December 21, 2013

Lab 14: BGP MED 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
*  192.168.0.1/32   13.0.0.2                               0 300 400 i
*>                  10.0.0.2                               0 200 400 i

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

access-list 10 permit 192.168.0.1

route-map RM_MED permit 10
 match ip address 10
 set metric 3000

router bgp 300
 neighbor 13.0.0.1 route-map RM_MED out

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

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
*  192.168.0.1/32   10.0.0.2              3000             0 200 400 i
*>                  13.0.0.2                               0 200 400 i

# DOWNLOAD LAB 14 GNS3 FILE