Networking-Forums.com

Professional Discussions => Routing and Switching => Topic started by: wintermute000 on March 15, 2015, 07:53:09 PM

Title: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: wintermute000 on March 15, 2015, 07:53:09 PM
Does anyone know how to actively see your AS-path prepend or make it come up in show ip bgp nei advertised-routes?


I'm a bit confused by this behaviour as the above show command doesn't seem to show the prepending, despite being supposed to show what you send your neighbor AFTER policy is applied.


Not a problem per se but would be useful if you don't have management of the far end
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: srg on March 16, 2015, 12:49:34 AM
OTOH it can't be done in vanilla IOS. advertised-routes does not take in account changed parameters like next-hop, as-path etc. There's also no way at all to see advertised communities per prefix.

This is all fixed in IOS XR.
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: wintermute000 on March 16, 2015, 01:08:38 AM
Cool good to know thanks
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: srg on March 16, 2015, 02:59:37 AM
RP/0/RSP0/CPU0:XR1#sh bgp ipv4 unicast advertised
192.168.0.0/22 is advertised to 4.4.4.4
  Path info:
    neighbor: Local           neighbor router id: 4.4.4.4
    valid  redistributed  best  import-candidate
Received Path ID 0, Local Path ID 1, version 1862381
  Attributes after inbound policy was applied:
    next hop: 1.2.3.4
    MET ORG AS COMM
    origin: IGP  metric: 0
    aspath:
    community: 65000:123 65534:1337
  Attributes after outbound policy was applied:
    next hop: 4.3.2.1
    MET ORG AS COMM
    origin: IGP  metric: 0
    aspath:
    community: 65000:123


Quite good improvement from vanilla :)
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: LynK on March 18, 2015, 10:08:33 AM
Quote from: srg on March 16, 2015, 02:59:37 AM
RP/0/RSP0/CPU0:XR1#sh bgp ipv4 unicast advertised
192.168.0.0/22 is advertised to 4.4.4.4
  Path info:
    neighbor: Local           neighbor router id: 4.4.4.4
    valid  redistributed  best  import-candidate
Received Path ID 0, Local Path ID 1, version 1862381
  Attributes after inbound policy was applied:
    next hop: 1.2.3.4
    MET ORG AS COMM
    origin: IGP  metric: 0
    aspath:
    community: 65000:123 65534:1337
  Attributes after outbound policy was applied:
    next hop: 4.3.2.1
    MET ORG AS COMM
    origin: IGP  metric: 0
    aspath:
    community: 65000:123


Quite good improvement from vanilla :)


:wub: :wub: :wub:
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: NetworkGroover on March 18, 2015, 12:07:32 PM
That's pretty cool.
Title: Re: show ip bgp nei xyz advertised-routes and AS-path prepending
Post by: wintermute000 on March 18, 2015, 05:25:39 PM
Jun OS does this already....
everything stupid/bad/lacking on IOS CLI it seems they thought of.... :p