December 21, 2013

Lab 15: BGP Local-Preference Modification

Configure BGP on all routers. After the configuration, R1's BGP routing table will be like this:

R1#show ip bgp
BGP table version is 2, local router ID is 13.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i192.168.0.1/32   10.0.0.2                 0    100      0 i
* i                 13.0.0.2                 0    100      0 i

As you see, 10.0.0.2 (R2) is the next-hop for 192.168.0.1. Let's modify local-preference on R3:

access-list 10 permit 192.168.0.1

route-map RM_LOCAL_PREF permit 10
 match ip address 10
 set local-preference 300

router bgp 100
 neighbor 13.0.0.1 route-map RM_LOCAL_PREF out

As a result, 13.0.0.2 (R3) becomes the next-hop for 192.168.0.1 because the local-preference for R3 (300) is higher than R2:

R1#show ip bgp
BGP table version is 3, local router ID is 13.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i192.168.0.1/32   10.0.0.2                 0    100      0 i
*>i                 13.0.0.2                 0    300      0 i

# DOWNLOAD LAB 15 GNS3 FILE