cc/td/doc/product/software/ios121/121cgcr/ip_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

BGP Commands

BGP Commands

Use the commands in this chapter to configure and monitor Border Gateway Protocol (BGP). For BGP configuration information and examples, refer to the "Configuring BGP" chapter of the IP and IP Routing Configuration Guide.

aggregate-address

To create an aggregate entry in a BGP routing table, use the aggregate-address router configuration command. To disable this function, use the no form of this command.

aggregate-address address mask [as-set] [summary-only] [suppress-map map-name][advertise-map map-name] [attribute-map map-name]

no aggregate-address address mask [as-set] [summary-only] [suppress-map map-name][advertise-map map-name] [attribute-map map-name]

Syntax Description

address

Aggregate address.

mask

Aggregate mask.

as-set

(Optional) Generates autonomous system set path information.

summary-only

(Optional) Filters all more specific routes from updates.

suppress-map map-name

(Optional) Name of route map used to select the routes to be suppressed.

advertise-map map-name

(Optional) Name of route map used to select the routes to create AS-SET origin communities.

attribute-map map-name

(Optional) Name of route map used to set the attribute of the aggregate route.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

You can implement aggregate routing in BGP either by redistributing an aggregate route into BGP or by using this conditional aggregate routing feature.

Using the aggregate-address command with no arguments will create an aggregate entry in the BGP routing table if there are any more-specific BGP routes available that fall in the specified range. The aggregate route will be advertised as coming from your autonomous system and has the atomic aggregate attribute set to show that information might be missing. (By default, the atomic aggregate attribute is set unless you specify the as-set keyword.)

Using the as-set keyword creates an aggregate entry using the same rules that the command follows without this keyword, but the path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized. Do not use this form of aggregate-address when aggregating many paths, because this route must be continually withdrawn and re-updated as autonomous system path reachability information for the summarized routes changes.

Using the summary-only keyword not only creates the aggregate route (for example, 193.*.*.*) but will also suppress advertisements of more-specific routes to all neighbors. If you only want to suppress advertisements to certain neighbors, you may use the neighbor distribute-list command, with caution. If a more specific route leaks out, all BGP speakers will prefer that route over the less-specific aggregate you are generating (using longest-match routing).

Using the suppress-map keyword creates the aggregate route but suppresses advertisement of specified routes. You can use the match clauses of route maps to selectively suppress some more specific routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported.

Examples

The following example creates an aggregate address. The path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized.

router bgp 5
 aggregate-address 193.0.0.0 255.0.0.0 as-set

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match ip address

Distributes any routers that have a destination network number address that is permitted by a standard or extended access list.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

auto-summary (BGP)

To restore the default behavior of automatic summarization of subnet routes into network-level routes, use the auto-summary router configuration command. To disable this feature and send subprefix routing information across classful network boundaries, use the no form of this command.

auto-summary

no auto-summary

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled (the software summarizes subprefixes to the classful network boundary when crossing classful network boundaries).

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Route summarization reduces the amount of routing information in the routing tables.

By default, BGP does not accept subnets redistributed from Interior Gateway Protocol (IGP). To advertise and carry subnet routes in BGP, use an explicit network command or the no auto-summary command. If you disable auto-summarization and have not entered a network command, you will not advertise network routes for networks with subnet routes unless they contain a summary route.

In the following example, network numbers are not summarized automatically:

router bgp 6
 no auto-summary

bgp always-compare-med

To allow the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp always-compare-med router configuration command. To disallow the comparison, use the no form of this command.

bgp always-compare-med

no bgp always-compare-med

Syntax Description

This command has no arguments or keywords.

Defaults

The Cisco IOS software does not compare MEDs for paths from neighbors in different autonomous systems.

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

The MED is one of the parameters that is considered when selecting the best path among many alternative paths. The path with a lower MED is preferred over a path with a higher MED.

By default, during the best-path selection process, MED comparison is done only among paths from the same autonomous system. This command changes the default behavior by allowing comparison of MEDs among paths regardless of the autonomous system from which the paths are received.

Examples

The following example configures the BGP speaker in autonomous system 100 to compare MEDs among alternative paths, regardless of the autonomous system from which the paths are received:

router bgp 109
 bgp always-compare-med

bgp bestpath as-path ignore

To prevent the router from considering as-path as a factor in the algorithm for choosing a route, use the bgp bestpath as-path ignore router configuration command. To allow the router to consider as-path in choosing a route, use the no form of this command.

bgp bestpath as-path ignore

no bgp bestpath as-path ignore

Syntax Description

This command has no arguments or keywords.

Defaults

The router considers as-path in choosing a route.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Examples

The following example prevents the BGP router from considering as-path as a factor in choosing a route.

router bgp 210 
 bgp bestpath as-path ignore

Related Commands
Command Description

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

bgp bestpath med-confed

To enable MED comparison among paths learned from confederation peers, use the bgp bestpath med-confed router configuration command. To prevent the software from considering the MED attribute in comparing paths, use the no form of this command.

bgp bestpath med-confed

no bgp bestpath med-confed

Syntax Description

This command has no arguments or keywords.

Defaults

The software does not consider the MED attribute when choosing among paths learned from confederation peers.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

The comparison between MEDs is only made if there are no external autonomous systems in the path (an external autonomous system is an autonomous system that is not within the confederation). If there is an external autonomous system in the path, then the external MED is passed transparently through the confederation, and the comparison is not made.

For example, assume that AS 65000, 65001, 65002, and 65004 are part of the confederation; AS1 is not; and we are comparing route A with four paths. If the bgp bestpath med-confed command is enabled, path 1 would be chosen. The fourth path has a lower MED, but it is not involved in the MED comparison because there is an external autonomous system in this path.

path= 65000 65004, med=2

path= 65001 65004, med=3

path= 65002 65004, med=4

path= 65003 1, med=1

Examples

The following command enables the BGP router to compare MED values for paths learned from confederation peers.

router bgp 210
 bgp bestpath med-confed

Related Commands
Command Description

show ip bgp

Display entries in the BGP routing table.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

bgp bestpath missing-as-worst

To have Cisco IOS software consider a missing MED attribute in a path as having a value of infinity, making the path without a MED value the least desirable path, use the bgp bestpath missing-as-worst router configuration command. To return the router to the default (assign a value of 0 to the missing MED), use the no form of this command.

bgp bestpath missing-as-worst

no bgp bestpath missing-as-worst

Syntax Description

This command has no arguments or keywords.

Defaults

The software assigns a value of 0 to the missing MED, causing the path with the missing MED attribute to be considered the best path.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Examples

The following command specifies that the Border Gateway Protocol (BGP) router to consider a missing MED attribute in a path as having a value of infinity, making this path the least desirable path.

router bgp 210
 bgp bestpath missing-as-worst

Related Commands
Command Description

show ip bgp

Display entries in the BGP routing table.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

bgp client-to-client reflection

To restore route reflection from a Border Gateway Protocol (BGP) route reflector to clients, use the bgp client-to-client reflection router configuration command. To disable client-to-client reflection, use the no form of this command.

bgp client-to-client reflection

no bgp client-to-client reflection

Syntax Description

This command has no arguments or keywords.

Defaults

When a route reflector is configured, the route reflector reflects routes from a client to other clients.

Command Modes

Router configuration

Command History
Release Modification

11.1

This command was introduced.

Usage Guidelines

By default, the clients of a route reflector are not required to be fully meshed and the routes from a client are reflected to other clients. However, if the clients are fully meshed, route reflection is not required. Use the no bgp client-to-client reflection command to disable client-to-client reflection.

Examples

In the following example, the local router is a route reflector. The three neighbors are fully meshed, so client-to-client reflection is disabled.

router bgp 5
 neighbor 155.24.95.22 route-reflector-client
 neighbor 155.24.95.23 route-reflector-client
 neighbor 155.24.95.24 route-reflector-client
 no bgp client-to-client reflection

Related Commands
Command Description

bgp cluster-id

Configures the cluster ID if the BGP cluster has more than one route reflector.

neighbor route-reflector-client

Configures the router as a BGP route reflector and configures the specified neighbor as its client.

show ip bgp

Displays entries in the BGP routing table.

bgp cluster-id

To configure the cluster ID if the Border Gateway Protocol (BGP) cluster has more than one route reflector, use the bgp cluster-id router configuration command. To remove the cluster ID, use the no form of this command.

bgp cluster-id cluster-id

no bgp cluster-id cluster-id

Syntax Description

cluster-id

Cluster ID of this router acting as a route reflector; maximum of 4 bytes.

Defaults

The router ID of the single route reflector in a cluster

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

Together, a route reflector and its clients form a cluster.

Usually a cluster of clients will have a single route reflector. In that case, the cluster is identified by the router ID of the route reflector. In order to increase redundancy and avoid a single point of failure, a cluster might have more than one route reflector. In this case, all route reflectors in the cluster must be configured with the 4-byte cluster ID so that a route reflector can recognize updates from route reflectors in the same cluster.

If the cluster has more than one route reflector, use this command to configure the cluster ID.

Examples

In the following example, the local router is one of the route reflectors serving the cluster. It is configured with the cluster ID to identify the cluster.

router bgp 5
 neighbor 198.92.70.24 route-reflector-client
 bgp cluster-id 50000

Related Commands
Command Description

bgp client-to-client reflection

Restores route reflection from a BGP route reflector to clients.

neighbor route-reflector-client

Configures the router as a BGP route reflector and configures the specified neighbor as its client.

show ip bgp

Display entries in the BGP routing table.

bgp confederation identifier

To specify a Border Gateway Protocol (BGP) confederation identifier, use the bgp confederation identifier router configuration command. To remove the confederation identifier, use the no form of this command.

bgp confederation identifier autonomous-system

no bgp confederation identifier autonomous-system

Syntax Description

autonomous-system

Autonomous system number that internally includes multiple autonomous systems.

Defaults

No confederation identifier is configured.

Command Modes

Router configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

Another way to reduce the Interior Border Gateway Protocol (IBGP) mesh is to divide an autonomous system into multiple autonomous systems and group them into a single confederation. Each autonomous system is fully meshed within itself, and has a few connections to another autonomous system in the same confederation. Even though the peers in different autonomous systems have EBGP sessions, they exchange routing information as if they are IBGP peers. Specifically, the next-hop, Multi Exit Discriminator (MED), and local preference information is preserved. This enables to you to retain a single Interior Gateway Protocol (IGP) for all the autonomous systems. To the outside world, the confederation looks like a single autonomous system.

Examples

In the following example, the autonomous system is divided into autonomous systems 4001, 4002, 4003, 4004, 4005, 4006, and 4007 and identified by the confederation identifier 5. Neighbor 1.2.3.4 is someone inside your routing domain confederation. Neighbor 3.4.5.6 is someone outside your routing domain confederation. To the outside world, there appears to be a single autonomous system with the number 5.

router bgp 4001
 bgp confederation identifier 5
 bgp confederation peers 4002 4003 4004 4005 4006 4007
 neighbor 1.2.3.4 remote-as 4002
 neighbor 3.4.5.6 remote-as 510

Related Commands
Command Description

bgp confederation peers

Configures the autonomous systems that belong to the confederation.

bgp confederation peers

To configure the autonomous systems that belong to the confederation, use the bgp confederation peers router configuration command. To remove an autonomous system from the confederation, use the no form of this command.

bgp confederation peers autonomous-system [autonomous-system]

no bgp confederation peers autonomous-system [autonomous-system]

Syntax Description

autonomous-system

Autonomous system numbers for BGP peers that will belong to the confederation.

No confederation peers are configured.

Defaults

No Border Gateway Protocol (BGP) peers are identified as belonging to the confederation.

Command Modes

Router configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

The autonomous systems specified in this command are visible internally to a confederation. Each autonomous system is fully meshed within itself. The bgp confederation identifier command specifies the confederation to which the autonomous systems belong.

Examples

The following example specifies that autonomous systems 1090, 1091, 1092, and 1093 belong to a single confederation:

router bgp 1090
 bgp confederation peers 1091 1092 1093

Related Commands
Command Description

bgp confederation identifier

Specifies a BGP confederation identifier.

bgp dampening

To enable Border Gateway Protocol (BGP) route dampening or change various BGP route dampening factors, use the bgp dampening global configuration command. To disable the function or restore the default values, use the no form of this command.

bgp dampening [half-life reuse suppress max-suppress-time] [route-map map]

no bgp dampening [half-life reuse suppress max-suppress-time] [route-map map]

Syntax Description

half-life

(Optional) Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The range of the half-life period is 1 to 45 minutes. The default is 15 minutes.

reuse

(Optional) If the penalty for a flapping route decreases enough to fall below this value, the route is unsuppressed. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is 1 to 20000; the default is 750.

suppress

(Optional) A route is suppressed when its penalty exceeds this limit. The range is 1 to 20000; the default is 2000.

max-suppress-time

(Optional) Maximum time (in minutes) a route can be suppressed. The range is 1 to 20000; the default is 4 times the half-life. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.

route-map map

(Optional) Name of route map that controls where BGP route dampening is enabled.

Defaults

Disabled by default.

half-life is 15 minutes.
reuse is 750.
suppress is 2000.
max-suppress-time is 4 times half-life.

Command Modes

Global configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

If this command is used with no arguments, it enables BGP route dampening. The arguments half-life, reuse, suppress, and max-suppress-time are position-dependent. Therefore, if any of them are used, they must all be specified.

Examples

The following example sets the half-life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:

bgp dampening 30 1500 10000 120

Related Commands
Command Description

clear ip bgp dampening

Clears BGP route dampening information and unsuppresses the suppressed routes.

clear ip bgp flap-statistics

Clears BGP flap statistics.

show ip bgp dampened-paths

Displays BGP dampened routes.

show ip bgp flap-statistics

Displays BGP flap statistics.

bgp default local-preference

To change the default local preference value, use the bgp default local-preference router configuration command. To return to the default setting, use the no form of this command.

bgp default local-preference value

no bgp default local-preference value

Syntax Description

value

Local preference value from 0 to 4294967295. Higher is more preferred.

Defaults

Local preference value of 100

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Generally, the default value of 100 allows you to easily define a particular path as less preferable than paths with no local preference attribute. The preference is sent to all routers and access servers in the local autonomous system.

Examples

The following example raises the default local preference value from the default of 100 to 200:

router bgp 200
 bgp default local-preference 200

Related Commands
Command Description

set local-preference

Specifies a preference value for the autonomous system path.

bgp deterministic med

To have Cisco IOS software compare the MED variable when choosing among routes advertised by different peers in the same autonomous system, use the bgp deterministic med router configuration command. To disallow the comparison, use the no form of this command.

bgp deterministic med

no bgp deterministic med

Syntax Description

This command has no arguments or keywords.

Defaults

The software does not compare the MED variable for paths advertised by a sub-AS.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

If the bgp always-compare-med command is enabled, all paths are fully comparable, including those from other autonomous systems in the confederation, even if the bgp deterministic med command is also enabled.

Examples

The following example specifies that the BGP router compare MED variables when choosing among routes advertised by the same sub-autonomous system within a confederation.

router 204
 bgp deterministic med

Related Commands
Command Description

show ip bgp

Displays entries in the BGP routing table.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

bgp fast-external-fallover

