BGP Lab 12 BGP Local preference (CCNP Level)


Download Lab: GNS3


Image requirements:
 Cisco IOSv        (vios-adventerprisek9-m.vmdk.SPA.156-2.T)


Introduction:
Another attribute influencing outbound route selection, local preference, with this one you can tell your downstream router to which way send traffic, for example, consider this, in our topology ER1 can set local preference to the prefix of AS101 to 500 then all downstream routers in the iBGP will choose ER1 to sent traffic to AS101 because default local preference of ER2 is 100, even ER2 itself now will route packets to AS101 via ER1 due to the local preference difference.


Lab tasks:

Policy: All internal routers in the AS250 have to access networks of AS101 exclusively via edge router ER1, while router ER2 will serve as the gateway for all other destinations. To accomplish this, the network team has a BGP local preference as a tool to implement the policy.

1. Configure router ER1 to set local preference for 50.0.0.0/20 of 500, the rest of the routes should stay with the default parameters.

2.  Configure router ER2 to keep the default local preference for 50.0.0.0/20 network but for the rest of the bgp table entries set local preference to 600.


Configuration example:
!
ER1(config)# ip prefix-list AS101_PREFIX permit 50.0.0.0/20
!
ER1(config)# route-map SET_LC_PREF permit 10
ER1(config-route-map)# match ip address prefix-list AS101_PREFIX
ER1(config-route-map)# set local-preference 500
ER1(config-route-map)# exit
!
ER1(config)# router bgp 250
ER1(config-router)#neighbor 50.0.0.100 route-map SET_LC_PREF in
ER1(config-router)# exit
!
ER1# clear ip bgp 50.0.0.100 soft in


Topology:




Comments

Popular Posts