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:
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.
Enable BGP routing on each router. The configurations should be
as follows:
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.
Issue the show ip bgp
command on Router A. What is the current preferred route to network
4.0.0.0?
List the different paths to network
4.0.0.0.
How do you know which path is
preferred?
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
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?