Set weight

To specify the BGP weight for the routing table, use the set weight command in route-map configuration mode. To delete an entry, use the no form of this command.

set weight weight no set weight weight

Syntax Description weight

Weight value. It can be an integer from 0 to 65535.

Defaults

The weight is not changed by the specified route map.

Command Modes Route-map configuration

Command History Release

Modification

10.0

This command was introduced.

Usage Guidelines

You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.

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. In other words, the weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.

Examples The following example sets the BGP weight for the routes matching the autonomous system path access list to 200:

route-map set-weight match as-path 10 set weight 200

I set weight

Related Commands Command Description

match as-path

Matches a BGP autonomous system path access list.

match community-list

Matches a BGP community.

match interface

Distributes routes that have their next hop out one of the

interfaces specified.

match ip address

Distributes any routes that have a destination network

number address permitted by a standard or extended access

list, or performs policy routing on packets.

match ip next-hop

Redistributes any routes that have a next-hop router address

passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and

access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match route-type

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the

specified tags.

route-map

Defines the conditions for redistributing routes from one

routing protocol to another, or enables policy routing.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value in a route map

configuration.

set community

Sets the BGP COMMUNITIES attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set origin

Sets the BGP origin code.

set tag

Sets the value of the destination routing protocol.

show ip bgp H

Continue reading here: Show ip bgp

Was this article helpful?

0 0