Configuring the MED Attribute
If two ASs connect to each other in more than one place, one link or path might be
a better choice to reach a particular prefix within or behind one of the ASs. The MED
value is a metric expressing a degree of preference for a particular path. Lower MED
values are preferred.
Whereas the Local Preference attribute is used only within an AS (to select an exit
point), the MED attribute is exchanged between ASs. A router in one AS sends the
MED to inform a router in another AS which path the second router should use to
reach particular destinations. If you are the administrator of the second AS, you must
therefore trust that the router in the first AS is providing information that is truly
beneficial to your AS.
You configure the MED on the sending router by using the
set metric
command in
an outbound route map. Unless configured otherwise, a receiving router compares
MED attributes only for paths from external neighbors that are members of the same
AS. If you want MED attributes from neighbors in different ASs to be compared, you
must issue the
bgp always-compare-med
command.
In Figure 35 on page 122, router London in AS 303 can reach 192.168.33.0/24 in AS
73 through router Paris or through router Nice to router Paris.
Figure 35: Configuring the MED
The following commands configure router London:
host1(config)#
router bgp 303
host1(config-router)#
neighbor 10.4.4.2 remote-as 73
host1(config-router)#
neighbor 10.3.3.2 remote-as 73
host1(config-router)#
neighbor 10.5.5.2 remote-as 4
host1(config-router)#
network 122.28.8.0 mask 255.255.248.0
The following commands configure router Paris:
host2(config)#
router bgp 73
122
■
Selecting the Best Path
JUNOSe 11.0.x BGP and MPLS Configuration Guide
Summary of Contents for JUNOSE
Page 6: ...vi...
Page 8: ...viii JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 24: ...xxiv Table of Contents JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 37: ...Part 1 Border Gateway Protocol Configuring BGP Routing on page 3 Border Gateway Protocol 1...
Page 38: ...2 Border Gateway Protocol JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 234: ...198 Monitoring BGP JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 236: ...200 Multiprotocol Layer Switching JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 298: ...262 Point to Multipoint LSPs Configuration JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 536: ...500 Monitoring BGP MPLS VPNs JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 538: ...502 Layer 2 Services Over MPLS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 604: ...568 Virtual Private LAN Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 618: ...582 VPLS References JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 674: ...638 Virtual Private Wire Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 718: ...682 Monitoring MPLS Forwarding Table for VPWS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 719: ...Part 6 Index Index on page 685 Index 683...
Page 720: ...684 Index JUNOSe 11 0 x BGP and MPLS Configuration Guide...