cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
6831
Views
11
Helpful
3
Replies

Route maps - match interface clause

bapatsubodh
Level 1
Level 1

Hi,

In route maps match interface clause what is the process flow to match the packets for this clause.

route-map PBR permit 10

match ip address LAN_1

match interface serial0

set next-hop  IP A.B.C.D ( serial 1 )

If this route map is applied on the interface for policy based routing.

Which packets will be matched

1. Those match access-list LAN_1

AND

2. check "show ip route" command and those packets are destined for serial 0

Then set the next hop as per the set command in this case serial 1.

Next, if we have the route-map related to the earlier map.

route-map NAT permit 10

match ip address LAN_1

match interface serial1

IF we are using the this route-map in NAT statement then which packets will match : Those match the access-list AND the those would be forwared out to serial 1. This is after the policy based routing is done and packets are decided  to be forwared out to serial 1.   At this time will the router check the show ip route comand an see which packets are to be forwared to serial 1? If this case there will not be any match as with normal routing process those will match serial 0. ( as in route-map PBR)

Please share the experinece.

Thanks in advance.

Subodh

3 Replies 3

Latchum Naidu
VIP Alumni
VIP Alumni

Hi,

That route-map matches all traffic matched by LAN_1 and going out of interface serial 1.
And Yes, before forwarding any packet the router will check first the routing table and the do forwarding.


Please rate the helpfull posts.
Regards,
Naidu.

Hi Latchum Naidu,

Thanks for youe reply. In the piece of NAT route-map matching the interface serial 1 will be done before router decided to forward the packets to serial 1 or after making the policy based decision from route-map PBR to forward the packets to serial 1.

As the packets matched may be different and in effect if we are using the the second route-map in NAT statement it may NAT the in-correct packets.  Also matching may change if the serial 1 is down.

Please share the experence.

Thanks

Subodh

Hi Subodh,

      We need to know how router works. I'd explain things as follows:

In your case : Inside - To - Outside

1. PBR is done before NAT process.

2. Policy sends traffic to the interface/next-hop you configured.

    The following commands are fine.

!

route-map PBR permit 10

match ip address LAN_1

set next-hop  IP A.B.C.D ( serial 1 )

!

3. It's time for NAT process. It's a good idea to define a new route-map for NATing on each interface. Assuming that you have 2 interfaces.

3.1. We need to control packets to be NATed on the correct interface.

    The following commands are fine.

!

route-map NAT-Serial1 permit 10

match ip address LAN_1

match interface serail1

!

ip nat inside source route-map NAT-Serial1 interface serail1 overload.

!

3.2 What happens when we don't specify the interface for NAT in some case?

       If you do NAT just one interface, it shouldn't be a problem. It's gonna be a problem when doing NAT 2 interfaces. As long as you have NAT statements configured you may face a NAT problem which causes the router to NAT with the wrong interface or NAT with the interface which is down.

HTH,

Toshi

Review Cisco Networking for a $25 gift card