To immediately reset the Border Gateway Protocol (BGP) sessions of any directly adjacent external peers if the link used to reach them goes down, use the bgp fast-external-fallover router configuration command. To disable this function, use the no form of this command.

bgp fast-external-fallover

no bgp fast-external-fallover

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Examples

The following example disables the automatic resetting of BGP sessions:

router bgp 109
 no bgp fast-external-fallover

bgp log-neighbor-changes

To enable logging of Border Gateway Protocol (BGP) neighbor resets, use the bgp log-neighbor-changes router configuration command. To disable the logging of changes in BGP neighbor adjacencies, use the no form of this command.

bgp log-neighbor-changes

no bgp log-neighbor-changes

Syntax Description

This command has no arguments or keywords.

Defaults

No BGP neighbor changes are logged.

Command Modes

Router configuration

Command History
Release Modification

11.1 CC and 12.0

This command was introduced.

Usage Guidelines

The bgp log-neighbor-changes command enables logging of BGP neighbor status changes (up or down) and resets for troubleshooting network connectivity problems and measuring network stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated.

Using the bgp log-neighbor-changes command to enable status change message logging does not create a significant performance hit, unlike, for example, enabling per BGP update debugging. If the UNIX syslog facility is enabled, messages are sent to the UNIX host running the syslog daemon so that the messages can be stored and archived. If the UNIX syslog facility is not enabled, the status change messages are retained in the router's internal buffer, and are not stored to disk. You can set the size of this buffer, which is dependent upon the available RAM, using the logging buffered command.

The neighbor status change messages are not tracked if bgp log-neighbor changes is not enabled, except for the reset reason, which is always available as output of the show ip bgp neighbor command.

The log messages display the following reasons for changes in a neighbor's status:

BGP protocol initialization

No memory for path entry

No memory for attribute entry

No memory for prefix entry

No memory for aggregate entry

No memory for dampening info

No memory for BGP updates

BGP Notification received

Erroneous BGP Update received

User reset request

Peer timeout

Password change

Error during connection collision

Peer closing down the session

Peer exceeding maximum prefix limit

Interface flap

Router ID changed

Neighbor deleted

Member added to peergroup

Administratively shutdown

Remote AS changed

RR client configuration modification

Soft reconfiguration modification

The eigrp log-neighbor-changes command enables logging of Enhanced IGRP neighbor adjacencies, but messages for BGP neighbors are logged only if they are specifically enabled with the bgp log-neighbor-changes command.

Use the show logging command to display the log for the BGP neighbor changes.

Examples

The following configuration will log neighbor changes for BGP:

bgp router 100
    bgp log-neighbor-changes

Related Commands
Command Description

logging buffered

Logs messages to an internal buffer.

show ip bgp neighbors

Displays information about the TCP and BGP connections to neighbors.

show logging

Displays the state of logging (syslog).

clear ip bgp

To reset a BGP connection using Border Gateway Protocol (BGP) soft reconfiguration, use the clear ip bgp EXEC command at the system prompt.

clear ip bgp {* | address | peer-group-name} [soft [in | out]]

Syntax Description

*

Resets all current BGP sessions.

address

Resets only the identified BGP neighbor.

peer-group-name

Resets the specified BGP peer group.

soft

(Optional) Soft reset. Does not reset the session.

in | out

(Optional) Triggers inbound or outbound soft reconfiguration. If the in or out option is not specified, both inbound and outbound soft reset are triggered.

Defaults

No reset is initiated.

Command Modes

EXEC

Command History
Release Modification

10.0

This command was introduced.

12.0(6)T

The dynamic inbound soft reset capability was added.

Usage Guidelines

You can reset inbound routing table updates dynamically or by generating new updates using stored update information. Using stored update information required additional memory for storing the updates.

To reset inbound routing table updates dynamically, all BGP routers must support the route refresh capability. To determine whether a BGP router supports this capability, use the show ip bgp neighbors command. If a router supports the route refresh capability, the following message is displayed:

Received route refresh capability from peer.

If all BGP routers support the route refresh capability, use the clear ip bgp {*|address|peer-group name} in command. You need not use the soft keyword, because soft reset is automatically assumed when the route refresh capability is supported.

To generate new inbound updates from stored update information (rather than dynamically), without resetting the BGP session, you must first preconfigure the local BGP router using the neighbor soft-reconfiguration inbound command. This preconfiguration causes the software to store all received updates without modification regardless of whether an update is accepted by the inbound policy. Storing updates is memory intensive and should be avoided if possible.

Outbound BGP soft configuration does not have any memory overhead and does not require any preconfiguration. You can trigger an outbound reconfiguration on the other side of the BGP session to make the new inbound policy take effect.

Use this command whenever any of the following changes occur:

Examples

The following example clears the inbound session with the neighbor 131.108.1.1 without resetting the session:

clear ip bgp 131.108.1.1 soft in
 

The following example clears the outbound session with the peer-group corp without resetting the session:

clear ip bgp corp soft out

Related Commands
Command Description

neighbor soft-reconfiguration

Configures the Cisco IOS software to start storing updates.

show ip bgp

Displays entries in the BGP routing table.

clear ip bgp dampening

To clear Border Gateway Protocol (BGP) route dampening information and unsuppress the suppressed routes, use the clear ip bgp dampening EXEC command.

clear ip bgp dampening [address mask]

Syntax Description

address

(Optional) IP address of the network about which to clear dampening information.

mask

(Optional) Network mask applied to the address.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Examples

The following example clears route dampening information about the route to network 150.0.0.0 and unsuppresses its suppressed routes. When the address and mask arguments are not specified, the clear ip bgp dampening command clears route dampening information for the entire BGP routing table.

clear ip bgp dampening 150.0.0.0 255.255.0.0

Related Commands
Command Description

bgp dampening

Enables BGP route dampening or changes various BGP route dampening factors.

show ip bgp dampened-paths

Displays BGP dampened routes.

clear ip bgp flap-statistics

To clear Border Gateway Protocol (BGP) flap statistics, use the clear ip bgp flap-statistics EXEC command.

clear ip bgp address flap-statistics [{regexp regexp} | {filter-list list} | {address mask}]

Syntax Description

regexp regexp

(Optional) Clears flap statistics for all the paths that match the regular expression.

filter-list list

(Optional) Clears flap statistics for all the paths that pass the access list.

address

(Optional) Clears flap statistics for a single entry at this IP address. If this argument is placed before flap-statistics, the router clears flap statistics for all paths from the neighbor at this address.

mask

(Optional) Network mask applied to the address.

Defaults

No statistics are cleared.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

If no arguments or keywords are specified, the router clear flap statistics for all routes.

The flap statistics for a route are also cleared when a BGP peer is reset. Although the reset withdraws the route, there is no penalty applied in this instance even though route flap dampening is enabled.

Examples

The following example clears all of the flap statistics for paths that pass filter list 3:

clear ip bgp flap-statistics filter-list 3

Related Commands
Command Description

bgp dampening

Enables BGP route dampening or changes various BGP route dampening factors.

clear ip bgp peer-group

To clear all the members of a Border Gateway Protocol (BGP) peer group, use the clear ip bgp peer-group EXEC command.

clear ip bgp peer-group tag

Syntax Description

tag

Name of the BGP peer group to clear.

Defaults

No BGP peer group members are cleared.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Examples

The following example clears all members from the BGP peer group internal:

clear ip bgp peer-group internal

Related Commands
Command Description

neighbor peer-group (assigning members)

Configures a BGP neighbor to be a member of a peer group.

clear ip prefix-list

To reset the hit count of the prefix list entries, use the clear ip prefix-list router configuration command.

clear ip bgp prefix-list [name] [network/len]

Syntax Description

name

(Optional) The name of the prefix list from which the hit count is to be cleared.

network/len

(Optional) The network number and length (in bits) of the network mask.

Defaults

Does not clear the hit count.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

The hit count is a value indicating the number of matches to a specific prefix list entry.

Examples

The following example clears the hit count from the prefix list entries for the prefix list named first_list that match the network mask 35.0.0.0/8.

clear ip prefix-list first_list 35.0.0.0/8

Related Commands
Command Description

distribute-list in (IP)

Filters networks received in updates.

distribute-list out

Suppresses networks from being advertised in updates.

ip prefix-list

Creates an entry in a prefix list

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

show ip bgp regexp

Displays information about a prefix list or prefix list entries

default-information originate (BGP)

To originate network 0.0.0.0 into the Border Gateway Protocol (BGP), use the default-information originate router configuration command. To disable this function, use the no form of this command.

default-information originate

no default-information originate

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Examples

The following example configures BGP to redistribute network 0.0.0.0 into BGP:

router bgp 164
 default-information originate

Related Commands
Command Description

neighbor ebgp-multihop

Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.

network (BGP)

Specifies the list of networks for the BGP routing process.

default-metric (BGP)

To set default metric values for the Border Gateway Protocol BGP routing protocol, use the default-metric router configuration command. To return to the default state, use the no form of this command.

default-metric number

no default-metric number

Syntax Description

number

Default metric value appropriate for the specified routing protocol.

Defaults

Built-in, automatic metric translations, as appropriate for each routing protocol

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

The default-metric command is used in conjunction with the redistribute router configuration command to cause the current routing protocol to use the same metric value for all redistributed routes. A default metric helps solve the problem of redistributing routes with incompatible metrics. Whenever metrics do not convert, using a default metric provides a reasonable substitute and enables the redistribution to proceed.

In BGP, this command sets the Multi Exit Discriminator (MED) metric. (The name of this metric for BGP Versions 2 and 3 is INTER_AS.)

Examples

The following example shows a router in autonomous system 109 using both the BGP and the Open Shortest Path First (OSPF) routing protocols. In the example, OSPF-derived routes are advertised by BGP with a default metric of 10.

router bgp 109
 default-metric 10
 redistribute ospf

Related Commands
Command Description

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

distance bgp

To allow the use of external, internal, and local administrative distances that could be a better route to a node, use the distance bgp router configuration command. To return to the default values, use the no form of this command.

distance bgp external-distance internal-distance local-distance

no distance bgp

Syntax Description

external-distance

Administrative distance for Border Gateway Protocol (BGP) external routes. External routes are routes for which the best path is learned from a neighbor external to the autonomous system. Acceptable values are from 1 to 255. The default is 20. Routes with a distance of 255 are not installed in the routing table.

internal-distance

Administrative distance for BGP internal routes. Internal routes are those routes that are learned from another BGP entity within the same autonomous system. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table.

local-distance

Administrative distance for BGP local routes. Local routes are those networks listed with a network router configuration command, often as back doors, for that router or for networks that are being redistributed from another process. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table.

Defaults

external-distance: 20
internal-distance: 200
local-distance: 200

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

An administrative distance is a rating of the trustworthiness of a routing information source, such as an individual router or a group of routers. Numerically, an administrative distance is an integer between 0 and 255. In general, the higher the value, the lower the trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored.

Use this command if another protocol is known to be able to provide a better route to a node than was actually learned via external BGP, or if some internal routes should really be preferred by the BGP.


Note Changing the administrative distance of BGP internal routes is considered dangerous and is not recommended. One problem that can arise is the accumulation of routing table inconsistencies, which can break routing.

Examples

In the following example, internal routes are known to be preferable to those learned through the Interior Gateway Protocol (IGP), so the administrative distance values are set accordingly:

router bgp 109
 network 131.108.0.0
 neighbor 129.140.6.6 remote-as 123
 neighbor 128.125.1.1 remote-as 47
 distance bgp 20 20 200

distribute-list in

To filter networks received in updates, use the distribute-list in router configuration command. To disable this function, use the no form of this command.

distribute-list {access-list-number | prefix-list} in [type number]

no distribute-list {access-list-number | prefix-list} in [type number]

Syntax Description

access-list-number | name

Standard IP access list number or name. The list defines which networks are to be received and which are to be suppressed in routing updates.

prefix-list

Name of a prefix list. The list defines which networks are to be received and which are to be suppressed in routing updates, based upon matching the network prefix to the prefixes in the list.

in

Applies the access list to incoming routing updates.

type

(Optional) Interface type.

number

(Optional) Interface number on which the access list should be applied to incoming updates. If no interface is specified, the access list will be applied to all incoming updates.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.2

The access-list-name, type, and number arguments were added.

12.0

The prefix-list argument was added.

Usage Guidelines

This command is not supported in IS-IS or OSPF.

Using a prefix list allows filtering based upon the prefix length, making it possible to filter either on the prefix list, the gateway, or both for incoming updates.

Do not use both access-list and prefix-list with the distribute-list in command.

To suppress networks from being advertised in updates, use the distribute-list out command.

Examples

In the following example, the BGP routing process accepts only two networks---network 0.0.0.0 and network 131.108.0.0:

access-list 1 permit 0.0.0.0
access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router bgp
 network 131.108.0.0
 distribute-list 1 in

In the following example, the BGP routing process accepts only networks with prefixes that match those in the prefix list firstlist on the interface ethernet 0.

router bgp
distribute-list prefix list firstlist in ethernet 0

Related Commands
Command Description

access-list (IP extended)

Defines an extended IP access list.

clear ip prefix-list

Resets the hit count of the prefix list entries.

distribute-list out

Suppresses networks from being advertised in updates.

ip prefix-list

Creates an entry in a prefix list

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

show ip bgp regexp

Displays information about a prefix list or prefix list entries

distribute-list out

To suppress networks from being advertised in updates, use the distribute-list out router configuration command. To disable this function, use the no form of this command.

distribute-list {access-list-number | name | prefix-list prefix-listname} out [interface-name | routing-process | autonomous-system-number]

no distribute-list {access-list-number | name | prefix-list prefix-listname} out [interface-name | routing-process | autonomous-system-number]

Syntax Description

access-list-number | name

Standard IP access list number or name. The list defines which networks are to be received and which are to be suppressed in routing updates.

prefix-list

Name of a prefix list. The list defines which networks are to be received and which are to be suppressed in routing updates, based upon matching the network prefix to the prefixes in the list.

out

Applies the access list to outgoing routing updates.

interface-name

(Optional) Name of a particular interface.

routing-process

(Optional) Name of a particular routing process, or the keyword static or connected.

autonomous-system-
number

(Optional) Autonomous system number.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.2

The access-list-name argument was added.

12.0

The prefix-list argument was added.

Usage Guidelines

When redistributing networks, a routing process name can be specified as an optional trailing argument to the distribute-list command. This causes the access list to be applied to only those routes derived from the specified routing process. After the process-specific access list is applied, any access list specified by a distribute-list command without a process name argument will be applied. Addresses not specified in the distribute-list command will not be advertised in outgoing routing updates.

Do not use both prefix-list and access-list with the distribute-list out command.


Note To filter networks received in updates, use the distribute-list in command.

Examples

The following example causes only one network (network 131.108.0.0) to be advertised by a RIP routing process.

access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router rip
 network 131.108.0.0
 distribute-list 1 out
 

In the following example, access list 1 is applied to outgoing routing updates, and IS-IS is enabled on Ethernet interface 0. Only network 131.131.101.0 will be advertised in outgoing IS-IS routing updates.

router isis
 redistribute ospf 109
 distribute-list 1 out
interface Ethernet 0
 ip router isis
access-list 1 permit 131.131.101.0 0.0.0.255
 

