cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
423
Views
0
Helpful
3
Replies

Route maps

Hello all,

 

i am little bit confused regarding route-maps and the permit/deny statement on them.

 

more specific, i have created the below

 

ip prefix-list BACKUP_TRAFFIC seq 1 permit 10.254.252.0/24

ip prefix-list BACKUP_TRAFFIC seq 2 deny 192.168.0.0/16  

 

route-map BACKUP_TRAFFIC permit 1
     match ip address prefix-list BACKUP_TRAFFIC
     set ip next-hop 192.168.150.1

 

My question is: is it actually needed permit 1 after route-map BACKUP_TRAFFIC ?

I mean that the traffic will be handled according prefix lists, permit 10.xxx and deny 192.xxx . Correct?

 

If i had the below configuration, how the traffic would be handled?

 

route-map BACKUP_TRAFFIC deny 1
     match ip address prefix-list BACKUP_TRAFFIC
     set ip next-hop 192.168.150.1

 

 

Would be the same if i had the below ?

 

route-map BACKUP_TRAFFIC
     match ip address prefix-list BACKUP_TRAFFIC
     set ip next-hop 192.168.150.1

 

 

Thank you

3 Replies 3

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

Q: 

Would be the same if i had the below ?

 

route-map BACKUP_TRAFFIC 
     match ip address prefix-list BACKUP_TRAFFIC
     set ip next-hop 192.168.150.1

 

Ans: Each route map statement has a "permit" or "deny" action and a sequence number. This route map shows a permit action and a sequence number of 10. These settings are the defaults—that is, if no action or sequence number is specified when the route map is configured, the route map will default to a permit and a sequence number of 10.

 

Q2: i am little bit confused regarding route-maps and the permit/deny statement on them

 

Ans: if the route-map deny is the first statement, it will deny all traffic for access-list 1 whether the access-list has denied or permit statement, and it will then look for the second sequence number to match. If there is no other sequence number to match, and (implicit deny all) at the end of any route-map would kick in.

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hello,

 

now, with current configuration traffic 10.xxx will be permitted and traffic 192.xxx will not. right?

 

ip prefix-list BACKUP_TRAFFIC seq 1 permit 10.254.252.0/24

ip prefix-list BACKUP_TRAFFIC seq 2 deny 192.168.0.0/16

 

route-map BACKUP_TRAFFIC permit 1
match ip address prefix-list BACKUP_TRAFFIC
set ip next-hop 192.168.150.1

 

Am i asking because 192.168.0.0/16 is a supernet and in routing table i have different prefixes, /24,/27,/30 . Theory says that prefix lists will match the exact prefix .correct?

Hi, 

as your question:

ip prefix-list BACKUP_TRAFFIC seq 2 deny 192.168.0.0/16

 

I think best is for you 192.168.0.0/3 ge 24 le 24

for more reference.

https://ccie20728.wordpress.com/2008/05/19/matching-address-classes-with-prefix-lists/

 

Q: now, with current configuration traffic 10.xxx will be permitted and traffic 192.xxx will not. right?

Ans: Yes you are right.

 

Regards,

Deepak Kumar

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!
Review Cisco Networking for a $25 gift card