host1(config-router)#
neighbor 10.72.4.2 remote-as 300
host1(config-router)#
neighbor 10.72.4.2 weight 500
Router LA sends traffic through router Boston in preference to router NY.
Using a Route Map
A route map instance is a set of conditions with an assigned number. The number
after the
permit
keyword designates an instance of a route map. For example,
instance 10 of route map 10 begins with the following:
host1(config)#
route-map 10 permit 10
In the following commands to configure router LA, instance 10 of route map 10
assigns a weight of 1000 to any routes from AS 100. Instance 20 assigns a weight
of 500 to routes from any other AS.
host1(config)#
router bgp 400
host1(config-router)#
neighbor 10.5.5.1 remote-as 100
host1(config-router)#
neighbor 10.5.5.1 route-map 10 in
host1(config-router)#
neighbor 10.72.4.2 remote-as 300
host1(config-router)#
neighbor 10.72.4.2 route-map 20 in
host1(config-router)#
exit
host1(config)#
route-map 10
host1(config-route-map)#
set weight 1000
host1(config-route-map)#
route-map 20
host1(config-route-map)#
set weight 500
See
JUNOSe IP Services Configuration Guide
for more information about using route
maps.
Using an AS-Path Access List
The following commands assign weights to routes filtered by AS-path access lists on
router LA:
host1(config)#
router bgp 400
host1(config-router)#
neighbor 10.5.5.1 remote-as 100
host1(config-router)#
neighbor 10.5.5.1 filter-list 1 weight 1000
host1(config-router)#
neighbor 10.72.4.2 remote-as 300
host1(config-router)#
neighbor 10.72.4.2 filter-list 2 weight 500
host1(config-router)#
exit
host1(config)#
ip as-path access-list 1 permit ^100_
host1(config)#
ip as-path access-list 2 permit ^300_
Access list 1 permits any route whose AS-path attribute begins with 100 (specified
by ^). This permits routes that pass through router Boston, whether they originate
in AS 100 (AS path = 100) or AS 200 (AS path = 100 200) or AS 300 (AS path =
100 200 300). Access list 2 permits any route whose AS-path attribute begins with
300. This permits routes that pass through router NY, whether they originate in AS
300 (AS path = 300) or AS 200 (AS path = 300 200) or AS 100 (AS path = 300 200
100).
Selecting the Best Path
■
113
Chapter 1: Configuring BGP Routing
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...