Lab 8.8.8 Multi-Exit Discriminator Attribute (MED)

Objectives:

  • Configure the MED attribute to influence routing decisions in another AS.

Scenario:

In the graphic, AS 300 receives updates about network 4.0.0.0 from AS 100. Currently, Router A will access network 4.0.0.0 via 3.0.0.0. We want AS 300 to use the 2.0.0.0 network to access network 4.0.0.0. Unfortunately, you have no control over the router in AS 300. Use the MED attribute to "influence" the routing decisions of AS 300.

Notes: 

In some situations, Router A may choose to access network 4.0.0.0 via 2.0.0.0. If this is the case, when you reach step 7 in the lab, set the metric to 100 on Router B and 50 on Router C. Before starting the lab, verify the route taken by using a trace and/or examining the routing table.

Tasks:

  1. Cable the lab and address the interfaces as shown in the graphic. Use the default subnet mask for all addresses. The IP address on Router A E0 should be 170.10.0.1.
  2. Enable BGP routing on each router. The configurations should be as follows:

RouterC(config)#router bgp 100
RouterC(config-router)#no synchronization
RouterC(config-router)#neighbor 3.3.3.1 remote-as 300
RouterC(config-router)#neighbor 4.4.4.2 remote-as 100
RouterC(config-router)#network 4.0.0.0

RouterB(config)#router bgp 100
RouterB(config-router)#neighbor 4.4.4.1 remote-as 100
RouterB(config-router)#neighbor 2.2.2.1 remote-as 300
RouterB(config-router)#no synchronization
RouterB(config-router)#network 4.0.0.0

RouterA(config)#router bgp 300
RouterA(config-router)#network 170.10.0.0
RouterA(config-router)#neighbor 2.2.2.2 remote-as 100
RouterA(config-router)#neighbor 3.3.3.2 remote-as 100

  1. Verify that you can see network 4.0.0.0 in the routing table of each router. Use the show ip route and show ip bgp commands to do this.



  2. Issue the show ip bgp command on Router A. What is the current preferred route to network 4.0.0.0?

  1. List the different paths to network 4.0.0.0.

  1. How do you know which path is preferred?



  2. Our task is to influence the preferences of AS 300 by using the MED attribute from AS 100. Remember that we want AS 300 to use a route that we specify. We will start with Router B in AS 100. This is another situation where a route map will come in handy! Issue the following commands:

    RouterB(config)#route-map setmedout permit 10
    RouterB(config-route-map)#set metric 50
    ***Remember: The lower MED wins!***

    RouterB(config)#router bgp 100
    RouterB(config-router)#neighbor 2.2.2.1 route-map setmedout out

    Now we need to move over to Router C and configure the MED there. Issue the following commands:

    RouterC(config)#route-map setmedout permit 10
    RouterC(config-route-map)#set metric 100
    ***Note: This is a higher MED than Router B!***

    RouterC(config)#router bgp 100
    RouterC(config-router)#neighbor 3.3.3.1 route-map setmedout out

  1. Log into Router A. Issue the clear ip bgp * command and wait a few seconds before issuing the show ip bgp command. Has there been any change in the routing behavior or is 3.3.3.2 still the preferred route?

Why?