3.7.d Implement optimize and troubleshoot routing policies

3.7.d [i] Attribute manipulation

weight

bgp_path_manipulation_topo

download addressed topology below:

down arrow smaller

bgp_path_manipulation

bgp path manipulation to 4 net

r2 wins the path contest for the 4 network by virtue of being the older next hop in the table since all else is equal. we can fix that by clearing r2’s table.

now r3’s path is older:

bgp_r3_wins

clear r3 and give it back to r2.

we want to weight r3 so that it controls the path to the 4 network. higher is better but weight is only locally significant and cisco proprietary.

method 1:

bgp neighbor weight

that’s the easy yet clumsy method because we have also weighted all it’s other paths.

get rid of the weight statement under router bgp 100.

bgp back to r2

now we’ll use a route map and acl to single out the 4 network and set the weight:

R1#sh access-list 1
Standard IP access list 1
    10 permit 4.4.4.4 (2 matches)

route-map WEIGHT permit 10
 match ip address 1
 set weight 500

then add it to bgp:

R1#sh run | b bgp
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 192.168.12.0
network 192.168.13.0
neighbor 192.168.12.2 remote-as 200
neighbor 192.168.13.3 remote-as 300
neighbor 192.168.13.3 route-map WEIGHT in
no auto-summary

bgp sh ip bgp 4.4.4.4