In the following example, the BGP routing process advertises only networks with prefixes that match those in the prefix list firstlist on the interface ethernet 0.

router bgp
distribute-list prefix list firstlist out ethernet 0

Related Commands
Command Description

access-list (IP extended)

Defines an extended IP access list.

clear ip prefix-list

Resets the hit count of the prefix list entries.

distribute-list in

Filters networks received in updates.

ip prefix-list

Creates an entry in a prefix list

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list

redistribute (IP)

Redistributes routes from one routing domain into another routing domain.

show ip bgp regexp

Displays information about a prefix list or prefix list entries

ip as-path access-list

To define a Border Gateway Protocol (BGP) AS path access list, use the ip as-path access-list global configuration command. To disable use of the access list, use the no form of this command.

ip as-path access-list access-list-number {permit | deny} as-regular-expression

no ip as-path access-list access-list-number

Syntax Description

access-list-number

Integer from 1 to 199 that indicates the regular expression access list number.

permit

Permits access for matching conditions.

deny

Denies access to matching conditions.

as-regular-expression

Autonomous system in the access list using a regular expression. See the "Regular Expressions" appendix in the Cisco IOS Dial Services Command Reference for information about forming regular expressions.

Defaults

No access lists are defined.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

You can specify an access list filter on both inbound and outbound BGP routes. Each filter is an access list based on regular expressions. If the regular expression matches the representation of the autonomous system path of the route as an ASCII string, then the permit or deny condition applies. The autonomous system path does not contain the local autonomous system number. Use the ip as-path access-list global configuration command to define an BGP access list, and the neighbor router configuration command to apply a specific access list.

Examples

The following example specifies that the BGP neighbor with IP address 128.125.1.1 is not sent advertisements about any path through or from the adjacent autonomous system 123:

ip as-path access-list 1 deny _123_
ip as-path access-list 1 deny ^123$
 
router bgp 109
 network 131.108.0.0
 neighbor 129.140.6.6 remote-as 123
 neighbor 128.125.1.1 remote-as 47
 neighbor 128.125.1.1 filter-list 1 out

Related Commands
Command Description

neighbor distribute-list

Distributes BGP neighbor information as specified in an access list.

neighbor filter-list

Sets up a BGP filter.

ip bgp-community new-format

To display BGP communities in the format AA:NN (autonomous system-community number/2-byte number), use the ip bgp-community new-format global configuration command.To reenable the previous display format for BGP communities (one 32-bit number), use the no form of this command.

ip bgp-community new-format

no ip bgp-community new-format

Syntax Description

This command has no argument or keywords.

Defaults

BGP communities are displayed in the Cisco default format, one 32-bit number.

Command Modes '

Global configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

The BGP communities RFC specifies that a BGP community is made up of two parts 2 bytes long. The first part is the AS number and the second part is a 2 byte number. In the most recent version of the RFC, a community is of the form AA:NN.The Cisco default community format is one 32-bit number. The ip bgp-community new-format command changes the community format to AANN to conform to the most recent RFC.

Examples

The following example shows how BGP community numbers are displayed when the ip bgp-community new-format command is enabled.

router# show ip bgp community 12345:111 local-as
 BGP table version is 10, local router ID is 224.0.0.10
 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
 Origin codes: i - IGP, e - EGP, ? - incomplete
 
    Network          Next Hop          Metric LocPrf Weight Path
 *> 2.2.2.2/32       158.43.222.2           0             0 222 ?
 *> 111.0.0.0        158.43.222.2           0             0 222 ?
 *> 158.43.0.0       158.43.222.2           0             0 222 ?
 *> 158.43.44.44/32  158.43.222.2           0             0 222 ?

Related Commands
Command Description

show ip bgp

Displays entries in the BGP routing table.

ip community-list

To create a community list for Border Gateway Protocol (BGP) and control access to it, use the ip community-list global configuration command. To delete the community list, use the no form of this command.

ip community-list community-list-number {permit | deny} community-number

no ip community-list community-list-number

Syntax Description

community-list-number

Integer from 1 to 99 that identifies one or more permit or deny groups of communities.

permit

Permits access for a matching condition.

deny

Denies access for a matching condition.

community-number

Community number configured by a set community command. Valid value is one of the following:

  • A number from 1 to 4294967200. You can specify a single number or multiple numbers separated by a space.

  • internet---The Internet community.

  • no-export---Routes with this community are sent to peers in other sub-autonomous systems within a confederation. Do not advertise this route to an EBGP peer. External systems are those outside the confederation. If there is no confederation, an external system is any EBGP peer.

  • local-as ---Send this route to peers in other sub-autonomous systems within the local confederation. Do not advertise this route to an external system.

  • no-advertise---Do not advertise this route to any peer (internal or external).

Defaults

Once you permit a value for the community number, the community list defaults to an implicit deny for everything else that has not been permitted.

Command Modes

Global configuration

Command History
Release Modification

10.3

This command was introduced.

12.0

The local-as attribute was added.

Examples

In the following example, Cisco IOS software permits all routes except the routes with the communities 5 and 10 or 10 and 15:

ip community-list 1 deny 5 10
ip community-list 1 deny 10 15
ip community-list 1 permit internet
 

The following example permits all routes within the local autonomous system:

ip community-list 1 permit local-as

Related Commands
Command Description

set community

Sets the BGP COMMUNITIES attribute.

show ip bgp community

Displays routes that belong to specified BGP communities.

ip prefix-list

To create an entry in a prefix list, use the ip prefix-list global configuration command. To delete the entry, use the no form of this command.

ip prefix-list list-name [seq seq-value] deny | permit network/len [ge ge-value] [le le-value]

no ip prefix-list list-name [seq seq-value] deny | permit network/len [ge ge-value] [le le-value]

Syntax Description

list-name

Name of a prefix list.

seq

(Optional) Applies the sequence number to the prefix list entry being created or deleted.

seq-value

(Optional) Specifies the sequence number for the prefix list entry.

deny

Denies access to matching conditions.

permit

Permits access for matching conditions.

network/len

(Mandatory) The network number and length (in bits) of the network mask.

ge

(Optional) Applies the ge-value to the range specified.

ge-value

(Optional) Specifies the lesser value of a range (the "from" portion of the range description).

le

(Optional) Applies the le-value to the range specified.

le-value

(Optional) Specifies the greater value of a range (the "to" portion of the range description).

Defaults

No prefix lists are created.

Command Modes

Global configuration

Command History
Release Modification

12.0(3)T

This command was introduced.

Usage Guidelines

When multiple entries of a prefix list match a given prefix, the sequence number of a prefix list entry identifies the entry with the lowest sequence number. In this case, the entry with the smallest sequence number is considered to be the "real" match.

The router begins the search at the top of the prefix list, with the sequence number 1. Once a match or deny occurs, the router does not need to go through the rest of the prefix list. For efficiency, you may want to put the most common matches or denies near the top of the list, using the argument seq in the ip prefix-list command. The show commands always include the sequence numbers in their output.

By default, the sequence numbers are automatically generated.They can be suppressed with the command no ip prefix-list seq. Sequence values are generated in increments of 5. The first sequence value generated in a prefix list would be 5, then 10, then 15, and so on. If you specify a value for an entry and then do not specify values for subsequent entries, the assigned (generated) sequence values are incremented in units of five. For example, if you specify that the first entry in the prefix list have a sequence value of 3, and then do not specify sequence values for the other entries, the automatically generated numbers will be 8, 13, 18, and so on.

ge and le can be used to specify the range of the prefix length to be matched for prefixes that are more specific than network/len. Exact match is assumed when neither ge nor le is specified. The range is assumed to be from ge-value to 32 if only the ge attribute is specified. And the range is assumed to be from len to le-value if only the le attribute is specified.

A specified ge-value and/or le-value must satisfy the following condition:

len < ge-value < le-value <= 32

Examples

The following examples show how a prefix list can be used.

To deny the default route 0.0.0.0/0:

    ip prefix-list abc deny 0.0.0.0/0
     
    

To permit the prefix 35.0.0.0/8:

    ip prefix-list abc permit 35.0.0.0/8
     
    

The following examples show how to specify a group of prefixes.

To accept a mask length of up to 24 bits in routes with the prefix 192/8:

    ip prefix-list abc permit 192.0.0.0/8 le 24 
     
    

To deny mask lengths greater than 25 bits in routes with a prefix of 192/8:

    ip prefix-list abc deny 192.0.0.0/8 ge 25 
     
    

To permit mask lengths from 8 to 24 bits in all address space:

    ip prefix-list abc permit 0.0.0.0/0 ge 8 le 24 
     
    

To deny mask lengths greater than 25 bits in all address space:

    ip prefix-list abc deny 0.0.0.0/0 ge 25
     
    

To deny all routes with a prefix of 10/8:

    ip prefix-list abc deny 10.0.0.0/8 le 32 
     
    

To deny all masks with a length greater than 25 bits routes with a prefix of 204.70.1/24:

    ip prefix-list abc deny 204.70.1.0/24 ge 25 
     
    

To permit all routes with a prefix of 0/0:

    ip prefix-list abc permit 0.0.0.0/0 le 32 
    

Related Commands
Command Description

clear ip prefix-list

Resets the hit count of the prefix list entries.

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list.

match route-type (IP)

Redistributes routes of the specified type.

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.

neighbor prefix-list

Distributes BGP neighbor information as specified in a prefix list.

show ip bgp regexp

Displays information about a prefix list or prefix list entries.

ip prefix-list description

To add a text description of a prefix list, use the ip prefix-list description global configuration command. To remove the text description, use the no form of this command.

ip prefix-list list-name description text

no
ip prefix-list list-name description text

Syntax Description

list name

Prefix list name.

text

Text description of te prefix list.

Defaults

There is no text description.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

11.2

The access-list-name, type, and number arguments were added.

12.0

The prefix-list argument was added.

Usage Guidelines

This command is not supported in IS-IS or OSPF.

To suppress networks from being advertised in updates, use the distribute-list out command.

Examples

The following example shows a prefix list description that indicates what routes are permitted by the prefix list:

ip prefix-list customerA description Permit routes from customer A

Related Commands
Command Description

clear ip prefix-list

Resets the hit count of the prefix list entries.

distribute-list out

Suppresses networks from being advertised in updates.

ip prefix-list

Creates an entry in a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.

neighbor prefix-list

Distributes BGP neighbor information as specified in a prefix list.

show ip prefix-list

Displays information about a prefix list or prefix list entries.

ip prefix-list sequence-number

To enable the generation of sequence numbers for entries in a prefix list, use the ip prefix-list sequence-number global configuration command. To remove the text description, use the no form of this command.

ip prefix-list sequence-number

no
ip prefix-list sequence-number

Syntax Description

This command has no arguments or keywords.

Defaults

There is no text description.

Command Modes

Global configuration

Command History
Release Modification

12.0

This command was introduced.

Examples

The following example disables the default automatic generation of sequence numbers for prefix list entries:

no ip prefix-list sequence-number

Related Commands
Command Description

clear ip prefix-list

Resets the hit count of the prefix list entries.

distribute-list in

Filters networks received in updates.

distribute-list out

Suppresses networks from being advertised in updates.

ip prefix-list

Creates an entry in a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.

neighbor prefix-list

Distributes BGP neighbor information as specified in a prefix list.

show ip prefix-list

Displays information about a prefix list or prefix list entries.

match as-path

To match a Border Gateway Protocol (BGP) autonomous system path access list, use the match as-path route-map configuration command. To remove a path list entry, use the no form of this command.

match as-path path-list-number

no match as-path path-list-number

Syntax Description

path-list-number

Autonomous system path access list. An integer from 1 to 199.

Defaults

No path lists are defined.

Command Modes

Route-map configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

The values set by the match as-path and set weight commands override global values. For Examples, the weights assigned with the match as-path and set weight route-map commands override the weight assigned using the neighbor weight command.

A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.

Examples

The following example sets the autonomous system path to match BGP autonomous system path access list 20:

route-map igp2bgp
 match as-path 20

Related Commands
Command Description

match community-list

Matches a BGP community.

