Weight

Weight is assigned locally on a router to specify a preferred path if multiple paths exist out of a router for a destination. Weights can be applied to individual routes or to all routes that are received from a peer. Weight is specific to Cisco routers and is not propagated to other routers. The weight value ranges from 0 to 65,535. Routes with a higher weight are preferred when multiple routes exist to a destination. Routes that are originated by the local router have a default weight of 32,768.

Weight can be used instead of local preference to influence the selected path to external BGP peers. The difference is that weight is configured locally and not exchanged in BGP updates. However, the local preference attribute is exchanged between iBGP peers and configured at the gateway router.

Figure 9-8 shows an example of the use of weight to influence the preferred route.

Figure 9-8 BGP Weight

When the same destinations are advertised from both Router B and Router C in Figure 9-8, Router A prefers the routes from Router C over Router B because the routes received from Router C have a larger weight (600).

The configuration for Router A is shown in Example 9-13.

Example 9-13 Configuration of Weight

router bgp 500

neighbor 4.1.1

1

remote

as 100

neighbor 4.1.1

1

weight

400

neighbor 5.1.1

1

remote

as 200

neighbor 5.1.1

1

weight

600

Was this article helpful?

0 0

Post a comment