3

I am setting the BGP MED value on some out bound routing advertisements but I can't find anyway to check the MED on my advertised routes on Cisco IOS XR, to verify my configuration is correct (in this particular case the routes are sent to an eBGP peer, I am not able to see or ask how they are receiving the routes):

prefix-set MED-0
 1.1.1.1/30,
 1.1.2.1/29
end-set

prefix-set MED-1000
 2.2.2.1/29 le 32,
 2.2.2.2/29 le 32
end-set

route-policy MED-OUT
  if destination in MED-1000 then
    set med 1000
    pass
  elseif destination in MED-0 then
    pass
  else
    drop
  endif
end-policy

router bgp 12345
 vrf A-VRF
 rd 12345:55555

 address-family ipv4 unicast

 neighbor 5.5.5.5
   remote-as 55555
   description External AS Peer
   address-family ipv4 unicast
    route-policy MY-IN-POLICY in
    route-policy MED-OUT out

This is the output I have which is not telling me the MEDs:

RP/0/RSP0/CPU0:router1#show bgp vrf A-VRF neighbor 5.5.5.5 advertised-routes
Wed Nov 12 22:59:38.982 UTC
Network            Next Hop        From            AS Path
Route Distinguisher: 12345:55555 (default for vrf A-VRF)
1.1.1.1/30         5.5.5.6         10.0.0.5        i
1.1.2.1/29         5.5.5.6         10.0.0.5        i
2.2.2.1/30         5.5.5.6         10.0.0.5        i
2.2.2.2/29         5.5.5.6         10.0.0.5        i

1 Answer 1

4

Unfortunately on IOS the show advertised command has always showed the attributes of the route pre policy. It will drop routes that were denied but the attributes are the original ones. Instead I recommend setting up a bgp session to another one of your devices, turning on soft reconfig inbound and denying all routes. This will let you look at the attributes of the sent routes. You could also try a debug, but that might be a lot to go through.

2
  • That is what I have since found out since posting this question. I can't find any Cisco doc's that give it in writing but many people have said this to me, that the route-map are apply changs that happen on outbound updates not stuff sitting in the BGP RIB so you can't really see it. Makes sense.
    – Baldrick
    Nov 19, 2014 at 18:52
  • That is correct, IOS only creates the outbound update on the fly. It doesn't make sense to keep it in memory considering the router could be holding full Internet routes and could be peering with many peers. It would take up too much RAM.
    – user27899
    Jul 26, 2018 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.