- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-BGP Commands | 212.11 KB |
Table of Contents
Chapter 1 BGP Configuration Commands
1.1 BGP Configuration Commands
1.1.4 compare-different-as-med
1.1.6 confederation nonstandard
1.1.10 default local-preference
1.1.17 display bgp routing-table
1.1.18 display bgp routing-table as-path-acl
1.1.19 display bgp routing-table cidr
1.1.20 display bgp routing-table community
1.1.21 display bgp routing-table community-list
1.1.22 display bgp routing-table dampened
1.1.23 display bgp routing-table different-origin-as
1.1.24 display bgp routing-table flap-info
1.1.25 display bgp routing-table peer
1.1.26 display bgp routing-table regular-expression
1.1.27 display bgp routing-table statistic
1.1.34 peer advertise-community
1.1.37 peer as-path-acl export
1.1.38 peer as-path-acl import
1.1.40 peer default-route-advertise
1.1.44 peer filter-policy export
1.1.45 peer filter-policy import
1.1.56 peer route-policy export
1.1.57 peer route-policy import
1.1.58 peer route-update-interval
1.1.62 reflect between-clients
Chapter 1 BGP Configuration Commands
& Note:
When a switch runs a routing protocol, it can perform the router functions. The term “router” or the router icon in this document refers to a router in a generic sense or an S9500 switch running routing protocols.
1.1 BGP Configuration Commands
1.1.1 aggregate
Syntax
aggregate address mask [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ]*
undo aggregate address mask [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ]*
View
BGP view
Parameters
address: Address of the aggregated route in dotted decimal format.
mask: Network mask of the aggregated route in dotted decimal format.
as-set: Creates a route with segment of AS_SET.
detail-suppressed: Only advertises the aggregated route.
suppress-policy route-policy-name: Suppresses the specific route selected and does not advertise part of the specific routes.
origin-policy route-policy-name: Selects the originate routes used for aggregation.
attribute-policy route-policy-name: Sets the attributes of the aggregated route.
Description
Use the aggregate command to establish an aggregated record in the BGP routing table.
Use the undo aggregate command to disable the function.
By default, there is no route aggregation.
The keywords are explained as follows:
Table 1-1 The use of the keywords
Keyword |
Use |
as-set |
Used to produce an aggregated route, whose AS path information includes detailed routes. Use this keyword carefully when many AS paths need to be aggregated, for the frequent change of routes may lead to route vibration. |
detail-suppressed |
This keyword does not suppress any aggregated route, but it restrains the advertisement of all the specific routes. If only some specific routes are to be restrained, use the peer filter-policy command carefully. |
suppress-policy |
Create an aggregated route with this keyword. At the same time, the advertisement of the specified route is restrained. If you want to restrain some specific routes selectively and leaves other routes still being advertised, use the if-match sub-statement of the route-policy command. |
origin-policy |
Selects only the specific routes that are in accordance with route-policy to create an aggregated route. |
attribute-policy |
Sets aggregated route attributes. The same work can be done by using the peer route-policy command, etc. |
Examples
# Create an aggregated record in BGP routing table.
[H3C-bgp] aggregate 168.328.0.0 255.255.0.0
1.1.2 balance
Syntax
balance balance-number
undo balance
View
BGP view
Parameters
balance-number: Specifies the number of BGP equivalent routes.
Description
Use the balance command to set the number of BGP equivalent routes currently supported by the system.
Use the undo balance command to restore the default number of BGP equivalent routes.
By default, the system supports one BGP equivalent route.
Examples
# Set the number of supported BGP equivalent routes to 3.
[H3C-bgp] balance 3
1.1.3 bgp
Syntax
bgp as-number
undo bgp [as-number ]
View
System view
Parameters
as-number: The specified local AS number, in the range of 1 to 65535.
Description
Use the bgp command to enable BGP and enter BGP view.
Use the undo bgp command to disable BGP.
By default, the system does not run BGP.
This command is used to enable and disable BGP as well as to specify the local AS number of BGP.
& Note:
If a router ID is configured before the bgp command is executed on a router, the router ID is applied for the BGP-enabled router; if not, the IP address of the interface (including, but not limited to, a loopback interface) that became up first is selected as the router ID.
Examples
# Enable BGP.
[H3C] bgp 100
[H3C-bgp]
1.1.4 compare-different-as-med
Syntax
compare-different-as-med
undo compare-different-as-med
View
BGP view
Parameters
None
Description
Use the compare-different-as-med command to enable comparison of MED values from different AS neighboring routes.
Use the undo compare-different-as-med command to disable the comparison.
By default, it is disabled to compare the MED attribute values from the routing paths of different AS peers.
If there are several routes available to one destination address, the route with smaller MED parameter can be selected as the final route item.
Do not use this command unless it is determined that the same IGP and routing selection mode are adopted by different autonomous systems.
Examples
[H3C-bgp] compare-different-as-med
1.1.5 confederation id
Syntax
confederation id as-number
undo confederation id
View
BGP view
Parameters
as-number: The ID of BGP AS confederation. It is equal to the AS number which contains the AS numbers of multiple sub-ASs. The range is 1 to 65535.
Description
Use the confederation id command to configure confederation identifier.
Use the undo confederation id command to cancel the BGP confederation specified by as-number argument.
By default, the confederation ID is not configured.
Confederation can be adopted to solve the problem of too many IBGP full connections in a large AS domain. The solution is, first dividing the AS domain into several smaller sub-ASs, and each sub-ASs remains full-connected. These sub-ASs form a confederation. Key BGP attributes of the route, such as next hop, MED, local preference, are not discarded across each sub-ASs. The sub-ASs still look like a whole from the point of view of a confederation although these sub-ASs have EBGP relations. This can assure the integrality of the former AS domain, and ease the problem of too many connections in the domain
Related commands: confederation nonstandard, confederation peer-as.
Examples
# Confederation 9 consists of four sub-ASs, namely, 38, 39, 40 and 41. Here, the peer 10.1.1.1 is an internal member of the AS confederation while the peer 200.1.1.1 is an external member of the AS confederation. For external members, Confederation 9 is a unified AS domain.
[H3C] bgp 41
[H3C-bgp] confederation id 9
[H3C-bgp] confederation peer-as 38 39 40
[H3C-bgp] group Confed38 external
[H3C-bgp] peer Confed38 as-number 38
[H3C-bgp] peer 10.1.1.1 group Confed38
[H3C-bgp] group Remote98 external
[H3C-bgp] peer Remote98 as-number 98
[H3C-bgp] peer 200.1.1.1 group Remote98
1.1.6 confederation nonstandard
Syntax
confederation nonstandard
undo confederation nonstandard
View
BGP view.
Parameters
None
Description
Use the confederation nonstandard command to configure the router to be compatible with routers not following RFC1965.
Use the undo confederation nonstandard command to disable this function.
By default, it is in accordance with RFC1965.
Related commands: confederation id, confederation peer-as.
Examples
# AS 100 contains routers following nonstandard, which is composed of two sub-ASs, 64000 and 65000.
[H3C] bgp 64000
[H3C-bgp] confederation id 100
[H3C-bgp] confederation peer-as 65000
[H3C-bgp] confederation nonstandard
1.1.7 confederation peer-as
Syntax
confederation peer-as as-number-1 [... as-number-n ]
undo confederation peer-as [ as-number-1 ] [... as-number-n ]
View
BGP view
Parameters
as-number-1...as-number-n: Sub-AS number. The range is 1 to 65535. This command can configure a maximum of 32 Sub-ASs belonging to a confederation.
Description
Use the confederation peer-as command to configure a confederation consisting of which Sub-ASs.
Use the undo confederation peer-as command to delete the specified Sub-AS in the confederation.
By default, no autonomous system is configured as a member of the confederation.
Before this command is performed, the confederation ID should be configured by the confederation id command. Otherwise this configuration is invalid. The configured ASs in this command are inside the confederation and each AS uses fully meshed network. The confederation appears as a single AS to the routers outside it.
Related commands: confederation nonstandard, confederation id.
Examples
# Configure the confederation contains AS 2001 and 2002.
[H3C-bgp]confederation peer-as 2000 2001
1.1.8 dampening
Syntax
dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling ] [ route-policy policy-name ]
undo dampening
View
BGP view
Parameters
half-life-reachable: Specifies the semi-dampening when the route is reachable. The range is 1 to 45 minutes. By default, the value is 15 minutes.
half-life-unreachable: Specifies the semi-dampening when the route is unreachable. The range is 1 to 45 minutes. By default, the value is 15 minutes.
reuse: When the penalty is reduced under this value, the route is reused. The range is 1 to 20000. By default, the value is 750.
suppress: When the penalty exceeds this value, the route is suppressed. The range is 1 to 20000. By default, the value is 2000.
ceiling: The upper threshold of the penalty. The range is 1001 to 20000. By default, the value is 16000.
policy-name: Configures route policy name.
If these parameters are not set, their default values will be used.
The parameters are mutually dependent. Once one of these parameters is configured, all other parameters should also be specified.
Description
Use the dampening command to make BGP route attenuation valid or modify various BGP route attenuation parameters.
Use the undo dampening command to make the characteristics invalid.
By default, no route attenuation is configured.
Related commands: reset bgp dampening, reset bgp flap-info, display bgp routing-table dampened, display bgp routing-table flap-info.
Examples
# Modify the BGP route dampening parameters.
[H3C-bgp] dampening 15 15 1000 2000 10000
1.1.9 debugging bgp
Syntax
debugging bgp { all | event | normal | { keepalive | mp-update | open | packet | route-refresh | update } [ receive | send ] [ verbose ] }
undo debugging bgp { all | event | normal | keepalive | mp-update | open | packet | route-refresh | update }
View
User view
Parameters
all: Indicates to enable all BGP information debugging.
event: Indicates to enable BGP event information debugging.
normal: Indicates to enable information debugging of BGP normal functions.
keepalive: Indicates to enable BGP Keepalive packet information debugging.
mp-update: Indicates to enable MBGP Update packet information debugging.
open: Indicates to enable BGP Open packet information debugging.
packet: Indicates to enable BGP packet information debugging.
route-refresh: Indicates to enable BGP route-refresh packet information debugging.
update: Indicates to enable BGP Update packet information debugging.
receive: Information of received packets.
send: Information of sent packets.
verbose: Detailed information.
Description
Use the debugging bgp all command to enable all the information debugging of BGP packet and events.
Use the debugging bgp event command to enable the information debugging of BGP events
Use the debugging bgp keepalive command to enable the information debugging of BGP Keepalive packets.
Use the debugging bgp packet command to enable the information debugging of BGP packets.
Use the undo debugging bgp command to disable the debugging functions.
Examples
# Enable the information debugging of BGP packets.
<H3C> debugging bgp packet
1.1.10 default local-preference
Syntax
default local-preference value
undo default local-preference
View
BGP view
Parameters
value: Default local preference to be configured. The range is 0 to 4294967295. By default, its value is 100.
Description
Use the default local-preference command to configure the local preference.
Use the undo default local-preference command to restore the default value.
Configuring different local preferences will affect BGP routing selection.
Examples
# The two routers RTA and RTB in the same autonomous area connect with external autonomous areas. The command can be used to configure the default local preference of RTB as 180 so that the route via RTB is selected first when the same route goes through RTA and RTB at the same time.
[H3C-bgp]default local-preference 180
1.1.11 default med
Syntax
default med med-value
undo default med
View
BGP view
Parameters
med-value: MED value to be specified. The range is 0 to 4294967295. By default, the med-value is 0.
Description
Use the default med command to configure the default system metric.
Use the undo default med command to restore the default metric of the system.
Multi-Exit Discriminators (MED) attribute is the external metric of a route. Different from local preference, MED is exchanged between ASs. However, this attribute is non-transitive. When a router running BGP gets routes with the same destination address but different next hops from different external peers, it selects the route with the smallest MED as the optimum route, provided that all other conditions are the same.
Examples
# Routers RTA and RTB belong to AS 100 and router RTC belongs to AS 200. RTC is the peer of RTA and RTB. So the MED of RTA can be configured as 25 to allow RTC to select the route transmitted by RTB first.
[H3C-bgp] default med 25
1.1.12 default-route imported
Syntax
default-route imported
undo default-route imported
View
BGP view
Parameters
None
Description
Use the default-route imported command to allow BGP to import the default routes of other routing protocols.
Use the undo default-route imported command to filter their default routes when BGP is importing other routing protocols.
When BGP is importing other routing protocols, BGP does not import their default routes by default.
Examples
# Configure a static default route.
<H3C> system-view
[H3C] ip route-static 0.0.0.0 0.0.0.0 NULL 0
# Import static routes into BGP.
[H3C] bgp 100
[H3C-bgp] import-route static
# Find out that no static default route is imported into BGP.
[H3C -bgp]display bgp routing-table
Routes total: 0
# Import the default routes of static routing protocols.
[H3C-bgp] default-route imported
# Query the routing table.
[H3C-bgp] display bgp routing-table
Flags: # - valid ^ - active I - internal
D - damped H - history S - aggregate suppressed
B - balance
Dest/Mask Next-Hop Med Local-pref Origin Path
--------------------------------------------------------------------------
#^ 0.0.0.0 0.0.0.0 0 INC
Routes total: 1
1.1.13 display bgp group
Syntax
display bgp group [ group-name ]
View
Any view
Parameters
group-name: Specified a peer group.
Description
Use the display bgp group command to display the information of peer groups.
Examples
# View the information of the peer group aaa.
<H3C> display bgp group aaa
Group : aaa type : external
as-number : 200
members in this group :
10.1.1.1 11.1.1.1
configuration within the group :
no export policy route-policy
no export policy filter-policy
no export policy acl
no export policy ip-prefix
route-policy specified in import policy : aaa
no import policy filter-policy
no import policy acl
no import policy ip-prefix
no default route produce
Table 1-2 Description on the fields of the display bgp group command
Field |
Description |
Group |
Name of peer group |
type |
Type of peer group: IBGP or EBGP |
as-number |
AS number of peer group |
members in this group |
Members in this peer group |
route-policy |
Name of configured route policy |
filter-policy |
Configured export and import route filter for BGP |
acl |
Configured access control list |
ip-prefix |
Configured IP address prefix list |
1.1.14 display bgp network
Syntax
display bgp network
View
Any view
Parameters
None
Description
Use the display bgp network command to display the routing information that has been configured.
Examples
# Display the routing information that has been configured.
<H3C> display bgp network
Network Mask Route-policy
133.1.1.0 255.255.255.0 None
112.1.0.0 255.255.0.0 None
Table 1-3 Description on the fields of the display bgp network command
Field |
Description |
Network |
Network address |
Mask |
Mask |
Route-policy |
Configured route policy |
1.1.15 display bgp paths
Syntax
display bgp paths as-regular-expression
View
Any view
Parameters
as-regular-expression: Matched AS path regular expression.
Description
Use the display bgp paths command to display the information about AS paths
Examples
# Display the information about the AS paths.
<H3C> display bgp paths ^600$
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
Id Hash-Index References Aggregator Origin As-Path
--------------------------------------------------------------------
6 90 15 <null> IGP 600
Table 1-4 Description on the fields of the display bgp paths command
Field |
Description |
|
Flags |
State flags: # - valid (valid) ^ - best (selected) D – damped (discarded) H – history (history) I – internal (interior gateway protocol) S - aggregate suppressed (suppressed) |
|
Id |
Value of sequence number |
|
Hash-Index |
Value of Hash-index |
|
References |
Count of times that the route is referenced |
|
Aggregator |
Mask length of aggregate route |
|
Origin |
Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values: |
|
IGP |
The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP. |
|
EGP |
The route is learned from exterior gateway protocol (EGP). |
|
INC |
Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE |
|
As-path |
AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided |
1.1.16 display bgp peer
Syntax
display bgp peer [ peer-address ] [ verbose ]
View
Any view
Parameters
peer-address: Specifies the peer to be displayed.
verbose: Displays the detailed information of the peer.
Description
Use the display bgp peer command to display the information about BGP peers.
Examples
# Display the detail information of the peer 1.1.1.1.
<H3C> display bgp peer 1.1.1.1 verbose
Peer: 1.1.1.1+179 Local: 6.6.6.6+2574
Type: External
State: Established Flags: <>
Expiring Time: 00:02:07
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Hold Timer Expired Error
Options: <KeepAll Ttl>
Peer Version: 4 Peer ID: 2.2.2.1 Local ID: 192.168.0.52
Active Holdtime: 180s, Keepalive: 60s
Last traffic (seconds): Received 53 Sent 53 Checked 53
Input messages: Total 2 Updates 2 Octets 195
Output messages: Total 4 Updates 2 Octets 171
Route Queue Timer: unset
Peer capabilities:
Route refresh: advertised and received
Ipv4-family Unicast: advertised and received
Ipv4-family VPNv4: advertised and received
Configuration within the peer :
no export policy route-policy
no export policy ip-prefix
no export policy filter-policy
no export policy acl
no import policy route-policy
no import policy ip-prefix
no import policy filter-policy
no import policy acl
Some member variables within the peer :
bgp_group_bit:0
bgp_outbuf:0
bgp_flags:0
Table 1-5 Description on the fields of the display bgp peer verbose command
Field |
Description |
Peer |
IP address of peer and port number used by the peer to establish TCP connection |
Local |
IP address and port number used to establish TCP connection of local end |
Type |
Type of peer: Internal for IBGP, and External for EBGP |
State |
State of peer |
Flags |
Flags of peer |
Last State |
Last state before entering the current state |
Last Event |
Last event of neighbor state machine |
Last Error |
Last error of neighbor state machine |
Options |
Options |
1.1.17 display bgp routing-table
Syntax
display bgp routing-table [ ip-address [ mask ] ]
View
Any view
Parameters
ip-address: Destination of the network.
mask: Mask of the network.
Description
Use the display bgp routing-table command to display all the BGP routing information.
Examples
# Display all the BGP routing information.
<H3C> display bgp routing-table
Flags: # - valid ^ - active I - internal
D - damped H - history S - aggregate suppressed
B – balance
Dest/Mask Next-hop Med Local-pref Origin As-path
-----------------------------------------------------------------------
#^ 129.1.1.0/24 5.5.5.5 IGP 600
#^ 129.1.2.0/24 5.5.5.5 IGP 600
#^ 129.1.3.0/24 5.5.5.5 IGP 600
#^ 129.1.4.0/24 5.5.5.5 IGP 600
#^ 129.1.5.0/24 5.5.5.5 IGP 600
#^ 129.1.6.0/24 5.5.5.5 IGP 600
#^ 129.1.7.0/24 5.5.5.5 IGP 600
#^ 129.1.8.0/24 5.5.5.5 IGP 600
#^ 129.1.9.0/24 5.5.5.5 IGP 600
#^ 129.1.10.0/24 5.5.5.5 IGP 600
Table 1-6 Description on the fields of the display bgp routing-table command
Field |
Description |
|
Flags |
State flags: # - valid (valid) ^ - best (selected) D – damped (discarded) H – history (history) I – internal (interior gateway protocol) S - aggregate suppressed (suppressed) B – balance (equivalent route) |
|
Dest/Mask |
Destination address/Mask |
|
Next Hop |
IP address of next hop |
|
Med |
MULTI_EXIT_DISC attribute value, which ranges from 0 to 4294967295 |
|
Local-Pref |
Local preference, which ranges from 0 to 4294967295 |
|
Origin |
Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values: |
|
IGP |
The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP. |
|
EGP |
The route is learned from exterior gateway protocol (EGP). |
|
INC |
Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE |
|
As-path |
AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided |
1.1.18 display bgp routing-table as-path-acl
Syntax
display bgp routing-table as-path-acl acl-number
View
Any view
Parameters
acl-number: Specifies matched AS path list number ranging from 1 to 199.
Description
Use the display bgp routing-table as-path-acl command to display routes that match an as-path acl.
Examples
# Display routes that match the as-path-acl 1.
<H3C> display bgp routing-table as-path-acl 1
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B - balance
Dest/Mask Pref Next-Hop Med Local-pref Origin As-path
--------------------------------------------------------------------
#^ 1.1.1.0/24 256 10.10.10.1 0 IGP 200
#^ 1.1.2.0/24 256 10.10.10.1 0 IGP 200
#^ 1.1.3.0/24 256 10.10.10.1 0 IGP 200
#^ 2.2.3.0/24 256 10.10.10.1 0 INC 200
#^ 4.4.4.0/24 256 10.10.10.1 0 INC 200
#^ 9.9.9.0/24 256 10.10.10.1 0 INC 200
#^ 10.10.10.0/24 256 10.10.10.1 0 IGP 200
#^ 22.1.0.0/16 256 200.1.7.2 100 INC 200
# 88.1.0.0/16 60 0.0.0.0 IGP
Table 1-7 Description on the fields of the display bgp routing-table as-path-acl command
Field |
Description |
|
Dest/Mask |
Destination address/Mask |
|
Pref |
Preference |
|
Nexthop |
IP address of next hop |
|
Med |
MULTI_EXIT_DISC attribute value |
|
Local-pref |
Local preference |
|
Origin |
Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values: |
|
IGP |
The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP. |
|
EGP |
The route is learned from exterior gateway protocol (EGP). |
|
INC |
Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE |
|
As-path |
AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided |
1.1.19 display bgp routing-table cidr
Syntax
display bgp routing-table cidr
View
Any view
Parameters
None
Description
Use the display bgp routing-table cidr command to display the routing information about the non-natural mask (namely classless inter-domain routing, CIDR).
Examples
<H3C> display bgp routing-table cidr
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Dest/Mask Pref Next-Hop Med Local-pref Origin As-path
--------------------------------------------------------------------
#^ 22.1.0.0/16 256 200.1.7.2 100 INC 200
# 88.1.0.0/16 60 0.0.0.0 IGP
For detailed description of the output information, see Table 1-6.
1.1.20 display bgp routing-table community
Syntax
display bgp routing-table community [ aa:nn ]* [ no-export-subconfed | no-advertise | no-export ]* [ whole-match ]
View
Any view
Parameters
aa:nn: Specifies a community number. It can be input up to 13 times.
no-export-subconfed: Does not send matched route outside AS.
no-advertise: Sends matched route to no peers.
no-export: Does not advertise the route to outside the AS or the confederation, but can advertise the route to other sub-ASs in the confederation.
whole-match: Configures to display the exactly matched routes.
Description
Use the display bgp routing-table community command to display the routing information related to the specified BGP community number in the routing table.
Examples
# Display the routing information matching BGP community number 11:22.
<H3C> display bgp routing-table community 11:22
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Dest/Mask Pref Next-Hop Med Local-pref Origin As-path
--------------------------------------------------------------------
#^ 1.0.0.0/8 256 172.10.0.2 100 IGP
#^ 2.0.0.0/8 256 172.10.0.2 100 IGP
For detailed description of the output information, see Table 1-6.
1.1.21 display bgp routing-table community-list
Syntax
display bgp routing-table community-list community-list-number [ whole-match ]
View
Any view
Parameters
community-list-number: Specifies a community-list.
whole-match: Configures to display the exactly matched routes.
Description
Use the display bgp routing-table community-list command to display the routing information matching the specified BGP community list.
Examples
# Display the routing information matching BGP community list 1.
[H3C] display bgp routing-table community-list 1
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Destination/Mask Pref Next-hop Med Local-Pref Origin As-Path
-------------------------------------------------------------------
1.1.1.0/24 256 10.10.10.1 0 IGP 200
1.1.2.0/24 256 10.10.10.1 0 IGP 200
1.1.3.0/24 256 10.10.10.1 0 IGP 200
2.2.3.0/24 256 10.10.10.1 0 INC 200
4.4.4.0/24 256 10.10.10.1 0 INC 200
9.9.9.0/24 256 10.10.10.1 0 INC 200
10.10.10.0/24 0 10.10.10.2 0 IGP
10.10.10.0/24 256 10.10.10.1 0 IGP 200
For detailed description of the output information, see Table 1-6.
1.1.22 display bgp routing-table dampened
Syntax
display bgp routing-table dampened
View
Any view
Parameters
None
Description
Use the display bgp routing-table dampened command to display BGP dampened routes.
Examples
# View BGP dampened information.
<H3C> display bgp routing-table dampened
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Dest/Mask Source Damping-limit Origin As-path
-----------------------------------------------------------------
#D 11.1.0.0/16 133.1.1.2 1:20:00 IGP 200
Table 1-8 Description on the fields of the display bgp routing-table dampened command
Field |
Description |
|
Flags |
State flags: # - valid (valid) ^ - best (selected) D – damped (discarded) H – history (history) I – internal (interior gateway protocol) S - aggregate suppressed (suppressed) |
|
#D |
The valid and damped route |
|
Dest/Mask |
The dampened route to the destination network 11.1.0.0 |
|
Source |
The nexthop of the route |
|
Damping-limit |
The time before dampening turns invalid and the route can be reused. |
|
Origin |
Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values: |
|
IGP |
The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP. |
|
EGP |
The route is learned from exterior gateway protocol (EGP). |
|
INC |
Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE |
|
As-path |
AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided |
1.1.23 display bgp routing-table different-origin-as
Syntax
display bgp routing-table different-origin-as
View
Any view
Parameters
None
Description
Use the display bgp routing-table different-origin-as command to display routes that have different source autonomous systems
Examples
# View the routes that have different source ASs.
<H3C> display bgp routing-table different-origin-as
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Destination/Mask Pref Next-hop Med Local-Pref Origin As-Path
------------------------------------------------------------------
10.10.10.0/24 0 10.10.10.2 0 IGP
10.10.10.0/24 256 10.10.10.1 0 IGP 200
For detailed description of the output information, see Table 1-6.
1.1.24 display bgp routing-table flap-info
Syntax
display bgp routing-table flap-info [ regular-expression as-regular-expression | as-path-acl acl-number | network-address [ mask [ longer-match ] ] ]
View
Any view
Parameters
as-regular-expression: The route flap-info matching AS path regular expression.
acl-number: Number of the specified AS path to be matched, ranging from 1 to 199.
network-address: Displays the flap information of this IP address.
mask: Network mask.
longer-match: Shows the route flap-info that is more specific than address, mask.
Description
Use the display bgp routing-table flap-info command to display BGP flap-info. If the network-address mask arguments are set to 0.0.0.0 0.0.0.0, this command displays the flap statistics of all BGP routes.
Examples
# Display BGP flap-info.
<H3C> display bgp routing-table flap-info
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Dest/Mask Source Keepup-time Damping-limit Flap-times Origin As-path
--------------------------------------------------------------------
#D 11.1.0.0/16 133.1.1.2 48 1:20:30 4 IGP 200
Table 1-9 Description on the fields of the display bgp routing-table flap-info command
Item |
Description |
|
Flags |
State flags: # - valid (valid) ^ - best (selected) D – damped (discarded) H – history (history) I – internal (interior gateway protocol) S - aggregate suppressed (suppressed) |
|
#D |
The valid and damped route |
|
Dest/Mask |
The dampened route to the destination network 11.1.0.0 |
|
Source |
The nexthop of the route |
|
Keepup-time |
The time that route damping has continued |
|
Damping-limit |
The time before dampening turns invalid and the route can be reused. |
|
Flap-times |
The times of the route flap |
|
Origin |
Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values: |
|
IGP |
The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP. |
|
EGP |
The route is learned from exterior gateway protocol (EGP). |
|
INC |
Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE |
|
As-path |
AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided |
1.1.25 display bgp routing-table peer
Syntax
display bgp routing-table peer peer-address { advertised | received } [ network-address [ mask ] | statistic ]
View
Any view
Parameters
peer-address: Specifies the peer to be displayed.
advertised: Routing information advertised by the specified peer.
received: Routing information the specified peer received.
network-address mask : IP address and address mask of destination network.
statistic: Statistic routing information of peer.
Description
Use the display bgp routing-table peer command to display the routing information the specified BGP peer advertised or received.
Related commands: display bgp peer.
Examples
# Display the routing information advertised by BGP peer 10.10.10.1.
[H3C] display bgp routing table peer 10.10.10.1 advertised
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B – balance
Dest/mask Next -Hop Med Local-pref Origin As-path
*> 10.10.10.0/24 0.0.0.0 INC
For detailed description of the output information, see Table 1-6.
1.1.26 display bgp routing-table regular-expression
Syntax
display bgp routing-table regular-expression as-regular-expression
View
Any view
Parameters
as-regular-expression: Matched AS regular expression.
Description
Use the display bgp routing-table regular-expression command to display the routing information matching the specified AS regular expression
Examples
# Display the routing information matched with ^600$.
<H3C> display bgp routing-table regular-expression ^600$
Flags: # - valid, ^ - best,
D - damped, H - history,
I - internal, S – aggregate suppressed
B - balance
Destination/Mask Pref Next-hop Med Local-Pref Origin Path
--------------------------------------------------------------------
1.1.1.0/24 256 10.10.10.1 0 IGP 200
1.1.2.0/24 256 10.10.10.1 0 IGP 200
1.1.3.0/24 256 10.10.10.1 0 IGP 200
2.2.3.0/24 256 10.10.10.1 0 INC 200
4.4.4.0/24 256 10.10.10.1 0 IGP 200
9.9.9.0/24 256 10.10.10.1 0 INC 200
10.10.10.0/24 256 10.10.10.1 0 IGP 200
For detailed description of the output information, see Table 1-6.
1.1.27 display bgp routing-table statistic
Syntax
display bgp routing-table [ advertised | received ] statistic
View
Any view
Parameters
advertised: Routing information advertised by the peers.
received: Routing information received by the peers.
statistic: The total number of routes advertised or received by the peer.
Description
Use the display bgp routing-table statistic command to display the total number of routes advertised or received by all BGP peers.
Related commands: display bgp peer.
Examples
# Display the routing information advertised by all BGP peers.
<H3C> display bgp routing-table advertised statistic
Peer: 200.1.7.2+1062
Advertised routes total: 516
Peer: 150.1.1.2+179
Advertised routes total: 346
Peer: 2 133.1.1.2+179
Advertised routes total: 116
# Display the routing information received by all BGP peers.
<H3C> display bgp routing-table received statistic
Peer: 200.1.7.2+1062
Received routes total: 213
Peer: 150.1.1.2+179
Received routes total: 423
Peer: 2 133.1.1.2+179
Received routes total: 123
1.1.28 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [routing-protocol ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [routing-protocol ]
View
BGP view
Parameters
acl-number: Number of IP access control list, in the range of 2000 to 3999.
ip-prefix-name: Name of ip prefix list. Its length ranges from 1 to 19.
routing-protocol: Specified protocols advertising routing information which include direct, ospf, ospf-ase, ospf-nssa, rip, isis, nat, and static.
Description
Use the filter-policy export command to filter the advertised routes and only the routes passing the filter can be advertised by BGP.
Use the undo filter-policy export command to cancel the filtration to the advertised routes.
By default, the advertised routes are not filtered.
If the protocol argument is specified, only the imported route generated by the specified protocol is filtered and the imported routes generated by other protocols are not affected. If the protocol argument is not specified, the imported route generated by any protocol will be filtered.
& Note:
If no rule is specified in the filter-policy command, all routes are denied by default.
Examples
# Use ACL 2000 to filter the routing information advertised by BGP.
[H3C-bgp] filter-policy 2000 export
1.1.29 filter-policy import
Syntax
filter-policy gateway ip-prefix-name import
undo filter-policy gateway ip-prefix-name import
filter-policy { acl-number | ip-prefix ip-prefix-name } import
undo filter-policy { acl-number | ip-prefix ip-prefix-name } import
View
BGP view
Parameters
acl-number: Number of IP access control list, in the range of 2000 to 3999.
ip-prefix-name: Name of an address prefix list. It is used for filtering routing information by destination address. Its length ranges from 1 to 19.
gateway ip-prefix-name: Name of a peer-router address prefix list. It is used for filtering routing information by peer-router address. Its length ranges from 1 to 19.
Description
Use the filter-policy gateway import command to filter the learned routing information advertised by the peer with the specified address.
Use the undo filter-policy gateway import command to cancel the filtration to the routing information advertised by the peer with specified address.
Use the filter-policy import command to filter the received global routing information. Use the undo filter-policy import command to remove the filtration to the received global routing information.
By default, filtration to the received routing information is not configured.
This command can be used to filter the routes received by BGP and determines whether to add the routes to the BGP routing table.
& Note:
If no rule is specified in the filter-policy command, all routes are denied by default.
Examples
# Use ACL 2000 to filter the routing information received by BGP.
[H3C-bgp] filter-policy 2000 import
1.1.30 group
Syntax
group group-name [ internal | external ]
undo group group-name
View
BGP view
Parameters
group-name: Specifies the name of the peer group. It can consist of numbers or letters with a length ranging from 1 to 47. group-name is locally significant.
internal: Specifies the type of the peer group as IBGP.
external: Specifies the type of the peer group as EBGP, including other groups of other sub-ASs in the confederation.
Description
Use the group group-name command to establish a peer group.
Use the undo group group-name command to cancel the configured peer group.
The default type of BGP peer group is internal.
A BGP peer must belong to a peer group. Therefore, when creating a BGP peer, you must create a BGP peer group first and then add the peer into the group.
All member peers must use the same update policy as the peer group, but they may use different ingress policies.
Examples
# Create an IBGP group named test.
[H3C-bgp] group test
1.1.31 import-route
Syntax
import-route protocol [ med med-value | route-policy route-policy-name ]*
undo import-route protocol
View
BGP view
Parameters
protocol: Specifies source routing protocols which can be redistributed, which include direct, ospf, ospf-nssa , ospf-ase, rip, isis, nat, and static at present.
med med-value: Specifies the MED value loaded by an redistributed route, ranging from 0 to 4294967295.
route-policy route-policy-name: Specifies a route-policy used for filtering redistributed routes of other protocols. It can consist of numbers and letters with a length ranging from 1 to 19.
Description
Use the import-route command to redistribute routes of other protocols.
Use the undo import-route command to cancel redistributing routes of other protocols.
By default, BGP does not redistribute routes of other protocols.
Note that when BGP is redistributing other routing protocols, BGP does not redistribute their default routes.
Examples
# Redistribute routes of RIP.
[H3C-bgp] import-route rip
1.1.32 network
Syntax
network ip-address [ address-mask ] [ route-policy route-policy-name ]
undo network ip-address [ address-mask ] [ route-policy route-policy-name ]
View
BGP view
Parameters
ip-address: Network address that BGP advertises.
address-mask: Mask of the network address.
route-policy-name: Route-policy applied to advertised routes.
Description
Use the network command to configure the network routes advertised by the local BGP.
Use the undo network command to cancel the existing configuration.
By default, the local BGP does not advertise any routes.
Examples
# Advertise routes to the network segment 10.0.0.0/16.
[H3C-bgp] network 10.0.0.1 255.255.0.0
1.1.33 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
BGP view
Parameters
None
Description
Use the log–peer-change command to enable the switch for reporting the BGP peer changes and print the BGP state change messages onto the screen.
Use the undo log-peer-change command to disable this function.
The switch for reporting BGP peer changes is disabled by default.
Examples
# Enable the switch for reporting the BGP peer changes.
<H3C> system-view
[H3C] bgp
[H3C-bgp] log-peer-change
1.1.34 peer advertise-community
Syntax
peer group-name advertise-community
undo peer group-name advertise-community
View
BGP view
Parameters
group-name: Name of a peer group.
Description
Use the peer advertise-community command to enable the transmission of the community attribute to a peer group.
Use the undo peer advertise-community command to cancel the existing configuration.
By default, the community attribute is not transmitted to any peer group.
Related commands: apply community.
Examples
# Transmit community attribute to the peer group named test.
[H3C-bgp] peer test advertise-community
1.1.35 peer allow-as-loop
Syntax
peer { group-name | peer-address } allow-as-loop [ number ]
undo peer { group-name | peer-address } allow-as-loop
View
BGP view
Parameters
group-name: Specifies name of the peer group.
peer-address: Specifies IP address of the peer.
number: Specifies the repeating times of local AS, ranging from 1 to 10.
Description
Use the peer allow-as-loop command to configure the repeating times of local AS.
Use the undo peer allow-as-loop command to remove the repeating times setting.
By default, the repeating times of local AS is 3.
Related commands: display bgp routing-table peer.
Examples
# Specify to configure the repeating times of local AS to 2.
[H3C-bgp] peer 1.1.1.1 allow-as-loop 2
1.1.36 peer as-number
Syntax
peer group-name as-number as-number
undo peer group-name as-number
View
BGP view
Parameters
group-name: Name of peer group.
as-number: Peer AS number of the peer group, the range is 1 to 65535.
Description
Use the peer as-number command to configure the peer AS number of the specified peer group.
Use the undo peer as-number command to delete the peer AS number of the specified peer group.
By default, no peer AS number of the specified peer group is configured.
Examples
# Specify the peer AS number for the peer group test as 100.
[H3C-bgp] peer test as-number 100
1.1.37 peer as-path-acl export
Syntax
peer group-name as-path-acl acl-number export
undo peer group-name as-path-acl acl-number export
View
BGP view
Parameters
group-name: Specifies name of the peer group.
acl-number: Number of an AS path list, in the range of 1 to 199.
export: Applies the AS path list to advertised routes.
Description
Use the peer as-path-acl export command to configure filtering Policy of BGP advertised routes based on AS path list.
Use the undo peer as-path-acl command to cancel the existing configuration.
By default, the peer group has no AS path list.
This command can only be configured on the peer group. The acl-number specifies the number of the AS path list. It is configured by the ip as-path-acl command rather than the acl command.
Related commands: peer as-path-acl import, ip as-path-acl.
Examples
# Configure to filter the routes advertised by the peer group test using the AS path-list 1.
[H3C-bgp] peer test as-path-acl 1 export
1.1.38 peer as-path-acl import
Syntax
peer { group-name | peer-address } as-path-acl acl-number import
undo peer { group-name | peer-address } as-path-acl acl-number import
View
BGP view
Parameters
group-name: Specifies the name of the peer group.
peer-address: Specifies IP address of the peer, in dotted decimal format.
acl-number: Specifies the filter list number of an AS regular expression. The range is 1 to 199.
import: Applies the AS path list to received routes.
Description
Use the peer as-path-acl import command to configure filtering policy of BGP received routes based on AS path list.
Use the undo peer as-path-acl import command to cancel the existing configuration.
By default, the peer/peer group has no AS path list.
The priority of the inbound filter policy configured for the peer is higher than that configured for the peer group.
Related commands: peer as-path-acl export, ip as-path-acl.
Examples
# Set the AS path ACL of the peer group test to filter BGP received routes.
[H3C-bgp] peer test as-path-acl 1 import
1.1.39 peer connect-interface
Syntax
peer { group-name | peer-address } connect-interface interface-type interface-number
undo peer { group-name | peer-address } connect-interface interface-type interface-name
View
BGP view
Parameters
group-name: Specified peer group.
peer-address: IP address of the peer.
interface-type: Interface type.
interface-number: Interface number.
Description
Use the peer connect-interface command to specify the source interface of a route update packet.
Use the undo peer connect-interface command to restore the best source interface.
By default, BGP uses the best source interface.
Usually, BGP uses the optimal route to update the source interface of the packets. However, you can set the mode of the interface to Loopback in order to send route updates even if the interface is not work normally.
Examples
# Specify Loopback 0 as the source interface of a route update packet.
[H3C-bgp] peer test connect-interface loopback 0
1.1.40 peer default-route-advertise
Syntax
peer group-name default-route-advertise
undo peer group-name default-route-advertise
View
BGP view
Parameters
group-name: Specifies name of the peer group.
Description
Use the peer default-route-advertise command to configure a peer group to generate a default route for a peer.
Use the undo peer default-route-advertise command to cancel the existing configuration.
By default, a peer group does not import the default route.
For this command, no default route needs to exist in the routing table. A default route is sent unconditionally to a peer with the next hop as itself.
Examples
# Configure a peer group named test to generate a default route.
[H3C-bgp] peer test default-route-advertise
1.1.41 peer description
Syntax
peer { group-name | peer-address } description description-line
undo peer { group-name | peer-address } description
View
BGP view
Parameters
group-name: Group name.
peer-address: Address of the peer.
description-line: Description information configured, which can be letters or numbers with the maximum length of 79.
Description
Use the peer description command to configure the description information of the peer/peer group.
Use the undo peer description command to cancel the description information of the peer/peer group.
By default, description information of peers/peer group is not configured.
Related commands: display current-configuration, display bgp peer.
Examples
# Configure the description information of the peer whose name is group1 as hangzhou1.
[H3C-bgp] peer group1 description hangzhou1
1.1.42 peer ebgp-max-hop
Syntax
peer group-name ebgp-max-hop [ ttl ]
undo peer group-name ebgp-max-hop
View
BGP view
Parameters
group-name: Specifies the name of the peer group.
ttl: Maximum hop value. The range is 1 to 255. By default, the value is 64.
Description
Use the peer ebgp-max-hop command to allow the router to establish EBGP connection with the peer on indirectly connected network.
Use the undo peer ebgp-max-hop command to cancel the existing configuration.
By default, this feature is disabled.
Examples
# Allow the router to establish EBGP connection with the peer group named test indirectly connected.
[H3C-bgp] peer test ebgp-max-hop
1.1.43 peer enable
Syntax
peer { group-name | peer-address } enable
undo peer { group-name | peer-address } enable
View
BGP view
Parameters
group-name: Specifies the name of the peer group which specifies the entire peer group.
peer-address: IP address of a peer, which specifies a certain peer.
Description
Use the peer enable command to enable the specified peer/peer group.
Use the undo peer enable command to disable the specified peer/peer group.
By default, BGP peer/peer group is enabled.
If the specified peer/peer group is disabled, the router will not exchange routing information with the specified peer/peer group.
Examples
# Disable the specified peer. After the configuration, the local router does not exchange BGP routing information with the specified peer.
[H3C-bgp] peer 18.10.0.9 group group1
[H3C-bgp] undo peer 18.10.0.9 enable
1.1.44 peer filter-policy export
Syntax
peer group-name filter-policy acl-number export
undo peer group-name filter-policy acl-number export
View
BGP view
Parameters
group-name: Specifies the name of the peer group.
acl-number: Specifies an IP ACL number, ranging from 2000 to 3999.
export: Egress filter policy. It is only applicable to peer groups.
Description
Use the peer filter-policy export command to configure the filter-policy list of routes advertised by a peer group.
Use the undo peer filter-policy export command to cancel the existing configuration.
By default, a peer/peer group has no access control list (ACL).
The peer filter-policy export command can only be configured on peer groups.
Related commands: ip as-path-acl, peer as-path-acl import, peer as-path-acl export, peer filter-policy export.
Examples
# Configure to use ACL 2000 to filter the routes advertised by the peer group test.
[H3C-bgp] peer test filter-policy 2000 export
1.1.45 peer filter-policy import
Syntax
peer { group-name | peer-address } filter-policy acl-number import
undo peer { group-name | peer-address } filter-policy acl-number import
View
BGP view
Parameters
group-name: Specifies the name of the peer group.
peer-address: Specifies the IP address of the peer.
acl-number: Specifies an IP ACL number, ranging from 2000 to 3999. That is, you can use basic ACLs or advanced ACLs.
import: Ingress filter policy. It is only applicable to peer groups.
Description
Use the peer filter-policy import command to configure the filter-policy list of the routes received by a peer/peer group.
Use the undo peer filter-policy import command to cancel the existing configuration.
By default, a peer/peer group has no access control list (ACL).
Related commands: ip as-path-acl, peer as-path-acl export, peer as-path-acl import.
The priority of the inbound filter policy configured for the peer is higher than that configured for the peer group.
Examples
# Configure to use ACL 2000 to filter the routes received by the peer group test.
[H3C-bgp] peer test filter-policy 2000 import
1.1.46 peer graceful-restart
Syntax
peer { peer-address | group-name } graceful-restart
undo peer { peer-address | group-name } graceful-restart
View
BGP view
Parameters
group-name: Name of the peer group, which can consist of 1 to 47 alphabetic letters and numerals.
peer-address: IP address of the peer.
Description
Use the peer graceful-restart command to enable the Graceful-restart ability of the specified peer or peer group.
Use the undo peer graceful-restart command to disable the Graceful-restart ability of the specified peer or peer group.
If the Graceful-restart ability is enabled for a peer group first, peers added into this group afterwards also inherits the Graceful-restart ability of this group.
It is allowed that peers in a peer group have a different Graceful-restart ability than that configured for this peer group. For example, after configuring Graceful-restart for the whole peer group, you can disable the Graceful-restart ability of a specific peer. To do so, you must configure Graceful-restart for the peer group first, and then use the undo graceful-restart command on the peer.
Examples
# Enable Graceful-restart on a peer whose IP address is 10.2.2.2.
[H3C-bgp] peer 10.2.2.2 graceful-restart
# Enable Graceful-restart on an EBGP peer group named TEST, and disable Graceful-restart on Peer 10.1.1.1 in this group.
<H3C>system-view
[H3C-bgp] group TEST external
[H3C-bgp] peer 10.1.1.1 group TEST as-number 200
[H3C-bgp] peer TEST graceful-restart
[H3C-bgp] undo peer 10.1.1.1 graceful-restart
1.1.47 peer group
Syntax
peer peer-address group group-name [ as-number as-number ]
undo peer peer-address
View
BGP view
Parameters
group-name: Specifies the name of the peer group, which can consist of letters and numbers with a length ranging from 1 to 47.
peer-address: Specifies the IP address of the peer.
as-number: Peer AS number of the peer/peer group, in the range of 1 to 65535.
Description
Use the peer group command to add a peer to the existing peer group.
Use the undo peer group command to delete the specified peer.
When you add a peer to an IBGP peer group, the as-number as-number argument is not available.
When a peer is added to an EBGP peer group that has been assigned an AS number, the peer inherits the configuration of the group. You cannot assign an AS number to the peer separately. If the peer group is not assigned an AS number, you need to assign an AS number to each peer when adding it to the group. The peers in the same peer group may use different AS numbers.
Examples
# Add a peer to the peer group TEST.
[H3C-bgp] group TEST
[H3C-bgp] peer TEST as-number 2004
[H3C-bgp] peer 10.1.1.1 group TEST
1.1.48 peer ip-prefix export
Syntax
peer group-name ip-prefix prefixname export
undo peer group-name ip-prefix prefixname export
View
BGP view
Parameters
group-name: Name of peer group.
prefixname: Name of the specified ip-prefix. It is a character string of 1 to 19 characters.
export: Applies the filtering policy on the route transmitted to the specified peer/peer group.
Description
Use the peer ip-prefix export command to configure the route filtering policy of routes advertised by the peer group based on the ip-prefix.
Use the undo peer ip-prefix export command to cancel the route filtering policy of the peer/peer group based on the ip-prefix.
By default, the route filtering policy of the peer group is not specified.
The peer ip-prefix export command can only be configured on peer groups.
Related commands: peer ip-prefix import.
Examples
# Configure the route filtering policy of the peer group based on the ip-prefix 1.
[H3C-bgp] peer group1 ip-prefix list1 export
1.1.49 peer ip-prefix import
Syntax
peer group-name ip-prefix prefixname import
undo peer group-name ip-prefix prefixname import
View
BGP view
Parameters
group-name: Name of peer group.
prefixname: Name of the specified ip-prefix.
import: Applies the filtering policy on the route received by the specified peer/peer group.
Description
Use the peer ip-prefix import command to configure the route filtering policy of routes received by the peer/peer group based on the ip-prefix.
Use the undo peer ip-prefix import command to cancel the route filtering policy of the peer/peer group based on the ip-prefix.
By default, the route filtering policy of the peer/peer group is not specified.
The priority of the inbound filter policy configured for the peer is higher than that configured for the peer group.
Related commands: peer ip-prefix export.
Examples
# Configure the route filtering policy of the peer group based on the ip-prefix 1.
[H3C-bgp] peer group1 ip-prefix list1 import
1.1.50 peer next-hop-local
Syntax
peer group-name next-hop-local
undo peer group-name next-hop-local
View
BGP view
Parameters
group-name: Specifies the name of the peer group.
Description
Use the peer next-hop-local command to configure to perform the process of the next hop in the route to be advertised to the peer/peer group and take the address of itself as the next hop.
Use the undo peer next-hop-local command to cancel the existing configuration.
Examples
# When BGP distributes the routes to the peer group test, it will take its own address as the next hop.
[H3C-bgp] peer test next-hop-local
1.1.51 peer route-limit
Syntax
peer { peer-addr | group-name } route-limit route-limit-value [ route-limit-percent ] [ alter-only | idle-forever | idle-timeout timeout-value ]
undo peer { peer-addr | group-name } route-limit
View
BGP view, BGP multicast view, BGP VPNv4 view, BGP VRF view
Parameters
peer-addr: IP address of a peer.
group-name: Name of a peer group.
route-limit-value: Maximum number of routes that can be received from the peer or each peer in the group.
route-limit-percent: Route limit percentage, on which an alarm is generated.
timeout-value: Waiting time for reestablishing BGP connection.
Description
Use the peer route-limit command to configure the maximum number of routes that can be received from a peer or each peer in a peer group.
Use the undo peer route-limit command to cancel the limit for receiving routes.
No default parameter setting is available for this command. You can configure the parameters as required.
If you specify the route-limit-percent argument, an alarm will be generated when the ratio of the route quantity received from the peer (or a peer in the group) to the set maximum number reaches this percentage.
If you include alter-only in the command, an alarm will be generated, but the BGP connection will not be cut off when the number of routes received from the peer (or a peer in the group) reaches route-limit-value.
If you include idle-forever in the command, an alarm will be generated and the BGP connection will be cut off when the number of routes received from the peer (or a peer in the group) reaches route-limit-value. A new connection can be set up only after you execute the reset bgp command.
If you include idle-timeout in the command, an alarm will be generated and the connection will be cut off when the number of routes received from the peer (or a peer in the group) reaches route-limit-value. And a new connection can be set up only after a specific time (set by the timeout-value argument).
Examples
# Set the maximum number of routes that can be received from each peer in the peer group out to 20000, configure to output alarm information when the number of routes received from a peer in the group reaches 4000, and configure to cut off the BGP connection when the number of received routes reaches 20000 and reestablish the connection after 30 seconds.
[H3C -bgp]peer out route-limit 20000 20 idle-timeout 30
1.1.52 peer password
Syntax
peer { group-name | peer-address } password { cipher | simple } password
undo peer { group-name | peer-address } password
View
BGP view
Parameters
group-name: Name of the peer group.
peer-address: IP address of the peer, in dotted decimal format.
cipher: Displays the configured password in cipher text mode.
simple: Displays the configured password in simple text mode.
password: Password in character string form with 1 to 16 characters when parameter simple is configured in the command or in the event of inputting the password in simple text mode but parameter cipher is configured in the command; with 24 characters in the event of inputting the password in cipher text mode when parameter cipher is configured in the command.
Description
Use the peer password command to configure MD5 authentication for BGP during TCP connection setup.
Use the undo peer password command to cancel the configuration.
By default, BGP does not perform MD5 authentication when TCP connection is set up.
Once MD5 authentication is enabled, both parties involved in the authentication must be configured with identical authentication modes and passwords. Otherwise, TCP connection will not be set up because of the failed authentication.
This command is used to configure MD5 authentication for the specific peer only when the peer group to which the peer belongs is not configured with MD5 authentication. Otherwise, the peer should be consistent with the peer group.
Examples
# Adopt MD5 authentication on the TCP connection set up between the local router at 10.1.100.1 and the peer router at 10.1.100.2.
[H3C-bgp] peer 10.1.100.2 password simple test
# Perform the similar configuration on the peer.
[H3C-bgp] peer 10.1.100.1 password simple test
1.1.53 peer public-as-only
Syntax
peer group-name public-as-only
undo peer group-name public-as-only
View
BGP view
Parameters
group-name: Name of a peer group.
Description
Use the peer public-as-only command to configure not to carry the AS number when transmitting BGP update packets.
Use the undo peer public-as-only command to configure to carry the AS number when transmitting BGP update packets.
By default, private AS number is carried when transmitting BGP update packets.
Generally, BGP transmits BGP update packets with the AS number (either public AS number or private AS number). To enable some outbound routers to ignore the AS number when transmitting update packets, you can configure not to carry the AS number when transmitting BGP update packets.
Examples
# Configure not to carry the private AS number when transmitting BGP update packets to the peer named test.
[H3C-bgp] peer test public-as-only
1.1.54 peer restart-timer
Syntax
peer group-name restart-timer time-value
undo peer group-name restart-timer
View
BGP view
Parameters
group-name: Name of a peer group, which can consist of 1 to 47 alphabetic letters and numerals.
time-value: Restart-time in seconds.
Description
Use the peer restart-timer command to configure the GR restart-time for a peer or peer group.
Use the undo peer restart-timer command to restore the default GR restart-time for a peer or peer group.
You can configure the restart-time even when the graceful-restart ability is not configured.
The default restart-time is 180 seconds.
Examples
# Set the Restart-time for peer group TEST to 100 seconds.
<H3C>system-view
[H3C-bgp] group TEST external
[H3C-bgp] peer TEST restart-timer 100
1.1.55 peer reflect-client
Syntax
peer group-name reflect-client
undo peer group-name reflect-client
View
BGP view
Parameters
group-name: Name of peer group.
Description
Use the peer reflect-client command to configure a peer group as the route reflector client.
Use the undo peer reflect-client command to cancel the existing configuration.
By default, there is no route reflector in an AS.
This command only applies to IBGP peer groups.
Related commands: reflect between-clients, reflector cluster-id.
Examples
# Configure the peer group test as the route reflector client.
[H3C-bgp] peer test reflect-client
1.1.56 peer route-policy export
Syntax
peer group-name route-policy route-policy-name export
undo peer group-name route-policy route-policy-name export
View
BGP view
Parameters
group-name: Name of peer group.
route-policy-name: The specified Route-policy.
Description
Use the peer route-policy export command to assign the Route-policy to the routes advertised to the peer group.
Use the undo peer route-policy export command to delete the specified Route-policy.
By default, the peer/peer group has no Route-policy association.
The peer route-policy export command only applies to peer groups.
Related commands: peer route-policy import.
Examples
# Apply the Route-policy named test-policy to the route going out of the peer group test.
[H3C-bgp] peer test route-policy test-policy export
1.1.57 peer route-policy import
Syntax
peer { group-name | peer-address } route-policy route-policy-name import
undo peer { group-name | peer-address } route-policy route-policy-name import
View
BGP view
Parameters
group-name: Name of peer group.
peer-address: IP address of the peer.
route-policy-name: The specified Route-policy.
Description
Use the peer route-policy import command to assign the Route-policy to the route coming from the peer/peer group.
Use the undo peer route-policy import command to delete the specified Route-policy.
By default, the peer/peer group has no Route-policy association.
The priority of the inbound filter policy configured for the peer is higher than that configured for the peer group.
Related commands: peer filter-policy export.
Examples
# Apply the Route-policy named test-policy to the route coming from the peer group test.
[H3C-bgp] peer test route-policy test-policy import
1.1.58 peer route-update-interval
Syntax
peer group-name route-update-interval seconds
undo peer group-name route-update-interval
View
BGP view
Parameters
group-name: Specifies the name of the configured peer group.
seconds: The minimum interval of sending route update message. The range is from 0 to 600 seconds. By default, the advertisement interval is 5 seconds for internal peer/peer group, and 30 seconds for external peer/peer group.
Description
Use the peer route-update-interval command to configure the interval for the transmission route of a peer group.
Use the undo peer route-update-interval command to restore the interval to the default value.
Examples
# Configure the interval of sending the route update packet of the BGP peer group test as 10 seconds.
[H3C-bgp] peer test as-number 100
[H3C-bgp] peer test route-update-interval 10
1.1.59 peer shutdown
Syntax
peer { peer-address | group-name } shutdown
undo peer { peer-address | group-name } shutdown
View
BGP view, BGP multicast view, BGP L2VPN view and BGP VRF view
Parameters
group-name: Peer group names, which contain letters and numbers. The name length ranges from 1 to 47.
peer-address: Peer IP address.
Description
Use the peer shutdown command to disconnect and not to reconnect BGP connections, without deleting BGP configurations.
Examples
# Disconnect without reconnecting peer 1.1.1.1 in the BGP unicast view.
[H3C-bgp] peer 1.1.1.1 shutdown
# Disconnect without reconnecting the Group Out in the BGP unicast view.
[H3C-bgp] peer out shutdown
# Disconnect without reconnecting Peer 1.1.1.1 in the BGP vrf view.
[H3C-bgp-af-vpn-instance] peer 1.1.1.1 shutdown
# Disconnect but not reconnect the out group in the BGP vrf view.
[H3C-bgp-af-vpn-instance] peer out shutdown
1.1.60 peer timer
Syntax
peer { group-name | peer-address } timer keep-alive keepalive-interval hold holdtime-interval }
undo peer { group-name | peer-address } timer
View
BGP view
Parameters
group-name: Name of peer group.
peer-address: IP address of the peer.
keepalive-interval: Keepalive interval to be specified. The range is 1 to 4294967295. By default, its value is 60 seconds.
holdtime-interval: Holdtime interval to be specified. The range is 3 to 4294967295. By default, its value is 180 seconds.
Description
Use the peer timer command to configure the Keepalive and Holdtime intervals for the specified peer/peer group.
Use the undo peer timer command to restore the default timer settings.
The timer configured by using this command has a higher priority than the one configured by using the timer command.
Examples
# Configure Keepalive and Holdtime intervals of the peer group test.
[H3C-bgp] peer test timer keep-alive 60 hold 180
1.1.61 preference
Syntax
preference ebgp-value ibgp-value local-value
undo preference
View
BGP view
Parameters
ebgp-value: Sets preference value for routes learned from external peers.
ibgp-value: Sets preference value for routes learned from internal peers.
local-value: Sets preference value for local-originated routes.
The ebgp-value, ibgp-value and local-value arguments are in the range of 1 to 256. By default, the first two is 256 and the last one is 130.
Description
Use the preference command to configure BGP preference.
Use the undo preference command to restore the default preference.
Three types of routes may be involved in BGP: routes learned from external peers, routes learned from internal peers and local-originated routes. You can set preference values for the three types of route.
Examples
# Set the preference of EBGP routes, IBGP routes and local-originated routes all to 170.
[H3C-bgp] preference 170 170 170
1.1.62 reflect between-clients
Syntax
reflect between-clients
undo reflect between-clients
View
BGP view
Parameters
None
Description
Use the reflect between-clients command to configure the reflection of a route between clients.
Use the undo reflect between-clients command to disable this function.
After the route reflector is configured, the route reflector reflects the routes of one client to other clients by default.
By default, the clients of a route reflector need not be fully connected. If the clients are fully connected, a route reflector is not required.
Related commands: reflector cluster-id, peer reflect-client.
Examples
# Disable the reflection between clients.
[H3C-bgp] undo reflect between-clients
1.1.63 reflector cluster-id
Syntax
reflector cluster-id { cluster-id | address }
undo reflector cluster-id
View
BGP view
Parameters
cluster-id: Specifies the cluster ID of the route reflector with the range from 1 to 4294967295. It is an integer.
address: Used as the interface address of the route reflector’s cluster ID.
Description
Use the reflector cluster-id command to configure the cluster ID of the route reflector.
Use the undo reflector cluster-id command to delete the cluster ID of the route reflector.
By default, each route reflector uses its Router ID as the cluster ID.
Usually, there is only one route reflector in a cluster. In this case, the cluster is identified by the router ID of the route reflector. You can configure multiple route reflectors to improve network stability. If there are multiple route reflectors, you can use this command to configure the same cluster ID for all these route reflectors.
Related commands: reflect between-clients, peer reflect-client.
Examples
# Set the cluster ID of the route reflector as 80.
[H3C-bgp] reflector cluster-id 80
[H3C-bgp] peer 172.38.160.10 reflect-client
1.1.64 refresh bgp
Syntax
refresh bgp { all | peer-address | group group-name } [ multicast | vpn-instance instance-name | vpnv4 ] { import | export }
View
User view
Parameters
all: Resets all the connections with BGP.
peer-address: Resets the connection with a specified BGP peer.
group-name: Resets the connection with a specified BGP peer group.
import: Requests the peer for all its routes by sending Route-refresh packets to the peer.
export: Refreshes routes advertised to the peers.
multicast: Refreshes multicast routes.
vpn-instance: VPN instance route.
vpnv4: VPNv4 route.
Description
Use the refresh bgp command to request the peers to refresh the routes.
After the BGP connection is established, only incremental routes are sent. However, some special cases exist. For example, when the routing policy changes, the routes advertised to the peer or the advertised routes from the peer need refreshing so that they can be filtered according to the new policy.
Examples
# Request all peers to re-send the routes.
<H3C>refresh bgp all import
1.1.65 reset bgp
Syntax
reset bgp { all | peer-address [ flap-info ] }
View
User view
Parameters
peer-address: Resets the connection with a specified BGP peer.
all: Resets all the connections with BGP.
flap-info: Resets the flap-info of a record at this peer address.
Description
Use the reset bgp peer-address command to reset the connection of BGP with a specified BGP peer.
Use the reset bgp all command to reset all the connections with BGP.
If the BGP policy or the protocol configuration changes, resetting the BGP connection can make the newly configured policy take effect immediately.
Examples
# Reset all the BGP connections to enable the new configuration (after configuring the new Keepalive interval and Holdtime interval using the timer command).
<H3C> reset bgp all
1.1.66 reset bgp flap-info
Syntax
reset bgp flap-info [ regular-expression as-regular-expression | as-path-acl acl-number } | network-address [ mask ] ]
View
User view
Parameters
regular-expression as-regular-expression: Resets the flap-info matching the AS path regular expression.
as-path-acl acl-number: Resets the flap-info in consistency with a specified filter list. The range of the acl-number argument is 1 to 199.
network-address: Resets the flap-info of a record at this IP address.
mask: Network mask.
Description
Use the reset bgp flap-info command to reset the flap-info of a route.
Related commands: dampening.
Examples
# Reset the flap-info of all the routes that go through filter list 1.
<H3C> reset bgp flap-info as-path-acl 1
1.1.67 reset bgp group
Syntax
reset bgp group group-name
View
User view
Parameters
group-name: Specifies the name of the peer group. It is a character string of 1 to 47 characters.
Description
Use the reset bgp group command to reset the connections between the BGP and all the members of a group.
Related commands: peer group.
Examples
# Reset BGP connections of all members from group1.
<H3C> reset bgp group group1
1.1.68 reset bgp dampening
Syntax
reset bgp dampening [ network-address [ mask ] ]
View
User view
Parameters
network-address: Network IP address related to the clearing attenuation information.
mask: Network mask.
Description
Use the reset dampening command to reset route attenuation information and release suppressed routes.
Related commands: dampening, display bgp routing-table dampened.
Examples
# Reset the route attenuation information of the specified route 20.1.0.0, and release the suppression of a suppressed route.
<H3C> reset dampening 20.1.0.0 255.255.0.0
1.1.69 summary
Syntax
summary
undo summary
View
BGP view
Parameters
None
Description
Use the summary command to configure auto aggregation of sub-network routes.
Use the undo summary command to disable auto aggregation of sub-network routes.
By default, no auto aggregation of sub-network routes is executed.
After the summary is configured, BGP cannot receive the sub-network routes imported from the IGP, so the amount of the routing information can be reduced.
Examples
# Make the auto aggregation of the sub-network routes.
[H3C-bgp] summary
1.1.70 timer
Syntax
timer keep-alive keepalive-interval hold holdtime-interval
undo timer
View
BGP view
Parameters
keepalive-interval: Sets the interval time value for keepalive time which ranges from 1 to 65535. By default, its value is 60 seconds.
holdtime-interval: Sets the interval time value for hold time which ranges from 3 to 65535. By default, its value is 180 seconds.
Description
Use the timer command to configure the Keep-alive and Hold-time timer of BGP.
Use the undo timer command to restore the default value of the Keep-alive and Hold-time of the timer.
Examples
# Configure the Keep-alive timer as 120 seconds and Hold-time timer as 360 seconds.
[H3C-bgp] timer keep-alive 120 hold 360