Weight Attribute – OSPF, BGP, and Route Manipulation
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 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 to a destination exist. Routes that are originated by the local router have a default weight of 32,768. The default weight for learned routes is 0.
You can use weight rather than local preference to influence the selected path to external BGP peers. The difference is that weight is configured locally and is not exchanged in BGP updates. On the other hand, the local preference attribute is exchanged between iBGP peers and is configured at the gateway router.
When the same destinations are advertised from both Router B and Router C, as shown in Figure 4-16, Router A prefers the routes from Router C over those from Router B because the routes received from Router C have a larger weight (600) locally assigned.

Figure 4-16 BGP Weight
Table 4-7 lists and describes the BGP attributes and their categories.
Table 4-7 BGP Attributes
BGP Attribute | Description | Category |
Origin | Indicates the source of the path information: IGP, EGP, or incomplete. | Well-known mandatory |
AS_Path | Lists the ASNs in the path to the destination. | Well-known mandatory |
Next hop | Specifies the IP address of the router as the next hop to the destination. | Well-known mandatory |
Local preference | Specifies the path to use to exit the AS. | Well-known discretionary |
MED | Tells an external BGP peer the preferred path into the AS. | Optional non-transitive |
Community | Groups routes and applies policies or decisions (accept, prefer) to those routes. (Not an attribute used in the routing-decision process.) | Optional transitive |
Atomic aggregate | Informs BGP peers that the local router used a less specific (aggregated) route to a destination instead of using a more specific route. | Well-known discretionary |
Weight | Specifies a preferred path if multiple paths exist out of a router for a destination. Assigned locally on a router. | Optional (Cisco specific) |