cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1194
Views
15
Helpful
4
Replies

XR route-policy match interface

seek_1992
Beginner
Beginner

Hi all

I wonder if IOS XR route-policy has match statement for interfaces like route-map in regular IOS.

 

route-map TEST permit 10

match interface loopback0

 

IOS XR:

route-policy TEST

 if interface LOOPBACK0

pass

 

I know that we can match based on the IP address, however, I want to match based on the interface in order to keep RPL integrity when the interface IP address has changed.

 

Regards

 Seek

1 Accepted Solution

Accepted Solutions

smilstea
Cisco Employee
Cisco Employee

What does match interface do? Match the next-hop or source or destination?

 

We do not have the ability to match interface in XR, you would need to match the next-hop, source, or destination IP address or subnet.

 

Sam

View solution in original post

4 Replies 4

smilstea
Cisco Employee
Cisco Employee

What does match interface do? Match the next-hop or source or destination?

 

We do not have the ability to match interface in XR, you would need to match the next-hop, source, or destination IP address or subnet.

 

Sam

Elvin Arias
Beginner
Beginner
I would say that doing matching based on the interface is only useful with NAT applications using route-maps, for routing-based policies, is better to be explicit by using references of prefix-lists, for example.

The Route Policy Language (RPL) in IOS-XR doesn't allow this, and you must always use other type of references. This doc can help as an intro to RPL, https://community.cisco.com/t5/service-providers-documents/asr9000-xr-understanding-and-using-rpl-route-policy-language/ta-p/3117050.

HTH,

Elvin

Hi All -

 

Exactly for the scenario mentioned by @Elvin Arias, I need to enable NAT from multiple "inside" interfaces to multiple "outside" interfaces on IOS-XR/ASR9K.  With IOS/ASR1K I use "match interface" within route-maps applied to the NAT statements to successfully achieve this. 

 

Does anyone happen to know the IOS-XR equivalent to this IOS example?

 

route-map NAT_TEN0/0/0_MAP permit 10
 match ip address NAT_ACL
 match interface TenGigabitEthernet0/0/0
!
route-map NAT_TEN0/0/1_MAP permit 10
 match ip address NAT_ACL
 match interface TenGigabitEthernet0/0/1
!
ip nat inside source route-map NAT_TEN0/0/0_MAP pool POOL_TEN0/0/0 overload
ip nat inside source route-map NAT_TEN0/0/1_MAP pool POOL_TEN0/0/1 overload
!

int te0/0/0

 ip nat outside

!

int te0/0/1

 ip nat outside

!

int te0/1/0

 ip nat inside

 

I tried to lab this in ViRL / Cisco Modeling Labs, but XRv does not seem to support NAT, presumably due to the lack of ISM/VSM module.  Although I'd love for someone to tell me I'm wrong here!

 

Thanks,

Mark Walters

 

 

 

Hi Mark,

 

on the ASR9k we will need a VSM/ISM card to process the nat translations it will not work without it.

 

on the newer line cards there is a feature called map-t that can be used if you have the 3rd generation tomahawk or higher

https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-2/cg-nat/configuration/guide/b-cgnat-cg-asr9000-62x/b-cgnat-cg-asr9000-62x_chapter_0101.html

 

 

thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers