118
BGP Commands P1R-365 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.

BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

  • Upload
    vankiet

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

BGP Commands P1R-365

BGP Commands

Use the commands in this chapter to configure and monitor Border Gateway Protocol (BGP). ForBGP configuration information and examples, refer to the “Configuring BGP” chapter of theNetwork Protocols Configuration Guide, Part 1.

Page 2: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

aggregate-address

P1R-366 Network Protocols Command Reference, Part 1

aggregate-addressTo create an aggregate entry in a BGP routing table, use theaggregate-addressrouter configurationcommand. To disable this function, use theno form of this command.

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

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

Syntax Description

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

Using theas-setkeyword creates an aggregate entry using the same rules that the command followswithout this keyword, but the path advertised for this route will be an AS_SET consisting of allelements contained in all paths that are being summarized. Do not use this form of

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-mapmap-name (Optional) Name of route map used to select the routes to besuppressed.

advertise-mapmap-name (Optional) Name of route map used to select the routes to createAS-SET origin communities.

attribute-map map-name (Optional) Name of route map used to set the attribute of theaggregate route.

Page 3: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

aggregate-address

BGP Commands P1R-367

aggregate-addresswhen aggregating many paths, because this route must be continually withdrawnand re-updated as autonomous system path reachability information for the summarized routeschanges.

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

Using the suppress-mapkeyword creates the aggregate route but suppresses advertisement ofspecified routes. You can use thematch clauses of route maps to selectively suppress some morespecific routes of the aggregate and leave others unsuppressed. IP access lists and autonomoussystem path access lists match clauses are supported.

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

router bgp 5aggregate-address 193.0.0.0 255.0.0.0 as-set

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch ip addressroute-map

Page 4: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

auto-summary

P1R-368 Network Protocols Command Reference, Part 1

auto-summaryTo restore the default behavior of automatic summarization of subnet routes into network-levelroutes, use theauto-summary router configuration command. To disable this feature and transmitsubprefix routing information across classful network boundaries, use theno form of this command.

auto-summaryno auto-summary

Syntax DescriptionThis command has no arguments or keywords.

DefaultEnabled (the software summarizes subprefixes to the classful network boundary when crossingclassful network boundaries).

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

By default, BGP does not accept subnets redistributed from IGP. To advertise and carry subnet routesin BGP, use an explicitnetwork command or theno auto-summary command. If you disableauto-summarization and have not entered anetwork command, you will not advertise networkroutes for networks with subnet routes unless they contain a summary route.

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

router bgp 6no auto-summary

Page 5: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp always-compare-med

BGP Commands P1R-369

bgp always-compare-medTo allow the comparison of the Multi Exit Discriminator (MED) for paths from neighbors indifferent autonomous systems, use the bgp always-compare-medrouter configuration command.To disallow the comparison, use theno form of this command.

bgp always-compare-medno bgp always-compare-med

Syntax DescriptionThis command has no arguments or keywords.

DefaultThe Cisco IOS software does not compare MEDs for paths from neighbors in different autonomoussystems.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

The MED is one of the parameters that is considered when selecting the best path among manyalternative 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 fromthe same autonomous system. This command changes the default behavior by allowing comparisonof MEDs among paths regardless of the autonomous system from which the paths are received.

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

router bgp 109bgp always-compare-med

Page 6: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp bestpath as-path ignore

P1R-370 Network Protocols Command Reference, Part 1

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

bgp bestpath as-path ignore

no bgp bestpath as-path ignore

Syntax DescriptionThis command has no arguments or keywords.

DefaultThe router considers as-path in choosing a route.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

ExampleThe following example preventes the BGP router from considering as-path as a factor in choosing aroute.

router bgp 210bgp bestpath as-path ignore

Related Commandsshow ip bgp neighbor

Page 7: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp bestpath med-confed

BGP Commands P1R-371

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

bgp bestpath med-confed

no bgp bestpath med-confed

Syntax DescriptionThis command has no arguments or keywords.

DefaultThe software does not consider the MED attribute when choosing among paths learned fromconfederation peers.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

The comparison between MEDs is only made if there are no external ASs in the path (an externalAS is an AS that is not within the confederation). If there is an external AS in the path, then theexternal 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 isnot; and we are comparing route A with four paths. Ifbgp bestpath med-confedis enabled, path 1would be chosen. The fourth path has a lower MED, but it is not involved in the MED comparisionbecause 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

ExampleThe following command enables the BGP router to compare MED values for paths learned fromconfederation peers.

router bgp 210bgp bestpath med-confed

Related Commandsshow ip bgpshow ip bgp neighbors

Page 8: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp bestpath missing-as-worst

P1R-372 Network Protocols Command Reference, Part 1

bgp bestpath missing-as-worstTo 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-worstrouter configuration command. To return the router to the default (assign a value of 0 to the missingMED), use the no form of this command.

bgp bestpath missing-as-worst

no bgp bestpath missing-as-worst

Syntax DescriptionThis command has no arguments or keywords.

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

ExampleThe following command specifies that the BGP router to consider a missing MED attribute in a pathas having a value of infinity, making this path the least desirable path.

router bgp 210bgp bestpath missing-as-worst

Related Commandsshow ip bgpshow ip bgp neighbors

Page 9: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp client-to-client reflection

BGP Commands P1R-373

bgp client-to-client reflectionTo restore route reflection from a BGP route reflector to clients, use thebgp client-to-clientreflection router configuration command. To disable client-to-client reflection, use theno form ofthis command.

bgp client-to-client reflectionno bgp client-to-client reflection

Syntax DescriptionThis command has no arguments or keywords.

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.1.

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

If client-to-client reflection is enabled, the clients of a route reflector cannot be members of a peergroup.

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

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp cluster-idneighbor route-reflector-clientshow ip bgp

Page 10: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp cluster-id

P1R-374 Network Protocols Command Reference, Part 1

bgp cluster-idTo configure the cluster ID if the BGP cluster has more than one route reflector, use thebgp cluster-id router configuration command. To remove the cluster ID, use theno form of thiscommand.

bgp cluster-id cluster-idno bgp cluster-idcluster-id

Syntax Description

DefaultThe router ID of the single route reflector in a cluster

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

Together, a route reflector and its clients form acluster.

Usually a cluster of clients will have a single route reflector. In that case, the cluster is identified bythe 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 mustbe configured with the 4-byte cluster ID so that a route reflector can recognize updates from routereflectors in the same cluster.

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

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

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp client-to-client reflectionneighbor route-reflector-clientshow ip bgp

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

Page 11: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp confederation identifier

BGP Commands P1R-375

bgp confederation identifierTo specify a BGP confederation identifier, use thebgp confederation identifierrouter configurationcommand. To remove the confederation identifier, use theno form of this command.

bgp confederation identifierautonomous-systemno bgp confederation identifierautonomous-system

Syntax Description

DefaultNo confederation identifier is configured.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

Another way to reduce the IBGP mesh is to divide an autonomous system into multiple autonomoussystems and group them into a single confederation. Each autonomous system is fully meshed withinitself, and has a few connections to another autonomous system in the same confederation. Eventhough the peers in different autonomous systems have EBGP sessions, they exchange routinginformation as if they are IBGP peers. Specifically, the next-hop and local preference information ispreserved. This enables to you to retain a single Interior Gateway Protocol (IGP) for all theautonomous systems. To the outside world, the confederation looks like a single autonomous system.

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

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp confederation peers

autonomous-system Autonomous system number that internally includes multipleautonomous systems.

Page 12: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp confederation peers

P1R-376 Network Protocols Command Reference, Part 1

bgp confederation peersTo configure the autonomous systems that belong to the confederation, use thebgp confederation peersrouter configuration command. To remove an autonomous system fromthe confederation, use theno form of this command.

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

Syntax Description

DefaultNo confederation peers are configured.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

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

ExampleThe following example specifies that autonomous systems 1090, 1091, 1092, and 1093 belong to asingle confederation:

router bgp 1090bgp confederation peers 1091 1092 1093

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp confederation identifier

autonomous-system Autonomous system number.

Page 13: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp dampening

BGP Commands P1R-377

bgp dampeningTo enable BGP route dampening or change various BGP route dampening factors, use the bgpdampeningglobal configuration command. To disable the function or restore the default values, usetheno 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

DefaultDisabled by default.

half-life is 15 minutesreuse is 750suppressis 2000max-suppress-timeis 4 timeshalf-life

Command ModeGlobal configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

If this command is used with no arguments, it enables BGP route dampening. The argumentshalf-life, reuse, suppress, andmax-suppress-timeare position-dependent. Therefore, if any of themare used, they must all be specified.

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

reuse (Optional) If the penalty for a flapping route decreases enough to fall belowthis value, the route is unsuppressed. The process of unsuppressing routesoccurs 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. Therange is 1 to 20000; the default is 2000.

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

route-map map (Optional) Name of route map that controls where BGP route dampening isenabled.

Page 14: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp dampening

P1R-378 Network Protocols Command Reference, Part 1

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

bgp dampening 30 1500 10000 120

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgp dampeningclear ip bgp flap-statisticsshow ip bgp dampened-pathsshow ip bgp flap-statistics

Page 15: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp default local-preference

BGP Commands P1R-379

bgp default local-preferenceTo change the default local preference value, use thebgp default local-preferencerouterconfiguration command. To return to the default setting, use theno form of this command.

bgp default local-preferencevalueno bgp default local-preferencevalue

Syntax Description

DefaultLocal preference value of 100

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

router bgp 200bgp default local-preference 200

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

set local-preference

value Local preference value from 0 to 4294967295. Higher is morepreferred.

Page 16: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp deterministic med

P1R-380 Network Protocols Command Reference, Part 1

bgp deterministic medTo have Cisco IOS software compare the MED variable when choosing among routes advertised bythe same sub-AS within a confederation, use thebgp deterministic med router configurationcommand. To disallow the comparison, use theno form of this command.

bgp deterministic med

no bgp deterministic med

Syntax DescriptionThis command has no arguments or keywords.

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

Command ModeRouter configuration mode

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

If bgp always-compare-medis enabled, all paths are fully comparable, including those from otherASes in the confederation, even ifbgp deterministic med is also enabled.

ExampleThe following example specifies that the BGP router compare MED variables when choosing amongroutes advertised by the same sub-AS within a confederation.

router 204bgp deterministic med

Related Commandsshow ip bgpshow ip bgp neighbors

Page 17: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp log-neighbor-changes

BGP Commands P1R-381

bgp log-neighbor-changesTo enable logging of BGP neighbor resets, use thebgp log-neighbor-changesrouter configurationcommand. To disable the logging of changes in BGP neighbor adjacencies, use theno form of thiscommand.

bgp log-neighbor-changesno bgp log-neighbor-changes

Syntax DescriptionThis command has no arguments or keywords.

DefaultNo BGP neighbor changes are logged.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.1 CC and 12.0.

Thebgp log-neighbor-changes command enables logging of BGP neighbor status changes (up ordown) and resets for troubleshooting network connectivity problems and measuring networkstability. Unexpected neighbor resets might indicate high error rates or high packet loss in thenetwork and should be investigated.

Using thebgp log-neighbo-changes command to enable status change message logging does notcreate a significant performance hit, unlike, for example, enabling per BGP update debugging. If theUNIX syslog facility is enabled, messages are sent to the UNIX host running the syslog daemon sothat the messages can be stored and archived. If the UNIX syslog facility is not enabled, the statuschange messages are retained in the router’s internal buffer, and are not stored to disk. You can setthe size of this buffer, which is dependent upon the available RAM, using thelogging bufferedcommand.

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 theshow ip bgp neighborcommand.

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

Page 18: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp log-neighbor-changes

P1R-382 Network Protocols Command Reference, Part 1

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

Theeigrp log-neighbor-changes command enables logging of Enhanced IGRP neighboradjacencies, but messages for BGP neighbors are logged only if they are specifically enabled withthebgp log-neighbor-changescommand.

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

ExampleThe following configuration will log neighbor changes for BGP:

bgp router 100bgp log-neighbor-changes

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

logging bufferedshow ip bgp neighborshow logging

Page 19: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

bgp fast-external-fallover

BGP Commands P1R-383

bgp fast-external-falloverTo immediately reset the BGP sessions of any directly adjacent external peers if the link used toreach them goes down, use the bgp fast-external-fallover router configuration command. Todisable this function, use theno form of this command.

bgp fast-external-falloverno bgp fast-external-fallover

Syntax DescriptionThis command has no arguments or keywords.

DefaultEnabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

ExampleThe following example disables the automatic resetting of BGP sessions:

router bgp 109no bgp fast-external-fallover

Page 20: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

clear ip bgp

P1R-384 Network Protocols Command Reference, Part 1

clear ip bgpTo reset a BGP connection using BGP soft reconfiguration, use theclear ip bgp EXEC command atthe system prompt.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

If you specify BGP soft reconfiguration, by including thesoft keyword, the sessions are not resetand the router sends all routing updates again. To generate new inbound updates without resettingthe BGP session, the local BGP speaker should store all received updates without modificationregardless of whether it is accepted by the inbound policy, using theneighbor soft-reconfigurationcommand. This process is memory intensive and should be avoided if possible. Outbound BGP softconfiguration does not have any memory overhead. You can trigger an outbound reconfiguration onthe other side of the BGP session to make the new inbound policy take effect.

Use this command whenever any of the following changes 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

ExampleThe following example resets all current BGP sessions:

clear ip bgp *

* Resets all current BGP sessions.

address Resets only the identified BGP neighbor.

peer-group-name Resets the specified BGP peer group.

soft (Optional) Soft reconfiguration.

in | out (Optional) Triggers inbound or outbound softreconfiguration. If thein or out option is not specified, bothinbound and outbound soft reconfiguration are triggered.

Page 21: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

clear ip bgp

BGP Commands P1R-385

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgpneighbor soft-reconfigurationshow ip bgptimers bgp

Page 22: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

clear ip bgp dampening

P1R-386 Network Protocols Command Reference, Part 1

clear ip bgp dampeningTo clear BGP route dampening information and unsuppress the suppressed routes, use the clear ipbgp dampeningEXEC command.

clear ip bgp dampening[address mask]

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

ExampleThe following example clears route dampening information about the route to network 150.0.0.0 andunsuppresses its suppressed routes:

clear ip bgp dampening 150.0.0.0 255.255.0.0

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp dampeningshow ip bgp dampened-paths

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

mask (Optional) Network mask applied to theaddress.

Page 23: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

clear ip bgp flap-statistics

BGP Commands P1R-387

clear ip bgp flap-statisticsTo clear BGP flap statistics, use the clear ip bgp flap-statisticsEXEC command.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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

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

ExampleThe following example clears all of the flap statistics for paths that pass access list 3:

clear ip bgp flap-statistics filter-list 3

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp dampening

regexp regexp (Optional) Clears flap statistics for all the paths that match the regularexpression.

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

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

mask (Optional) Network mask applied to theaddress.

Page 24: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

clear ip bgp peer-group

P1R-388 Network Protocols Command Reference, Part 1

clear ip bgp peer-groupTo remove all the members of a BGP peer group, use theclear ip bgp peer-groupEXEC command.

clear ip bgp peer-grouptag

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

ExampleThe following example removes all members from the BGP peer groupinternal:

clear ip bgp peer-group internal

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (assigning members)

tag Name of the BGP peer group to clear.

Page 25: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

default-information originate (BGP)

BGP Commands P1R-389

default-information originate (BGP)To allow the redistribution of network 0.0.0.0 into BGP, use the default-information originaterouter configuration command. To disable this function, use theno form of this command.

default-information originateno default-information originate

Syntax DescriptionThis command has no arguments or keywords.

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

The same functionality will result from thenetwork 0.0.0.0command, using thenetwork routerconfiguration command.

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

router bgp 164default-information originate

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor ebgp-multihop

Page 26: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

default-metric (BGP, OSPF, and RIP)

P1R-390 Network Protocols Command Reference, Part 1

default-metric (BGP, OSPF, and RIP)To set default metric values for the BGP, OSPF, and RIP routing protocols, use this form of thedefault-metric router configuration command. To return to the default state, use theno form of thiscommand.

default-metric numberno default-metric number

Syntax Description

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

ExampleThe following example shows a router in autonomous system 109 using both the RIP and the OSPFrouting protocols. The example advertises OSPF-derived routes using the RIP protocol and assignsthe IGRP-derived routes a RIP metric of 10.

router ripdefault-metric 10redistribute ospf 109

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

redistribute

number Default metric value appropriate for the specified routing protocol.

Page 27: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

distance bgp

BGP Commands P1R-391

distance bgpTo allow the use of external, internal, and local administrative distances that could be a better routeto a node, use the distance bgprouter configuration command. To return to the default values, usetheno form of this command.

distance bgpexternal-distance internal-distance local-distanceno distance bgp

Syntax Description

Defaultsexternal-distance: 20internal-distance: 200local-distance: 200

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

An administrative distance is a rating of the trustworthiness of a routing information source, such asan individual router or a group of routers. Numerically, an administrative distance is an integerbetween 0 and 255. In general, the higher the value, the lower the trust rating. An administrativedistance 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 thanwas 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 isnot recommended. One problem that can arise is the accumulation of routing table inconsistencies,which can break routing.

external-distance Administrative distance for BGP external routes. External routes areroutes for which the best path is learned from a neighbor external to theautonomous system. Acceptable values are from 1 to 255. The default is20. Routes with a distance of 255 are not installed in the routing table.

internal-distance Administrative distance for BGP internal routes. Internal routes are thoseroutes that are learned from another BGP entity within the sameautonomous system. Acceptable values are from 1 to 255. The default is200. Routes with a distance of 255 are not installed in the routing table.

local-distance Administrative distance for BGP local routes. Local routes are thosenetworks listed with anetwork router configuration command, often asback doors, for that router or for networks that are being redistributedfrom another process. Acceptable values are from 1 to 255. The defaultis 200. Routes with a distance of 255 are not installed in the routingtable.

Page 28: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

distance bgp

P1R-392 Network Protocols Command Reference, Part 1

ExampleIn the following example, internal routes are known to be preferable to those learned through theIGP, so the administrative distance values are set accordingly:

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

Page 29: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

ip as-path access-list

BGP Commands P1R-393

ip as-path access-listTo define a BGP-related access list, use theip as-path access-list global configuration command.To disable use of the access list, use theno form of this command.

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

Syntax Description

DefaultNo access lists are defined.

Command ModeGlobal configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

You can specify an access list filter on both inbound and outbound BGP routes. In addition, you canassignweights based on a set of filters. Each filter is an access list based on regular expressions. Ifthe regular expression matches the representation of the autonomous system path of the route as anASCII string, then thepermit or deny condition applies. The autonomous system path does notcontain the local autonomous system number. Use theip as-path access-list global configurationcommand to define an BGP access list, and theneighbor router configuration command to apply aspecific access list.

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

ip as-path access-list 1 deny _123_ip as-path access-list 1 deny ^123$

router bgp 109network 131.108.0.0neighbor 129.140.6.6 remote-as 123neighbor 128.125.1.1 remote-as 47neighbor 128.125.1.1 filter-list 1 out

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

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. Seethe “Regular Expressions” appendix in theDial Solutions CommandReference for information about forming regular expressions.

Page 30: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

ip as-path access-list

P1R-394 Network Protocols Command Reference, Part 1

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor distribute-listneighbor filter-list

Page 31: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

ip bgp-community new-format

BGP Commands P1R-395

ip bgp-community new-formatTo display BGP communities in the format AA:NN (AS-community number/2-byte number), usethe ip bgp-community new-format global configuration command.To re-enable the previousdisplay format for BGP communities (NN:AA), use theno form of this command.

ip bgp-community new-formatno ip bgp-community new-format

Syntax DescriptionThis command has no argument or keywords.

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

The BGP communitiesRFC specifies that a BGP community is made up of two parts 2 bytes long.The first part is the AS number and the second part is a 2 byte number. In the most recent version ofthe RFC, a community is of the form AA:NN.The Cisco default community format is in the formatNNAA. The ip bgp-community new-formatcommand changes the community forma to AANN toconform to the most recent RFC.

Examplerouter# show ip bgp community 12345:111 local-as BGP table version is 10, local router ID is 224.0.0.10 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path *> 2.2.2.2/32 158.43.222.2 0 0 222 ? *> 111.0.0.0 158.43.222.2 0 0 222 ? *> 158.43.0.0 158.43.222.2 0 0 222 ? *> 158.43.44.44/32 158.43.222.2 0 0 222 ?

Related Commandshow ip bgp x.x.x.x

Page 32: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

ip community-list

P1R-396 Network Protocols Command Reference, Part 1

ip community-listTo create a community list for BGP and control access to it, use theip community-list globalconfiguration command. To delete the community list, use theno form of this command.

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

Syntax Description

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

Command ModeGlobal configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3. Thelocal-asattribute was added in CiscoIOS Release 12.0.

community-list-number Integer from 1 to 99 that identifies one or more permit or denygroups of communities.

permit Permits access for a matching condition.

deny Denies access for a matching condition.

community-number Community number configured by aset communitycommand.Valid value is one of the following:

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

• internet—The Internet community.

• no-export—Routes with this community are sent to peers inother sub-autonomous systems within a confederation. Donot advertise this route to an EBGP peer. External systemsare those outside the confederation. If there is noconfederation, an external system is any EBGP peer.

• local-asSend this route to peers in other sub-autonomoussystems within the local confederation. Do not advertise thisroute to an external system.

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

Page 33: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

ip community-list

BGP Commands P1R-397

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

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

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

ip community-list 1 permit local-as

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

set communityshow ip bgp community

Page 34: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

match as-path

P1R-398 Network Protocols Command Reference, Part 1

match as-pathTo match a BGP autonomous system path access list, use thematch as-path route-mapconfiguration command. To remove a path list entry, use theno form of this command.

match as-pathpath-list-numberno match as-pathpath-list-number

Syntax Description

DefaultNo path lists are defined.

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

The values set by thematch andset commands override global values. For example, the weightsassigned with thematch as-path and set weight route-map commands override the weightsassigned using the neighbor weight andneighbor filter-list commands.

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

The implemented weight is based on the first matched autonomous system path.

ExampleThe following example sets the autonomous system path to match BGP autonomous system pathaccess list 20:

route-map igp2bgpmatch as-path 20

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match community-listmatch interfacematch ip addressmatch ip next-hopmatch ip route-sourcematch metricmatch route-typematch tag

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

Page 35: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

match as-path

BGP Commands P1R-399

route-mapset as-pathset automatic-tagset communityset levelset local-preferenceset metricset metric-typeset next-hopset originset tagset weight

Page 36: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

match community-list

P1R-400 Network Protocols Command Reference, Part 1

match community-listTo match a BGP community, use thematch community-list route-map configuration command. Toremove the community list entry, use theno form of this command.

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

Syntax Description

DefaultNo community list is defined.

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

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

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

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

ip community-list 1 permit 109!route-map set_weight

match community-list 1set weight 100

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

ip community-list 1 permit 109!route-map set_weight

match community-list 1 exactset weight 200

community-list-number Community list number in the range 1 to 99.

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

Page 37: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

match community-list

BGP Commands P1R-401

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

route-mapset weight

Page 38: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor advertisement-interval

P1R-402 Network Protocols Command Reference, Part 1

neighbor advertisement-intervalTo set the minimum interval between the sending of BGP routing updates, use theneighboradvertisement-intervalrouter configuration command. To remove an entry, use theno form of thiscommand.

neighbor { ip-address| peer-group-name} advertisement-intervalsecondsno neighbor { ip-address| peer-group-name} advertisement-intervalseconds

Syntax Description

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

router bgp 5neighbor 4.4.4.4 advertisement-interval 10

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

seconds Time in seconds. Integer from 0 to 600.

Page 39: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor default-originate

BGP Commands P1R-403

neighbor default-originateTo allow a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as adefault route, use theneighbor default-originate router configuration command. To send no routeas a default, use theno 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

DefaultNo default route is sent to the neighbor.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0. Modifications to permit extended accesslists first appeared in Cisco IOS Release 12.0.

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

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

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

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

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

route-map map-name (Optional) Name of the route map. The route map allows route0.0.0.0 to be injected conditionally.

Page 40: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor default-originate

P1R-404 Network Protocols Command Reference, Part 1

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

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

!route-map default-map 10 permit

match ip address 1!access-list 1 permit 198.92.68.0

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

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

!route-map default-map 10 permit

match ip address 1!access-list 100 permit ip host 198.92.68.0 host 255.255.255.0

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor ebgp-multihop

Page 41: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor description

BGP Commands P1R-405

neighbor descriptionTo associate a description with a neighbor, use theneighbor description router configurationcommand. To remove the description, use theno form of this command.

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

Syntax Description

DefaultThere is no description of the neighbor.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.3.

ExampleIn the following example, the description of the neighbor is “peer with abc.com”:

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

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.

Page 42: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor distribute-list

P1R-406 Network Protocols Command Reference, Part 1

neighbor distribute-listTo distribute BGP neighbor information as specified in an access list, use theneighbor distribute-list router configuration command. To remove an entry, use theno form of thiscommand.

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

out}

Syntax Description

DefaultNo BGP neighbor is specified.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. Thepeer-group-name argument firstappeared in Cisco IOS Release 11.0. Theaccess-list-nameargument first appeared in Cisco IOSRelease 11.2.

Using distribute lists is one of two ways to filter BGP advertisements. The other way is to useAS-path filters, as with theip as-path access-listglobal configuration command and theneighborfilter-list command.

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

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

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

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

access-list-number |name

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

in Access list is applied to incoming advertisements to that neighbor.

out Access list is applied to outgoing advertisements from that neighbor.

Page 43: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor distribute-list

BGP Commands P1R-407

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

ip as-path access-listneighbor filter-listneighbor peer-group (creating)

Page 44: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor ebgp-multihop

P1R-408 Network Protocols Command Reference, Part 1

neighbor ebgp-multihopTo accept and attempt BGP connections to external peers residing on networks that are not directlyconnected, use theneighbor ebgp-multihoprouter configuration command. To return to the default,use theno form of this command.

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

Syntax Description

DefaultOnly directly connected neighbors are allowed.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. Thepeer-group-name argument firstappeared in Cisco IOS Release 11.0.

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

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

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

ExampleThe following example allows connections to or from neighbor 131.108.1.1, which resides on anetwork that is not directly connected:

router bgp 109neighbor 131.108.1.1 ebgp-multihop

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor default-originateneighbor peer-group (creating)network (BGP)

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.

Page 45: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor filter-list

BGP Commands P1R-409

neighbor filter-listTo set up a BGP filter, use theneighbor filter-list router configuration command. To disable thisfunction, use theno 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

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

This command establishes filters on both inbound and outbound BGP routes. Any number of weightfilters are allowed on a per-neighbor basis, but only one in or out filter is allowed. The weight of aroute affects BGP’s route-selection rules.

The implemented weight is based on the first matched autonomous system path. Weights indicatedwhen an autonomous system path is matched override the weights assigned by globalneighborcommands. In other words, the weights assigned with thematch as-pathandset weightroute-mapcommands override the weights assigned using the neighbor weight andneighbor filter-listcommands.

See the “Regular Expressions” appendix in theDial Solutions Command Referencefor informationon forming regular expressions.

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

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 definethis access list with theip 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 matchingautonomous system paths. Acceptable values are 0 to 65535.

Page 46: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor filter-list

P1R-410 Network Protocols Command Reference, Part 1

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

ip as-path access-list 1 deny _123_ip as-path access-list 1 deny ^123$

router bgp 109network 131.108.0.0neighbor 129.140.6.6 remote-as 123neighbor 128.125.1.1 remote-as 47neighbor 128.125.1.1 filter-list 1 out

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

ip as-path access-listneighbor distribute-listneighbor peer-group (creating)neighbor weight

Page 47: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor maximum-prefix

BGP Commands P1R-411

neighbor maximum-prefixTo control how many prefixes can be received from a neighbor, use theneighbor maximum-prefixrouter configuration command. To disable this function, use theno 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

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.3.

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

When the number of received prefixes exceeds themaximum number configured, the routerterminates the peering (by default). However, if the keywordwarning-only is configured, the routerinstead only sends a log message, but continues peering with the sender. If the peer is terminated,the peer stays down until theclear ip bgpcommand is issued.

ExampleThe following example sets the maximum number of prefixes allowed from the neighbor at129.140.6.6 to 1000:

router bgp 109network 131.108.0.0neighbor 129.140.6.6 maximum-prefix 1000

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 ofmaximum therouter starts to generate a warning message. The range 1 to 100; thedefault is 75 (percent).

warning-only (Optional) Allows the router to generate log message when themaximum is exceeded, instead of terminating the peering.

Page 48: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor maximum-prefix

P1R-412 Network Protocols Command Reference, Part 1

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgp

Page 49: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor next-hop-self

BGP Commands P1R-413

neighbor next-hop-selfTo disable next-hop processing of BGP updates on the router, use theneighbor next-hop-selfrouterconfiguration command. To disable this feature, use theno form of this command.

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

Syntax Description

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. Thepeer-group-name argument firstappeared in Cisco IOS Release 11.0.

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

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

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

ExampleThe following example forces all updates destined for 131.108.1.1 to advertise this router as the nexthop:

router bgp 109neighbor 131.108.1.1 next-hop-self

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)set ip next-hop

ip-address IP address of the BGP-speaking neighbor.

peer-group-name Name of a BGP peer group.

Page 50: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor password

P1R-414 Network Protocols Command Reference, Part 1

neighbor passwordTo enable MD5 authentication on a TCP connection between two BGP peers, use theneighborpasswordrouter configuration command. To disable this function, use theno form of this command.

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

Syntax Description

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

You can invoke authentication between two BGP peers, causing each segment sent on the TCPconnection between them to be verified. This feature must be configured with the same password onboth BGP peers; otherwise, the connection between them will not be made. The authenticationfeature uses the MD5 algorithm. Specifying this command causes the generation and checking ofthe 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 oneestablished.

If you specify a BGP peer group by using thepeer-group-name argument, all the members of thepeer 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 messagesuch as the following will appear on the console while the routers attempt to establish a BGP sessionbetween them:

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

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

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

ip-address IP address of the BGP-speaking neighbor.

peer-group-name Name of a BGP peer group.

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

Page 51: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor password

BGP Commands P1R-415

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

router bgp 109neighbor 131.108.1.1 password bla4u00=2nkq

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

Page 52: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor peer-group (assigning members)

P1R-416 Network Protocols Command Reference, Part 1

neighbor peer-group (assigning members)To configure a BGP neighbor to be a member of a peer group, use theneighbor peer-grouprouterconfiguration command. To remove the neighbor from the peer group, use theno form of thiscommand.

neighbor ip-addresspeer-group peer-group-nameno neighbor ip-addresspeer-group peer-group-name

Syntax Description

DefaultThere are no BGP neighbors in a peer group.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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

ExampleThe following example assigns three neighbors to the peer group namedinternal:

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

neighbor shutdown

ip-address IP address of the BGP neighbor who belongs to the peer group specifiedby thetag.

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

Page 53: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor peer-group (creating)

BGP Commands P1R-417

neighbor peer-group (creating)To create a BGP peer group, use theneighbor peer-grouprouter configuration command. Toremove the peer group and all of its members, use theno form of this command.

neighbor peer-group-namepeer-groupno neighborpeer-group-namepeer-group

Syntax Description

DefaultThere is no BGP peer group.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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 thesame update policies can be grouped into peer groups to simplify configuration and make updatecalculation more efficient.

Peer group members can spanned multiple logical IP subnets, and can transit, or pass along, routesfrom one peer group member to another.

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

Peer group members will always inherit the following configuration options: remote-as (ifconfigured), 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 inheritchanges made to the peer group.

If a peer group is not configured with a remote-as, the members can be configured with theneighbor { ip-address| peer-group-name} remote-as command. This command allows you tocreate peer groups containing EBGP neighbors.

Example for an IBGP Peer GroupIn the following example, the peer group namedinternalconfigures the members of the peer groupto be IBGP neighbors. By definition, this is an IBGP peer group because therouter bgp commandand theneighbor remote-ascommand indicate the same autonomous system (in this case, AS 100).

peer-group-name Name of the BGP peer group.

Page 54: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor peer-group (creating)

P1R-418 Network Protocols Command Reference, Part 1

All the peer group members use loopback 0 as the update source and useset-med as the outboundroute-map. Theneighbor internal filter-list 2 in command shows that, except for 171.69.232.55,all the neighbors have filter-list 2 as the inbound filter list.

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

Example for an EBGP Peer GroupThe following example defines the peer group namedexternal-peers without theneighborremote-as command. This is what makes it an EBGP peer group. Each individual member of thepeer group is configured with its respective AS-number separately. Thus the peer group consists ofmembers from autonomous systems 200, 300, and 400. All the peer group members haveset-metricroute map as an outbound route map and filter-list 99 as an outbound filter list. Except for neighbor171.69.232.110, all of them have 101 as the inbound filter list.

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgp peer-groupneighbor peer-group (assigning members)show ip bgp peer-group

Page 55: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor prefix-list

BGP Commands P1R-419

neighbor prefix-listTo distribute BGP neighbor information as specified in a prefix list, use theneighbor access-listrouter configuration command. To remove an entry, use theno 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

DefaultNo BGP neighbor is specified.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

Using prefix lists is one of two ways to filter BGP advertisements. The other way is to use AS-pathfilters, as with theip as-path access-listglobal configuration command and theneighbor filter-listcommand, and access or prefix lists, as with theneighbor distribute-list command.

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

Note Do not use bothneighbor access-listandneighbor prefix-list commands for a single BGPpeer. Do not apply both aneighbor distribute-list and aneighbor prefix-list command to the sameneighbor.

ExamplesThe following example applies prefix listabc to incoming advertisements to neighbor 120.23.4.1:

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

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 from that neighbor.

Page 56: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor prefix-list

P1R-420 Network Protocols Command Reference, Part 1

The following example applies prefix listCustomerA to incoming advertisements to neighbor120.23.4.1:

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip prefix-listip as-path access-listip prefix-listip prefix-list descriptionip prefix-list sequence-numberneighbor filter-listneighbor peer-group (creating)show ip prefix-list

Page 57: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor remote-as

BGP Commands P1R-421

neighbor remote-asTo add an entry to the BGP neighbor table, use theneighbor remote-as router configurationcommand. To remove an entry from the table, use theno form of this command.

neighbor { ip-address | peer-group-name} remote-asnumberno neighbor { ip-address | peer-group-name} remote-asnumber

Syntax Description

DefaultThere are no BGP neighbor peers.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. Thepeer-group-name argument firstappeared in Cisco IOS Release 11.0.

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

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

ExamplesThe following example specifies that a router at the address 131.108.1.2 is a neighbor in autonomoussystem number 109:

router bgp 110network 131.108.0.0neighbor 131.108.1.2 remote-as 109

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

number Autonomous system to which the neighbor belongs.

Page 58: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor remote-as

P1R-422 Network Protocols Command Reference, Part 1

The following example assigns a BGP router to autonomous system 109, and two networks are listedas originating in the autonomous system. Then the addresses of three remote routers (and theirautonomous systems) are listed. The router being configured will share information about networks131.108.0.0 and 192.31.7.0 with the neighbor routers. The first router listed is in the same Class Bnetwork address space, but in a different autonomous system; the secondneighbor commandillustrates specification of an internal neighbor (with the same autonomous system number) ataddress 131.108.234.2; and the lastneighbor command specifies a neighbor on a different network.

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

Page 59: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor route-map

BGP Commands P1R-423

neighbor route-mapTo apply a route map to incoming or outgoing routes, use theneighbor route-map routerconfiguration command. To remove a route map, use theno 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

DefaultNo route maps are applied to a peer.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

ExampleThe following example applies a route map namedinternal-map to incoming route from198.92.70.24:

router bgp 5neighbor 198.92.70.24 route-map internal-map in

!route-map internal-map

match as-path 1set local-preference 100

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

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.

Page 60: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor route-reflector-client

P1R-424 Network Protocols Command Reference, Part 1

neighbor route-reflector-clientTo configure the router as a BGP route reflector and configure the specified neighbor as its client,use theneighbor route-reflector-client router configuration command. To indicate that theneighbor is not a client, use theno form of this command. When all the clients are disabled, the localrouter is no longer a route reflector.

neighbor ip-address route-reflector-clientno neighbor ip-address route-reflector-client

Syntax Description

DefaultThere is no route reflector in the autonomous system.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.1.

By default, all IBGP speakers in an autonomous system must be fully meshed, and neighbors do notreadvertise 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 aroute reflector responsible for passing IBGP learnedroutes to IBGP neighbors. This scheme eliminates the need for each router to talk to every otherrouter.

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

If client-to-client reflection is enabled (by default it is enabled), clients of a route reflector cannot bemembers of a peer group. Thebgp client-to-client reflection command controls client-to-clientreflection.

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

router bgp 5neighbor 198.92.70.24 route-reflector-client

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

Page 61: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor route-reflector-client

BGP Commands P1R-425

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp client-to-client reflectionbgp cluster-idshow ip bgp

Page 62: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor send-community

P1R-426 Network Protocols Command Reference, Part 1

neighbor send-communityTo specify that a COMMUNITIES attribute should be sent to a BGP neighbor, use theneighborsend-community router configuration command. To remove the entry, use theno form of thiscommand.

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

Syntax Description

DefaultNo COMMUNITIES attribute is sent to any neighbor.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3. Thepeer-group-name argument firstappeared in Cisco IOS Release 11.0.

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

ExampleIn the following example, the router belongs to autonomous system 109 and is configured to sendthe COMMUNITIES attribute to its neighbor at IP address 198.92.70.23:

router bgp 109neighbor 198.92.70.23 send-community

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match community-listneighbor peer-group (creating)set community

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

Page 63: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor shutdown

BGP Commands P1R-427

neighbor shutdownTo disable a neighbor or peer group, use theneighbor shutdownrouter configuration command.Tore-enable the neighbor or peer group, use theno form of this command.

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

Syntax Description

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

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

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

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor maximum prefixshow ip bgp summary

ip-address Neighbor’s IP address.

peer-group-name Name of a BGP peer group.

Page 64: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor soft-reconfiguration

P1R-428 Network Protocols Command Reference, Part 1

neighbor soft-reconfigurationTo configure the Cisco IOS software to start storing updates, use theneighbor soft-reconfigurationrouter configuration command. To not store received updates, use theno 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

DefaultSoft reconfiguration is not enabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.2.

This command requires at least one keyword. Currently the only keyword available isinbound, sothe use ofinbound 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 thepeer-group-name argument, all the members of thepeer group will inherit the characteristic configured with this command.

ExampleThe following example enables inbound soft-reconfiguration for the neighbor 131.108.1.1. All theupdates 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 anew set of inbound updates.

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

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 isrequired and no other keywords are available.

Page 65: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor soft-reconfiguration

BGP Commands P1R-429

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgpneighbor peer-group (creating)

Page 66: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor timers

P1R-430 Network Protocols Command Reference, Part 1

neighbor timersTo set the timers for a specific BGP peer or peer group, use theneighbor timers router configurationcommand. To clear the timers for a specific BGP peer or peer group, use theno form of thiscommand.

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

Syntax Description

Defaultkeepalive: 60 secondsholdtime: 180 seconds

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0

The timers configured for a specific neighbor or peer group override the timers configured for allBGP neighbors using the commandtimers bgp.

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

router bgp 109neighbor 192.98.47.0 timers 70 210

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 IOSsoftware sendskeepalive messages to its peer. Thedefault is 60 seconds.

holdtime Interval, in seconds, after not receiving akeepalivemessage that the software declares a peer dead. Thedefault is 180 seconds.

Page 67: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor update-source

BGP Commands P1R-431

neighbor update-sourceTo have the Cisco IOS software allow internal BGP sessions to use any operational interface for TCPconnections, use theneighbor update-source router configuration command. To restore theinterface assignment to the closest interface, which is called thebest local address, use theno formof this command.

neighbor { ip-address| peer-group-name} update-sourceinterfaceno neighbor { ip-address| peer-group-name} update-sourceinterface

Syntax Description

DefaultBest local address

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

This feature works in conjunction with the loopback interface feature described in the “InterfaceConfiguration Overview” chapter of theCisco IOS Interface Configuration Guide.

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

ExampleThe following example sources BGP TCP connections for the specified neighbor with loopbackinterface’s IP address rather than the best local address:

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

ip-address IP address of the BGP-speaking neighbor.

peer-group-name Name of a BGP peer group.

interface Loopback interface.

Page 68: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor version

P1R-432 Network Protocols Command Reference, Part 1

neighbor versionTo configure the Cisco IOS software to accept only a particular BGP version, use theneighbor versionrouter configuration command. To use the default version level of a neighbor, usetheno form of this command.

neighbor { ip-address| peer-group-name} versionvalueno neighbor { ip-address| peer-group-name} versionvalue

Syntax Description

DefaultBGP Version 4

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

Entering this command disables dynamic version negotiation.

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

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

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

router bgp 109neighbor 131.104.27.2 version 4

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor peer-group (creating)

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 toonly use Version 2 with the specified neighbor. The default is to useVersion 4 and dynamically negotiate down to Version 2 if requested.

Page 69: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor weight

BGP Commands P1R-433

neighbor weightTo assign a weight to a neighbor connection, use theneighbor weight router configurationcommand. To remove a weight assignment, use theno form of this command.

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

Syntax Description

DefaultRoutes learned through another BGP peer have a default weight of 0 and routes sourced by the localrouter have a default weight of 32768.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

The weights assigned with thematch as-path and set weight route-map commands override theweights assigned using the neighbor weight andneighbor filter-list commands.

Note For weight changes to take effect, it may be necessary to useclear ip bgp peer-group *.

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

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

router bgp 109neighbor 151.23.12.1 weight 50

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.

Page 70: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

neighbor weight

P1R-434 Network Protocols Command Reference, Part 1

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor distribute-listneighbor filter-listneighbor peer-group (creating)

Page 71: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

network (BGP)

BGP Commands P1R-435

network (BGP)To specify the list of networks for the BGP routing process, use this form of thenetwork routerconfiguration command. To remove an entry, use theno form of this command.

network network-number[mask network-mask]no network network-number[mask network-mask]

Syntax Description

DefaultNo networks are specified.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. The limit of 200 network commands perBGP router was removed in Cisco IOS Release 12.0.

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

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

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

router bgp 120network 131.108.0.0

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

default-information originate (BGP)neighbor ebgp-multihopnetwork backdoornetwork masknetwork weightrouter bgp

network-number Network that BGP will advertise.

mask Network or subnetwork mask.

network-mask (Optional) Network mask address.

Page 72: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

network backdoor

P1R-436 Network Protocols Command Reference, Part 1

network backdoorTo specify a backdoor route to a BGP border router that will provide better information about thenetwork, use thenetwork backdoor router configuration command. To remove an address from thelist, use theno form of this command.

network addressbackdoorno network addressbackdoor

Syntax Description

DefaultNo network is advertised.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

router bgp 109network 131.108.0.0network 192.31.7.0 backdoor

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

Page 73: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

network weight

BGP Commands P1R-437

network weightTo assign an absolute weight to a BGP network, use the network weight router configurationcommand. To delete an entry, use theno form of the command.

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

Syntax Description

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

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

The weight specified by this command overrides a weight assigned by theredistribute command.

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

router bgp 5network 193.0.0.0 255.0.0.0 weight 100

address IP address of the network.

mask Network mask of the network.

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

route-map map-name (Optional) Name of route-map.

Page 74: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

router bgp

P1R-438 Network Protocols Command Reference, Part 1

router bgpTo configure the Border Gateway Protocol (BGP) routing process, use therouter bgp globalconfiguration command. To remove a routing process, use theno form of this command.

router bgp autonomous-systemno router bgp autonomous-system

Syntax Description

DefaultNo BGP routing process is enabled by default.

Command ModeGlobal configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

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

router bgp 120

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

network (BGP)timers bgp

autonomous-system Number of an autonomous system that identifies the router toother BGP routers and tags the routing information passedalong.

Page 75: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set as-path

BGP Commands P1R-439

set as-pathTo modify an autonomous system path for BGP routes, use theset as-pathroute map configurationcommand. To not modify the autonomous system path, use theno form of this command.

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

Syntax Description

DefaultAutonomous system path is not modified.

Command ModeRoute map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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

By allowing you to convert the tag into an autonomous system path, theset as-pathtag variation ofthis command modifies the autonomous system length. Theset as-pathprependvariation allows youto “prepend” an arbitrary autonomous system path string to BGP routes. Usually the localautonomous system number is prepended multiple times. This increases the autonomous systempath length.

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

route-map set-as-path-from-tagmatch as-path 2set as-path prepend 100 100 100

!router bgp 100

redistribute ospf 109 route-map set-as-path-from-tag

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

prependas-path-string

Appends the string following the keywordprepend to the as-path of theroute that is matched by the route map. Applies to inbound and outboundBGP route maps.

Page 76: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set as-path

P1R-440 Network Protocols Command Reference, Part 1

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

route-map set-as-pathmatch as-path 1set as-path prepend 100 100 100

!router bgp 100

neighbor 131.108.1.1 route-map set-as-path out

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch community-listmatch interfacematch ip addressmatch ip next-hopmatch ip route-sourcematch metricmatch route-typematch tagroute-mapset automatic-tagset communityset levelset local-preferenceset metricset metric-typeset next-hopset originset tagset weight

Page 77: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set comm-list delete

BGP Commands P1R-441

set comm-list deleteTo remove communities from the community attribute of an inbound or outbound update, use thesetcomm-list deleteconfiguration command. To negate a previousset comm-list deletecommand, usetheno form of this command.

set comm-listlist-numdeleteno set comm-listlist-numdelete

Syntax Description

DefaultNo communities are removed.

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 12.0.

This route-map set command removes communities from the community attribute of an inbound oroutbound update using a route map to filter and determine the communities to be deleted. Dependingupon whether the route map is applied to the inbound or outbound update for a neighbor, eachcommunity that passes the route map “permit” clause and matches the given community list will beremoved 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 thesetcomm-list deletecommand. 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:10ip community-list 5 permit 10:20

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

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

When both theset communitycommandset comm-listlist-numdeletecommands are configuredin the same sequence of a route-map attribute, the deletion operation (set comm-listlist-numdelete)is performed before the set operation (set communitycomm).

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

router bgp 100neighbor 171.69.233.33 remote-as 120neighbor 171.69.233.33 route-map ROUTEMAPIN in

list-num A standard or extended community list number.

Page 78: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set comm-list delete

P1R-442 Network Protocols Command Reference, Part 1

neighbor 171.69.233.33 route-map ROUTEMAPOUT out!ip community-list 1 permit 100:10ip community-list 1 permit 100:20!ip community-list 120 deny 100:50ip 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 CommandsYou can use the master indexes or search online to find documentation of related commands.

set communitycomm

Page 79: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set community

BGP Commands P1R-443

set communityTo set the BGP COMMUNITIES attribute, use theset community route-map configurationcommand. To delete the entry, use theno form of this command.

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

Syntax Description

DefaultNo BGP COMMUNITIES attributes exist.

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

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

Use theroute-map global configuration command, and thematch andsetroute-map configurationcommands, to define the conditions for redistributing routes from one routing protocol into another.Eachroute-map command has a list ofmatch andset commands associated with it. Thematchcommands specify thematch criteria—the conditions under which redistribution is allowed for thecurrentroute-map command. Theset commands specify theset actions—the particularredistribution actions to perform if the criteria enforced by thematch commands are met. Thenoroute-map command deletes the route map.

Theset route-map configuration commands specify the redistributionset actions to be performedwhen all of a route map’s match criteria are met. When all match criteria are met, all set actions areperformed.

community-number Valid values are 1 to 4294967200,no-export, orno-advertise.

additive (Optional) Adds the community to the already existingcommunities.

none Removes the COMMUNITY attribute from the prefixes that pass theroute-map.

Page 80: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set community

P1R-444 Network Protocols Command Reference, Part 1

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

route-map set_community 10 permitmatch as-path 1set community 109

route-map set_community 20 permitmatch as-path 2set community no-export

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

route-map set_community 10 permitmatch as-path 1set community 109

route-map set_community 20 permitmatch as-path 2set community local-as

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

ip community-listmatch community-listroute-mapset comm-list deleteshow ip bgp community

Page 81: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set dampening

BGP Commands P1R-445

set dampeningTo set the BGP route dampening factors, use theset dampeningroute-map configuration command.To disable this function, use theno form of this command.

set dampeninghalf-life reuse suppress max-suppress-timeno set dampening

Syntax Description

DefaultDisabled

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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

Use theroute-map global configuration command, and thematch andsetroute-map configurationcommands, to define the conditions for redistributing routes from one routing protocol into another.Eachroute-map command has a list ofmatch andset commands associated with it. Thematchcommands specify thematch criteria—the conditions under which redistribution is allowed for thecurrentroute-map command. Theset commands specify theset actions—the particularredistribution actions to perform if the criteria enforced by thematch commands are met. Thenoroute-map command deletes the route map.

Theset route-map configuration commands specify the redistributionset actions to be performedwhen all of a route map’s match criteria are met. When all match criteria are met, all set actions areperformed.

half-life Time (in minutes) after which a penalty is decreased. Once the route hasbeen assigned a penalty, the penalty is decreased by half after the half-lifeperiod (which is 15 minutes by default). The process of reducing thepenalty happens every 5 seconds. The range of the half-life period is 1 to45 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 at10-second increments. The range of the reuse value is 1 to 20000; thedefault is 750.

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

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

Page 82: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set dampening

P1R-446 Network Protocols Command Reference, Part 1

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

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

route-map tagmatch as path 10set dampening 30 1500 10000 120

!router bgp 100

neighbor 171.69.233.52 route-map tag in

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch community-listmatch interfacematch ip addressmatch ip next-hopmatch ip route-sourcematch metricmatch route-typematch tagroute-mapset as-pathset automatic-tagset communityset levelset local-preferenceset metricset metric-typeset next-hopset originset tagset weightshow route-map

Page 83: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set ip next-hop

BGP Commands P1R-447

set ip next-hopTo indicate where to output packets that pass a match clause of a route map for policy routing, usetheset ip next-hoproute map configuration command. To delete an entry, use theno form of thiscommand.

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

Syntax Description

DefaultDisabled

Command ModeRoute map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0. The keywordpeer-addressfirst appearedin Cisco IOS Release 12.0.

Use theip policy route-map interface configuration command, theroute-map global configurationcommand, and thematch andset route map configuration commands, to define the conditions forpolicy routing packets. Theip policy route-map command identifies a route map by name. Eachroute-map command has a list ofmatch andset commands associated with it. Thematchcommands specify thematch criteria—the conditions under which policy routing occurs. Thesetcommands specify theset actions—the particular routing actions to perform if the criteria enforcedby thematch commands are met.

If the first next hop specified with theset ip next-hopcommand is down, the optionally specified IPaddresses are tried in turn.

Whenset ip next-hopis used with thepeer-address keyword in an inbound route map of a BGPpeer, 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 multipleBGP peers to override third-party next hops.

Whenset ip next-hopis used with thepeer-address keyword in an outbound route map of a BGPpeer, the next hop of the advertised matching routes will be set to be the peering address of the localrouter, thus disabling the next hop calculation. This command has finer granularity than theper-neighborneighbor next-hop-selfcommand, since you can set the next hop for some routes, butnot others. Theneighbor next-hop-self sets the next hop for all routes sent to that neighbor

ip-address IP address of the next hop to which packets are output. It need not be anadjacent router.

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

Page 84: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set ip next-hop

P1R-448 Network Protocols Command Reference, Part 1

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

set ip next-hopset interfaceset ip default next-hopset default interface

ExamplesIn the following example, packets with a Level 3 length of 3 to 50 bytes are output to the router atIP address 161.14.2.2:

interface serial 0ip policy route-map thataway

!route-map thataway

match length 3 50set ip next-hop 161.14.2.2

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

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

ip policy route-mapmatch ip addressmatch lengthneighbor next-hop-selfroute-mapset default interfaceset interfaceset ip default next-hop

Page 85: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set metric-type internal

BGP Commands P1R-449

set metric-type internalTo set the MED value on prefixes advertised to EBGP neighbors to match the IGP metric of the nexthop, use theset metric internal route-map configuration command. To return to the default, use theno form of this command.

set metric-type internalno set metric-type internal

Syntax DescriptionThis command has no arguments or keywords.

DefaultDisabled

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

This command will cause BGP to advertise a MED that corresponds to the IGP metric associatedwith the NEXT HOP of the route. This command applies to generated, iBGP-, and eBGP-derivedroutes.

If this command is used, multiple BGP speakers in a common AS can advertise different MEDs fora 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 theroute-map global configuration command, and thematch andsetroute-map configurationcommands, to define the conditions for redistributing routes from one routing protocol into another.Eachroute-map command has a list ofmatch andset commands associated with it. Thematchcommands specify thematch criteria—the conditions under which redistribution is allowed for thecurrentroute-map command. Theset commands specify theset actions—the particularredistribution actions to perform if the criteria enforced by thematch commands are met. Thenoroute-map command deletes the route map.

Theset route-map configuration commands specify the redistributionset actions to be performedwhen all of a route map’s match criteria are met. When all match criteria are met, all set actions areperformed.

Page 86: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set metric-type internal

P1R-450 Network Protocols Command Reference, Part 1

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

