host1(config)#
router bgp 293
host1(config-router)#
network 192.168.5.0 mask 255.255.255.0
host1(config-router)#
neighbor 10.2.2.4 remote-as 17
host1(config-router)#
neighbor 10.2.2.4 weight 150
host1(config-router)#
neighbor 10.5.5.2 remote-as 32
host1(config-router)#
neighbor 10.5.5.2 weight 50
Figure 25: Route Map Filtering
Routes learned from router Boston have a weight of 150, whereas those learned from
router NY have a weight of 50. Router Chicago therefore prefers all routes learned from
router Boston to those learned from router NY. Based on this configuration, router Chicago
prefers routes to prefixes originating in AS 837 or originating in AS 32 that pass through
router Boston over routes to those same prefixes that pass through router NY.
This is a longer path than you might desire. You can avoid this result by configuring a
route map to modify the weight of certain routes learned by router Chicago:
host1(config-router)#
neighbor 10.5.5.2 route-map alpha in
host1(config-router)#
exit
host1(config)#
route-map alpha permit 10
host1(config-route-map)#
match as-path dog1
host1(config-route-map)#
set weight 175
host1(config-route-map)#
exit
host1(config)#
ip as-path access-list dog1 permit _32$
host1(config)#
ip as-path access-list dog1 permit _837$
host1(config)#
route-map alpha permit 20
host1(config-route-map)#
match as-path dog2
host1(config-route-map)#
exit
host1(config)#
ip as-path access-list dog2 permit .*
BGP applies route map alpha to all routes learned from 10.5.5.2 (router NY). Instance 10
of route map alpha matches routes with access list dog1. This access list permits any
route whose AS-path attribute ends in 32 or 837—that is, routes that originate in AS 32
or AS 837. It sets their weight to 175, overriding the neighbor weight (50) set for updates
received from 10.5.5.2. Then, instance 20 of route map alpha permits all other routes
with no modification.
The result of this improved configuration is the following:
89
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...