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 119, 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
host2(config-router)#
neighbor 10.4.4.1 remote-as 303
host2(config-router)#
neighbor 10.4.4.1 route-map 10 out
host2(config-router)#
neighbor 10.2.25.1 remote-as 73
119
Copyright © 2010, Juniper Networks, Inc.
Chapter 1: Configuring BGP Routing
Содержание JUNOSE 11.2.X BGP AND MPLS
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 38: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 192: ...Copyright 2010 Juniper Networks Inc 156 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 242: ...Copyright 2010 Juniper Networks Inc 206 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 244: ...Copyright 2010 Juniper Networks Inc 208 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 310: ...Copyright 2010 Juniper Networks Inc 274 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 356: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 418: ...Copyright 2010 Juniper Networks Inc 382 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 524: ...Copyright 2010 Juniper Networks Inc 488 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 544: ...Copyright 2010 Juniper Networks Inc 508 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 608: ...Copyright 2010 Juniper Networks Inc 572 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 672: ...Copyright 2010 Juniper Networks Inc 636 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 674: ...Copyright 2010 Juniper Networks Inc 638 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 716: ...Copyright 2010 Juniper Networks Inc 680 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 717: ...PART 6 Index Index on page 683 681 Copyright 2010 Juniper Networks Inc...
Страница 718: ...Copyright 2010 Juniper Networks Inc 682 JunosE 11 2 x BGP and MPLS Configuration Guide...