host2(config-router)#
neighbor 10.6.6.1 remote-as 4
host2(config-router)#
neighbor 10.6.6.1 route-map 10 out
host2(config-router)#
network 192.168.33.0 mask 255.255.255.0
host2(config-router)#
exit
host2(config)#
route-map 10 permit 10
host2(config-route-map)#
set metric 50
The following commands configure router Nice:
host3(config)#
router bgp 73
host3(config-router)#
neighbor 10.3.3.1 remote-as 303
host3(config-router)#
neighbor 10.3.3.1 route-map 10 out
host3(config-router)#
neighbor 10.2.25.2 remote-as 73
host3(config-router)#
network 172.19.0.0
host3(config-router)#
exit
host3(config)#
route-map 10 permit 10
host3(config-route-map)#
set metric 100
The following commands configure router Dublin:
host4(config)#
router bgp 4
host4(config-router)#
neighbor 10.5.5.1 remote-as 303
host4(config-router)#
neighbor 10.5.5.1 route-map 10 out
host4(config-router)#
neighbor 10.6.6.2 remote-as 73
host4(config-router)#
network 172.14.27.0 mask 255.255.255.0
host4(config-router)#
exit
host4(config)#
route-map 10 permit 10
host4(config-route-map)#
set metric 25
Router London receives updates regarding route 192.168.33.0/24 from both router Nice
and router Paris. Router London compares the MED values received from the two routers:
Router Nice advertises a MED of 100 for the route, whereas router Paris advertises a MED
of 50. On this basis, router London prefers the path through router Paris.
Because BGP by default compares only MED attributes of routes coming from the same
AS, router London can compare only the MED attributes for route 192.168.33.0/24 that
it received from routers Paris and Nice. It cannot compare the MED received from router
Dublin, because router Dublin is in a different AS than routers Paris and Nice.
However, you can use the
bgp always-compare-med
command to configure router
London to take into account the MED attribute from router Dublin as follows:
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
host1(config-router)#
bgp always-compare-med
Router Dublin advertises a MED of 25 for route 192.168.33.0/24, which is lower—more
preferred—than the MED advertised by router Paris or router Nice. However, the AS path
for the route through router Dublin is longer than that through router Paris. The AS path
is the same length for router Paris and router Nice, but the MED advertised by router Paris
is lower than that advertised by router Nice. Consequently, router London prefers the
path through router Paris.
Copyright © 2010, Juniper Networks, Inc.
120
JunosE 11.2.x BGP and MPLS Configuration Guide
Содержание 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...