cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1419
Views
10
Helpful
8
Replies

Route-map

Roel Reyes
Level 1
Level 1

Hi, 

 

i have this config and output: 

 

router bgp 1111
bgp log-neighbor-changes
neighbor 172.30.0.10 remote-as 700
neighbor 172.30.0.10 soft-reconfiguration inbound
neighbor 172.30.0.10 route-map local-pref in
neighbor 172.30.0.10 filter-list 1 out
neighbor 192.168.1.5 remote-as 1111
neighbor 192.168.1.5 next-hop-self
!
ip forward-protocol nd
!
ip as-path access-list 1 permit ^$
ip as-path access-list 2 permit .*
!
ip prefix-list 20.20.20.0/24-route seq 5 permit 20.20.20.0/24
!
route-map local-pref permit 10
match ip address prefix-list 20.20.20.0/24-route
set local-preference 150
!
route-map local-pref permit 20
!
test1.PNG

 

But if i removed this line: route-map local-pref permit 20 

2.2.2.0/24 is gone

 

router bgp 1111
bgp log-neighbor-changes
neighbor 172.30.0.10 remote-as 700
neighbor 172.30.0.10 soft-reconfiguration inbound
neighbor 172.30.0.10 route-map local-pref in
neighbor 172.30.0.10 filter-list 1 out
neighbor 192.168.1.5 remote-as 1111
neighbor 192.168.1.5 next-hop-self
!
ip forward-protocol nd
!
ip as-path access-list 1 permit ^$
ip as-path access-list 2 permit .*
!
ip prefix-list 20.20.20.0/24-route seq 5 permit 20.20.20.0/24
!
ip prefix-list prepend-0.0.0.0/0 seq 5 permit 0.0.0.0/0 le 32
!
ip prefix-list prepend-20.20.20.0/24 seq 5 permit 20.20.20.0/24
!
route-map local-pref permit 10
match ip address prefix-list 20.20.20.0/24-route
set local-preference 150
!

test1.PNG

 

as far as i know, 2.2.2.0/24 should be gone with the first statement as it will be denied due to implicit deny. i dont know why it is still accepted and received.

1 Accepted Solution

Accepted Solutions

Hello,

 

have a look at the two links below which I think explain the concept well. In your case, the important part is:

 

" If a route-map entry does not explicitly specify any matching conditions, then it always matches."

 

http://docs.frrouting.org/en/latest/routemap.html

 

https://www.examcollection.com/certification-training/ccnp-concept-of-route-maps.html

View solution in original post

8 Replies 8

Hello,

 

that is expected behavior:

 

route-map local-pref permit 10
match ip address prefix-list 20.20.20.0/24-route
set local-preference 150

 

--> the first part sets the local preference for the specified prefix list to 150

route-map local-pref permit 20

 

--> the second part allows everything else that doesn't match the prefix list, with the default values

Hi,

but the ip prefix list has implicit deny? so when non - 20.20.20.0/24 route comes in it will be denied? a denied route or packet will proceed to seq 20?

ip prefix-list 20.20.20.0/24-route seq 5 permit 20.20.20.0/24

Hello,

 

the implicit deny is only for setting the local preference. With your second line (route-map local-pref permit 20) you allow everything else, with the default values...

Hi,

I thought implicit deny on route map will let packet untouched, then why removing the seq 20 will let 2.2.2.0/24 get filtered? 2.2.2.0/24 should remain to default local pref since it will not matched the route map on the first seq

Hello Roel,

 

the implicit deny filters all routes not specified, if you want to allow everything else with the default values, you need the second line. That is just how a route map works...

Hi,


thanks for the clarification, do you have any good resource about
route-map? tried to search cisco route map but cannot find very specific
definitions.

Hello,

 

have a look at the two links below which I think explain the concept well. In your case, the important part is:

 

" If a route-map entry does not explicitly specify any matching conditions, then it always matches."

 

http://docs.frrouting.org/en/latest/routemap.html

 

https://www.examcollection.com/certification-training/ccnp-concept-of-route-maps.html

Hi ,first of all you use first line just for setting local preference not anything else and second line is empty that means everything else allowed , second i think this is because you use permit in your route-map if i remember right in logical process when you use deny in route-map command the match parameters will completely denied . look at the logic process of route map in image

route-map.png

 

 

 

Review Cisco Networking products for a $25 gift card