3.7.d Implement, optimize and troubleshoot routing policies

3.7.d [i] Attribute manipulation

the tasks are on the diagram:

screenshot

download this:

down arrow smaller

bgp_as_path

before AS-PATH manipulation:

bgp_as-path_shows01

note the ttl from ebgp multi-hop set for 2

AS-11#sh run | i multi
neighbor 22.22.22.22 ebgp-multihop 2
neighbor 55.55.55.55 ebgp-multihop 2
AS-11#

bgp_wireshark_ttl_ebgp-multi

go to this link to analyze the cap yourself:

down arrow smaller

https://www.cloudshark.org/captures/c8eb006afb36

and this is the disable-connected:

https://www.cloudshark.org/captures/15a5b0847502

the next task is to change the path to 33.33.33.0 to use AS-55 using the AS-PATH attribute from AS-22:

AS-22(config-router)#neigh 11.11.11.11 route-map AS-PATH out
AS-22(config-router)#route-map AS-PATH permit 10
AS-22(config-route-map)#set as-path prepend 22 22 22 22 22
AS-22(config-route-map)#match ip add 33.33.33.0 0.0.0.255
AS-22(config-route-map)#route-map AS-PATH permit 20
AS-22(config-route-map)#access-list 1 permit 33.33.33.0 0.0.0.255
AS-22(config)#router bgp 22
AS-22(config-router)#neigh 11.11.11.11 route-map AS-PATH out
AS-22(config-router)#

bgp_as-path-prepend-result

below is an excellent tutorial from cisco.com:

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3se/3850/irg-xe-3se-3850-book/irg-prefix-filter.html#topichead2

AS-33 will be set up in similar fashion; AS-11 will be slightly different.

i think the concept of inbound and outbound concerning these manipulations gives people headaches. i know it did me. and i also think it’s not explained very well.  try to think of it from the perspective of the advertising router. for instance, AS-11 will receive the 33 route directly from two sources, AS-22 and AS-55 (and indirectly from AS-33, the originator). however, from AS-22’s perspective it is receiving the route in from AS-33, and then advertising the route out, or toward AS-11. conversely, if we want to manipulate the route at AS-11, then the route will be incoming to AS-11 but the policy will be toward neighbor AS-22.

as in:

bgp_as-path-in

as with access-lists if desired, DO NOT FORGET the route-map permit at the end. that’ll bite you in the ass…