match interface (IP)

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 (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map (IP)

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 (IP)

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 (BGP)

Sets the BGP origin code.

set tag (IP)

Sets the value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.

match community-list

To match a Border Gateway Protocol (BGP) community, use the match community-list route-map configuration command. To remove the community list entry, use the no form of this command.

match community-list community-list-number [exact]

no match community-list community-list-number [exact]

Syntax Description

community-list-number

Community list number in the range 1 to 99.

exact

(Optional) Indicates an exact match is required. All of the communities and only those communities in the community list must be present.

Defaults

No community list is defined.

Command Modes

Route-map configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.

Matching based on community list is one of the types of match clauses applicable to BGP.

Examples

In the following example, the routes that match community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.

ip community-list 1 permit 109
!
route-map set_weight
 match community-list 1
 set weight 100
 

In the following example, the routes that match community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.

ip community-list 1 permit 109
!
route-map set_weight
 match community-list 1 exact
 set weight 200

Related Commands
Command Description

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.

set weight

Specifies the BGP weight for the routing table.

neighbor advertisement-interval

To set the minimum interval between the sending of Border Gateway Protocol (BGP) routing updates, use the neighbor advertisement-interval router configuration command. To remove an entry, use the no form of this command.

neighbor {ip-address | peer-group-name} advertisement-interval seconds

no neighbor {ip-address | peer-group-name} advertisement-interval seconds

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

seconds

Time in seconds. Integer from 0 to 600.

Defaults

30 seconds for external peers and 5 seconds for internal peers.

Command Modes

Router configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example sets the minimum time between sending BGP routing updates to 10 seconds:

router bgp 5
 neighbor 4.4.4.4 advertisement-interval 10

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor default-originate

To allow a Border Gateway Protocol (BGP) speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route, use the neighbor default-originate router configuration command. To send no route as a default, use the no form of this command.

neighbor {ip-address | peer-group-name} default-originate [route-map map-name]

no neighbor {ip-address | peer-group-name} default-originate [route-map map-name]

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

route-map map-name

(Optional) Name of the route map. The route map allows route 0.0.0.0 to be injected conditionally.

Defaults

No default route is sent to the neighbor.

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

12.0

Modifications were added to permit extended access lists.

Usage Guidelines

This command does not require the presence of 0.0.0.0 in the local router. When used with a route map, the default route 0.0.0.0 is injected if the route map contains a match ip address clause and there is a route that matches the IP access list exactly. The route map can contain other match clauses also.

You can use standard or extended access lists with the neighbor default-originate command.

Examples

In the following example, the local router injects route 0.0.0.0 to the neighbor 160.89.2.3 unconditionally:

router bgp 109
 network 160.89.0.0
 neighbor 160.89.2.3 remote-as 200
 neighbor 160.89.2.3 default-originate
 

In the following example, the local router injects route 0.0.0.0 to the neighbor 160.89.2.3 only if there is a route to 198.92.68.0 (that is, if a route with any mask exists, such as 255.255.255.0 or 255.255.0.0):

router bgp 109
 network 160.89.0.0
 neighbor 160.89.2.3 remote-as 200
 neighbor 160.89.2.3 default-originate route-map default-map
!
route-map default-map 10 permit
 match ip address 1
!
access-list 1 permit 198.92.68.0
 

In the following example, the last line of the configuration has been changed to show the use of an extended access list. The local router injects route 0.0.0.0 to the neighbor 160.89.2.3 only if there is a route to 198.92.68.0 with a mask of 255.255.0.0:

router bgp 109
 network 160.89.0.0
 neighbor 160.89.2.3 remote-as 200
 neighbor 160.89.2.3 default-originate route-map default-map
!
route-map default-map 10 permit
 match ip address 1
!
access-list 100 permit ip host 198.92.68.0 host 255.255.255.0

Related Commands
Command Description

neighbor ebgp-multihop

Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.

neighbor description

To associate a description with a neighbor, use the neighbor description router configuration command. To remove the description, use the no form of this command.

neighbor {ip-address | peer-group-name} description text

no neighbor {ip-address | peer-group-name} description [text]

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

text

Text (up to 80 characters) that describes the neighbor.

Defaults

There is no description of the neighbor.

Command Modes

Router configuration

Command History
Release Modification

11.3

This command was introduced.

Examples

In the following example, the description of the neighbor is "peer with abc.com":

router bgp 109
 network 160.89.0.0
 neighbor 160.89.2.3 description peer with abc.com

neighbor distribute-list

To distribute Border Gateway Protocol (BGP) neighbor information as specified in an access list, use the neighbor distribute-list router configuration command. To remove an entry, use the no form of this command.

neighbor {ip-address | peer-group-name} distribute-list {access-list-number | name/ prefix-list-name} {in | out}

no neighbor {ip-address | peer-group-name} distribute-list {access-list-number | name/prefix-list-name} {in |out}

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

access-list-number | name

Number or name of a standard or extended access list. It can be an integer from 1 to 199.

prefix-list-name

Name of a BGP prefix list.

in

Access list is applied to incoming advertisements to that neighbor.

out

Access list is applied to outgoing advertisements from that neighbor.

Defaults

No BGP neighbor is specified.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

11.2

The access-list-name argument was added.

12.0

The prefix-list-name argument was added,

Usage Guidelines

Using distribute lists one way to filter BGP advertisements. Other ways are to use AS-path filters, as with the ip as-path access-list global configuration command and the neighbor filter-list command, or access lists with the route-map command.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command for a neighbor overrides the inbound policy that is inherited from the peer group.

Examples

The following example applies list 39 to incoming advertisements to neighbor 120.23.4.1:

router bgp 109
 network 131.108.0.0
 neighbor 120.23.4.1 distribute-list 39 in
 

The following example applies list 40 to outgoing advertisements to neighbor 120.23.4.1:

router bgp 109
 network 131.108.0.0
 neighbor 120.23.4.1 distribute-list 40 out

Related Commands
Command Description

ip as-path access-list

Defines a BGP-related access list.

neighbor filter-list

Sets up a BGP filter.

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor ebgp-multihop

To accept and attempt Border Gateway Protocol (BGP) connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihop router configuration command. To return to the default, use the no form of this command.

neighbor {ip-address | peer-group-name} ebgp-multihop [ttl]

no neighbor {ip-address | peer-group-name} ebgp-multihop

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

ttl

(Optional) Time-to-live in the range 1 to 255 hops.

Defaults

Only directly connected neighbors are allowed.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

Usage Guidelines

This feature should only be used under the guidance of technical support staff.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

To prevent the creation of loops through oscillating routes, the multihop will not be established if the only route to the multihop peer is the default route (0.0.0.0).

Examples

The following example allows connections to or from neighbor 131.108.1.1, which resides on a network that is not directly connected:

router bgp 109
 neighbor 131.108.1.1 ebgp-multihop

Related Commands
Command Description

neighbor default-originate

Allows a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route.

neighbor peer-group (creating)

Creates a BGP peer group.

network (BGP)

Specifies the list of networks for the BGP routing process.

neighbor filter-list

To set up a Border Gateway Protocol (BGP) filter, use the neighbor filter-list router configuration command. To disable this function, use the no form of this command.

neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out}

no neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out}

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

access-list-number

Number of an autonomous system path access list. You define this access list with the ip as-path access-list command.

in

Access list to incoming routes.

out

Access list to outgoing routes.

Defaults

No filter is used.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

12.1

The weight keyword was removed.

Usage Guidelines

This command establishes filters on both inbound and outbound BGP routes.

The weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight command.

See the "Regular Expressions" appendix in the Cisco IOS Dial Services Command Reference for information on forming regular expressions.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command with an IP address will override the value inherited from the peer group.

Examples

In the following example, the BGP neighbor with IP address 128.125.1.1 is not sent advertisements about any path through or from the adjacent autonomous system 123:

ip as-path access-list 1 deny _123_
ip as-path access-list 1 deny ^123$
 
router bgp 109
 network 131.108.0.0
 neighbor 129.140.6.6 remote-as 123
 neighbor 128.125.1.1 remote-as 47
 neighbor 128.125.1.1 filter-list 1 out

Related Commands
Command Description

ip as-path access-list

Defines a BGP-related access list.

neighbor distribute-list

Distributes BGP neighbor information as specified in an access list.

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor weight

Assigns a weight to a neighbor connection.

neighbor maximum-prefix

To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix router configuration command. To disable this function, use the no form of this command.

neighbor {ip-address | peer-group-name} maximum-prefix maximum [threshold] [warning-only]

no neighbor {ip-address | peer-group-name} maximum-prefix maximum

Syntax Description

ip-address

IP address of the neighbor.

peer-group-name

Name of a BGP peer group.

maximum

Maximum number of prefixes allowed from this neighbor.

threshold

(Optional) Integer specifying at what percentage of maximum the router starts to generate a warning message. The range 1 to 100; the default is 75 (percent).

warning-only

(Optional) Allows the router to generate log message when the maximum is exceeded, instead of terminating the peering.

Defaults

Disabled; there is no limit on the number of prefixes.

Command Modes

Router configuration

Command History
Release Modification

11.3

This command was introduced.

Usage Guidelines

This command allows you to configure a maximum number of prefixes a BGP router is allowed to receive from a peer. It adds another mechanism (in addition to distribute lists, filter lists, and route maps) to control prefixes received from a peer.

When the number of received prefixes exceeds the maximum number configured, the router terminates the peering (by default). However, if the warning-only keyword is configured, the router instead only sends a log message, but continues peering with the sender. If the peer is terminated, the peer stays down until the clear ip bgp command is issued.

Examples

The following example sets the maximum number of prefixes allowed from the neighbor at 129.140.6.6 to 1000:

router bgp 109
 network 131.108.0.0
 neighbor 129.140.6.6 maximum-prefix 1000
 
 

Related Commands
Command Description

clear ip bgp

Resets a BGP connection using BGP soft reconfiguration.

neighbor next-hop-self

To configure the router as the next hop for a BGP-speaking neighbor or peer group, use the neighbor next-hop-self router configuration command. To disable this feature, use the no form of this command.

neighbor {ip-address | peer-group-name} next-hop-self

no neighbor {ip-address | peer-group-name} next-hop-self

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

Usage Guidelines

This command is useful in nonmeshed networks (such as Frame Relay or X.25) where BGP neighbors may not have direct access to all other neighbors on the same IP subnet.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command with an IP address will override the value inherited from the peer group.

For a finer granularity of control, see the set ip next-hop command.

Examples

The following example forces all updates destined for 131.108.1.1 to advertise this router as the next hop:

router bgp 109
 neighbor 131.108.1.1 next-hop-self

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

set ip next-hop (BGP)

Indicates where to output packets that pass a match clause of a route map for policy routing.

neighbor password

To enable Message Digest 5 (MD5) authentication on a TCP connection between two Border Gateway Protocol (BGP) peers, use the neighbor password router configuration command. To disable this function, use the no form of this command.

neighbor {ip-address | peer-group-name} password string

no neighbor {ip-address | peer-group-name} password

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

string

Case-sensitive password of up to 80 characters. The first character cannot be a number. The string can contain any alphanumeric characters, including spaces. You cannot specify a password in the format number-space-anything. The space after the number causes problems.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

You can invoke authentication between two BGP peers, causing each segment sent on the TCP connection between them to be verified. This feature must be configured with the same password on both BGP peers; otherwise, the connection between them will not be made. The authentication feature uses the MD5 algorithm. Specifying this command causes the generation and checking of the MD5 digest on every segment sent on the TCP connection.

Configuring a password for a neighbor will cause an existing session to be torn down and a new one established.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

If a router has a password configured for a neighbor, but the neighbor router does not, a message such as the following will appear on the console while the routers attempt to establish a BGP session between them:

%TCP-6-BADAUTH: No MD5 digest from [peer's IP address]:11003 to [local router's IP address]:179
 

Similarly, if the two routers have different passwords configured, a message such as the following will appear on the console:

%TCP-6-BADAUTH: Invalid MD5 digest from [peer's IP address]:11004 to [local router's IP address]:179

Examples

The following example enables the authentication feature between this router and the BGP neighbor at 131.102.1.1. The password that must also be configured for the neighbor is bla4u00=2nkq.

router bgp 109
 neighbor 131.108.1.1 password bla4u00=2nkq

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor peer-group (assigning members)

To configure a Border Gateway Protocol (BGP) neighbor to be a member of a peer group, use the neighbor peer-group router configuration command. To remove the neighbor from the peer group, use the no form of this command.

neighbor ip-address peer-group peer-group-name

no neighbor ip-address peer-group peer-group-name

Syntax Description

ip-address

IP address of the BGP neighbor who belongs to the peer group specified by the tag.

peer-group-name

Name of the BGP peer group to which this neighbor belongs.

Defaults

There are no BGP neighbors in a peer group.

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

The neighbor at the IP address indicated inherits all the configured options of the peer group.

Examples

The following example assigns three neighbors to the peer group named internal:

router bgp 100
 neighbor internal peer-group
 neighbor internal remote-as 100
 neighbor internal update-source loopback 0
 neighbor internal route-map set-med out
 neighbor internal filter-list 1 out
 neighbor internal filter-list 2 in
 neighbor 171.69.232.53 peer-group internal
 neighbor 171.69.232.54 peer-group internal
 neighbor 171.69.232.55 peer-group internal
 neighbor 171.69.232.55 filter-list 3 in

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor shutdown

Disables a neighbor or peer group.

neighbor peer-group (creating)

To create a Border Gateway Protocol (BGP) peer group, use the neighbor peer-group router configuration command. To remove the peer group and all of its members, use the no form of this command.

neighbor peer-group-name peer-group

no neighbor peer-group-name peer-group

Syntax Description

peer-group-name

Name of the BGP peer group.

Defaults

There is no BGP peer group.

Command Modes

Router configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

