Tuesday, October 11, 2016

use bgp local preference to influence outbound route selection

1- the route before apply, local preference


2- we will set local preference to 110 for subnet when it update subnet lists from router 3

below is the configuration running for R1

router bgp 1
 bgp router-id
 neighbor n3 peer-group
 neighbor n3 remote-as 3
 neighbor n3 soft-reconfiguration inbound
 neighbor n3 route-map RMAP-R3 in
 neighbor n5 peer-group
 neighbor n5 remote-as 5
 neighbor n5 soft-reconfiguration inbound
 neighbor peer-group n3
 neighbor peer-group n5
ip prefix-list MATCHALL seq 20 permit le 24
ip prefix-list SUBNET-OUT-R3 seq 20 permit

route-map RMAP-R3 permit 20
 match ip address prefix-list SUBNET-OUT-R3
 set local-preference 110
route-map RMAP-R3 permit 30
 match ip address prefix-list MATCHALL

3- after update the configuration issue the following command to make the changes take effect.

clear ip bgp soft in 

4- show we can use show command to see the changes

- snapshot of ip route

- snapshot of show ip bgp, and we can see the local preference that we have set

No comments:

Post a Comment