Assigning a Weight to a Route
You can assign a weight to a route when more than one route exists to the same
destination. A weight indicates a preference for that particular route over the other
routes to that destination. The higher the assigned weight, the more preferred the
route. By default, the route weight is 32768 for paths originated by the router, and
0 for other paths.
In the configuration shown in Figure 31 on page 112, routers Boston and NY both
learn about network 192.68.5.0/24 from AS 200. Routers Boston and NY both
propagate the route to router LA. Router LA now has two routes for reaching
192.68.5.0/24 and must decide the appropriate route. If you prefer that router LA
direct traffic through router Boston, you can configure router LA so that the weight
of routes coming from router Boston are higher—more preferred—than the routes
coming from router NY. Router LA subsequently prefers routes received from router
Boston and therefore uses router Boston as the next hop to reach network
192.68.5.0/24.
Figure 31: Assigning a Weight to a Neighbor Connection
You can use any of the following three ways to set the weights in routes coming in
from router Boston:
■
The
neighbor weight
command
■
The
set weight
command in route maps
■
An AS-path access list
Using the neighbor weight Command
The following commands assign a weight of 1000 to all routes router LA receives
from AS 100 and assign a weight of 500 to all routes router LA receives from AS 300:
host1(config)#
router bgp 400
host1(config-router)#
neighbor 10.5.5.1 remote-as 100
host1(config-router)#
neighbor 10.5.5.1 weight 1000
112
■
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...