Often in a BGP speaker, there are many neighbors configured with the same update policies (that is, same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into peer groups to simplify configuration and make update calculation more efficient.


Note Peer group members can span multiple logical IP subnets, and can transit, or pass along, routes from one peer group member to another.

Once a peer group is created with the neighbor peer-group command, it can be configured with the neighbor commands. By default, members of the peer group inherit all the configuration options of the peer group. Members can also be configured to override the options that do not affect outbound updates.

Peer group members will always inherit the following configuration options: remote-as (if configured), version, update-source, out-route-map, out-filter-list, out-dist-list, minimum-advertisement-interval, and next-hop-self. All the peer group members will inherit changes made to the peer group.

If a peer group is not configured with a remote-as, the members can be configured with the neighbor {ip-address | peer-group-name} remote-as command. This command allows you to create peer groups containing Exterior Border Gateway Protocol (EBGP) neighbors.

Examples

Example for an IBGP Peer Group

In the following example, the peer group named internal configures the members of the peer group to be Interior Border Gateway Protocol (IBGP) neighbors. By definition, this is an IBGP peer group because the router bgp command and the neighbor remote-as command indicate the same autonomous system (in this case, autonomous system 100). All the peer group members use loopback 0 as the update source and use set-med as the outbound route-map. The neighbor internal filter-list 2 in command shows that, except for 171.69.232.55, all the neighbors have filter-list 2 as the inbound filter list.

router bgp 100
 neighbor internal peer-group
 neighbor internal remote-as 100
 neighbor internal update-source loopback 0
 neighbor internal route-map set-med out
 neighbor internal filter-list 1 out
 neighbor internal filter-list 2 in
 neighbor 171.69.232.53 peer-group internal
 neighbor 171.69.232.54 peer-group internal
 neighbor 171.69.232.55 peer-group internal
 neighbor 171.69.232.55 filter-list 3 in

Example for an EBGP Peer Group

The following example defines the peer group named external-peers without the neighbor remote-as command. This is what makes it an EBGP peer group. Each individual member of the peer group is configured with its respective AS-number separately. Thus the peer group consists of members from autonomous systems 200, 300, and 400. All the peer group members have the set-metric route map as an outbound route map and filter-list 99 as an outbound filter list. Except for neighbor 171.69.232.110, all of them have 101 as the inbound filter list.

router bgp 100
 neighbor external-peers peer-group
 neighbor external-peers route-map set-metric out
 neighbor external-peers filter-list 99 out
 neighbor external-peers filter-list 101 in
 neighbor 171.69.232.90 remote-as 200
 neighbor 171.69.232.90 peer-group external-peers
 neighbor 171.69.232.100 remote-as 300
 neighbor 171.69.232.100 peer-group external-peers
 neighbor 171.69.232.110 remote-as 400
 neighbor 171.69.232.110 peer-group external-peers
 neighbor 171.69.232.110 filter-list 400 in

Related Commands
Command Description

clear ip bgp peer-group

Removes all the members of a BGP peer group.

neighbor peer-group (creating)

Creates a BGP peer group.

show ip bgp peer-group

Displays information about BGP peer groups.

neighbor prefix-list

To distribute Border Gateway Protocol (BGP) neighbor information as specified in a prefix list, use the neighbor prefix-list router configuration command. To remove an entry, use the no form of this command.

neighbor {ip-address | peer-group-name} prefix-list prefix-listname {in | out}

no neighbor {ip-address | peer-group-name} prefix-list prefix-listname {in |out}

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

prefix-listname

Name of a prefix list.

in

Access list is applied to incoming advertisements to that neighbor.

out

Access list is applied to outgoing advertisements from that neighbor.

Defaults

No BGP neighbor is specified.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

Using prefix lists is one of two ways to filter BGP advertisements. The other way is to use AS-path filters, as with the ip as-path access-list global configuration command and the neighbor filter-list command, and access or prefix lists, as with the neighbor distribute-list command.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command with an IP address will override the value inherited from the peer group.


Note Do not apply both a neighbor distribute-list and a neighbor prefix-list command to the same neighbor.

Examples

The following example applies prefix list abc to incoming advertisements to neighbor 120.23.4.1:

router bgp 109
 network 131.108.0.0
 neighbor 120.23.4.1 prefix-list abc in
 

The following example applies prefix list CustomerA to outgoing advertisements to neighbor 120.23.4.1:

router bgp 109
 network 131.108.0.0
 neighbor 120.23.4.1 prefix-list CustomerA out

Related Commands
Command Description

clear ip prefix-list

Resets the hit count of the prefix list entries.

ip as-path access-list

Defines a BGP-related access list.

ip prefix-list

Creates an entry in a prefix list.

ip prefix-list description

Adds a text description of a prefix list.

ip prefix-list sequence-number

Enables the generation of sequence numbers for entries in a prefix list.

neighbor filter-list

Sets up a BGP filter.

neighbor peer-group (creating)

Creates a BGP peer group.

show ip bgp peer-group

Displays information about BGP peer groups.

show ip prefix-list

Displays information about a prefix list or prefix list entries.

neighbor remote-as

To add an entry to the Border Gateway Protocol (BGP) neighbor table, use the neighbor remote-as router configuration command. To remove an entry from the table, use the no form of this command.

neighbor {ip-address | peer-group-name} remote-as number

no neighbor {ip-address | peer-group-name} remote-as number

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

number

Autonomous system to which the neighbor belongs.

Defaults

There are no BGP neighbor peers.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

11.0

The peer-group-name argument was added.

Usage Guidelines

Specifying a neighbor with an autonomous system number that matches the autonomous system number specified in the router bgp global configuration command identifies the neighbor as internal to the local autonomous system. Otherwise, the neighbor is considered external.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example specifies that a router at the address 131.108.1.2 is a neighbor in autonomous system number 109:

router bgp 110
 network 131.108.0.0
 neighbor 131.108.1.2 remote-as 109
 

The following example assigns a BGP router to autonomous system 109, and two networks are listed as originating in the autonomous system. Then the addresses of three remote routers (and their autonomous systems) are listed. The router being configured will share information about networks 131.108.0.0 and 192.31.7.0 with the neighbor routers. The first router listed is in the same Class B network address space, but in a different autonomous system; the second neighbor remote-as command illustrates specification of an internal neighbor (with the same autonomous system number) at address 131.108.234.2; and the last neighbor remote-as command specifies a neighbor on a different network.

router bgp 109
 network 131.108.0.0
 network 192.31.7.0
 neighbor 131.108.200.1  remote-as 167
 neighbor 131.108.234.2  remote-as 109
 neighbor 150.136.64.19  remote-as  99

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor route-map

To apply a route map to incoming or outgoing routes, use the neighbor route-map router configuration command. To remove a route map, use the no form of this command.

neighbor {ip-address | peer-group-name} route-map map-name {in | out}

no neighbor {ip-address | peer-group-name} route-map map-name {in | out}

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

map-name

Name of route map.

in

Apply to incoming routes.

out

Apply to outgoing routes.

Defaults

No route maps are applied to a peer.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

If an outbound route map is specified, it is proper behavior to only advertise routes that match at least one section of the route map.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command. Specifying the command for a neighbor overrides the inbound policy that is inherited from the peer group.

Examples

The following example applies a route map named internal-map to incoming route from 198.92.70.24:

router bgp 5
 neighbor 198.92.70.24 route-map internal-map in
!
route-map internal-map
 match as-path 1
 set local-preference 100
 
 

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor route-reflector-client

To configure the router as a Border Gateway Protocol (BGP) route reflector and configure the specified neighbor as its client, use the neighbor route-reflector-client router configuration command. To indicate that the neighbor is not a client, use the no form of this command. When all the clients are disabled, the local router is no longer a route reflector.

neighbor ip-address route-reflector-client

no neighbor ip-address route-reflector-client

Syntax Description

ip-address

IP address of the BGP neighbor being identified as a client.

Defaults

There is no route reflector in the autonomous system.

Command Modes

Router configuration

Command History
Release Modification

11.1

This command was introduced.

Usage Guidelines

By default, all Interior Border Gateway Protocol (IBGP) speakers in an autonomous system must be fully meshed, and neighbors do not readvertise IBGP learned routes to neighbors, thus preventing a routing information loop.

If you use route reflectors, all IBGP speakers need not be fully meshed. In the route reflector model, an internal BGP peer is configured to be a route reflector responsible for passing IBGP learned routes to IBGP neighbors. This scheme eliminates the need for each router to talk to every other router.

Use the neighbor route-reflector-client command to configure the local router as the route reflector and the specified neighbor as one of its clients. All the neighbors configured with this command will be members of the client group and the remaining IBGP peers will be members of the nonclient group for the local route reflector.

If client-to-client reflection is enabled (by default it is enabled), clients of a route reflector cannot be members of a peer group. The bgp client-to-client reflection command controls client-to-client reflection.

Examples

In the following example, the local router is a route reflector. It passes learned IBGP routes to the neighbor at 198.92.70.24.

router bgp 5
 neighbor 198.92.70.24 route-reflector-client
 

Related Commands
Command Description

neighbor route-reflector-client

Configures the router as a BGP route reflector and configures the specified neighbor as its client.

bgp cluster-id

Configures the cluster ID if the BGP cluster has more than one route reflector.

show ip bgp

Displays entries in the BGP routing table.

neighbor send-community

To specify that a "communities" attribute should be sent to a Border Gateway Protocol (BGP) neighbor, use the neighbor send-community router configuration command. To remove the entry, use the no form of this command.

neighbor {ip-address | peer-group-name} send-community

no neighbor {ip-address | peer-group-name} send-community

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

Defaults

No "communities" attribute is sent to any neighbor.

Command Modes

Router configuration

Command History
Release Modification

10.3

This command was introduced.

11.0

The peer-group-name argument was added.

Usage Guidelines

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

In the following example, the router belongs to autonomous system 109 and is configured to send the "communities" attribute to its neighbor at IP address 198.92.70.23:

router bgp 109
 neighbor 198.92.70.23 send-community

Related Commands
Command Description

match community-list

Matches a BGP community.

neighbor peer-group (creating)

Creates a BGP peer group.

set community

Sets the BGP COMMUNITIES attribute.

neighbor shutdown

To disable a neighbor or peer group, use the neighbor shutdown router configuration command. To reenable the neighbor or peer group, use the no form of this command.

neighbor {ip-address | peer-group-name} shutdown

no neighbor {ip-address | peer-group-name} shutdown

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

Defaults

No change is made to the status of any BGP neighbor or peer group.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

The neighbor shutdown command terminates any active session for the specified neighbor or peer group, and removes all associated routing information. In the case of a peer group, this could mean a large number of peering sessions are suddenly terminated.

To view a summary of BGP neighbors and peer-group connections, use the show ip bgp summary command. Those neighbors with an Idle status and the Admin entry have been disabled by the neighbor shutdown command.

"State/PfxRcd" shows the current state of the BGP session/the number of prefixes the router has received from a neighbor or peer group. When the maximum number (as set by the neighbor maximum-prefix command) is reached, the string "PfxRcd" appears in the entry, the neighbor is shut down, and the connection is Idle.

Examples

The following example disables any active session for the neighbor 198.92.70.23:

neighbor 198.92.70.23 shutdown
 

The following example disables all peering sessions for the peer group internal:

neighbor internal shutdown

Related Commands
Command Description

neighbor maximum-prefix

Controls how many prefixes can be received from a neighbor.

show ip bgp summary

Displays the status of all BGP connections.

neighbor soft-reconfiguration

To configure the Cisco IOS software to start storing updates, use the neighbor soft-reconfiguration router configuration command. To not store received updates, use the no form of this command.

neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound]

no neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound]

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

inbound

(Optional) Keyword indicating that the update to be stored is an incoming update.

Defaults

Soft reconfiguration is not enabled

Command Modes

Router configuration

Command History
Release Modification

11.2

This command was introduced.

Usage Guidelines

This command requires at least one keyword. Currently the only keyword available is inbound, so the use of the inbound keyword is not optional.

Entering this command starts the storage of updates, required to do inbound soft reconfiguration. Outbound BGP soft reconfiguration does not require inbound soft reconfiguration to be enabled.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example enables inbound soft-reconfiguration for the neighbor 131.108.1.1. All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy. When inbound soft reconfiguration is done later, the stored information will be used to generate a new set of inbound updates.

router bgp 100
 neighbor 131.108.1.1 remote-as 200
 neighbor 131.108.1.1 soft-reconfiguration inbound
 

Related Commands
Command Description

clear ip bgp

Resets a BGP connection using BGP soft reconfiguration.

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor timers

To set the timers for a specific Border Gateway Protocol (BGP) peer or peer group, use the neighbor timers router configuration command. To clear the timers for a specific BGP peer or peer group, use the no form of this command.

neighbor [ip-address | peer-group-name] timers keepalive holdtime

no neighbor [ip-address | peer-group-name] timers keepalive holdtime

Syntax Description

ip-address

(Optional) A BGP peer or peer group IP address.

peer-group-name

(Optional) Name of the BGP peer group.

keepalive

Frequency, in seconds, with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds.

holdtime

Interval, in seconds, after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds.

Defaults

keepalive: 60 seconds
holdtime: 180 seconds

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

The timers configured for a specific neighbor or peer group override the timers configured for all BGP neighbors using the timers bgp command.

Examples

The following example changes the keepalive timer to 70 seconds and the holdtime timer to 210 seconds for the BGP peer 192.98.47.0:

router bgp 109
 neighbor 192.98.47.0 timers 70 210

neighbor update-source

To have the Cisco IOS software allow internal Border Gateway Protocol (BGP) sessions to use any operational interface for TCP connections, use the neighbor update-source router configuration command. To restore the interface assignment to the closest interface, which is called the best local address, use the no form of this command.

neighbor {ip-address | peer-group-name} update-source interface

no neighbor {ip-address | peer-group-name} update-source interface

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

interface

Loopback interface.

Defaults

Best local address

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

This feature works in conjunction with the loopback interface feature described in the "Interface Configuration Overview" chapter of the Cisco IOS Interface Configuration Guide.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example sources BGP TCP connections for the specified neighbor with loopback interface's IP address rather than the best local address:

router bgp 110
 network 160.89.0.0
 neighbor 160.89.2.3 remote-as 110
 neighbor 160.89.2.3 update-source Loopback0

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor version

To configure the Cisco IOS software to accept only a particular Border Gateway Protocol (BGP) version, use the neighbor version router configuration command. To use the default version level of a neighbor, use the no form of this command.

neighbor {ip-address | peer-group-name} version value

no neighbor {ip-address | peer-group-name} version value

Syntax Description

ip-address

IP address of the BGP-speaking neighbor.

peer-group-name

Name of a BGP peer group.

value

BGP version number. The version can be set to 2 to force the software to only use Version 2 with the specified neighbor. The default is to use Version 4 and dynamically negotiate down to Version 2 if requested.

Defaults

BGP Version 4

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Entering this command disables dynamic version negotiation.

Our implementation of BGP supports BGP Versions 2, 3, and 4. If the neighbor does not accept default Version 4, dynamic version negotiation is implemented to negotiate down to Version 2.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example locks down to Version 4 of the BGP protocol:

router bgp 109
 neighbor 131.104.27.2 version 4

Related Commands
Command Description

neighbor peer-group (creating)

Creates a BGP peer group.

neighbor weight

To assign a weight to a neighbor connection, use the neighbor weight router configuration command. To remove a weight assignment, use the no form of this command.

neighbor {ip-address | peer-group-name} weight weight

no neighbor {ip-address | peer-group-name} weight weight

Syntax Description

ip-address

Neighbor's IP address.

peer-group-name

Name of a BGP peer group.

weight

Weight to assign. Acceptable values are 0 to 65535.

Defaults

Routes learned through another BGP peer have a default weight of 0 and routes sourced by the local router have a default weight of 32768.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

All routes learned from this neighbor will have the assigned weight initially. The route with the highest weight will be chosen as the preferred route when multiple routes are available to a particular network.

The weights assigned with the set weight route-map command overrides the weights assigned using the neighbor weight command.


Note For weight changes to take effect, it may be necessary to use the clear ip bgp peer-group * commands.

If you specify a BGP peer group by using the peer-group-name argument, all the members of the peer group will inherit the characteristic configured with this command.

Examples

The following example sets the weight of all routes learned via 151.23.12.1 to 50:

router bgp 109
 neighbor 151.23.12.1 weight 50

Related Commands
Command Description

neighbor distribute-list

Distributes BGP neighbor information as specified in an access list.

neighbor filter-list

Sets up a BGP filter.

neighbor peer-group (creating)

Creates a BGP peer group.

network (BGP)

To specify the networks to be advertised by the Border Gateway Protocol (BGP) routing process, use the network router configuration command. To remove an entry, use the no form of this command.

network network-number [mask network-mask]

no network network-number [mask network-mask]

Syntax Description

network-number

Network that BGP will advertise.

mask

(Optional) Network or subnetwork mask.

network-mask

(Optional) Network mask address.

Defaults

No networks are specified.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

12.0

The limit of 200 network commands per BGP router was removed.

Usage Guidelines

These types of networks can be learned from connected routes, dynamic routing, and from static route sources.

The maximum number of network commands you can use is determined by the router's resources, such as the configured NVRAM or RAM.

Examples

The following example sets up network 131.108.0.0 to be included in the BGP updates:

router bgp 120
 network 131.108.0.0

Related Commands
Command Description

default-information originate (BGP)

Allows the redistribution of network 0.0.0.0 into BGP.

neighbor ebgp-multihop

Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.

network backdoor

Specifies a backdoor route to a BGP border router that will provide better information about the network.

network weight

Assigns an absolute weight to a BGP network.

router bgps

Configures the BGP routing process.

network backdoor

To specify a backdoor route to a Border Gateway Protocol (BGP) border router that will provide better information about the network, use the network backdoor router configuration command. To remove an address from the list, use the no form of this command.

network address backdoor

no network address backdoor

Syntax Description

address

IP address of the network to which you want a backdoor route.

Defaults

No network is advertised.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

A backdoor network is treated as a local network, except that it is not advertised.

Examples

The following example configures network 131.108.0.0 as a local network and network 192.31.7.0 as a backdoor network:

router bgp 109
 network 131.108.0.0
 network 192.31.7.0 backdoor

network weight

To assign an absolute weight to a Border Gateway Protocol (BGP) network, use the network weight router configuration command. To delete an entry, use the no form of the command.

network address mask weight weight [route-map map-name]

no network address mask weight weight [route-map map-name]

Syntax Description

address

IP address of the network.

mask

Network mask of the network.

weight

Absolute weight, or importance. It can be an integer from 0 to 65535.

route-map map-name

(Optional) Name of route map.

Defaults

Weight is unmodified. Weight is zero if the original default weight has not been modified by other router configuration commands.

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

The weight specified by this command overrides a weight assigned by the redistribute command.

Examples

In the following example, the BGP network has a weight of 100:

router bgp 5
 network 193.0.0.0 255.0.0.0 weight 100

router bgp

To configure the Border Gateway Protocol (BGP) routing process, use the router bgp global configuration command. To remove a routing process, use the no form of this command.

router bgp autonomous-system

no router bgp autonomous-system

Syntax Description

autonomous-system

Number of an autonomous system that identifies the router to other BGP routers and tags the routing information passed along.

Defaults

No BGP routing process is enabled by default.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

This command allows you to set up a distributed routing core that automatically guarantees the loop-free exchange of routing information between autonomous systems.

Examples

The following example configures a BGP process for autonomous system 120:

router bgp 120

Related Commands
Command Description

network (BGP)

Specifies the list of networks for the BGP routing process.

timers bgp

Adjust BGP network timers.

set as-path

To modify an autonomous system path for Border Gateway Protocol (BGP) routes, use the set as-path route-map configuration command. To not modify the autonomous system path, use the no form of this command.

set as-path {tag | prepend as-path-string}

no set as-path {tag | prepend as-path-string}