router bgp 109network 160.89.0.0neighbor 160.89.2.3 remote-as 200neighbor 160.89.2.3 route-map setMED out

!route-map setMED permit 10

match as-path 1set metric-type internal

!ip as-path access-list 1 permit .*

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

route-map

Page 87: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set origin

BGP Commands P1R-451

set originTo set the BGP origin code, use theset origin route-map configuration command. To delete an entry,use theno form of this command.

set origin { igp | egpautonomous-system| incomplete}

Syntax Description

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

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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 withmatch andset route-map configurationcommands to define the conditions for redistributing routes from one routing protocol into another.Eachroute-map command has a list ofmatch andset commands associated with it. Thematchcommands specify thematch criteria—the conditions under which redistribution is allowed for thecurrentroute-map command. Theset commands specify theset actions—the particularredistribution actions to perform if the criteria enforced by thematch commands are met. Thenoroute-map command deletes the route map.

Theset route-map configuration commands specify the redistributionset actions to be performedwhen all of a route map’s match criteria are met. When all match criteria are met, all set actions areperformed.

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

route-map set_originmatch as-path 10set origin igp

igp Remote IGP.

egp Local EGP.

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

incomplete Unknown heritage.

Page 88: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set origin

P1R-452 Network Protocols Command Reference, Part 1

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch community-listmatch interfacematch ip addressmatch ip next-hopmatch ip route-sourcematch metricmatch route-typematch tagroute-mapset as-pathset automatic tagset communityset levelset local-preferenceset metricset metric-typeset next-hopset tagset weight

Page 89: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set weight

BGP Commands P1R-453

set weightTo specify the BGP weight for the routing table, use theset weight route-map configurationcommand. To delete an entry, use theno form of this command.

set weightweightno set weightweight

Syntax Description

DefaultThe weight is not changed by the specified route map.

Command ModeRoute-map configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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 indicatedwhen an autonomous system path is matched override the weights assigned by globalneighborcommands. In other words, the weights assigned with thematch as-pathandset weightroute-mapcommands override the weights assigned using the neighbor weight andneighbor filter-listcommands.

ExampleThe following example sets the BGP weight for the routes matching the autonomous system pathaccess list to 200:

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

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch community-listmatch interfacematch ip addressmatch ip next-hopmatch ip route-sourcematch metricmatch route-typematch tagroute-map

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

Page 90: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

set weight

P1R-454 Network Protocols Command Reference, Part 1

set as-pathset automatic-tagset communityset levelset local-preferenceset metricset metric-typeset next-hopset originset tag

Page 91: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp

BGP Commands P1R-455

show ip bgpTo display entries in the BGP routing table, use theshow ip bgpEXEC command.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. The display of prefix advertisementstatistics was added in release 12.0.

Sample DisplaysThe following is sample output from theshow ip bgp command:

Router# show ip bgp

BGP table version is 716977, local router ID is 193.0.32.1Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path* i3.0.0.0 193.0.22.1 0 100 0 1800 1239 ?*>i 193.0.16.1 0 100 0 1800 1239 ?* i6.0.0.0 193.0.22.1 0 100 0 1800 690 568 ?*>i 193.0.16.1 0 100 0 1800 690 568 ?* i7.0.0.0 193.0.22.1 0 100 0 1800 701 35 ?*>i 193.0.16.1 0 100 0 1800 701 35 ?* 198.92.72.24 0 1878 704 701 35 ?* i8.0.0.0 193.0.22.1 0 100 0 1800 690 560 ?*>i 193.0.16.1 0 100 0 1800 690 560 ?* 198.92.72.24 0 1878 704 701 560 ?* i13.0.0.0 193.0.22.1 0 100 0 1800 690 200 ?*>i 193.0.16.1 0 100 0 1800 690 200 ?* 198.92.72.24 0 1878 704 701 200 ?* i15.0.0.0 193.0.22.1 0 100 0 1800 174 ?*>i 193.0.16.1 0 100 0 1800 174 ?* i16.0.0.0 193.0.22.1 0 100 0 1800 701 i*>i 193.0.16.1 0 100 0 1800 701 i* 198.92.72.24 0 1878 704 701 i

Table 45 describes significant fields shown in the display.

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

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

longer-prefixes (Optional) Displays route and more specific routes.

Page 92: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp

P1R-456 Network Protocols Command Reference, Part 1

Table 45 Show IP BGP Field Descriptions

Field Description

BGP table version Internal version number of the table. This number is incrementedwhenever 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 ofeach 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 ofeach line in the table. It can be one of the following values:

i—Entry originated from IGP and was advertised with anetworkrouter configuration command.

e—Entry originated from EGP.

?—Origin of the path is not clear Usually, this is a router that isredistributed 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 tothe destination network. An entry of 0.0.0.0 indicates that the routerhas some non-BGP routes to this network.

Metric If shown, this is the value of the interautonomous system metric. Thisfield is frequently not used.

LocPrf Local preference value as set with theset local-preferenceroute-mapconfiguration 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 beone entry in this field for each autonomous system in the path.

Page 93: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp

BGP Commands P1R-457

The following is sample output from theshow ip bgpcommand when you specifylonger-prefixes:

Router# show ip bgp 198.92.0.0 255.255.0.0 longer-prefixes

BGP table version is 1738, local router ID is 198.92.72.24Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*> 198.92.0.0 198.92.72.30 8896 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.1.0 198.92.72.30 8796 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.11.0 198.92.72.30 42482 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.14.0 198.92.72.30 8796 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.15.0 198.92.72.30 8696 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.16.0 198.92.72.30 1400 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.17.0 198.92.72.30 1400 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.18.0 198.92.72.30 8876 32768 ?* 198.92.72.30 0 109 108 ?*> 198.92.19.0 198.92.72.30 8876 32768 ?* 198.92.72.30 0 109 108 ?

The following is sample output from theshow ip bp command, showing information for prefix3.0.0.0:

show ip bgp 3.0.0.0BGP routing table entry for 3.0.0.0/8, version 628Paths: (1 available, best #1)Advertised to peer-groups:

ebgpAdvertised to non peer-group peers:

171.69.232.162109 65000 297 701 80

171.69.233.56 from 171.69.233.56 (172.19.185.32)Origin incomplete, localpref 100, valid, external, best, ref 2

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

Page 94: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp cidr-only

P1R-458 Network Protocols Command Reference, Part 1

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

show ip bgp cidr-only

Syntax DescriptionThis command has no arguments or keywords.

Command ModePrivileged EXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

Sample DisplayThe following is sample output from the show ip bgp cidr-onlycommand:

Router# show ip bgp cidr-only

BGP table version is 220, local router ID is 198.92.73.131Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*> 192.0.0.0/8 198.92.72.24 0 1878 ?*> 198.92.0.0/16 198.92.72.30 0 108 ?

Table 46 describes significant fields shown in the display.

Table 46 Show IP BGP CIDR-Only Field Descriptions

Field Description

BGP table version is 220 Internal version number for the table. This number is incremented anytime 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 ofeach line in the table. It can be one of the following values:

i—Entry originated from IGP and was advertised with anetworkrouter configuration command.

e—Entry originated from EGP.

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

Page 95: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp cidr-only

BGP Commands P1R-459

Network Internet address of the network the entry describes.

Next Hop IP address of the next system to use when forwarding a packet to thedestination network. An entry of 0.0.0.0 indicates that the access serverhas some non-BGP route to this network.

Metric If shown, this is the value of the interautonomous system metric. Thisfield is frequently not used.

LocPrf Local preference value. Default is 100.

Weight Set through the use of autonomous system filters.

Path Autonomous system paths to the destination network. There can beone entry in this field for each autonomous system in the path. At theend of the path is the origin code for the path.

i—The entry was originated with the IGP and advertised with anetwork router configuration command.

e—The route originated with EGP.

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

Table 46 Show IP BGP CIDR-Only Field Descriptions (continued)

Field Description

Page 96: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp community

P1R-460 Network Protocols Command Reference, Part 1

show ip bgp communityTo display routes that belong to specified BGP communities, use theshow ip bgp communityEXEC command.

show ip bgp communitycommunity-number[exact]

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3. Thelocal-as community was added inCisco IOS Release 12.0.

Sample DisplayThe following is sample output from theshow ip bgp communitycommand:

router# show ip bgp community 111:12345 local-as BGP table version is 10, local router ID is 224.0.0.10 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path *> 2.2.2.2/32 158.43.222.2 0 0 222 ? *> 111.0.0.0 158.43.222.2 0 0 222 ? *> 158.43.0.0 158.43.222.2 0 0 222 ? *> 158.43.44.44/32 158.43.222.2 0 0 222 ? * 158.43.222.0/24 158.43.222.2 0 0 222 i *> 172.17.240.0/21 158.43.222.2 0 0 222 ? *> 192.168.212.0 158.43.222.2 0 0 222 i *> 203.9.1.0 158.43.222.2 0 0 222 ?

Table 47 describes significant fields shown in the display.

community-number Valid value is community number in the range 1 to4294967200,internet, no-export, local-as, or no-advertise.

You must enter the numerical communities before thewell-known communities. For example, the following does notwork:

router#sh ip b community local-as 111:12345

Use the following instead:

router#sh ip b community 111:12345 local-as

exact (Optional) Displays only routes that have exactly the samespecified communities.

Page 97: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp community

BGP Commands P1R-461

Table 47 Show IP BGP Community Field Descriptions

Field Description

BGP table version Internal version number of the table. This number is incrementedwhenever 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 ofeach 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 ofeach line in the table. It can be one of the following values:

i—Entry originated from IGP and was advertised with anetworkrouter configuration command.

e—Entry originated from EGP.

?—Origin of the path is not clear Usually, this is a router that isredistributed 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 tothe destination network. An entry of 0.0.0.0 indicates that the routerhas some non-BGP routes to this network.

Metric If shown, this is the value of the interautonomous system metric. Thisfield is frequently not used.

LocPrf Local preference value as set with theset local-preferenceroute-mapconfiguration 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 beone entry in this field for each autonomous system in the path.

Page 98: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp community-list

P1R-462 Network Protocols Command Reference, Part 1

show ip bgp community-listTo display routes that are permitted by the BGP community list, use theshow ip bgpcommunity-list EXEC command.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.3.

Sample DisplayThe following is sample output of theshow ip bgp community-listcommand:

Router# show ip bgp community-list 20

BGP table version is 716977, local router ID is 193.0.32.1Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path* i3.0.0.0 193.0.22.1 0 100 0 1800 1239 ?*>i 193.0.16.1 0 100 0 1800 1239 ?* i6.0.0.0 193.0.22.1 0 100 0 1800 690 568 ?*>i 193.0.16.1 0 100 0 1800 690 568 ?* i7.0.0.0 193.0.22.1 0 100 0 1800 701 35 ?*>i 193.0.16.1 0 100 0 1800 701 35 ?* 198.92.72.24 0 1878 704 701 35 ?* i8.0.0.0 193.0.22.1 0 100 0 1800 690 560 ?*>i 193.0.16.1 0 100 0 1800 690 560 ?* 198.92.72.24 0 1878 704 701 560 ?* i13.0.0.0 193.0.22.1 0 100 0 1800 690 200 ?*>i 193.0.16.1 0 100 0 1800 690 200 ?* 198.92.72.24 0 1878 704 701 200 ?* i15.0.0.0 193.0.22.1 0 100 0 1800 174 ?*>i 193.0.16.1 0 100 0 1800 174 ?* i16.0.0.0 193.0.22.1 0 100 0 1800 701 i*>i 193.0.16.1 0 100 0 1800 701 i* 198.92.72.24 0 1878 704 701 i

Table 48 describes significant fields shown in the display.

community-list-number Community list number in the range 1 to 99.

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

Page 99: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp community-list

BGP Commands P1R-463

Table 48 Show IP BGP Community List Field Descriptions

Field Description

BGP table version Internal version number of the table. This number is incrementedwhenever 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 ofeach 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 ofeach line in the table. It can be one of the following values:

i—Entry originated from IGP and was advertised with anetworkrouter configuration command.

e—Entry originated from EGP.

?—Origin of the path is not clear Usually, this is a router that isredistributed 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 tothe destination network. An entry of 0.0.0.0 indicates that the routerhas some non-BGP routes to this network.

Metric If shown, this is the value of the interautonomous system metric. Thisfield is frequently not used.

LocPrf Local preference value as set with theset local-preferenceroute-mapconfiguration 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 beone entry in this field for each autonomous system in the path.

Page 100: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp dampened-paths

P1R-464 Network Protocols Command Reference, Part 1

show ip bgp dampened-pathsTo display BGP dampened routes, use the show ip bgp dampened-pathsEXEC command.

show ip bgp dampened-paths

Syntax DescriptionThis command has no arguments or keywords.

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

Sample DisplayThe following is sample output from theshow ip bgp dampened-paths command:

Router# show ip bgp dampened-pathsBGP table version is 10, local router ID is 171.69.232.182Status codes: s suppressed, d damped, h history, * valid, > best, i -internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network From Reuse Path*d 10.0.0.0 171.69.232.177 00:18:4 100 ?*d 12.0.0.0 171.69.232.177 00:28:5 100 ?

Table 49 describes the fields in the display.

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp dampeningclear ip bgp dampening

Table 49 Show IP BGP Dampened-Paths Field Descriptions

Field Description

BGP table version Internal version number for the table. This number is incremented anytime the table changes.

local router IP address of the router where route dampening is enabled.

*d Network Route to the network indicated is dampened.

From IP address of the peer that advertised this path.

Reuse Time (in hours:minutes:seconds) after which the path will be madeavailable.

Path AS-path of the route that is being dampened.

Page 101: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp filter-list

BGP Commands P1R-465

show ip bgp filter-listTo display routes that conform to a specified filter list, use the show ip bgp filter-list privilegedEXEC command.

show ip bgp filter-list access-list-number

Syntax Description

Command ModePrivileged EXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

Sample DisplayThe following is sample output from theshow ip bgp filter-list command:

Router# show ip bgp filter-list 2

BGP table version is 1738, local router ID is 198.92.72.24Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path* 198.92.0.0 198.92.72.30 0 109 108 ?* 198.92.1.0 198.92.72.30 0 109 108 ?* 198.92.11.0 198.92.72.30 0 109 108 ?* 198.92.14.0 198.92.72.30 0 109 108 ?* 198.92.15.0 198.92.72.30 0 109 108 ?* 198.92.16.0 198.92.72.30 0 109 108 ?* 198.92.17.0 198.92.72.30 0 109 108 ?* 198.92.18.0 198.92.72.30 0 109 108 ?* 198.92.19.0 198.92.72.30 0 109 108 ?* 198.92.24.0 198.92.72.30 0 109 108 ?* 198.92.29.0 198.92.72.30 0 109 108 ?* 198.92.30.0 198.92.72.30 0 109 108 ?* 198.92.33.0 198.92.72.30 0 109 108 ?* 198.92.35.0 198.92.72.30 0 109 108 ?* 198.92.36.0 198.92.72.30 0 109 108 ?* 198.92.37.0 198.92.72.30 0 109 108 ?* 198.92.38.0 198.92.72.30 0 109 108 ?* 198.92.39.0 198.92.72.30 0 109 108 ?

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

Page 102: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp filter-list

P1R-466 Network Protocols Command Reference, Part 1

Table 50 describes significant fields shown in the display.

Table 50 Show IP BGP Filter-List Field Descriptions

Field Description

BGP table version Internal version number for the table. This number is incremented anytime the table changes.

local router ID An Internet address of the access server.

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 ofeach line in the table. It can be one of the following values:

i—Entry originated from IGP and was advertised with anetworkrouter configuration command.

e—Entry originated from EGP.

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

Network Internet address of the network the entry describes.

Next Hop IP address of the next system to use when forwarding a packet to thedestination network. An entry of 0.0.0.0 indicates that the access serverhas some non-BGP route to this network.

Metric If shown, this is the value of the interautonomous system metric. Thisfield is frequently not used.

LocPrf Local preference value. Default is 100.

Weight Set through the use of autonomous system filters.

Path Autonomous system paths to the destination network. There can beone entry in this field for each autonomous system in the path. At theend of the path is the origin code for the path.

i—The entry was originated with the IGP and advertised with anetwork router configuration command.

e—The route originated with EGP.

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

Page 103: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp flap-statistics

BGP Commands P1R-467

show ip bgp flap-statisticsTo display BGP flap statistics, use the show ip bgp flap-statisticsEXEC command.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

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

Sample DisplayThe following is sample output from theshow ip bgp flap-statistics command:

Router# show ip bgp flap-statisticsBGP table version is 10, local router ID is 171.69.232.182Status codes: s suppressed, d damped, h history, * valid, > best, i -internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network From Flaps Duration Reuse Path*d 10.0.0.0 171.69.232.177 4 00:13:31 00:18:10 100*d 12.0.0.0 171.69.232.177 4 00:02:45 00:28:20 100

Table 51 describes the significant fields in the display.

regexp regexp (Optional) Clears flap statistics for all the paths that match the regularexpression.

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

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

mask (Optional) Network mask applied to theaddress.

longer-prefix (Optional) Displays flap statistics for more specific entries.

Table 51 Show IP BGP Flap-Statistics Field Descriptions

Field Description

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

local router ID IP address of the router where route dampening is enabled.

Network Route to the network indicated is dampened.

From IP address of the peer that advertised this path.

Flaps Number of times the route has flapped.

Page 104: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp flap-statistics

P1R-468 Network Protocols Command Reference, Part 1

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

bgp dampeningclear ip bgp flap-statistics

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

Reuse Time (in hours:minutes:seconds) after which the path will be madeavailable.

Path AS-path of the route that is being dampened.

Table 51 Show IP BGP Flap-Statistics Field Descriptions (continued)

Field Description

Page 105: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp inconsistent-as

BGP Commands P1R-469

show ip bgp inconsistent-asTo display routes with inconsistent originating autonomous systems, use the show ip bgpinconsistent-asprivileged EXEC command.

show ip bgp inconsistent-as

Syntax DescriptionThis command has no arguments or keywords.

Command ModePrivileged EXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

Sample DisplayThe following is sample output from theshow ip bgp inconsistent-as command:

Router# show ip bgp inconsistent-asBGP table version is 87, local router ID is 172.19.82.53Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path* 11.0.0.0 171.69.232.55 0 0 300 88 90 99 ?*> 171.69.232.52 2222 0 400 ?* 171.69.0.0 171.69.232.55 0 0 300 90 99 88 200 ?*> 171.69.232.52 2222 0 400 ?* 200.200.199.0 171.69.232.55 0 0 300 88 90 99 ?*> 171.69.232.52 2222 0 400 ?

show ip bgp neighborsTo display information about the TCP and BGP connections to neighbors, use theshow ip bgpneighbors EXEC command.

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

Page 106: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp neighbors

P1R-470 Network Protocols Command Reference, Part 1

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. Thereceived-routes keyword firstappeared in Cisco IOS Release 11.2.

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

received-routes (Optional) Displays all received routes (both accepted and rejected) fromthe specified neighbor.

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

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

pathsregular-expression

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

dampened-routes (Optional) Displays the dampened routes to the neighbor at the IPaddress specified.

Page 107: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp neighbors

BGP Commands P1R-471

Sample DisplaysThe following is sample output from theshow ip bgp neighbors command:

Router# show ip bgp neighbors 171.69.232.178

BGP neighbor is 171.69.232.178, remote AS 10, external link Index 1, Offset 0, Mask 0x2 Inbound soft reconfiguration allowed BGP version 4, remote router ID 171.69.232.178 BGP state = Established, table version = 27, up for 00:06:12 Last read 00:00:12, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 19 messages, 0 notifications, 0 in queue Sent 17 messages, 0 notifications, 0 in queue Inbound path policy configured Route map for incoming advertisements is testing Connections established 2; dropped 1Connection state is ESTAB, I/O status: 1, unread input bytes: 0Local host: 171.69.232.181, Local port: 11002Foreign host: 171.69.232.178, Foreign port: 179

Enqueued packets for retransmit: 0, input: 0, saved: 0

Event Timers (current time is 0x530C294):Timer Starts Wakeups NextRetrans 12 0 0x0TimeWait 0 0 0x0AckHold 12 10 0x0SendWnd 0 0 0x0KeepAlive 0 0 0x0GiveUp 0 0 0x0PmtuAger 0 0 0x0

iss: 133981889 snduna: 133982166 sndnxt: 133982166 sndwnd: 16108irs: 3317025518 rcvnxt: 3317025810 rcvwnd: 16093 delrcvwnd: 291

SRTT: 441 ms, RTTO: 2784 ms, RTV: 951 ms, KRTT: 0 msminRTT: 0 ms, maxRTT: 300 ms, ACK hold: 300 msFlags: higher precedence, nagle

Datagrams (max data segment is 1460 bytes):Rcvd: 15 (out of order: 0), with data: 12, total data bytes: 291Sent: 23 (retransmit: 0), with data: 11, total data bytes: 276

Table 52 describes the fields shown in the display.

Table 52 Show IP BGP Neighbors Field Descriptions

Field Description

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

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

BGP state Internal state of this BGP connection.

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

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

Last read Time that BGP last read a message from this neighbor.

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

Page 108: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp neighbors

P1R-472 Network Protocols Command Reference, Part 1

keepalive interval Time period between sending keepalive packets, which help ensure that the TCPconnection is up.

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

notifications Number of error messages received from the peer.

Sent Total number of BGP messages that have been sent to this peer, includingkeepalives.

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

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

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

Connection state State of BGP peer.

unread input bytes Number of bytes of packets still to be processed.

Local host, Local port Peering address of local router, plus port.

Foreign host, Foreignport

Neighbor’s peering address.

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

iss Initial send sequence number.

snduna Last send sequence number the local host sent but has not received anacknowledgment for.

sndnxt Sequence number the local host will send next.

sndwnd TCP window size of the remote host.

irs Initial receive sequence number.

rcvnxt Last receive sequence number the local host has acknowledged.

rcvwnd Local host’s TCP window size.

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

SRTT A calculated smoothed round-trip timeout.

RTTO Round-trip timeout.

RTV Variance of the round-trip time.

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

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

maxRTT Largest recorded round-trip timeout.

ACK hold Time the local host will delay an acknowledgment in order to piggyback dataon it.

Flags IP precedence of the BGP packets.

Datagrams: Rcvd Number of update packets received from neighbor.

with data Number of update packets received with data.

total data bytes Total bytes of data.

Table 52 Show IP BGP Neighbors Field Descriptions (continued)

Field Description

Page 109: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp neighbors

BGP Commands P1R-473

The following is sample output from theshow ip bgp neighborscommand withadvertised-routes:

Router# show ip bgp neighbors 171.69.232.178 advertised-routes

BGP table version is 27, local router ID is 171.69.232.181Status codes: s suppressed, d damped, h history, * valid, > best, i -internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*>i110.0.0.0 171.69.232.179 0 100 0 ?*> 200.2.2.0 0.0.0.0 0 32768 i

The following is sample output from theshow ip bgp neighbors command withroutes:

Router# show ip bgp neighbors 171.69.232.178 routes

BGP table version is 27, local router ID is 171.69.232.181Status codes: s suppressed, d damped, h history, * valid, > best, i -internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*> 10.0.0.0 171.69.232.178 40 0 10 ?*> 20.0.0.0 171.69.232.178 40 0 10 ?

Table 53 describes the fields shown in the display.

Sent Number of update packets sent.

with data Number of update packets with data sent.

total data bytes Total number of data bytes.

Table 53 Show IP BGP Neighbors Advertised-Routes andRoutes Field Descriptions

Field Description

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

local router ID IP address of the router.

Status codes s—The table entry is suppressed.

*—The table entry is valid.

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

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

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

i—Entry originated from IGP and was advertised with anetwork routerconfiguration command.

e—Entry originated from EGP.

?—Origin of the path is not clear Usually, this is a router that is redistributedinto BGP from an IGP.

Network IP address of a network entity.

Table 52 Show IP BGP Neighbors Field Descriptions (continued)

Field Description

Page 110: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp neighbors

P1R-474 Network Protocols Command Reference, Part 1

The following is sample output from theshow ip bgp neighbors command withpaths:

Router# show ip bgp neighbors 171.69.232.178 paths ^10

Address Refcount Metric Path0x60E577B0 2 40 10 ?

Next Hop IP address of the next system that is used when forwarding a packet to thedestination network. An entry of 0.0.0.0 indicates that the router has somenon-BGP routes to this network.

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

LocPrf Local preference value as set with theset local-preference route-mapconfiguration 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 inthis field for each autonomous system in the path.

Table 53 Show IP BGP Neighbors Advertised-Routes andRoutes Field Descriptions (continued)

Field Description

Page 111: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp paths

BGP Commands P1R-475

show ip bgp pathsTo display all the BGP paths in the database, use theshow ip bgp pathsEXEC command.

show ip bgp paths

Syntax DescriptionThis command has no arguments or keywords.

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

Sample DisplayThe following is sample output from theshow ip bgp paths command:

Router# show ip bgp pathsAddress Hash Refcount Metric Path0x60E5742C 0 1 0 i0x60E3D7AC 2 1 0 ?0x60E5C6C0 11 3 0 10 ?0x60E577B0 35 2 40 10 ?

Table 54 describes significant fields shown in the display.

Table 54 Show IP BGP Paths Field Descriptions

Field Description

Address Internal address where the path is stored.

Hash Hash bucket where path is stored.

Refcount Number of routes using that path.

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

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

Page 112: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp peer-group

P1R-476 Network Protocols Command Reference, Part 1

show ip bgp peer-groupTo display information about BGP peer groups, use theshow ip bgp peer-groupEXEC command.

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

Syntax Description

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 11.0.

Sample DisplayThe following is sample output from theshow ip bgp peer-group command:

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

tag (Optional) Displays information about that specific peer group.

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

Page 113: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp regexp

BGP Commands P1R-477

show ip bgp regexpTo display routes matching the regular expression, use the show ip bgp regexpprivileged EXECcommand.

show ip bgp regexp regular-expression

Syntax Description

Command ModePrivileged EXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

Sample DisplayThe following is sample output from theshow ip bgp regexp command:

Router# show ip bgp regexp 108$

BGP table version is 1738, local router ID is 198.92.72.24Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path* 198.92.0.0 198.92.72.30 0 109 108 ?* 198.92.1.0 198.92.72.30 0 109 108 ?* 198.92.11.0 198.92.72.30 0 109 108 ?* 198.92.14.0 198.92.72.30 0 109 108 ?* 198.92.15.0 198.92.72.30 0 109 108 ?* 198.92.16.0 198.92.72.30 0 109 108 ?* 198.92.17.0 198.92.72.30 0 109 108 ?* 198.92.18.0 198.92.72.30 0 109 108 ?* 198.92.19.0 198.92.72.30 0 109 108 ?* 198.92.24.0 198.92.72.30 0 109 108 ?* 198.92.29.0 198.92.72.30 0 109 108 ?* 198.92.30.0 198.92.72.30 0 109 108 ?* 198.92.33.0 198.92.72.30 0 109 108 ?* 198.92.35.0 198.92.72.30 0 109 108 ?* 198.92.36.0 198.92.72.30 0 109 108 ?* 198.92.37.0 198.92.72.30 0 109 108 ?* 198.92.38.0 198.92.72.30 0 109 108 ?* 198.92.39.0 198.92.72.30 0 109 108 ?

regular-expression Regular expression to match the BGP autonomous systempaths.

Page 114: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp summary

P1R-478 Network Protocols Command Reference, Part 1

show ip bgp summaryTo display the status of all BGP connections, use theshow ip bgp summaryEXEC command.

show ip bgp summary

Syntax DescriptionThis command has no arguments or keywords.

Command ModeEXEC

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0. The PfxRcd and Admin entries firstappeared in Cisco IOS Release 12.0.

Sample DisplayThe following is sample output from theshow ip bgp summary command:

Router# show ip bgp summary

BGP table version is 717029, main routing table version 71702919073 network entries (37544 paths) using 3542756 bytes of memory691 BGP path attribute entries using 57200 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd193.0.16.1 4 1755 32642 2973 717029 0 0 1:27:11193.0.17.1 4 1755 4790 2973 717029 0 0 1:27:51193.0.18.1 4 1755 7722 3024 717029 0 0 1:28:13193.0.19.1 4 1755 0 0 0 0 0 2d02 Active193.0.20.1 4 1755 3673 3049 717029 0 0 2:50:10 Idle (PfxRcd)193.0.21.1 4 1755 3741 3048 717029 0 0 12:24:43193.0.22.1 4 1755 33129 3051 717029 0 0 12:24:48193.0.23.1 4 1755 0 0 0 0 0 2d02 Active193.0.24.1 4 1755 0 0 0 0 0 2d02 Active193.0.25.1 4 1755 0 0 0 0 0 2d02 Active193.0.26.1 4 1755 0 0 0 0 0 2d02 Active193.0.27.1 4 1755 4269 3049 717029 0 0 12:39:33193.0.28.1 4 1755 3037 3050 717029 0 0 2:08:15198.92.72.24 4 1878 11635 13300 717028 0 0 0:50:39198.92.72.36 4 1001 0 0 0 0 0 never Idle (Admin)

Page 115: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

show ip bgp summary

BGP Commands P1R-479

Table 55 describes significant fields shown in the display.

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

neighbor maximum-prefixneighbor shutdownshow ip bgp summary

Table 55 Show IP BGP Summary Field Descriptions

Field Description

BGP table version Internal version number of BGP database.

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

Neighbor IP address of a neighbor.

V BGP version number spoken to that neighbor.

AS Autonomous system.

MsgRcvd BGP messages received from that neighbor.

MsgSent BGP messages sent to that neighbor.

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

InQ Number of messages from that neighbor waiting to be processed.

OutQ Number of messages waiting to be sent to that neighbor.

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

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

An (Admin) entry with Idle status indicates that the connection hasbeen shut down using theneighbor shutdown command.

Page 116: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

synchronization

P1R-480 Network Protocols Command Reference, Part 1

synchronizationTo enable the synchronization between BGP and your IGP, use the synchronization routerconfiguration command. To enable the Cisco IOS software to advertise a network route withoutwaiting for the IGP, use theno form of this command.

synchronizationno synchronization

Syntax DescriptionThis command has no arguments or keywords.

DefaultEnabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

Usesynchronization if there are routers in the autonomous system that do not speak BGP.

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

router bgp 120no synchronization

Page 117: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

table-map

BGP Commands P1R-481

table-mapTo modify metric and tag values when the IP routing table is updated with BGP learned routes, usethe table-map router configuration command. To disable this function, use theno form of thecommand.

table-map route-map-nameno table-maproute-map-name

Syntax Description

DefaultDisabled

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

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

You can usematch clauses of route maps in thetable-map command. IP access list, autonomoussystem paths, and next-hop match clauses are supported.

ExampleIn the following example, the Cisco IOS software is configured to automatically compute the tagvalue for the BGP learned routes and to update the IP routing table.

route-map tagmatch as path 10set automatic-tag

!router bgp 100

table-map tag

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

match as-pathmatch ip addressmatch ip next-hoproute-map

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

Page 118: BGP Commands - Cisco网络技术(Net130.Com) command.pdf · BGP Commands P1R-373 bgp client-to-client reflection To restore route reflection from a BGP route reflector to clients,

timers bgp

P1R-482 Network Protocols Command Reference, Part 1

timers bgpTo adjust BGP network timers, use thetimers bgp router configuration command. To reset the BGPtiming defaults, use theno form of this command.

timers bgp keepalive holdtimeno timers bgp

Syntax Description

Defaultskeepalive: 60 secondsholdtime: 180 seconds

Command ModeRouter configuration

Usage GuidelinesThis command first appeared in Cisco IOS Release 10.0.

ExampleThe following example changes the keepalive timer to 70 seconds and the holdtime timer to210 seconds:

timers bgp 70 210

Related CommandsYou can use the master indexes or search online to find documentation of related commands.

clear ip bgp peer-grouprouter bgpshow ip bgp

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

holdtime Interval, in seconds, after not receiving akeepalivemessage thatthe software declares a peer dead. The default is 180 seconds.