cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1278
Views
5
Helpful
8
Replies

BGP not advertising MED on a null route

lewisd
Level 1
Level 1

I'm unable to get the below config working as expected.

 

I would expect the route-map applied would set my route advertisements to have a MED/metric value of 100. Am I missing something obvious here?

 

router bgp 65020
 bgp log-neighbor-changes
 neighbor 169.254.254.2 remote-as 1111
 !
 address-family ipv4
  network 172.28.0.0
  neighbor 169.254.254.2 activate
  neighbor 169.254.254.2 soft-reconfiguration inbound
  neighbor 169.254.254.2 prefix-list ACCEPT_ROUTES in
  neighbor 169.254.254.2 prefix-list ADVERTISE_ROUTES out
  neighbor 169.254.254.2 route-map SET_MED_OUT out
 exit-address-family
!
ip route 172.28.0.0 255.255.0.0 Null0
!
ip prefix-list ACCEPT_ROUTES seq 5 permit 172.100.0.0/16
!
ip prefix-list ADVERTISE_ROUTES seq 5 permit 172.28.0.0/16
!
route-map SET_MED_OUT permit 5
 set metric 100

router#show ip route | i 172.28.0.0
      172.28.0.0/16 is variably subnetted, 5 subnets, 3 masks
S        172.28.0.0/16 is directly connected, Null0

router#show ip bgp neigh 169.254.254.2 advertised-routes
     Network          Next Hop            Metric LocPrf Weight Path
 *>   172.28.0.0       0.0.0.0                  0         32768 i 

 

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Lewisd,

 

check on the other router, because there is a chance that the show ip bgp neigh x.x.x.x advertised-routes show the routes but with the attributed of the local RIB, that is BEFORE applying the outbound policy.

I think my guess is correct because:

the BGP next-hop is 0.0.0.0 and the weight is 32768 this means locally generated route.

The BGP next-hop to an eBGP peer is changed to the local source of the eBGP session something like 169.254.254.1 I suppose on your site.

If this is a lab you can easily access the other router, if it is a real world configuration ask to the ISP people to check the received routes from your router.

 

Hope to help

Giuseppe

 

 

View solution in original post

8 Replies 8

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Lewisd,

 

check on the other router, because there is a chance that the show ip bgp neigh x.x.x.x advertised-routes show the routes but with the attributed of the local RIB, that is BEFORE applying the outbound policy.

I think my guess is correct because:

the BGP next-hop is 0.0.0.0 and the weight is 32768 this means locally generated route.

The BGP next-hop to an eBGP peer is changed to the local source of the eBGP session something like 169.254.254.1 I suppose on your site.

If this is a lab you can easily access the other router, if it is a real world configuration ask to the ISP people to check the received routes from your router.

 

Hope to help

Giuseppe

 

 

I don't have access to the neighbor.

 

Is there a command to show advertised routes after things like route-map/prefix-lists etc are applied?

Hello Lewisd,

your configuration looks like correct.

There is no show command to see the effective eBGP update, however there are two options:

 

a) use of appropriate debug commands the command you need

debug ip bgp updates out

+ command

term mon

Be careful with debug because it adds load to the cpu have a second session to the device without the term mon command and be ready to type undebug all

 

b) in some modern platforms there is an embedded packet capture capability so you could capture the traffic exiting to the eBGP peer and have it or saved in a file that you can retrieve or you can have a PC with wireshark protocol analyzer connected to a free interface on the router-

In both cases you need to shutdown the neighbor in BGP with neigh x.x.x.x shut in order to have the eBGP session to restart and the BGP update to be sent.

see RITE

 

Hope to help

Giuseppe

 

Hello,
for the RITE feature see for example the following:
http://formatsix.blogspot.it/2013/05/cisco-rite-configuration-when-span-wont.html

Hope to help
Giuseppe

It looks like you are right, advertised-routes must be before route-map etc is applied.

I've configured both of my routers to send different MED values to my neighbor and failover is working as expected. The neighbor must be receiving the MED values even though advertised-routes is not displaying them.

Richard Burts
Hall of Fame
Hall of Fame

Can you get us from the neighbor the output of show ip bgp so we can see what the neighbor received?

 

HTH

 

Rick

HTH

Rick

Hi Rick
I don't have access to the neighbor router.

Can you clear the BGP neighbor relationship and do the show advertised route after the neighbor relationship is re-established.

 

HTH

 

Rick

HTH

Rick
Review Cisco Networking for a $25 gift card