Syntax Description

tag

Converts the tag of a route into an autonomous system path. Applies only when redistributing routes into BGP.

prepend as-path-string

Appends the string following the keyword prepend to the as-path of the route that is matched by the route map. Applies to inbound and outbound BGP route maps.

Defaults

Autonomous system path is not modified.

Command Modes

Route-map configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

The only global BGP metric available to influence the best path selection is the AS-PATH length. By varying the length of the AS-PATH, a BGP speaker can influence the best path selection by a peer further away.

By allowing you to convert the tag into an autonomous system path, the set as-path tag variation of this command modifies the autonomous system length. The set as-path prepend variation allows you to "prepend" an arbitrary autonomous system path string to BGP routes. Usually the local autonomous system number is prepended multiple times, increasing the autonomous system path length.

Examples

The following example converts the tag of a redistributed route into an autonomous system path:

route-map set-as-path-from-tag
 set as-path tag
!
router bgp 100
 redistribute ospf 109 route-map set-as-path-from-tag
 

The following example prepends 100 100 100 to all the routes advertised to 131.108.1.1:

route-map set-as-path
 match as-path 1
 set as-path prepend 100 100 100
!
router bgp 100
 neighbor 131.108.1.1 route-map set-as-path out

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match community-list

Matches a BGP community.

