Table Of Contents
BGP Commands
aggregate-address
auto-summary (BGP)
bgp always-compare-med
bgp bestpath compare-routerid
bgp bestpath med-confed
bgp bestpath missing-as-worst
bgp client-to-client reflection
bgp cluster-id
bgp confederation identifier
bgp confederation peers
bgp dampening
bgp default local-preference
bgp deterministic-med
bgp log-neighbor-changes
bgp fast-external-fallover
bgp router-id
clear ip bgp
clear ip bgp dampening
clear ip bgp flap-statistics
clear ip bgp peer-group
default-information originate (BGP)
default-metric (BGP)
distance bgp
distribute-list in (BGP)
distribute-list out (BGP)
ip as-path access-list
ip bgp-community new-format
ip bgp fast-external-fallover
ip community-list
match as-path
match community
maximum-paths
neighbor advertisement-interval
neighbor advertise-map non-exist-map
neighbor default-originate
neighbor description
neighbor distribute-list
neighbor ebgp-multihop
neighbor filter-list
neighbor maximum-prefix
neighbor next-hop-self
neighbor password
neighbor peer-group (assigning members)
neighbor peer-group (creating)
neighbor prefix-list
neighbor remote-as
neighbor remove-private-as
neighbor route-map
neighbor route-reflector-client
neighbor send-community
neighbor shutdown
neighbor soft-reconfiguration
neighbor timers
neighbor update-source
neighbor version
neighbor weight
network (BGP)
network backdoor
router bgp
set as-path
set comm-list delete
set community
set dampening
set ip next-hop (BGP)
set metric-type internal
set origin
set weight
show ip bgp
show ip bgp cidr-only
show ip bgp community
show ip bgp community-list
show ip bgp dampened-paths
show ip bgp filter-list
show ip bgp flap-statistics
show ip bgp inconsistent-as
show ip bgp neighbors
show ip bgp paths
show ip bgp peer-group
show ip bgp regexp
show ip bgp summary
synchronization
table-map
timers bgp
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 Network Protocols Configuration Guide, Part 1.
aggregate-address
To create an aggregate entry in a Border Gateway Protocol (BGP) routing table, use the aggregate-address command in router configuration mode. 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 the route map used to set the attribute of the aggregate route.
|
Defaults
This command is disabled by default.
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 keywords 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 want to suppress only 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.
Using the advertise-map keyword selects specific routes that will be used to build different components of the aggregate route, such as AS_SET or community. This form of the aggregate-address command is useful when the components of an aggregate are in separate autonomous systems and you want to create an aggregate with AS_SET, and advertise it back to some of the same autonomous systems. You must remember to omit the specific autonomous system numbers from the AS_SET to prevent the aggregate from being dropped by the BGP loop detection mechanism at the receiving router. IP access lists and autonomous system path access lists match clauses are supported.
Using the attribute-map keyword allows attributes of the aggregate route to be changed. This form of the aggregate-address command is useful when one of the routes forming the AS_SET is configured with an attribute such as the community no-export attribute, which would prevent the aggregate route from being exported. An attribute map route map can be created to change the aggregate attributes.
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.
aggregate-address 10.0.0.0 255.0.0.0 as-set
In the following example, a route map called map-one is created matching on an as-path access list. The path advertised for this route will be an AS_SET consisting of elements contained in paths that are matched in the route map.
ip as-path access-list 1 deny ^1234_
ip as-path access-list 1 permit .*
aggregate-address 10.0.0.0 255.0.0.0 as-set advertise-map map-one
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 command in router configuration mode. To disable this feature and transmit 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
The behavior of this command is enabled by default (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 an 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:
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 command in router configuration mode. 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:
nobgp bestpath as-path ignore
no bgp bestpath as-path ignore
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
The following example prevents the BGP router from considering as-path as a factor in choosing a route.
Related Commandsrouter bgp 210
bgp bestpath as-path ignore
Command
|
Description
|
show ip bgp neighbors
|
Displays information about the TCP and BGP connections to neighbors.
|
bgp bestpath compare-routerid
To compare similar routes received from external Border Gateway Protocol (eBGP) peers during the best path selection process and switch the bestpath to the route with the lowest router ID, use the bgp bestpath compare-routerid command in router configuration mode. To return the router to the default, use the no form of this command.
bgp bestpath compare-routerid
no bgp bestpath compare-routerid
BGP does not compare similar paths received from eBGP peers during the best path selection process and switch the bestpath to the route with the lowest router ID.
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
12.0S
|
This command was introduced.
|
12.0ST
|
This command was introduced.
|
Usage Guidelines
By default, during the best path selection process, when BGP receives similar routes from eBGP peers (all the attributes are the same except for the router ID), the best path is not switched to the route with the lowest router ID if that route was not the first route received. If the bgp bestpath compare-routerid command is enabled, then similar routes are compared and the best path is switched to the route with the lowest router ID.
The following example shows the BGP speaker in autonomous system 500 configured to compare the router IDs of similar paths, regardless of the autonomous system from which the paths are received:
bgp bestpath compare-routerid
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
bgp bestpath med-confed
To enable MED comparison among paths learned from confederation peers, use the bgp bestpath med-confed command in router configuration mode. 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 ASs in the path (an external AS is an AS that is not within the confederation). If there is an external AS 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 bgp bestpath med-confed 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 AS 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.
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 command in router configuration mode. 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 BGP router to consider a missing MED attribute in a path as having a value of infinity, making this path the least desirable path.
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 BGP route reflector to clients, use the bgp client-to-client reflection command in router configuration mode. 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.
neighbor 10.24.95.22 route-reflector-client
neighbor 10.24.95.23 route-reflector-client
neighbor 10.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 configure the specified neighbor as its client.
|
show ip bgp
|
Display entries in the BGP routing table.
|
bgp cluster-id
To configure the cluster ID if the BGP cluster has more than one route reflector, use the bgp cluster-id command in router configuration mode. 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.
neighbor 172.16.70.24 route-reflector-client
Related Commands
bgp confederation identifier
To specify a BGP confederation identifier, use the bgp confederation identifier command in router configuration mode. 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
One way to reduce the 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 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 10.2.3.4 is someone inside your routing domain confederation. Neighbor 10.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.
bgp confederation identifier 5
bgp confederation peers 4002 4003 4004 4005 4006 4007
neighbor 10.2.3.4 remote-as 4002
neighbor 10.4.5.6 remote-as 510
Related Commands
bgp confederation peers
To configure the autonomous systems that belong to the confederation, use the bgp confederation peers command in router configuration mode. 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 number.
|
Defaults
No confederation peers are configured.
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:
bgp confederation peers 1091 1092 1093
Related Commands
bgp dampening
To enable BGP route dampening or change various BGP route dampening factors, use the bgp dampening command in global configuration mode. 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) Reuse values based on accumulated penalties. 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 from 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. When the max-suppress-time is configured, the maximum penalty will never be exceeded, regardless of the number of times that the prefix dampens. The maximum penalty is computed with the following formula:
Max penalty = reuse-limit *2^(maximum suppress time/half time)
|
route-map map
|
(Optional) Name of route map that controls where BGP route dampening is enabled.
|
Defaults
This command is 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.
When BGP dampening is configured and a prefix is withdrawn, BGP considers the withdrawn prefix as a flap and increases the penalty by a 1000. If BGP receives an attribute change, BGP increases the penalty by 500. If then the prefix has been withdrawn, BGP keeps the prefix in the BGP table as a history entry. If the prefix has not been withdrawn by the neighbor and BGP is not using this prefix, the prefix is marked as dampened. Dampened prefixes are not used in the BGP decision process and not installed to the routing table.
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
bgp default local-preference
To change the default local preference value, use the bgp default local-preference command in router configuration mode. 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:
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 enforce the deterministic comparison of the Multi Exit Discriminator (MED) variable between all paths received from the same autonomous system, use the bgp deterministic-med command in router configuration mode. To disable 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 enforce the deterministic comparison of the MED variable between all paths received from the same autonomous system.
Command Modes
Router configuration
Address-family configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
After the bgp always-compare-med command is configured, all paths for the same prefix that are received from different neighbors, which are in the same autonomous system, will be grouped together and sorted by the ascending MED value (received-only paths are ignored and not grouped or sorted). The best path selection algorithm will then pick the best paths using the existing rules; the comparison is made on a per neighbor autonomous system basis and then global basis. The grouping and sorting of paths occurs immediately after this command is entered. For correct results, all routers in the local autonomous system must have this command enabled (or disabled).
Examples
The following example specifies that the BGP router compare MED variables when choosing among routes advertised by the same subautonomous system within a confederation:
Router(config)# router bgp 204
Router(config-router)# bgp deterministic-med
The following example show ip bgp command output illustrates how route selection is affected by the configuration of the bgp deterministic-med command. The order in which routes are received affects how routes are selected for best path selection when the bgp deterministic-med command is not enabled.
The following sample output from the show ip bgp command shows three paths that are received for the same prefix (10.100.0.0), and the bgp deterministic-med command is not enabled:
router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 40
Paths: (3 available, best #3, advertised over IBGP, EBGP)
192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external, best
If the bgp deterministic-med command is not enabled on the router, the route selection can be affected by the order in which the routes are received. Consider the following scenario in which a router received three paths for the same prefix:
The clear ip bgp * command is entered to clear all routes in the local routing table.
The show ip bgp command is issued again after the routing table has been repopulated. Note that the order of the paths changed after clearing the BGP session. The results of the selection algorithm also changed. This occurred because the order in which the paths were received was different for the second session.
Router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 2
Paths: (3 available, best #3, advertised over EBGP)
109 192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal, best
If the bgp deterministic-med command is enabled, then the result of the selection algorithm will always be the same, regardless of the order in which the paths are received by the local router. The following output is always generated when the bgp deterministic-med command is entered on the local router in this scenario:
Router# show ip bgp 10.100.0.0
BGP routing table entry for 10.100.0.0/16, version 15
Paths: (3 available, best #1, advertised over EBGP)
192.168.43.10 from 192.168.43.10 (192.168.43.1)
Origin IGP, metric 0, localpref 100, valid, internal, best 3
192.168.43.22 from 192.168.43.22 (192.168.43.2)
Origin IGP, metric 20, localpref 100, valid, internal 3
192.168.43.3 from 192.168.43.3 (10.4.1.1)
Origin IGP, metric 30, valid, external
Related Commands
Command
|
Description
|
clear ip bgp
|
Resets a BGP connection or session.
|
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 log-neighbor-changes
To enable logging of BGP neighbor resets, use the bgp log-neighbor-changes command in router configuration mode. 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.1CC 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 cause a substantial performance impact, 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:
Related Commands
Command
|
Description
|
logging buffered
|
Enables logging of message 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).
|
bgp fast-external-fallover
To immediately reset the BGP sessions of any directly adjacent external peers if the link used to reach them goes down, use the bgp fast-external-fallover command in router configuration mode. 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
The behavior of this command is enabled by default.
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:
no bgp fast-external-fallover
bgp router-id
To configure a fixed router ID for a BGP-speaking router, use the bgp router-id command in router configuration mode. To remove the bgp router-id command from the configuration file and restore the default value of the router ID, use the no form of this command.
bgp router-id ip-address
no bgp router-id ip-address
Syntax Description
ip-address
|
IP address of the router.
|
Defaults
The router ID is set to the IP address of a loopback interface if one is configured. If no virtual interfaces are configured, the highest IP address is configured for a physical interface on that router. Peering sessions will be reset if the router ID is changed.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
Use this command to configure a fixed router ID as an identifier of the router running BGP. A loopback interface, if one is configured, is more effective than a fixed interface as an identifier because there is no physical link to go down.
Examples
The following example shows the local router configured with the router ID of 192.168.70.24:
bgp router-id 192.168.70.24
Related Commands
Command
|
Description
|
show ip bgp
|
Displays entries in the BGP routing table.
|
clear ip bgp
To reset a BGP connection using BGP soft reconfiguration, use the clear ip bgp command in privileged EXEC mode at the system prompt.
clear ip bgp {* | address | peer-group name} [soft [in | out]]
Syntax Description
*
|
Specifies that all current BGP sessions will be reset.
|
address
|
Specifies that only the identified BGP neighbor will be reset.
|
peer-group-name
|
Specifies that the specified BGP peer group will be reset.
|
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 is triggered.
|
Defaults
No reset is initiated.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
If you specify BGP soft reconfiguration, by including the soft keyword, the sessions are not reset and the router sends all routing updates again. To generate new inbound updates without resetting the BGP session, the local BGP speaker should store all received updates without modification regardless of whether it is accepted by the inbound policy, using the neighbor soft-reconfiguration command. This process is memory intensive and should be avoided if possible. Outbound BGP soft configuration does not have any memory overhead. 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 conditions occur:
•
Additions or changes to the BGP-related access lists
•
Changes to BGP-related weights
•
Changes to BGP-related distribution lists
•
Changes in the BGP timer's specifications
•
Changes to the BGP administrative distance
•
Changes to BGP-related route maps
Examples
The following example resets all current BGP sessions:
Related Commands
clear ip bgp dampening
To clear BGP route dampening information and unsuppress the suppressed routes, use the clear ip bgp dampening command in privileged EXEC mode.
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
Privileged EXEC
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Examples
The following example clears route dampening information about the route to network 192.168.0.0 and unsuppresses its suppressed routes:
clear ip bgp dampening 192.168.0.0 255.255.0.0
Related Commands
clear ip bgp flap-statistics
To clear BGP flap statistics, use the clear ip bgp flap-statistics command in privileged EXEC mode.
clear ip bgp flap-statistics [{regexp regexp} | {filter-list list} | {address mask}]
clear ip bgp [address] flap-statistics
Syntax Description
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.
|
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.
|
mask
|
(Optional) Network mask applied to the address.
|
Defaults
No statistics are cleared.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
If no arguments or keywords are specified, the router will clear BGP 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 access list 3:
clear ip bgp flap-statistics filter-list 3
Related Commands
Command
|
Description
|
bgp dampening
|
Enables BGP route dampening or change various BGP route dampening factors.
|
clear ip bgp peer-group
To remove all the members of a BGP peer group, use the clear ip bgp peer-group command in privileged EXEC mode.
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
Privileged EXEC
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Examples
The following example removes all members from the BGP peer group internal:
clear ip bgp peer-group internal
Related Commands
default-information originate (BGP)
To control the redistribution of a protocol or network into the BGP, use the default-information originate command in router configuration mode. 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
This command is disabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The default-information originate command should be used if the network operator needs to control the redistribution of default routes. Using the default-information originate command in BGP is similar to using the network command. However, to achieve the same result as configuring the network command with the route 0.0.0.0, the default-information originate command requires an explicit redistribution of the route 0.0.0.0. The network command requires only that route 0.0.0.0 is specified in the Interior Gateway Protocol (IGP) routing table. For this reason, the network command is preferred for redistributing default routes and protocols into BGP.
Examples
The following router configuration mode example configures BGP to redistribute OSPF into BGP:
default-information originate
Related Commands
Command
|
Description
|
neighbor ebgp-multihop
|
Accepts and attempt 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.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
default-metric (BGP)
To set a default metric for routes redistributed into Border Gateway Protocol (BGP), use the default-metric command in address family or router configuration mode. To remove the configured value and return BGP to default operation, use the no form of this command.
default-metric number
no default-metric number
Syntax Description
number
|
Default metric value applied to the redistributed route. The range of values for this argument is from 1 to 4294967295.
|
Defaults
The following is default behavior if this command is not configured or if the no form of this command is entered:
•
The metric of redistributed interior gateway protocol (IGP) routes is set to a value that is equal to the interior BGP (iBGP) metric.
•
The metric of redistributed connected and static routes is set to 0.
When this command is enabled, the metric for redistributed connected routes is set to 0.
Command Modes
Address family configuration
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
12.0(7)T
|
Address family configuration mode support was added.
|
Usage Guidelines
The default-metric command is used to set the metric value for routes redistributed into BGP with the redistribute command. A default metric can be configured to solve the problem of redistributing routes with incompatible metrics. Assigning the default metric will allow redistribution to occur.
This value is the Multi Exit Discriminator (MED) that is evaluated by BGP during the best path selection process. The MED is a non-transitive value that is processed only within the local autonomous system and adjacent autonomous systems. The default metric is not set if the received route has a MED value.
Note
When enabled, the default-metric command applies a metric value of 0 to redistributed connected routes. The default-metric command does not override metric values that are applied with the redistribute command.
Examples
In the following example, a metric of 1024 is set for routes redistributed into BGP from OSPF:
Router(config)# router bgp 50000
Router(config-router)# address-family ipv4 unicast
Router(config-router-af)# default-metric 1024
Router(config-router-af)# redistribute ospf 10
Router(config-router-af)# end
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 command in router configuration mode. 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 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 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 IGP, so the administrative distance values are set accordingly:
neighbor 192.168.6.6 remote-as 123
neighbor 172.16.1.1 remote-as 47
distribute-list in (BGP)
To filter routes or networks received in incoming Border Gateway Protocol (BGP) updates, use the distribute-list in command in router configuration mode. To delete the distribute list and remove it from the running configuration file, use the no form of this command.
distribute-list acl-number | prefix list-name in
no distribute-list acl-number | prefix list-name in
Syntax Description
acl-number
|
IP access list number. The access list defines which networks are to be received and which are to be suppressed in routing updates.
|
prefix list-name
|
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 prefixes in the prefix list.
|
Note
Interface type and number arguments may be displayed in the CLI depending on the installed version of Cisco IOS software. However, the interface arguments are not support in any software release.
Defaults
If this command is configured without a predefined access list, the distribute list will default to permitting all traffic.
Command Modes
Router configuration
Note
The distribute-list in command can be entered in address family configuration mode. However, address family configuration is not recommended and not supported.
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The acl-number arguments was added.
|
12.0
|
The prefix list-name argument was added.
|
Usage Guidelines
The distribute-list in command is used to filter incoming BGP updates. An access list must be defined prior to configuration of this command. In addition to access lists, prefix list can be used to filter based upon the prefix length, making it possible to filter either on the prefix list, the gateway, or both for incoming updates. The session must be reset with the clear ip bgp command before the distribute list will take effect. To suppress networks from being advertised in updates, use the distribute-list out command.
Note
We recommend that you use IP prefix lists (configured with the ip prefix-list command in global configuration mode) instead of distribute lists. IP prefix lists provide improved performance and are simpler to configure. Distribute list configuration will be removed from the CLI at a future date.
Note
Prefix lists and access lists are mutually exclusive when configuring a distribute list. We recommend that you do not use both the prefix-list and access-list-name arguments with the distribute-list in command.
Examples
In the following example, a prefix list and distribute list are defined to configure the BGP routing process to accept traffic from only network 192.168.1.0 and network 10.108.0.0. An inbound route refresh is initiated to activate the distribute-list.
Router(config)# ip prefix-list RED deny 0.0.0.0/0 le 32
Router(config)# ip prefix-1ist RED permit 10.108.0.0/16
Router(config)# ip prefix-list RED permit 192.168.1.0/24
Router(config)# router bgp 50000
Router(config-router)# network 10.108.0.0
Router(config-router)# distribute-list prefix RED in
Router(config-router)# end
Router# clear ip bgp in
In the following example, an access list and a distribute list are defined to configure the BGP routing process to accept traffic from only network 192.168.1.0 and network 10.108.0.0. An inbound route refresh is initiated to activate the distribute-list.
Router(config)# access-list 1 permit 192.168.1.0
Router(config)# access-list 1 permit 10.108.0.0
Router(config)# access-list 1 deny 0.0.0.0 255.255.255.255
Router(config)# router bgp 50000
Router(config-router)# network 10.108.0.0
Router(config-router)# distribute-list 1 in
Router(config-router)# end
Related Commands
Command
|
Description
|
access-list
|
Defines an IP access list.
|
clear ip bgp
|
Resets a BGP connection or session.
|
distribute-list out (BGP)
|
Suppresses networks from being advertised in outbound BGP updates.
|
ip prefix-list
|
Creates an entry in a prefix list.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
distribute-list out (BGP)
To suppress networks from being advertised in outbound Border Gateway Protocol (BGP) updates, use the distribute-list out command in router configuration mode. To delete the distribute list and remove it from the running configuration file, use the no form of this command.
distribute-list acl-number | prefix list-name out [protocol process-number | connected | static]
no distribute-list acl-number | prefix list-name out [protocol process-number | connected | static]
Syntax Description
acl-number
|
IP access list number. The access list defines which networks are to be received and which are to be suppressed in routing updates.
|
prefix list-name
|
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 prefixes in the prefix list.
|
protocol process-number
|
Specifies the routing protocol to apply the distribution list. BGP, EIGRP, OSPF, and RIP are supported. The process number is entered for all routing protocols, except RIP. The process number is a value from 1 to 65535.
|
connected
|
Specifies peers and networks learned through connected routes.
|
static
|
Specifies peers and networks learned through static routes.
|
Note
Interface type and number arguments may be displayed in the CLI depending on the installed version of Cisco IOS software. However, the interface arguments are not support in any software release.
Defaults
If this command is configured without a predefined access list, the distribute list will default to permitting all traffic.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The acl-number argument was added.
|
12.0
|
The prefix list-name argument was added.
|
Usage Guidelines
The distribute-list out command is used to filter outbound BGP updates. An access list must be defined prior to configuration of this command. In addition to access lists, prefix list can be used to filter based upon the prefix length, making it possible to filter either on the prefix list, the gateway, or both for incoming updates. The session must be reset with the clear ip bgp command before the distribute list will take effect. To filter routes that are received in inbound updates, use the distribute-list in command.
Entering a protocol and/or process-number arguments causes the distribute list to be applied to only routes derived from the specified routing process. Addresses not specified in the distribute-list command will not be advertised in outgoing routing updates after a distribute list is configured.
Note
We recommend that you use IP prefix lists (configured with the ip prefix-list command in global configuration mode) instead of distribute lists. IP prefix lists provide improved performance and are simpler to configure. Distribute list configuration will be removed from the CLI at a future date.
Note
Prefix lists and access lists are mutually exclusive when configuring distribute lists. We recommend that you do not use both the prefix-list and access-list-name arguments with the distribute-list out command.
Examples
In the following example, an access list and a distribute list are defined to configure the BGP routing process to advertise only network 192.168.0.0. An outbound route refresh is initiated to activate the distribute-list.
Router(config)# access-list 1 permit 192.168.0.0 0.0.255.255
Router(config)# access-list 1 deny 0.0.0.0 255.255.255.255
Router(config)# router bgp 50000
Router(config-router)# distribute-list 1 out
Router(config-router)# end
Related Commands
Command
|
Description
|
access-list
|
Defines an IP access list.
|
clear ip bgp
|
Resets a BGP connection or session.
|
distribute-list in (BGP)
|
Filters routes and networks received in updates.
|
ip prefix-list
|
Creates an entry in a prefix list.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
ip as-path access-list
To define a BGP-related access list, use the ip as-path access-list command in global configuration mode. 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 {permit | deny} as-regular-expression
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 Dial Solutions 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. In addition, you can assign weights based on a set of filters. 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 172.16.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$
neighbor 192.168.6.6 remote-as 123
neighbor 172.16.1.1 remote-as 47
neighbor 172.16.1.1 filter-list 1 out
Related Commands
ip bgp-community new-format
To display BGP communities in the format AA:NN (AS-community number/2-byte number), use the ip bgp-community new-format command in global configuration mode.To re-enable the previous display format for BGP communities (NN:AA), 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.
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Usage Guidelines
RFC 1997, BGP Communities Attribute specifies that a BGP community is made up of two parts that are 2 bytes long. The first part is the autonomous system 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 AA:NN to conform to RFC 1997.
Examples
The following example upgrades a router that uses the 32-bit number community format to the AA:NN format:
Router(config)# ip bgp-community new-format
The following example shows how BGP community numbers are displayed when the ip bgp-community new-format command is enabled:
Router# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 4
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
10.0.33.35 from 10.0.33.35 (192.168.3.3)
Origin incomplete, metric 10, localpref 100, valid, external
0.0.0.0 from 0.0.0.0 (10.0.33.34)
Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best
Related Commands
Command
|
Description
|
show ip bgp
|
Display entries in the BGP routing table.
|
ip bgp fast-external-fallover
To enable per-interface fast external fallover, enter the ip bgp fast-external-fallover command in interface configuration mode. To revert back to the current behavior, use the no format of this command.
ip bgp fast-external-fallover [permit | deny]
no ip bgp fast-external-fallover [permit | deny]
Syntax Description
permit
|
Allows per-interface fast external fallover.
|
deny
|
Prevents per-interface fast external fallover.
|
Defaults
Global fast external fallover.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.0ST
|
This command was introduced.
|
Usage Guidelines
When you specify the ip bgp fast-external-fallover command with the permit or deny keyword, it overrides the global setting. If you enter the no format of the command, the global setting is in effect for this interface.
Examples
The following example enables per-interface fast-external-fallover on interface Ethernet 0/0:
Router(config)# interface ethernet 0/0
Router(config-if)# ip bgp fast-external-fallover permit
ip community-list
To create or configure a Border Gateway Protocol (BGP) community list and to control access to it, use the ip community-list command in global configuration command. To delete the community list, use the no form of this command.
ip community-list {standard | standard list-name {deny | permit} [community-number] [AA:NN]
[internet] [local-AS] [no-advertise] [no-export]} | {expanded | expanded list-name {deny |
permit} regexp}
no ip community-list standard | expanded | {expanded | standard} list-name
Syntax Description
standard
|
Configures a standard community list using a number from 1 to 99 to identify one or more permit or deny groups of communities.
|
standard list-name
|
Configures a named standard community list.
|
permit
|
Permits access for a matching condition.
|
deny
|
Denies access for a matching condition.
|
community-number
|
(Optional) Specifies a community as a 32-bit number from 1 to 4294967200. A single community can be entered or multiple communities can be entered, each separated by a space.
|
AA:NN
|
(Optional) Autonomous system number and network number entered in the 4-byte new community format. This value is configured with with two 2-byte numbers separated by a colon. A number from 1 to 65535 can be entered each 2-byte number. A single community can be entered or multiple communities can be entered, each separated by a space.
|
internet
|
(Optional) Specifies the Internet community. Routes with this community are advertised to all peers (internal and external).
|
no-export
|
(Optional) Specifies the no-export community. Routes with this community are advertised to only peers in the same autonomous system or to only other subautonomous systems within a confederation. These routes are not advertised to external peers.
|
local-as
|
(Optional) Specifies the local-as community. Routes with community are advertised to only peers that are part of the local autonomous system or to only peers within a subautonomous system of a confederation. These routes are not advertised external peers or to other subautonomous systems within a confederation.
|
no-advertise
|
(Optional) Specifies the no-advertise community. Routes with this community are not advertised to any peer (internal or external).
|
expanded
|
Configures an expanded community list number from 100 to 500 to identify one or more permit or deny groups of communities.
|
expanded list-name
|
Configures a named expanded community list.
|
regexp
|
Configures a regular expression that is used to specify a pattern to match against an input string.
Note Regular expressions can be used only with expanded community lists
|
Defaults
BGP community exchange is not enabled by default. It is enabled on a per-neighbor basis with the neighbor send-community command.
The Internet community is applied to all routes or prefixes by default, until any other community value is configured with this command or the set community command.
Once a permit value has been configured to match a given set of communities, the community list defaults to an implicit deny for all other community values.
Community values entered in the new format (AA:NN) are converted to 32-bit numbers if the ip bgp-community new-format command is not enabled on the local router.
Defaults
Global configuration
Command History
Release
|
Modification
|
10.3
|
This command was introduced.
|
12.0
|
Support for the local-as community was introduced.
|
12.0(10)S
|
Named community list support was added.
|
12.0(16)ST
|
Named community list support was introduced.
|
12.1(9)E
|
Named community list support was integrated into Cisco IOS Release 12.1(9)E.
|
12.2(8)T
|
Named community list support was integrated into Cisco IOS Release 12.2(8)T.
|
12.0(22)S
|
The maximum number of expanded community list numbers was increased from 199 to 500.
|
12.2(15)T
|
The maximum number of expanded community list numbers was increased from 199 to 500.
|
Usage Guidelines
The ip community-list command is used to configure BGP community filtering. BGP community values are configured as a 32-bit number (old format) or as a 4-byte number (new format). The new community format is enabled when the ip bgp-community new-format command is entered in global configuration mode. The new community format consists of a 4-byte value. The first two bytes represent the autonomous system number, and the trailing two bytes represent a user-defined network number. Named and numbered community lists are supported. BGP community attribute exchange between BGP peers is enabled when the neighbor send-community command is configured for the specified neighbor. The BGP community attribute is defined in RFC-1997 and RFC-1998.
Standard Community Lists
Standard community lists are used to configure well-known communities and specific community numbers. A maximum of 16 communities can be configured in a standard community list. If you attempt to configure more than 16 communities, the trailing communities that exceed the limit are not processed or saved to the running configuration file.
Expanded Community Lists
Expanded community lists are used to filter communities using a regular expression. Regular expressions are used to configure patterns to match community attributes. The order for matching using the * or + character is longest construct first. Nested constructs are matched from the outside in. Concatenated constructs are matched beginning at the left side. If a regular expression can match two different parts of an input string, it will match the earliest part first. For more information about configuring regular expressions, see the Regular Expressions appendix of the Cisco IOS Terminal Services Configuration Guide.
Community List Processing
When multiple values are configured in the same community list statement, a logical AND condition is created. All community values must match to satisfy an AND condition. When multiple values are configured in separate community list statements, a logical OR condition is created. The first list that matches a condition is processed.
Examples
In the following example, a standard community list is configured that permits routes that from network 10 in autonomous system 50000:
Router(config)# ip community-list 1 permit 50000:10
In the following example, a standard community list is configured that permits only routes from peers in the same autonomous system or from subautonomous system peers in the same confederation:
Router(config)# ip community-list 1 permit no-export
In the following example, a standard community list is configured to deny routes that carry communities from network 40 in autonomous system 65534 and from network 60 in autonomous system 65412. This example shows a logical AND condition; all community values must match in order for the list to be processed.
Router(config)# ip community-list 2 deny 65534:40 65412:60
In the following example, a named standard community list is configured that permits all routes within the local autonomous system or permits routes from network 20 in autonomous system 40000. This example shows a logical OR condition; the first match is processed.
Router(config)# ip community-list standard RED permit local-AS
Router(config)# ip community-list standard RED permit 40000:20
In the following example, an expanded community list is configured that will deny routes that carry communities from any private autonomous system:
Router(config)# ip community-list 500 deny _64[6-9][0-9][0-9]_|_65[0-9][0-9][0-9]_
In the following example, a named expanded community list configured that denies routes from network 1 through 99 in autonomous system 50000:
Router(config)# ip community-list expanded BLUE deny 50000:[0-9][0-9]_
Related Commands
Command
|
Description
|
match community
|
Matches a BGP community.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set community
|
Sets the BGP communities attribute.
|
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.
|
show ip bgp regexp
|
Displays routes that match a locally configured regular expression.
|
match as-path
To match a BGP autonomous system path access list, use the match as-path command in route-map configuration mode. 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 example, the weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
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.
The implemented weight is based on the first matched autonomous system path.
Examples
The following example sets the autonomous system path to match BGP autonomous system path access list 20:
Related Commands
Command
|
Description
|
match community-list
|
Matches a BGP community.
|
match interface
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next-hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric
|
Redistributes routes with the metric specified.
|
match route-type
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set as-path
|
Modifies an autonomous system path for BGP routes.
|
set automatic-tag
|
Automatically computes the tag value in a route map configuration.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set origin
|
Sets the BGP origin code.
|
set tag
|
Sets the value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match community
To match a Border Gateway Protocol (BGP) community, use the match community command in route-map configuration mode. To remove the match community command from the configuration file and restore the system to its default condition where the software removes the BGP community list entry, use the no form of this command.
match community{standard-list-number | expanded-list-number | community-list-name
[exact-match]}
no match community {standard-list-number | expanded-list-number | community-list-name
[exact-match]}
Syntax Description
standard-list-number
|
Specifies a standard community list number from 1 to 99 that identifies one or more permit or deny groups of communities.
|
expanded-list-number
|
Specifies an expanded community list number from 100 to 199 that identifies one or more permit or deny groups of communities.
|
community-list-name
|
The community list name.
|
exact-match
|
(Optional) Indicates that an exact match is required. All of the communities and only those communities specified must be present.
|
Defaults
No community list is matched by the route map.
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 command 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 number or name is one of the types of match commands applicable to BGP.
Examples
The following example shows that the routes matching community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.
Router(config)# ip community-list 1 permit 109
Router(config)# route-map set_weight
Router(config-route-map)# match community 1
Router(config-route-map)# set weight 100
The following example shows that the routes matching community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.
Router(config)# ip community-list 1 permit 109
Router(config)# route-map set_weight
Router(config-route-map)# match community 1 exact
Router(config-route-map)# set weight 200
In the following example, the routes that match community list LIST_NAME will have the weight set to 100. Any route that has community 101 alone will have the weight set to 100.
Router(config)# ip community-list 1 permit 101
Router(config)# route-map set_weight
Router(config-route-map)# match community LIST_NAME
Router(config-route-map)# set weight 100
Related Commands
Command
|
Description
|
ip community-list
|
Creates a community list for BGP and controls access to it.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another.
|
set weight
|
Specifies the BGP weight for the routing table.
|
maximum-paths
To configure the maximum number of parallel routes that an IP routing protocol will install into the routing table, use the maximum-paths command in router configuration or address family configuration mode. To restore the default value, use the no form of this command.
maximum-paths number [import number ]| import number
no maximum-paths number | import number
Syntax Description
number
|
Specifies the number of routes to install to the routing table. See the usage guidelines for the number of paths that can be configured with this argument.
|
import number
|
(Optional) Specifies the number of redundant paths that can be configured as back up multipaths for a VRF. This keyword can only be configured under a VRF in address family configuration mode.
Note We recommend that this feature is enabled only where needed and that the number of import paths be kept to the minimum (Typically, not more than two paths). For more information, see the related note in the usage guidelines of this command reference page.
|
Defaults
Border Gateway Protocol (BGP) by default will install only one best path in the routing table. The default for all other IP routing protocols is four paths.
Command Modes
Router configuration
Address family configuration
Command History
Release
|
Modification
|
11.2
|
This command was introduced.
|
12.0(25)S
|
The import keyword was introduced.
|
12.2(13)T
|
The import keyword was integrated into Cisco IOS Release 12.2(13)T.
|
12.2(14)S
|
The import keyword was integrated into Cisco IOS Release 12.2(14)S.
|
Usage Guidelines
The maximum-paths command is used to set the number of parallel (equal-cost) routes that BGP will install in the routing table to configure multipath loadsharing. The number of paths that can be configured is determined by the version of Cisco IOS software. The following list shows current limits:
•
Cisco IOS Release 12.0S based software: 8 paths
•
Cisco IOS Release 12.3T based software: 16 paths
•
Cisco IOS Release 12.2S based software: 32 paths
The maximum-paths command cannot be configured with the maximum-paths eibgp command for the same BGP routing process.
Configuring VRF Import Paths
A VRF will import only one path (best path) per prefix from the source VRF table, unless the prefix is exported with a different route-target. If the best path goes down, the destination will not be reachable until the next import event occurs, and then a new best path will be imported into the VRF table. The import event runs every 15 seconds by default.
The import keyword allows you to configure the VRF table to accept multiple redundant paths in addition to the best path. An import path is a redundant path, and it can have a next hop that matches an installed multipath.This feature should be used when there are multiple paths with identical next hops available to ensure optimal convergence times. A typical application of this feature is to configure redundant paths in a network that has multiple route reflectors for redundancy.
Note
Configuring redundant paths with the import keyword can increase CPU and memory utilization significantly, especially in a network where there are many prefixes to learn and a large number of configured VRFs. It is recommended that this feature is only configured as necessary and that the minimum number of redundant paths are configured (Typically, not more than two).
Examples
In the following example, the router is configured to install 2 parallel routes in the BGP routing table:
Router(config)# router bgp 40000
Router(config-router)# maximum-paths 2
In the following example, the router is configured to install 6 equal-cost routes and 2 import routes (backup) in the VRF routing table:
Router(config)# router bgp 40000
Router(config-router)# address-family ipv4 vrf RED
Router(config-router-af)# maximum-paths 6 import 2
In the following example, the router is configured to install 2 import routes in the VRF routing table:
Router(config)# router bgp 100
Router(config-router)# address-family ipv4 vrf BLUE
Router(config-router-af)# maximum-paths import 2
neighbor advertisement-interval
To set the minimum interval between the sending of BGP routing updates, use the neighbor advertisement-interval command in router configuration mode. 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:
neighbor 4.4.4.4 advertisement-interval 10
Related Commands
neighbor advertise-map non-exist-map
To install a Border Gateway Protocol (BGP) route as a locally originated route into a BGP routing table for conditional advertisement, use the neighbor advertise-map non-exist-map command in router configuration mode. To disable conditional advertisement, use the no form of this command.
neighbor{ip-address} advertise-map {map1-name} non-exist-map {map2-name}
no neighbor{ip-address} advertise-map {map1-name} non-exist-map {map2-name}
Syntax Description
ip-address
|
Specifies the IP address of the router that should receive conditional advertisements for a given set of routes.
|
map-name
|
Specifies the name of the advertise-map and the non-exist-map.
|
Defaults
The BGP Conditional Advertisement feature is not enabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.1CC
|
This command was introduced.
|
11.2
|
This command was integrated into Cisco IOS Release 11.2.
|
Usage Guidelines
Use the neighbor advertise-map non-exist-map router configuration command to conditionally advertise selected routes. The route map associated with the non-exist-map specifies the prefix that the BGP speaker will track. The route map associated with the advertise-map specifies the prefix that will be advertised when the prefix in the non-exist-map no longer exists. Any BGP route that is matched by the advertise-map route map will be advertised to the neighbor if the non-exist-map route map does not match any route in the BGP routing table. If the non-exist-map route map matches any route in the BGP routing table, any BGP routes that are matched by the advertise-map route map will not be advertised to the neighbor. All routes that may be dynamically advertised or not advertised need to exist in the BGP routing table for conditional advertisement to take place. The prefix tracked by the BGP speaker must be present in the IP routing table for the conditional advertisement not to take place.
Examples
The following example configures a router to conditionally advertise routes to 10.1.1.1:
neighbor 10.1.1.1 advertise-map map1 non-exist-map map2
neighbor default-originate
To allow a 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 command in router configuration mode. 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
|
IP address of the neighbor.
|
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 172.16.2.3 unconditionally:
neighbor 172.16.2.3 remote-as 200
neighbor 172.16.2.3 default-originate
In the following example, the local router injects route 0.0.0.0 to the neighbor 172.16.2.3 only if there is a route to 172.16.68.0 (that is, if a route with any mask exists, such as 255.255.255.0 or 255.255.0.0):
neighbor 172.16.2.3 remote-as 200
neighbor 172.16.2.3 default-originate route-map default-map
route-map default-map 10 permit
access-list 1 permit 172.16.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 172.16.2.3 only if there is a route to 172.16.68.0 with a mask of 255.255.0.0:
neighbor 172.16.2.3 remote-as 200
neighbor 172.16.2.3 default-originate route-map default-map
route-map default-map 10 permit
access-list 100 permit ip host 172.16.68.0 host 255.255.255.0
Related Commands
Command
|
Description
|
neighbor ebgp-multihop
|
Accepts and attempt 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 command in router configuration mode. 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 xyz.com":
neighbor 172.16.2.3 description peer with xyz.com
neighbor distribute-list
To distribute BGP neighbor information as specified in an access list, use the neighbor distribute-list command in router configuration mode. To remove an entry, use the no form of this command.
neighbor {ip-address | peer-group-name} distribute-list {access-list-number |
expanded-list-number | access-list-name| prefix-list-name} {in | out}
no neighbor {ip-address | peer-group-name} distribute-list {access-list-number |
expanded-list-number | access-list-name| prefix-list-name} {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 a standard or extended access list. The range of a standard access list number is from 1 to 99. The range of an extended access list number is from 100 to 199.
|
expanded-list-number
|
Number of an expanded access list number. The range of an expanded access list is from 1300 to 2699.
|
access-list-name
|
Name of a standard or extended access list.
|
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 to 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.
|
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. Specifying the command for a neighbor overrides the inbound policy that is inherited from the peer group.
Using a distribute list is one of several ways to filter advertisements. Advertisements can also be filtered by using the following methods:
•
Autonomous system path filters can be configured with the ip as-path access-list and neighbor filter-list commands.
•
The access-list (IP standard) and access-list (IP extended) commands can be used to configure standard and extended access lists for the filtering of advertisement.
•
The route map command can be used to filter advertisements. Route maps may be configured with autonomous system filters, prefix filters, access lists and distribute lists.
Standard access lists may be used to filter routing updates. However, in the case of route filtering when using classless interdomain routing (CIDR), standard access lists do not provide the level of granularity that is necessary to configure advanced filtering of network addresses and masks. Extended access lists, configured with the access-list (IP extended) command, should be used to configure route filtering when using CIDR because extended access lists allow the network operator to use wild card bits to filter the relevant prefixes and masks. Wild card bits are similar to the bit masks that are used with normal access lists; prefix and mask bits that correspond to wild card bits that are set to 0 are used in the comparison of addresses or prefixes and wild card bits that are set to 1 are ignored during any comparisons. This function of extended access list configuration can also be used to filter addresses or prefixes based on the prefix length.
Examples
The following router configuration mode example applies list 39 to incoming advertisements from neighbor 192.168.4.1. List 39 permits the advertisement of network 10.109.0.0.
neighbor 192.168.4.1 distribute-list 39 in
The following three examples show different scenarios for using an extended access list with a distribute list. The three examples are labeled "Example A", "Example B", and "Example C." Each of the example extended access list configurations are used with the neighbor distribute-list command configuration example below.
neighbor 192.168.4.1 distribute-list 101 in
Example A
The following extended access list example will permit route 192.108.0.0 255.255.0.0 but deny any more specific routes of 192.108.0.0 (including 192.108.0.0 255.255.255.0):
access-list 101 permit ip 192.108.0.0 0.0.0.0 255.255.0.0 0.0.0.0
access-list 101 deny ip 192.108.0.0 0.0.255.255 255.255.0.0 0.0.255.255
Example B
The following extended access list example will permit route 10.108.0/24 but deny 131.108/16 and all other subnets of 10.108.0.0:
access-list 101 permit ip 10.108.0.0 0.0.0.0 255.255.255.0 0.0.0.0
access-list 101 deny ip 10.108.0.0 0.0.255.255 255.255.0.0 0.0.255.255
Example C
The following extended access list example will deny all prefixes that are longer than 24 bits and permit all of the shorter prefixes:
access-list 101 deny ip 0.0.0.0 255.255.255.255 255.255.255.0 0.0.0.255
access-list 101 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255
Related Commands
neighbor ebgp-multihop
To accept and attempt BGP connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihop command in router configuration mode. 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 be used only 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 10.108.1.1, which resides on a network that is not directly connected:
neighbor 10.108.1.1 ebgp-multihop
Related Commands
neighbor filter-list
To set up a BGP filter, use the neighbor filter-list command in router configuration mode. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out | weight weight}
no neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out | weight
weight}
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.
|
weight weight
|
Assigns a relative importance to incoming routes matching autonomous system paths. Acceptable values are 0 to 65535.
|
Defaults
This command is disabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
This command establishes filters on both inbound and outbound BGP routes. Any number of weight filters are allowed on a per-neighbor basis, but only one in or out filter is allowed. The weight of a route affects BGP's route-selection rules.
The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands. In other words, the weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
See the "Regular Expressions" appendix in the Dial Solutions 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 172.16.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$
neighbor 192.168.6.6 remote-as 123
neighbor 172.16.1.1 remote-as 47
neighbor 172.16.1.1 filter-list 1 out
Related Commands
neighbor maximum-prefix
To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix command in router configuration mode. 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
This command is disabled by default. 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 keyword warning-only 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 192.168.6.6 to 1000:
neighbor 192.168.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 disable next-hop processing of BGP updates on the router, use the neighbor next-hop-self command in router configuration mode. 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
This command is disabled by default.
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 10.108.1.1 to advertise this router as the next hop:
neighbor 10.108.1.1 next-hop-self
Related Commands
neighbor password
To enable MD5 authentication on a TCP connection between two BGP peers, use the neighbor password command in router configuration mode. 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 25 characters. 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
This command is disabled by default.
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 screen:
%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 10.108.1.1. The password that must also be configured for the neighbor is bla4u00=2nkq.
neighbor 10.108.1.1 password bla4u00=2nkq
Related Commands
neighbor peer-group (assigning members)
To configure a BGP neighbor to be a member of a peer group, use the neighbor peer-group command in router configuration mode. 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:
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 172.16.232.53 peer-group internal
neighbor 172.16.232.54 peer-group internal
neighbor 172.16.232.55 peer-group internal
neighbor 172.16.232.55 filter-list 3 in
Related Commands
neighbor peer-group (creating)
To create a BGP peer group, use the neighbor peer-group command in router configuration mode. 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.
Peer group members can spanned 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 EBGP neighbors.
Example for an IBGP Peer Group
In the following example, the peer group named internal configures the members of the peer group to be 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, AS 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 172.16.232.55, all the neighbors have filter-list 2 as the inbound filter list.
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 172.16.232.53 peer-group internal
neighbor 172.16.232.54 peer-group internal
neighbor 172.16.232.55 peer-group internal
neighbor 172.16.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 set-metric route map as an outbound route map and filter-list 99 as an outbound filter list. Except for neighbor 172.16.232.110, all of them have 101 as the inbound filter list.
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 172.16.232.90 remote-as 200
neighbor 172.16.232.90 peer-group external-peers
neighbor 172.16.232.100 remote-as 300
neighbor 172.16.232.100 peer-group external-peers
neighbor 172.16.232.110 remote-as 400
neighbor 172.16.232.110 peer-group external-peers
neighbor 172.16.232.110 filter-list 400 in
Related Commands
neighbor prefix-list
To distribute BGP neighbor information as specified in a prefix list, use the neighbor access-list command in router configuration mode. 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-list
|
Applies a prefix list to the route to be matched.
|
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 to 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 use both neighbor access-list and neighbor prefix-list commands for a single BGP peer. 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 192.168.4.1:
neighbor 192.168.4.1 prefix-list abc in
The following example applies prefix list CustomerA to incoming advertisements to neighbor 192.168.4.1:
neighbor 192.168.4.1 prefix-list CustomerA in
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 and assigns a sequence number to the entry.
|
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
|
Display 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 BGP neighbor table, use the neighbor remote-as command in router configuration mode. 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 10.108.1.2 is a neighbor in autonomous system number 109:
neighbor 10.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 10.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 neighborremote-as command illustrates specification of an internal neighbor (with the same autonomous system number) at address 10.108.234.2; and the last neighborremote-as command specifies a neighbor on a different network.
neighbor 10.108.200.1 remote-as 167
neighbor 10.108.234.2 remote-as 109
neighbor 150.136.64.19 remote-as 99
Related Commands
neighbor remove-private-as
To remove private autonomous system numbers from t in outbound routing updates, use the neighbor remove-private-as command in router configuration mode. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} remove-private-as
no neighbor {ip-address | peer-group-name} remove-private-as
Syntax Description
ip-address
|
IP address of the BGP-speaking neighbor.
|
peer-group-name
|
Name of a BGP peer group.
|
Defaults
This command is disabled by default.
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
This feature is available for external BGP (EBGP) neighbors only.
When an update is passed to the external neighbor, if the AS-path includes private autonomous system numbers, the software will drop the private autonomous system numbers.
If the AS-path includes both private and public autonomous system numbers, the software considers this to be a configuration error and does not remove the private autonomous system numbers.
If the AS-path contains the autonomous system number of the EBGP neighbor, the private autonomous system numbers will not be removed.
If this feature is used with confederation, it will work as long as the private autonomous system numbers follow the confederation portion of the AS-path.
The private autonomous system values are from 64512 to 65535.
Examples
The following example shows a configuration that will remove the private autonomous system number from the updates sent to 172.16.2.33. The result is that the AS_path for the paths advertised by 10.108.1.1 through autonomous system 100 will just contain "100" (as seen by autonomous system 2051).
neighbor 10.108.1.1 description peer with private-as
neighbor 10.108.1.1 remote-as 65001
neighbor 172.16.2.33 description eBGP peer
neighbor 172.16.2.33 remote-as 2051
neighbor 172.16.2.33 remove-private-as
router-in-AS100# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 15
Paths: (1 available, best #1)
Advertised to non peer-group peers:
10.108.1.1 from 10.108.1.1
Origin IGP, metric 0, localpref 100, valid, external, best
router-in-AS2501# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 3
Paths: (1 available, best #1)
Not advertised to any peer
172.16.2.32 from 172.16.2.32
Origin IGP, metric 0, localpref 100, valid, external, best
Related Commands
Command
|
Description
|
neighbor remote-as
|
Allows entries to the BGP neighbor table.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
neighbor route-map
To apply a route map to incoming or outgoing routes, use the neighbor route-map command in router configuration mode. 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 with an IP address will override the value inherited from the peer group.
Examples
The following example applies a route map named internal-map to incoming route from 172.16.70.24:
neighbor 172.16.70.24 route-map internal-map in
Related Commands
neighbor route-reflector-client
To configure the router as a BGP route reflector and configure the specified neighbor as its client, use the neighbor route-reflector-client command in router configuration mode. 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 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.
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 172.16.70.24.
neighbor 172.16.70.24 route-reflector-client
Related Commands
neighbor send-community
To specify that a COMMUNITIES attribute should be sent to a BGP neighbor, use the neighbor send-community command in router configuration mode. To remove the entry, use the no form of this command.
neighbor {ip-address | peer-group-name} send-community [both | standard | extended]
no neighbor {ip-address | peer-group-name} send-community
Syntax Description
ip-address
|
IP address of the neighbor.
|
peer-group-name
|
Name of a BGP peer group.
|
both
|
(Optional) Specifies that both standard and extended communities will be sent.
|
standard
|
(Optional) Specifies that only standard communities will be sent.
|
extended
|
(Optional) Specifies that only extended communities will be sent.
|
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 172.16.70.23:
neighbor 172.16.70.23 send-community
Related Commands
neighbor shutdown
To disable a neighbor or peer group, use the neighbor shutdown command in router configuration mode.To re-enable 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 display 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.
Related Commands
neighbor soft-reconfiguration
To configure the Cisco IOS software to start storing updates, use the neighbor soft-reconfiguration command in router configuration mode. 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
|
Keyword indicating that the update to be stored is an incoming update.
Inbound is currently required with this command, since a keyword is required and no other keywords are available.
|
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 inbound 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 10.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.
neighbor 10.108.1.1 remote-as 200
neighbor 10.108.1.1 soft-reconfiguration inbound
Related Commands
neighbor timers
To set the timers for a specific BGP peer or peer group, use the neighbor timers command in router configuration mode. 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 command timers bgp.
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 Border Gateway Protocol (BGP) sessions to use a specific operational interface for TCP connections, use the neighbor update-source command in router configuration mode. 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-type
|
Interface to be used as the source.
|
Defaults
Best local address
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
This command works in conjunction with any specified interface on the router. The loopback interface is the interface that is most commonly used with this feature. For more information, refer to 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:
neighbor 172.16.2.3 remote-as 110
neighbor 172.16.2.3 update-source Loopback0
Related Commands
neighbor version
To configure the Cisco IOS software to accept only a particular BGP version, use the neighbor version command in router configuration mode. 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 use only 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
neighbor weight
To assign a weight to a neighbor connection, use the neighbor weight command in router configuration mode. 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 match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
Note
For weight changes to take effect, it may be necessary to use clear ip bgp peer-group *.
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 172.16.12.1 to 50:
router bgp 109
neighbor 172.16.12.1 weight 50
Related Commands
network (BGP)
To specify the list of networks for the Border Gateway Protocol (BGP) routing process, use this form of the network command in router configuration mode. To remove an entry, use the no form of this command.
network network-number [mask network-mask] [route-map map-name]
no network network-number [mask network-mask] [route-map map-name]
Syntax Description
network-number
|
Network that BGP will advertise.
|
mask
|
Network or subnetwork mask. If the mask keyword is configured, then an exact match must exist in the routing table.
|
network-mask
|
(Optional) Network mask address.
|
route-map map-name
|
(Optional) Name of a route map.
|
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
This command first appeared in Cisco IOS Release 10.0. The limit of 200 network commands per BGP router was removed in Cisco IOS Release 12.0. The maximum number of network commands you can use is now determined by the resources of the router, such as the amount of configured NVRAM or RAM.
For the information to be advertised by BGP or multiprotocol BGP, a route to the network specified must be present in the routing table. The routing information may be learned from connected routes, dynamic routing, and from static route sources.
Use the route-map keyword to apply a route map to a network to be advertised by the BGP and multiprotocol BGP routing processes. The specified route map can be used in filtering the network, or in setting attributes on the routes advertised by the network command.
Examples
The following example sets up network 10.108.0.0 to be included in the BGP updates:
The following example shows the use of the mask keyword:
ip route 10.0.0.0 255.0.0.0 null0
Note
This configuration will advertise a supernet 10.0.0.0/8. It is necessary to use a static route to provide the information because this summary route may not be learned through dynamic routing or from a connected interface. Specifying the null 0 interface with the ip route command guarantees that the routing information will always be present in the routing table.
Related Commands
Command
|
Description
|
network backdoor
|
Specifies a backdoor route to a BGP border router that will provide better information about the network.
|
router bgps
|
Configures the Border Gateway Protocol (BGP) routing process.
|
network backdoor
To specify a backdoor route to a BGP-learned prefix that provides better information about the network, use the network backdoor command in router configuration mode. 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 assigned an administrative distance of 200. The objective is to make Interior Gateway Protocol (IGP) learned routes preferred. A backdoor network is treated as a local network, except that it is not advertised. A network that is marked as a back door is not sourced by the local router, but should be learned from external neighbors. The BGP best path selection algorithm does not change when a network is configured as a back door.
Examples
The following example configures network 10.108.0.0 as a local network and network 192.31.7.0 as a backdoor network:
network 192.31.7.0 backdoor
router bgp
To configure the Border Gateway Protocol (BGP) routing process, use the router bgp command in global configuration mode. 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:
Related Commands
Command
|
Description
|
network (BGP)
|
Specifies the list of networks for the BGP routing process.
|
timers bgp
|
Adjusts BGP network timers.
|
set as-path
To modify an autonomous system path for 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. This increases 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 prepend 100 100 100
redistribute ospf 109 route-map set-as-path-from-tag
The following example prepends 100 100 100 to all the routes advertised to 10.108.1.1:
set as-path prepend 100 100 100
neighbor 10.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
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next-hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric
|
Redistributes routes with the metric specified.
|
match route-type
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set automatic-tag
|
Automatically computes the tag value in a route map configuration.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set origin
|
Sets the BGP origin code.
|
set tag
|
Sets the value of the destination routing protocol.
|
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 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 172.16.233.33. Also, except for 100:50, all communities beginning with 100: will be deleted from updates sent to 172.16.233.33.
router bgp 100
neighbor 172.16.233.33 remote-as 120
neighbor 172.16.233.33 route-map ROUTEMAPIN in
neighbor 172.16.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 BGP COMMUNITIES attribute, use the set community command in route-map configuration mode. 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
|
Specifies that community number. Valid values are 1 to 4294967200, no-export, or no-advertise.
|
additive
|
(Optional) Adds the community to the already existing communities.
|
none
|
(Optional) 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
route-map set_community 20 permit
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
route-map set_community 20 permit
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
|
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 BGP route dampening factors, use the set dampening command in route-map configuration mode. 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. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.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.
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:
set dampening 30 1500 10000 120
neighbor 172.16.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
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next-hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric
|
Redistributes routes with the metric specified.
|
match route-type
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set automatic-tag
|
Automatically computes the tag value in a route map configuration.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set origin
|
Sets the BGP origin code.
|
set tag
|
Sets the value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
show route-map
|
Displays configured route maps.
|
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. The next hop must be an adjacent router.
|
peer-address
|
(Optional) Sets the next hop to be the BGP peering address.
|
Defaults
This command is disabled by default.
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 interface associated with 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. This command has finer granularity than the per-neighbor neighbor next-hop-self command, since 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:
set ip next-hop
set interface
set ip default next-hop
set default interface
Examples
In the following example, packets with a Level 3 length of 3 to 50 bytes are output to the router at IP address 172.16.2.2:
ip policy route-map thataway
set ip next-hop 172.16.2.2
In the following example, three routers are on the same FDDI LAN (with IP addresses 10.1.1.1, 10.1.1.2, and 10.1.1.3). Each is in a different autonomous system. The set ip next-hop peer-address command specifies that traffic from the router (10.1.1.3) in remote AS 300 for the router (10.1.1.1) in remote AS 100 that matches the route map is passed through the router bgp 200, rather than sent directly to the router (10.1.1.1) in AS 100 over their mutual connection to the LAN:
neighbor 10.1.1.3 remote-as 100
neighbor 10.1.1.3 route-map set-peer-address out
neighbor 10.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 local policy routing.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, or performs policy routing on packets.
|
match length
|
Bases policy routing on the Level 2 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 EBGP neighbors to match the IGP metric of the next hop, use the set metric internal command in route-map configuration mode. To return to the default, use the no form of this command.
set metric-type internal
no set metric-type internal
no set ip next-hop ip-address [...ip-address] [peer-address]
Syntax Description
This command has no arguments or keywords.
Defaults
This command is disabled by default.
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 not readvertise the route.
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.
Note
This command is not supported for redistributing routes into Border Gateway Protocol (BGP).
Examples
In the following example, the MED for all the advertised routes to neighbor 172.16.2.3 is set to the corresponding IGP metric of the nexthop:
neighbor 172.16.2.3 remote-as 200
neighbor 172.16.2.3 route-map setMED out
route-map setMED permit 10
ip as-path access-list 1 permit .*
Related Commands
Command
|
Description
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set origin
To set the BGP origin code, use the set origin command in route-map configuration mode. 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 IGP.
|
egp
|
Local EGP.
|
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:
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community-list
|
Matches a BGP community.
|
match interface
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next-hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric
|
Redistributes routes with the metric specified.
|
match route-type
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set as-path
|
Modifies an autonomous system path for BGP routes.
|
set automatic-tag
|
Automatically computes the tag value in a route map configuration.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set tag
|
Sets the value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
set weight
To specify the BGP weight for the routing table, use the set weight command in route-map configuration mode. To delete an entry, use the no form of this command.
set weight weight
no set weight weight
Syntax Description
weight
|
Weight value. It can be an integer from 0 to 65535.
|
Defaults
The weight is not changed by the specified route map.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands. In other words, the weights assigned with the match as-path and set weight route-map commands override the weights assigned using the neighbor weight and neighbor filter-list commands.
Examples
The following example sets the BGP weight for the routes matching the autonomous system path access list to 200:
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community-list
|
Matches a BGP community.
|
match interface
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address permitted by a standard or extended access list, or performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next-hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric
|
Redistributes routes with the metric specified.
|
match route-type
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
|
set as-path
|
Modifies an autonomous system path for BGP routes.
|
set automatic-tag
|
Automatically computes the tag value in a route map configuration.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set origin
|
Sets the BGP origin code.
|
set tag
|
Sets the value of the destination routing protocol.
|
show ip bgp
To display entries in the BGP routing table, use the show ip bgp command in EXEC mode.
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.
|
Examples
The following is sample output from the show ip bgp command:
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 ?
* 172.16.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 ?
* 172.16.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 ?
* 172.16.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
* 172.16.72.24 0 1878 704 701 i
Table 39 describes significant fields shown in the display.
Table 39 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 IGP and was advertised with a network router configuration command.
e—Entry originated from 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 command when you specify longer-prefixes:
Router# show ip bgp 172.16.0.0 255.255.0.0 longer-prefixes
BGP table version is 1738, local router ID is 172.16.72.24
Status codes: s suppressed, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 172.16.72.30 8896 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.1.0 172.16.72.30 8796 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.11.0 172.16.72.30 42482 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.14.0 172.16.72.30 8796 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.15.0 172.16.72.30 8696 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.16.0 172.16.72.30 1400 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.17.0 172.16.72.30 1400 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.18.0 172.16.72.30 8876 32768 ?
* 172.16.72.30 0 109 108 ?
*> 172.16.19.0 172.16.72.30 8876 32768 ?
* 172.16.72.30 0 109 108 ?
The following is sample output from the show ip bgp command, showing information for prefix 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:
Advertised to non peer-group peers:
172.16.233.56 from 172.16.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."
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 command in EXEC mode.
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 172.16.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.168.0.0/8 172.16.72.24 0 1878 ?
*> 172.16.0.0/16 172.16.72.30 0 108 ?
Table 40 describes significant fields shown in the display.
Table 40 show ip bgp cidr-only Field Descriptions
Field
|
Description
|
BGP table version is 220
|
Internal version number of the table. This number is incremented any time the table changes.
|
local router ID
|
An Internet 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 IGP and was advertised with a network router configuration command.
e—Entry originated from 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 that is used 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.
|
|