set weight

To specify the Border Gateway Protocol (BGP) weight for the routing table, use the set weight command. To delete an entry, use the no form of this command.

set weight number

no set weight [ number ]

Syntax Description

number
Weight value. Range: 0 to 65535.

Command Default

The weight is not changed by the specified route map.

Command Modes

Route-map configuration mode

Command History

Release
Modification
5.0(3)N1(1)
This command was introduced.

Usage Guidelines

The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands.

Examples

This example shows how to set the BGP weight for the routes that match the autonomous system path access list to 200:

switch# configure terminal
switch(config)# route-map set-weight
switch(config-route-map)# match as-path 10
switch(config-route-map)# set weight 200
switch(config-route-map)#

Related Commands

Command
Description
match as-path
Matches a BGP autonomous system path access list.
route-map
Defines the conditions for redistributing routes from one routing protocol into another.
show ip community-list
Displays information about a community list.
show ip extcommunity-list
Displays information about an extended community list.
show ip prefix-list
Displays information about IPv4 prefix lists.
show route-map
Displays information about a route map.