match interface (IP)

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 (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

set automatic-tag

Automatically computes the tag value.

set community

Sets the BGP COMMUNITIES attribute.

set level (IP)

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 (BGP)

Sets the BGP origin code.

set tag (IP)

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.

set comm-list delete

To remove communities from the community attribute of an inbound or outbound update, use the set comm-list delete router configuration command. To negate a previous set comm-list delete command, use the no form of this command.

set comm-list list-num delete

no set comm-list list-num delete

Syntax Description

list-num

A standard or extended community list number.

Defaults

No communities are removed.

Command Modes

Router configuration

Command History
Release Modification

12.0

This command was introduced.

Usage Guidelines

This route-map set command removes communities from the community attribute of an inbound or outbound update using a route map to filter and determine the communities to be deleted. Depending upon whether the route map is applied to the inbound or outbound update for a neighbor, each community that passes the route map "permit" clause and matches the given community list will be removed from the community attribute being received from or sent to the BGP neighbor.

Each entry of a standard community list should list only one community when used with the set comm-list delete command. For example, in order to be able to delete communities 10:10 and 10:20, you must use the following format to create the entries:

ip community-list 5 permit 10:10
ip community-list 5 permit 10:20

The following format for a community list entry, while acceptable otherwise, does not work with the set comm-list delete command:

config ip community-list 5 permit 10:10 10:20
 

When both the set community comm and set comm-list delete commands are configured in the same sequence of a route-map attribute, the deletion operation (set comm-list delete) is performed before the set operation (set community comm).

Examples

In the following example, the communities 100:10 and 100:20 (if present) will be deleted from updates received from 171.69.233.33. Also, except for 100:50, all communities beginning with 100: will be deleted from updates sent to 171.69.233.33.

router bgp 100
 neighbor 171.69.233.33 remote-as 120
 neighbor 171.69.233.33 route-map ROUTEMAPIN in
 neighbor 171.69.233.33 route-map ROUTEMAPOUT out
!
ip community-list 1 permit 100:10
ip community-list 1 permit 100:20
!
ip community-list 120 deny 100:50
ip community-list 120 permit 100:.*
!
route-map ROUTEMAPIN permit 10
 set comm-list 1 delete
!
route-map ROUTEMAPOUT permit 10
 set comm-list 120 delete

Related Commands
Command Description

set community

Sets the BGP COMMUNITIES attribute.

set community

To set the Border Gateway Protocol (BGP) COMMUNITIES attribute, use the set community route-map configuration command. To delete the entry, use the no form of this command.

set community {community-number [additive]} | none

no set community {community-number [additive]} | none

Syntax Description

community-number

Valid values are 1 to 4294967200, no-export, or no-advertise.

additive

(Optional) Adds the community to the already existing communities.

none

Removes the COMMUNITY attribute from the prefixes that pass the route-map.

Defaults

No BGP COMMUNITIES attributes exist.

Command Modes

Route-map configuration

Command History
Release Modification

10.3

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.

Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria---the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions---the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The set route-map configuration commands specify the redistribution set actions to be performed when all of a route map's match criteria are met. When all match criteria are met, all set actions are performed.

Examples

In the following example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to no-export (these routes will not be advertised to any EBGP peers).

route-map set_community 10 permit
 match as-path 1
 set community 109
 
route-map set_community 20 permit
 match as-path 2
 set community no-export
 

In the following similar example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to local-as (the router will not advertise this route to an EBGP peer outside the local autonomous system.

route-map set_community 10 permit
 match as-path 1
 set community 109
 
route-map set_community 20 permit
 match as-path 2
 set community local-as

Related Commands
Command Description

ip community-list

Creates a community list for BGP and control access to it.

match community-list

Matches a BGP community.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

set comm-list delete

Removes communities from the community attribute of an inbound or outbound update.

show ip bgp community

Displays routes that belong to specified BGP communities.

set dampening

To set the Border Gateway Protocol (BGP) route dampening factors, use the set dampening route-map configuration command. To disable this function, use the no form of this command.

set dampening half-life reuse suppress max-suppress-time

no set dampening

Syntax Description

half-life

Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The range of the half-life period is 1 to 45 minutes. The default is 15 minutes.

reuse

If the penalty for a flapping route decreases enough to fall below this value, the route is unsuppressed. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is 1 to 20000; the default is 750.

suppress

A route is suppressed when its penalty exceeds this limit. The range is 1 to 20000; the default is 2000.

max-suppress-time

Maximum time (in minutes) a route can be suppressed. The range is 1 to 20000; the default is 4 times the half-life value. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.

Defaults

Disabled

Command Modes

Route-map configuration

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria---the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions---the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

When a BGP peer is reset, the route is withdrawn and the flap statistics cleared. In this instance, the withdrawal does not incur a penalty even though route flap dampening is enabled.

Examples

The following example sets the half-life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:

route-map tag
 match as path 10
 set dampening 30 1500 10000 120
!
router bgp 100
 neighbor 171.69.233.52 route-map tag in

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match community-list

Matches a BGP community.

match interface (IP)

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 that is permitted by a standard or extended access list, and 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 (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.

set automatic-tag

Automatically computes the tag value.

set community

Sets the BGP COMMUNITIES attribute.

set level (IP)

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

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 (BGP)

Sets the BGP origin code.

set tag (IP)

Sets the value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.

show route-map

Displays all route maps configured or only the one specified.

set ip next-hop (BGP)

To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop route-map configuration command. To delete an entry, use the no form of this command.

set ip next-hop ip-address [...ip-address] [peer-address]

no set ip next-hop ip-address [...ip-address] [peer-address]

Syntax Description

ip-address

IP address of the next hop to which packets are output. It need not be an adjacent router.

peer-address

(Optional) Sets the next hop to be the BGP peering address.

Defaults

Disabled

Command Modes

Route-map configuration

Command History
Release Modification

11.0

This command was introduced.

12.0

The keyword peer-address was added.

Usage Guidelines

Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria---the conditions under which policy routing occurs. The set commands specify the set actions---the particular routing actions to perform if the criteria enforced by the match commands are met.

If the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses are tried in turn.

When set ip next-hop is used with the peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. This means that the same route map can be applied to multiple BGP peers to override third-party next hops.

When set ip next-hop is used with the peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. The set ip next-hop command has finer granularity than the per-neighbor neighbor next-hop-self command, because you can set the next hop for some routes, but not others. The neighbor next-hop-self sets the next hop for all routes sent to that neighbor

The set clauses can be used in conjunction with one another. They are evaluated in the following order:

    1. set ip next-hop

    2. set interface

    3. set ip default next-hop

    4. set default interface

Examples

In the following example, three routers are on the same FDDI LAN (with IP addresses 1.1.1.1, 1.1.1.2, and 1.1.1.3). Each is in a different autonomous system. The set ip next-hop peer-address command specifies that traffic from the router (1.1.1.3) in remote autonomous system 300 for the router (1.1.1.1) in remote autonomous system 100 that matches the route map is passed through the router bgp 200, rather than sent directly to the router (1.1.1.1) in autonomous system 100 over their mutual connection to the LAN:

router bgp 200
neighbor 1.1.1.3 remote-as 100
neighbor 1.1.1.3 route-map set-peer-address out
neighbor 1.1.1.1 remote-as 100
route-map set-peer-address permit 10
set ip next-hop peer-address

Related Commands
Command Description

ip policy route-map

Identifies a route map to use for policy routing on an interface.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.

match length

Bases policy routing on the Level 3 length of a packet.

neighbor next-hop-self

Disables next-hop processing of BGP updates on the router.

route-map

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

set default interface

Indicates where to output packets that pass a match clause of a route map for policy routing and that have no explicit route to the destination.

set interface

Indicates where to output packets that pass a match clause of a route map for policy routing.

set ip default next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination.

set metric-type internal

To set the MED value on prefixes advertised to External Border Gateway Protocol (EBGP) neighbors to match the Interior Gateway Protocol (IGP) metric of the next hop, use the set metric-type internal route-map configuration command. To return to the default, use the no form of this command.

set metric-type internal

no set metric-type internal

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Route-map configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

This command will cause BGP to advertise a MED that corresponds to the IGP metric associated with the NEXT HOP of the route. This command applies to generated, IBGP-, and EBGP-derived routes.

If this command is used, multiple BGP speakers in a common AS can advertise different MEDs for a particular prefix. Also, note that if the IGP metric changes, BGP will readvertise the route every 10 minutes.

Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria---the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions---the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The set route-map configuration commands specify the redistribution set actions to be performed when all of a route map's match criteria are met. When all match criteria are met, all set actions are performed.

Examples

In the following example, the MED for all the advertised routes to neighbor 160.89.2.3 is set to the corresponding IGP metric of the nexthop:

router bgp 109
 network 160.89.0.0
 neighbor 160.89.2.3 remote-as 200
 neighbor 160.89.2.3 route-map setMED out
!
route-map setMED permit 10
 match as-path 1
 set metric-type internal
!
 ip as-path access-list 1 permit .*

Related Commands
Command Description

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.

set origin (BGP)

To set the Border Gateway Protocol (BGP) origin code, use the set origin route-map configuration command. To delete an entry, use the no form of this command.

set origin {igp | egp autonomous-system | incomplete}

no set origin {igp | egp autonomous-system | incomplete}

Syntax Description

igp

Remote Interior Gateway Protocol (IGP) system.

egp

Local Exterior Gateway Protocol (EGP) system.

autonomous-system

Remote autonomous system. This is an integer from 0 to 65535.

incomplete

Unknown heritage.

Defaults

Default origin, based on route in main IP routing table.

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.

Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria---the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions---the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The set route-map configuration commands specify the redistribution set actions to be performed when all of a route map's match criteria are met. When all match criteria are met, all set actions are performed.

Examples

The following example sets the origin of routes that pass the route map to IGP:

route-map set_origin
 match as-path 10
 set origin igp
 
 
 

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match community-list

Matches a BGP community.

match interface (IP)

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 that is permitted by a standard or extended access list, and 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 (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map (IP)

Displays all route maps configured or only the one specified.

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 (IP)

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 tag (IP)

Sets the value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.

set weight

To specify the Border Gateway Protocol (BGP) weight for the routing table, use the set weight route-map configuration command. 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

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 set weight route-map command overrides the weights assigned using the neighbor weight command.

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

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match community-list

Matches a BGP community.

match interface (IP)

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, and 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 (IP)

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map (IP)

Displays all route maps configured or only the one specified.

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 (IP)

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 (BGP)

Sets the BGP origin code.

set tag (IP)

Sets the value of the destination routing protocol.

show ip bgp

To display entries in the Border Gateway Protocol (BGP) routing table, use the show ip bgp EXEC command.

show ip bgp [network] [network-mask] [longer-prefixes]

Syntax Description

network

(Optional) Network number, entered to display a particular network in the BGP routing table.

network-mask

(Optional) Displays all BGP routes matching the address/mask pair.

longer-prefixes

(Optional) Displays route and more specific routes.

Command Modes

EXEC

Command History
Release Modification

10.0

This command was introduced.

12.0

The display of prefix advertisement statistics was added.

12.0(6)T

The display of a message indicating support for route refresh capability was added.

Examples

The following is sample output from the show ip bgp command:

Router# show ip bgp
 
BGP table version is 716977, local router ID is 193.0.32.1
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
* i3.0.0.0          193.0.22.1             0    100      0 1800 1239 ?
*>i                 193.0.16.1             0    100      0 1800 1239 ?
* i6.0.0.0          193.0.22.1             0    100      0 1800 690 568 ?
*>i                 193.0.16.1             0    100      0 1800 690 568 ?
* i7.0.0.0          193.0.22.1             0    100      0 1800 701 35 ?
*>i                 193.0.16.1             0    100      0 1800 701 35 ?
*                   198.92.72.24                         0 1878 704 701 35 ?
* i8.0.0.0          193.0.22.1             0    100      0 1800 690 560 ?
*>i                 193.0.16.1             0    100      0 1800 690 560 ?
*                   198.92.72.24                         0 1878 704 701 560 ?
* i13.0.0.0         193.0.22.1             0    100      0 1800 690 200 ?
*>i                 193.0.16.1             0    100      0 1800 690 200 ?
*                   198.92.72.24                         0 1878 704 701 200 ?
* i15.0.0.0         193.0.22.1             0    100      0 1800 174 ?
*>i                 193.0.16.1             0    100      0 1800 174 ?
* i16.0.0.0         193.0.22.1             0    100      0 1800 701 i
*>i                 193.0.16.1             0    100      0 1800 701 i
*                   198.92.72.24                         0 1878 704 701 i
 

Table 68 describes significant fields shown in the display.


Table 68: show ip bgp Field Descriptions
Field Description

BGP table version

Internal version number of the table. This number is incremented whenever the table changes.

local router ID

IP address of the router.

Status codes

Status of the table entry. The status is displayed at the beginning of each line in the table. It can be one of the following values:

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Route refresh capability

Indicates that the peer supports dynamic soft reset using the route refresh capability.

Network

IP address of a network entity.

Next Hop

IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network.

Metric

If shown, this is the value of the interautonomous system metric.

LocPrf

Local preference value as set with the set local-preference route-map configuration command. The default value is 100.

Weight

Weight of the route as set via autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path.

The following is sample output from the show ip bgp command when you specify the longer-prefixes keyword:

Router# show ip bgp 198.92.0.0 255.255.0.0 longer-prefixes
 
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*> 198.92.0.0       198.92.72.30        8896         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.1.0       198.92.72.30        8796         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.11.0      198.92.72.30       42482         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.14.0      198.92.72.30        8796         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.15.0      198.92.72.30        8696         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.16.0      198.92.72.30        1400         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.17.0      198.92.72.30        1400         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.18.0      198.92.72.30        8876         32768 ?
*                   198.92.72.30                         0 109 108 ?
*> 198.92.19.0      198.92.72.30        8876         32768 ?
*                   198.92.72.30                         0 109 108 ?
 

The following is sample output from the show ip bgp command, showing information for prefix 3.0.0.0:

show ip bgp 3.0.0.0
BGP routing table entry for 3.0.0.0/8, version 628
Paths: (1 available, best #1)
Advertised to peer-groups:
 ebgp
Advertised to non peer-group peers:
 171.69.232.162
109 65000 297 701 80
 171.69.233.56 from 171.69.233.56 (172.19.185.32)
  Origin incomplete, localpref 100, valid, external, best, ref 2
 

Note If a prefix has not been advertised to any peer, the display shows "Not advertised to any peer."

Related Commands
Command Description

clear ip bgp

Resets a BGP connection or session.

neighbor soft-reconfiguration

Configures the Cisco IOS software to start storing updates.

show ip bgp cidr-only

To display routes with nonnatural network masks (that is, classless interdomain routing, or CIDR), use the show ip bgp cidr-only privileged EXEC command.

show ip bgp cidr-only

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

10.0

This command was introduced.

Examples

The following is sample output from the show ip bgp cidr-only command:

Router# show ip bgp cidr-only
 
BGP table version is 220, local router ID is 198.92.73.131
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*> 192.0.0.0/8      198.92.72.24                         0 1878 ?
*> 198.92.0.0/16    198.92.72.30                         0 108 ?
 

Table 69 describes significant fields shown in the display.


Table 69: show ip bgp cidr-only Field Descriptions
Field Description

BGP table version is 220

Internal version number for the table. This number is incremented any time the table changes.

local router ID

An IP address of the router.

Status codes

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Network

Internet address of the network the entry describes.

Next Hop

IP address of the next system to use when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the access server has some non-BGP route to this network.

Metric

If shown, this is the value of the interautonomous system metric.

LocPrf

Local preference value. Default is 100.

Weight

Set through the use of autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path. At the end of the path is the origin code for the path.

i---The entry was originated with the IGP and advertised with a network router configuration command.

e---The route originated with EGP.

?---The origin of the path is not clear. Usually this is a path that is redistributed into BGP from an IGP.

show ip bgp community

To display routes that belong to specified Border Gateway Protocol (BGP) communities, use the show ip bgp community EXEC command.

show ip bgp community community-number [exact]

Syntax Description

community-number

Valid value is community number in the range 1 to 4294967200 or AA:NN (autonomous system-community number/2-byte number), internet, no-export, local-as, or no-advertise.

exact

(Optional) Displays only routes that have exactly the same specified communities.

Command Modes

EXEC

Command History
Release Modification

10.3

This command was introduced.

12.0

The local-as community was added.

Examples

The following is sample output from the show ip bgp community command:

router# show ip bgp community 111:12345 local-as
 BGP table version is 10, local router ID is 224.0.0.10
 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
 Origin codes: i - IGP, e - EGP, ? - incomplete
 
    Network          Next Hop          Metric LocPrf Weight Path
 *> 2.2.2.2/32       158.43.222.2           0             0 222 ?
 *> 111.0.0.0        158.43.222.2           0             0 222 ?
 *> 158.43.0.0       158.43.222.2           0             0 222 ?
 *> 158.43.44.44/32  158.43.222.2           0             0 222 ?
 *  158.43.222.0/24  158.43.222.2           0             0 222 i
 *> 172.17.240.0/21  158.43.222.2           0             0 222 ?
 *> 192.168.212.0    158.43.222.2           0             0 222 i
 *> 203.9.1.0        158.43.222.2           0             0 222 ?
 

Table 70 describes significant fields shown in the display.


Table 70: show ip bgp community Field Descriptions
Field Description

BGP table version

Internal version number of the table. This number is incremented whenever the table changes.

local router ID

IP address of the router.

Status codes

Status of the table entry. The status is displayed at the beginning of each line in the table. It can be one of the following values:

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Network

IP address of a network entity.

Next Hop

IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network.

Metric

If shown, this is the value of the interautonomous system metric. This field is frequently not used.

LocPrf

Local preference value as set with the set local-preference route-map configuration command. The default value is 100.

Weight

Weight of the route as set via autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path.

show ip bgp community-list

To display routes that are permitted by the Border Gateway Protocol (BGP) community list, use the show ip bgp community-list EXEC command.

show ip bgp community-list community-list-number [exact]

Syntax Description

community-list-number

Community list number in the range 1 to 99.

exact

(Optional) Displays only routes that have an exact match.

Command Modes

EXEC

Command History
Release Modification

10.3

This command was introduced.

Examples

The following is sample output of the show ip bgp community-list command:

Router# show ip bgp community-list 20
 
BGP table version is 716977, local router ID is 193.0.32.1
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
* i3.0.0.0          193.0.22.1             0    100      0 1800 1239 ?
*>i                 193.0.16.1             0    100      0 1800 1239 ?
* i6.0.0.0          193.0.22.1             0    100      0 1800 690 568 ?
*>i                 193.0.16.1             0    100      0 1800 690 568 ?
* i7.0.0.0          193.0.22.1             0    100      0 1800 701 35 ?
*>i                 193.0.16.1             0    100      0 1800 701 35 ?
*                   198.92.72.24                         0 1878 704 701 35 ?
* i8.0.0.0          193.0.22.1             0    100      0 1800 690 560 ?
*>i                 193.0.16.1             0    100      0 1800 690 560 ?
*                   198.92.72.24                         0 1878 704 701 560 ?
* i13.0.0.0         193.0.22.1             0    100      0 1800 690 200 ?
*>i                 193.0.16.1             0    100      0 1800 690 200 ?
*                   198.92.72.24                         0 1878 704 701 200 ?
* i15.0.0.0         193.0.22.1             0    100      0 1800 174 ?
*>i                 193.0.16.1             0    100      0 1800 174 ?
* i16.0.0.0         193.0.22.1             0    100      0 1800 701 i
*>i                 193.0.16.1             0    100      0 1800 701 i
*                   198.92.72.24                         0 1878 704 701 i
 

Table 71 describes significant fields shown in the display.


Table 71: show ip bgp community list Field Descriptions
Field Description

BGP table version

Internal version number of the table. This number is incremented whenever the table changes.

local router ID

IP address of the router.

Status codes

Status of the table entry. The status is displayed at the beginning of each line in the table. It can be one of the following values:

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Network

IP address of a network entity.

Next Hop

IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network.

Metric

If shown, this is the value of the interautonomous system metric. This field is frequently not used.

LocPrf

Local preference value as set with the set local-preference route-map configuration command. The default value is 100.

Weight

Weight of the route as set via autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path.

show ip bgp dampened-paths

To display Border Gateway Protocol (BGP) dampened routes, use the show ip bgp dampened-paths EXEC command.

show ip bgp dampened-paths

Syntax Description

This command has no arguments or keywords.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Examples

The following is sample output from the show ip bgp dampened-paths command:

Router# show ip bgp dampened-paths
BGP table version is 10, local router ID is 171.69.232.182
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From             Reuse   Path
*d 10.0.0.0         171.69.232.177   00:18:4 100 ?
*d 12.0.0.0         171.69.232.177   00:28:5 100 ?
 

Table 72 describes the fields in the display.


Table 72: show ip bgp dampened-paths Field Descriptions
Field Description

BGP table version

Internal version number for the table. This number is incremented any time the table changes.

local router

IP address of the router where route dampening is enabled.

*d Network

Route to the network indicated is dampened.

From

IP address of the peer that advertised this path.

Reuse

Time (in hours:minutes:seconds) after which the path will be made available.

Path

AS-path of the route that is being dampened.

Related Commands
Command Description

bgp dampening

Enables BGP route dampening or changes various BGP route dampening factors.

clear ip bgp dampening

Clears BGP route dampening information and unsuppresses the suppressed routes.

show ip bgp filter-list

To display routes that conform to a specified filter list, use the show ip bgp filter-list privileged EXEC command.

show ip bgp filter-list access-list-number

Syntax Description

access-list-number

Number of an autonomous system path access list. It can be a number from 1 to 199.

Command Modes

Privileged EXEC

Command History
Release Modification

10.0

This command was introduced.

Examples

The following is sample output from the show ip bgp filter-list command:

Router# show ip bgp filter-list 2
 
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*  198.92.0.0       198.92.72.30                         0 109 108 ?
*  198.92.1.0       198.92.72.30                         0 109 108 ?
*  198.92.11.0      198.92.72.30                         0 109 108 ?
*  198.92.14.0      198.92.72.30                         0 109 108 ?
*  198.92.15.0      198.92.72.30                         0 109 108 ?
*  198.92.16.0      198.92.72.30                         0 109 108 ?
*  198.92.17.0      198.92.72.30                         0 109 108 ?
*  198.92.18.0      198.92.72.30                         0 109 108 ?
*  198.92.19.0      198.92.72.30                         0 109 108 ?
*  198.92.24.0      198.92.72.30                         0 109 108 ?
*  198.92.29.0      198.92.72.30                         0 109 108 ?
*  198.92.30.0      198.92.72.30                         0 109 108 ?
*  198.92.33.0      198.92.72.30                         0 109 108 ?
*  198.92.35.0      198.92.72.30                         0 109 108 ?
*  198.92.36.0      198.92.72.30                         0 109 108 ?
*  198.92.37.0      198.92.72.30                         0 109 108 ?
*  198.92.38.0      198.92.72.30                         0 109 108 ?
*  198.92.39.0      198.92.72.30                         0 109 108 ?
 

Table 73 describes significant fields shown in the display.


Table 73: show ip bgp filter-list Field Descriptions
Field Description

BGP table version

Internal version number for the table. This number is incremented any time the table changes.

local router ID

An IP address of the router.

Status codes

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Network

Internet address of the network the entry describes.

Next Hop

IP address of the next system to use when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP route to this network.

Metric

If shown, this is the value of the interautonomous system metric. This field is frequently not used.

LocPrf

Local preference value. Default is 100.

Weight

Set through the use of autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path. At the end of the path is the origin code for the path.

i---The entry was originated with the IGP and advertised with a
     network router configuration command.

e---The route originated with EGP.

?---The origin of the path is not clear. Usually this is a path that is
      redistributed into BGP from an IGP.

show ip bgp flap-statistics

To display Border Gateway Protocol (BGP) flap statistics, use the show ip bgp flap-statistics EXEC command.

show ip bgp flap-statistics [{regexp regexp} | {filter-list list} | {address mask [longer-prefix]}]

Syntax Description

regexp regexp

(Optional) Clears flap statistics for all the paths that match the regular expression.

filter-list list

(Optional) Clears flap statistics for all the paths that pass the access list.

address

(Optional) Clears flap statistics for a single entry at this IP address.

mask

(Optional) Network mask applied to the address.

longer-prefix

(Optional) Displays flap statistics for more specific entries.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Usage Guidelines

If no arguments or keywords are specified, the router displays flap statistics for all routes.

Examples

The following is sample output from the show ip bgp flap-statistics command:

Router# show ip bgp flap-statistics
BGP table version is 10, local router ID is 171.69.232.182
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From            Flaps Duration Reuse    Path
*d 10.0.0.0         171.69.232.177  4     00:13:31 00:18:10 100
*d 12.0.0.0         171.69.232.177  4     00:02:45 00:28:20 100
 

Table 74 describes the significant fields in the display.


Table 74: show ip bgp flap-statistics Field Descriptions
Field Description

BGP table version

Internal version number for the table. This number is incremented any time the table changes.

local router ID

IP address of the router where route dampening is enabled.

Network

Route to the network indicated is dampened.

From

IP address of the peer that advertised this path.

Flaps

Number of times the route has flapped.

Duration

Time (in hours:minutes:seconds) since the router noticed the first flap.

Reuse

Time (in hours:minutes:seconds) after which the path will be made available.

Path

AS-path of the route that is being dampened.

Related Commands
Command Description

bgp dampening

Enables BGP route dampening or changes various BGP route dampening factors.

clear ip bgp flap-statistics

Clears BGP flap statistics.

show ip bgp inconsistent-as

To display routes with inconsistent originating autonomous systems, use the show ip bgp inconsistent-as privileged EXEC command.

show ip bgp inconsistent-as

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

11.0

This command was introduced.

Examples

The following is sample output from the show ip bgp inconsistent-as command:

Router# show ip bgp inconsistent-as
BGP table version is 87, local router ID is 172.19.82.53
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*  11.0.0.0         171.69.232.55          0             0 300 88 90 99 ?
*>                  171.69.232.52       2222             0 400 ?
*  171.69.0.0       171.69.232.55          0             0 300 90 99 88 200 ?
*>                  171.69.232.52       2222             0 400 ?
*  200.200.199.0    171.69.232.55          0             0 300 88 90 99 ?
*>                  171.69.232.52       2222             0 400 ?

show ip bgp neighbors

To display information about the TCP and Border Gateway Protocol (BGP) connections to neighbors, use the show ip bgp neighbors EXEC command.

show ip bgp neighbors [address] [received-routes | routes | advertised-routes | {paths regular-expression} | dampened-routes]

Syntax Description

address

(Optional) Address of the neighbor whose routes you have learned from. If you omit this argument, all neighbors are displayed.

received-routes

(Optional) Displays all received routes (both accepted and rejected) from the specified neighbor.

routes

(Optional) Displays all routes that are received and accepted. This is a subset of the output from the received-routes keyword.

advertised-routes

(Optional) Displays all the routes the router has advertised to the neighbor.

paths regular-expression

(Optional) Regular expression that is used to match the paths received.

dampened-routes

(Optional) Displays the dampened routes to the neighbor at the IP address specified.

Command Modes

EXEC

Command History
Release Modification

10.0

This command was introduced.

11.2

The received-routes keyword was added.

Examples

The following is sample output from the show ip bgp neighbors command:

Router# show ip bgp neighbors 171.69.232.178
 
BGP neighbor is 171.69.232.178,  remote AS 10, external link
 Index 1, Offset 0, Mask 0x2
  Inbound soft reconfiguration allowed
  BGP version 4, remote router ID 171.69.232.178
  BGP state = Established, table version = 27, up for 00:06:12
  Last read 00:00:12, hold time is 180, keepalive interval is 60 seconds
  Minimum time between advertisement runs is 30 seconds
  Received 19 messages, 0 notifications, 0 in queue
  Sent 17 messages, 0 notifications, 0 in queue
  Inbound path policy configured
  Route map for incoming advertisements is testing
  Connections established 2; dropped 1
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 171.69.232.181, Local port: 11002
Foreign host: 171.69.232.178, Foreign port: 179
 
Enqueued packets for retransmit: 0, input: 0, saved: 0
 
Event Timers (current time is 0x530C294):
Timer          Starts    Wakeups            Next
Retrans            12          0             0x0
TimeWait            0          0             0x0
AckHold            12         10             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
 
iss:  133981889  snduna:  133982166  sndnxt:  133982166     sndwnd:  16108
irs: 3317025518  rcvnxt: 3317025810  rcvwnd:      16093  delrcvwnd:    291
 
SRTT: 441 ms, RTTO: 2784 ms, RTV: 951 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 300 ms
Flags: higher precedence, nagle
 
Datagrams (max data segment is 1460 bytes):
Rcvd: 15 (out of order: 0), with data: 12, total data bytes: 291
Sent: 23 (retransmit: 0), with data: 11, total data bytes: 276
 

Table 75 describes the fields shown in the display.


Table 75: show ip bgp neighbors Field Descriptions
Field Description

BGP neighbor

IP address of the BGP neighbor and its autonomous system number. If the neighbor is in the same autonomous system as the router, then the link between them is internal; otherwise, it is considered external.

BGP version

BGP version being used to communicate with the remote router; the neighbor's router ID (an IP address) is also specified.

BGP state

Internal state of this BGP connection.

table version

Indicates that the neighbor has been updated with this version of the primary BGP routing table.

up for

Amount of time that the underlying TCP connection has been in existence.

Last read

Time that BGP last read a message from this neighbor.

hold time

Maximum amount of time that can elapse between messages from the peer.

keepalive interval

Time period between sending keepalive packets, which help ensure that the TCP connection is up.

Received

Number of total BGP messages received from this peer, including keepalives.

notifications

Number of error messages received from the peer.

Sent

Total number of BGP messages that have been sent to this peer, including keepalives.

notifications

Number of error messages the router has sent to this peer.

Connections established

Number of times the router has established a TCP connection and the two peers have agreed speak BGP with each other.

dropped

Number of times that a good connection has failed or been taken down.

Connection state

State of BGP peer.

unread input bytes

Number of bytes of packets still to be processed.

Local host, Local port

Peering address of local router, plus port.

Foreign host, Foreign port

Neighbor's peering address.

Event Timers

Table displays the number of starts and wakeups for each timer.

iss

Initial send sequence number.

snduna

Last send sequence number the local host sent but has not received an acknowledgment for.

sndnxt

Sequence number the local host will send next.

sndwnd

TCP window size of the remote host.

irs

Initial receive sequence number.

rcvnxt

Last receive sequence number the local host has acknowledged.

rcvwnd

Local host's TCP window size.

delrecvwnd

Delayed receive window---data the local host has read from the connection, but has not yet subtracted from the receive window the host has advertised to the remote host. The value in this field gradually increases until it is larger than a full-sized packet, at which point it is applied to the rcvwnd field.

SRTT

A calculated smoothed round-trip timeout.

RTTO

Round-trip timeout.

RTV

Variance of the round-trip time.

KRTT

New round-trip timeout (using the Karn algorithm). This field separately tracks the round-trip time of packets that have been retransmitted.

minRTT

Smallest recorded round-trip timeout (hard wire value used for calculation).

maxRTT

Largest recorded round-trip timeout.

ACK hold

Time the local host will delay an acknowledgment in order to piggyback data on it.

Flags

IP precedence of the BGP packets.

Datagrams: Rcvd

Number of update packets received from neighbor.

with data

Number of update packets received with data.

total data bytes

Total bytes of data.

Sent

Number of update packets sent.

with data

Number of update packets with data sent.

total data bytes

Total number of data bytes.

The following is sample output from the show ip bgp neighbors command with the advertised-routes keyword:

Router# show ip bgp neighbors 171.69.232.178 advertised-routes
 
BGP table version is 27, local router ID is 171.69.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*>i110.0.0.0        171.69.232.179         0    100      0 ?
*> 200.2.2.0        0.0.0.0                0         32768 i
 

The following is sample output from the show ip bgp neighbors command with the routes keyword:

Router# show ip bgp neighbors 171.69.232.178 routes
 
BGP table version is 27, local router ID is 171.69.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*> 10.0.0.0         171.69.232.178        40             0 10 ?
*> 20.0.0.0         171.69.232.178        40             0 10 ?
 

Table 76 describes the fields shown in the display.


Table 76: show ip bgp neighbors advertised-routes and routes Field Descriptions
Field Description

BGP table version

Internal version number of the table. This number is incremented whenever the table changes.

local router ID

IP address of the router.

Status codes

s---The table entry is suppressed.

*---The table entry is valid.

>---The table entry is the best entry to use for that network.

i---The table entry was learned via an internal BGP session.

Origin codes

Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values:

i---Entry originated from Interior Gateway Protocol (IGP) and was advertised with a network router configuration command.

e---Entry originated from Exterior Gateway Protocol (EGP).

?---Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP.

Network

IP address of a network entity.

Next Hop

IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network.

Metric

If shown, this is the value of the interautonomous system metric. This field is frequently not used.

LocPrf

Local preference value as set with the set local-preference route-map configuration command. The default value is 100.

Weight

Weight of the route as set via autonomous system filters.

Path

Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path.

The following is sample output from the show ip bgp neighbors command with the paths keyword:

Router# show ip bgp neighbors 171.69.232.178 paths ^10
 
Address    Refcount Metric Path
0x60E577B0        2     40 10 ?

show ip bgp paths

To display all the Border Gateway Protocol (BGP) paths in the database, use the show ip bgp paths EXEC command.

show ip bgp paths

Syntax Description

This command has no arguments or keywords.

Command Modes

EXEC

Command History
Release Modification

10.0

This command was introduced.

Examples

The following is sample output from the show ip bgp paths command:

Router# show ip bgp paths
Address    Hash Refcount Metric Path
0x60E5742C    0        1      0 i
0x60E3D7AC    2        1      0 ?
0x60E5C6C0   11        3      0 10 ?
0x60E577B0   35        2     40 10 ?
 

Table 77 describes significant fields shown in the display.


Table 77: show ip bgp paths Field Descriptions
Field Description

Address

Internal address where the path is stored.

Hash

Hash bucket where path is stored.

Refcount

Number of routes using that path.

Metric

The multiple exit discriminator (MED) metric for the path. (The name of this metric for BGP versions 2 and 3 is INTER_AS.)

Path

The AS_PATH for that route, followed by the origin code for that route.

show ip bgp peer-group

To display information about Border Gateway Protocol (BGP) peer groups, use the show ip bgp peer-group EXEC command.

show ip bgp peer-group [tag] [summary]

Syntax Description

tag

(Optional) Displays information about that specific peer group.

summary

(Optional) Displays a summary of the status of all the members of a peer group.

Command Modes

EXEC

Command History
Release Modification

11.0

This command was introduced.

Examples

The following is sample output from the show ip bgp peer-group command:

Router# show ip bgp peer-group 0 internal
BGP neighbor is internal, peer-group leader
  BGP version 4
  Minimum time between advertisement runs is 5 seconds
  Incoming update AS path filter list is 2
  Outgoing update AS path filter list is 1
  Route map for outgoing advertisements is set-med

show ip bgp regexp

To display routes matching the AS path regular expression, use the show ip bgp regexp privileged EXEC command.

show ip bgp regexp regular-expression

Syntax Description

regular-expression

Regular expression to match the BGP autonomous system paths.

Command Modes

Privileged EXEC

Command History
Release Modification

10.0

This command was introduced.

Examples

The following is sample output from the show ip bgp regexp command:

Router# show ip bgp regexp 108$
 
BGP table version is 1738, local router ID is 198.92.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop          Metric LocPrf Weight Path
*  198.92.0.0       198.92.72.30                         0 109 108 ?
*  198.92.1.0       198.92.72.30                         0 109 108 ?
*  198.92.11.0      198.92.72.30                         0 109 108 ?
*  198.92.14.0      198.92.72.30                         0 109 108 ?
*  198.92.15.0      198.92.72.30                         0 109 108 ?
*  198.92.16.0      198.92.72.30                         0 109 108 ?
*  198.92.17.0      198.92.72.30                         0 109 108 ?
*  198.92.18.0      198.92.72.30                         0 109 108 ?
*  198.92.19.0      198.92.72.30                         0 109 108 ?
*  198.92.24.0      198.92.72.30                         0 109 108 ?
*  198.92.29.0      198.92.72.30                         0 109 108 ?
*  198.92.30.0      198.92.72.30                         0 109 108 ?
*  198.92.33.0      198.92.72.30                         0 109 108 ?
*  198.92.35.0      198.92.72.30                         0 109 108 ?
*  198.92.36.0      198.92.72.30                         0 109 108 ?
*  198.92.37.0      198.92.72.30                         0 109 108 ?
*  198.92.38.0      198.92.72.30                         0 109 108 ?
*  198.92.39.0      198.92.72.30                         0 109 108 ?
 

show ip bgp summary

To display the status of all Border Gateway Protocol (BGP) connections, use the show ip bgp summary EXEC command.

show ip bgp summary

Syntax Description

This command has no arguments or keywords.

Command Modes

EXEC

Command History
Release Modification

10.0

This command was introduced.

12.0

The PfxRcd and Admin fields were added to the output.

Examples

The following is sample output from the show ip bgp summary command:

Router# show ip bgp summary
 
BGP table version is 717029, main routing table version 717029
19073 network entries (37544 paths) using 3542756 bytes of memory
691 BGP path attribute entries using 57200 bytes of memory
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
193.0.16.1      4  1755   32642    2973   717029    0    0 1:27:11  
193.0.17.1      4  1755    4790    2973   717029    0    0 1:27:51  
193.0.18.1      4  1755    7722    3024   717029    0    0 1:28:13  
193.0.19.1      4  1755       0       0        0    0    0 2d02     Active
193.0.20.1      4  1755    3673    3049   717029    0    0 2:50:10  Idle (PfxRcd)
193.0.21.1      4  1755    3741    3048   717029    0    0 12:24:43 
193.0.22.1      4  1755   33129    3051   717029    0    0 12:24:48 
193.0.23.1      4  1755       0       0        0    0    0 2d02     Active
193.0.24.1      4  1755       0       0        0    0    0 2d02     Active
193.0.25.1      4  1755       0       0        0    0    0 2d02     Active
193.0.26.1      4  1755       0       0        0    0    0 2d02     Active
193.0.27.1      4  1755    4269    3049   717029    0    0 12:39:33 
193.0.28.1      4  1755    3037    3050   717029    0    0 2:08:15  
198.92.72.24    4  1878   11635   13300   717028    0    0 0:50:39  
198.92.72.36    4  1001       0       0        0    0    0 never    Idle (Admin)
 

Table 78 describes significant fields shown in the display

.
Table 78: show ip bgp summary Field Descriptions
Field Description

BGP table version

Internal version number of BGP database.

main routing table version

Last version of BGP database that was injected into main routing table.

Neighbor

IP address of a neighbor.

V

BGP version number spoken to that neighbor.

AS

Autonomous system.

MsgRcvd

BGP messages received from that neighbor.

MsgSent

BGP messages sent to that neighbor.

TblVer

Last version of the BGP database that was sent to that neighbor.

InQ

Number of messages from that neighbor waiting to be processed.

OutQ

Number of messages waiting to be sent to that neighbor.

Up/Down

The length of time that the BGP session has been in state Established, or the current state if it is not Established.

State/PfxRcd

Current state of the BGP session/the number of prefixes the router has received from a neighbor or peer group. When the maximum number (as set by the neighbor maximum-prefix command) is reached, the string "PfxRcd" appears in the entry, the neighbor is shut down, and the connection is Idle.

An (Admin) entry with Idle status indicates that the connection has been shut down using the neighbor shutdown command.

Related Commands
Command Description

neighbor maximum-prefix

Controls how many prefixes can be received from a neighbor.

neighbor shutdown

Disables a neighbor or peer group.

show ip bgp summary

Displays the status of all BGP connections.

show ip prefix-list

To display information about a prefix list or prefix list entries, use the show ip prefix-list EXEC command.

show ip prefix-list [detail-summary] name [network/len] [seq seq-num] [longer] [first-match]

Syntax Description

detail-summary

(Optional) Displays detailed or summarized information about all prefix lists.

name

(Optional) The name of a specific prefix list.

network/len

(Optional) The network number and length (in bits) of the network mask.

seq

(Optional) Applies the sequence number to the prefix list entry.

seq-num

The sequence number of the prefix list entry.

longer

Displays all entries of a prefix list that are more specific than the given network/len.

first-match

Displays the entry of a prefix list that matches the given network/len.

Command Modes

EXEC

Command History
Release Modification

12.0

This command was introduced.

Examples

The following example shows the output of the show ip prefix-list command with details about the prefix list "test."

sh ip prefix-list detail test
ip prefix-list test:
Description: test-list
 count: 1, range entries: 0, sequences: 10 - 10, refcount: 3  seq 10 permit 35.0.0.0/8 (hit count: 0, refcount: 1)

Related Commands
Command Description

clear ip prefix-list

Resets the hit count of the prefix list entries.

distribute-list in

Filters networks received in updates.

distribute-list out

Suppresses networks from being advertised in updates.

ip prefix-list

Creates an entry in a prefix list.

ip prefix-list description

Adds a text description of a prefix list.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.

neighbor prefix-list

Distributes BGP neighbor information as specified in a prefix list.

synchronization

To enable the synchronization between Border Gateway Protocol (BGP) and your Interior Gateway Protocol (IGP) system, use the synchronization router configuration command. To enable the Cisco IOS software to advertise a network route without waiting for the IGP, use the no form of this command.

synchronization

no synchronization

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

Usually, a BGP speaker does not advertise a route to an external neighbor unless that route is local or exists in the IGP. The no synchronization command allows the Cisco IOS software to advertise a network route without waiting for the IGP. This feature allows routers and access servers within an autonomous system to have the route before BGP makes it available to other autonomous systems.

Use the synchronization command if there are routers in the autonomous system that do not speak BGP.

Examples

The following example enables a router to advertise a network route without waiting for the IGP:

router bgp 120
 no synchronization

table-map

To modify metric and tag values when the IP routing table is updated with Border Gateway Protocol (BGP) learned routes, use the table-map router configuration command. To disable this function, use the no form of the command.

table-map route-map-name

no table-map route-map-name

Syntax Description

route-map-name

Route-map name, from the route-map command.

Defaults

Disabled

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

This command adds the route-map name defined by the route-map command to the IP routing table. This command is used to set the tag name and the route metric to implement redistribution.

You can use match clauses of route maps in the table-map command. IP access list, autonomous system paths, and next-hop match clauses are supported.

Examples

In the following example, the Cisco IOS software is configured to automatically compute the tag value for the BGP learned routes and to update the IP routing table:

route-map tag
 match as path 10
 set automatic-tag
!
router bgp 100
 table-map tag

Related Commands
Command Description

match as-path

Matches a BGP autonomous system path access list.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing.

match ip next-hop

Redistributes any routes that have a next hop router address passed by one of the access lists specified.

route-map (IP)

Defines the conditions for redistributing routes form one routing protocol into another, or enables policy routing.

timers bgp

To adjust Border Gateway Protocol (BGP) network timers, use the timers bgp router configuration command. To reset the BGP timing defaults, use the no form of this command.

timers bgp keepalive holdtime

no timers bgp

Syntax Description

keepalive

Frequency, in seconds, with which the Cisco IOS software sends keepalive messages to its peer. The default is 60 seconds.

holdtime

Interval, in seconds, after not receiving a keepalive message that the software declares a peer dead. The default is 180 seconds.

Defaults

keepalive: 60 seconds
holdtime: 180 seconds

Command Modes

Router configuration

Command History
Release Modification

10.0

This command was introduced.

Examples

The following example changes the keepalive timer to 70 seconds and the holdtime timer to 210 seconds:

timers bgp 70 210

Related Commands
Command Description

clear ip bgp peer-group

Removes all the members of a BGP peer group.

router bgp

Configures the BGP routing process.

show ip bgp

Displays entries in the BGP routing table.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Jun 1 17:40:12 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.