- Table of Contents
-
- H3C S9500 Command Manual-Release2132[V2.03]-03 IP Routing Volume
- 00-1Cover
- 01-IP Routing Table Display Commands
- 02-BGP Commands
- 03-IS-IS Commands
- 04-OSPF Commands
- 05-RIP Commands
- 06-Routing Policy Commands
- 07-Static Routing Commands
- 08-IPv6 BGP Commands
- 09-IPv6 IS-IS Commands
- 10-IPv6 OSPFv3 commands
- 11-IPv6 RIPng Commands
- 12-IPv6 Static Routing Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
02-BGP Commands | 269.08 KB |
Table of Contents
Chapter 1 BGP Configuration Commands
1.1 BGP Configuration Commands
1.1.2 balance (BGP/BGP-VPN instance view)
1.1.3 bestroute as-path-neglect (BGP/BGP-VPN instance view)
1.1.4 bestroute compare-med (BGP/BGP-VPN instance view)
1.1.5 bestroute med-confederation (BGP/BGP-VPN instance view)
1.1.7 compare-different-as-med (BGP/BGP-VPN instance view)
1.1.9 confederation nonstandard
1.1.11 dampening (BGP/BGP-VPN instance view)
1.1.14 default local-preference (BGP/BGP-VPN instance view)
1.1.15 default med (BGP/BGP-VPN instance view)
1.1.16 default-route imported (BGP/BGP-VPN instance view)
1.1.21 display bgp routing-table
1.1.22 display bgp routing-table as-path-acl
1.1.23 display bgp routing-table cidr
1.1.24 display bgp routing-table community
1.1.25 display bgp routing-table community-list
1.1.26 display bgp routing-table dampened
1.1.27 display bgp routing-table dampening parameter
1.1.28 display bgp routing-table different-origin-as
1.1.29 display bgp routing-table flap-info
1.1.30 display bgp routing-table peer
1.1.31 display bgp routing-table regular-expression
1.1.32 display bgp routing-table statistic
1.1.33 ebgp-interface-sensitive
1.1.34 filter-policy export (BGP/BGP-VPN instance view)
1.1.35 filter-policy import (BGP/BGP-VPN instance view)
1.1.36 group (BGP/BGP-VPN instance view)
1.1.37 import-route (BGP/BGP-VPN instance view)
1.1.39 network (BGP/BGP-VPN instance view)
1.1.40 peer advertise-community (BGP/BGP-VPN instance view)
1.1.41 peer advertise-ext-community (BGP/BGP-VPN instance view)
1.1.42 peer allow-as-loop (BGP/BGP-VPN instance view)
1.1.43 peer as-number (BGP/BGP-VPN instance view)
1.1.44 peer as-path-acl (BGP/BGP-VPN instance view)
1.1.45 peer capability-advertise conventional
1.1.46 peer capability-advertise route-refresh
1.1.47 peer connect-interface (BGP/BGP-VPN instance view)
1.1.48 peer default-route-advertise (BGP/BGP-VPN instance view)
1.1.49 peer description (BGP/BGP-VPN instance view)
1.1.50 peer ebgp-max-hop (BGP/BGP-VPN instance view)
1.1.52 peer fake-as (BGP/BGP-VPN instance view)
1.1.53 peer filter-policy (BGP/BGP-VPN instance view)
1.1.54 peer group (BGP/BGP-VPN instance view)
1.1.55 peer ignore (BGP/BGP-VPN instance view)
1.1.57 peer keep-all-routes (BGP/BGP-VPN instance view)
1.1.58 peer log-change (BGP/BGP-VPN instance view)
1.1.59 peer next-hop-local (BGP/BGP-VPN instance view)
1.1.61 peer preferred-value (BGP/BGP-VPN instance view)
1.1.62 peer public-as-only (BGP/BGP-VPN instance view)
1.1.63 peer reflect-client (BGP view)
1.1.64 peer route-limit (BGP/BGP-VPN instance view)
1.1.65 peer route-policy (BGP/BGP-VPN instance view)
1.1.66 peer route-update-interval (BGP/BGP-VPN instance view)
1.1.67 peer substitute-as (BGP/BGP-VPN instance view)
1.1.68 peer timer (BGP/BGP-VPN instance view)
1.1.69 preference (BGP/BGP-VPN instance view)
1.1.70 reflect between-clients (BGP view)
1.1.71 reflector cluster-id (BGP view)
1.1.79 synchronization (BGP view)
1.1.80 timer (BGP/BGP-VPN instance view)
Chapter 1 BGP Configuration Commands
1.1 BGP Configuration Commands
& Note:
For routing policy configuration commands, refer to Routing Policy Commands.
1.1.1 aggregate
Syntax
aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *
undo aggregate ip-address { mask | mask-length }
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
ip-address: Summary address.
mask: Summary address mask, in dotted decimal notation.
mask-length: Summary address mask length.
as-set: Creates a summary with AS set.
attribute-policy route-policy-name: References a routing policy to set the attributes of the summary route. Note that, when the routing policy is used, the apply as-path clause of the routing policy cannot set the AS_PATH attribute of the summary route.
detail-suppressed: Only advertises the summary route.
suppress-policy route-policy-name: Suppresses specific routes defined in the routing policy.
origin-policy route-policy-name: References the routing policy to specify routes for summarization.
Table 1-1 describes the functions of the above-mentioned keywords.
Table 1-1 Functions of the keywords
Keywords |
Function |
as-set |
Used to create a summary route, whose AS path contains the AS path information of summarized routes. Use this keyword carefully when many AS paths need to be summarized, because the frequent changes of routes may lead to route oscillation. |
detail-suppressed |
This keyword does not suppress the summary route, but it suppresses the advertisement of all the more specific routes. To summarize only some specific routes, use the peer filter-policy command. |
suppress-policy |
Used to create a summary route and suppress the advertisement of some summarized routes. If you want to suppress some routes selectively and leave other routes still advertised, use the if-match clause of the route-policy command. |
origin-policy |
Selects only routes satisfying the routing policy for route summarization |
attribute-policy |
Sets attributes except the AS-PATH attribute for the summary route. The same work can be done by using the peer route-policy command. |
Description
Use the aggregate command to create a summary route in the BGP routing table.
Use the undo aggregate command to remove a summary route.
By default, no summary route is configured.
& Note:
The suppress-policy keyword takes priority over the keyword detail-suppressed.
Examples
# In BGP view, create a summary of 192.213.0.0/16 in the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] aggregate 192.213.0.0 255.255.0.0
# In BGP-VPN instance view, create a summary of 192.213.0.0/16 in BGP routing table (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] aggregate 192.213.0.0 255.255.0.0
1.1.2 balance (BGP/BGP-VPN instance view)
Syntax
balance number
undo balance
View
BGP view, VPN instance view
Default Level
2: System level
Parameters
number: Number of BGP routes for load balancing. When it is set to 1, load balancing is disabled.
Description
Use the balance command to configure the number of BGP routes for load balancing.
Use the undo balance command to disable load balancing.
By default, no load balancing is configured.
Unlike IGP, BGP has no explicit metric for making load balancing decision. Instead, it implements load balancing using route selection rules.
Related commands: display bgp routing-table.
Examples
# In BGP view, set the number of routes participating in BGP load balancing to 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] balance 2
# In BGP-VPN instance view, set the number of routes participating in BGP load balancing to 2 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] balance 2
1.1.3 bestroute as-path-neglect (BGP/BGP-VPN instance view)
Syntax
bestroute as-path-neglect
undo bestroute as-path-neglect
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the bestroute as-path-neglect command to ignore the AS_PATH attribute during best route selection.
Use the undo bestroute as-path-neglect command to take the AS_PATH as a factor during best route selection.
By default, the device takes AS_PATH as a factor when selecting the best route.
Examples
# In BGP view, ignore AS_PATH in route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute as-path-neglect
# In BGP-VPN instance view, ignore AS_PATH in route selection (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute as-path-neglect
1.1.4 bestroute compare-med (BGP/BGP-VPN instance view)
Syntax
bestroute compare-med
undo bestroute compare-med
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the bestroute compare-med command to enable the comparison of the MED for paths from each AS.
Use the undo bestroute compare-med command to disable this comparison.
This comparison is not enabled by default.
Caution:
After the bestroute compare-med command is executed, the balance command does not take effect.
Examples
# In BGP view, enable the comparison of MEDs for paths from each AS when selecting the best route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute compare-med
# In BGP-VPN instance view, enable the comparison of MED for paths from each AS when selecting the best route. (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute compare-med
1.1.5 bestroute med-confederation (BGP/BGP-VPN instance view)
Syntax
bestroute med-confederation
undo bestroute med-confederation
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the bestroute med-confederation command to enable the comparison of the MED for paths from confederation peers to select the optimal route.
Use the undo bestroute med-confederation command to disable the comparison.
The comparison is not enabled by default.
The system only compares MED values for paths from peers within the confederation. Paths from external ASs are advertised throughout the confederation without MED comparison.
Examples
# In BGP view, enable the comparison of the MED for paths from peers within the confederation.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute med-confederation
# In BGP-VPN instance view, enable the comparison of the MED for paths from peers within the confederation. (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute med-confederation
1.1.6 bgp
Syntax
bgp as-number
undo bgp [ as-number ]
View
System view
Default Level
2: System level
Parameters
as-number: Local AS number.
Description
Use the bgp command to enable BGP and enter the BGP view.
Use the undo bgp command to disable BGP.
By default, BGP is not enabled.
Examples
# Enable BGP and set local AS number to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp]
1.1.7 compare-different-as-med (BGP/BGP-VPN instance view)
Syntax
compare-different-as-med
undo compare-different-as-med
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the compare-different-as-med command to enable the comparison of the MED for paths from peers in different ASs.
Use the undo compare-different-as-med command to disable the comparison.
The comparison is disabled by default.
If there are several paths for one destination available, the path with the smallest MED is selected.
Do not use this command unless associated ASs adopt the same IGP protocol and routing selection method.
Examples
# In BGP view, enable to compare the MED for paths from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] compare-different-as-med
# In BGP-VPN instance view, enable to compare the MED for paths from peers in different ASs (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] compare-different-as-med
1.1.8 confederation id
Syntax
confederation id as-number
undo confederation id
View
BGP view
Default Level
2: System level
Parameters
as-number: Number of the AS that contains multiple sub-ASs.
Description
Use the confederation id command to configure a confederation ID.
Use the undo confederation id command to remove a specified confederation.
By default, no confederation ID is configured.
Configuring a confederation can reduce IBGP connections in a large AS. You can split the AS into several sub-ASs, and each sub-AS remains fully meshed. These sub-ASs form a confederation. Key IGP attributes of a route, such as the next hop, MED, local preference, are not discarded when crossing each sub-AS. The sub-ASs still look like a whole from the perspective of other ASs. This can ensure the integrity of the former AS, and solve the problem of too many IBGP connections in the AS.
Related commands: confederation nonstandard, confederation peer-as.
Examples
# Confederation 9 consists of four sub-ASs, namely, 38, 39, 40 and 41. The peer 10.1.1.1 is a member of the confederation while the peer 200.1.1.1 is outside of the confederation. Take sub AS 41 as an example.
<Sysname> system-view
[Sysname] bgp 41
[Sysname-bgp] confederation id 9
[Sysname-bgp] confederation peer-as 38 39 40
[Sysname-bgp] group Confed38 external
[Sysname-bgp] peer Confed38 as-number 38
[Sysname-bgp] peer 10.1.1.1 group Confed38
[Sysname-bgp] group Remote98 external
[Sysname-bgp] peer Remote98 as-number 98
[Sysname-bgp] peer 200.1.1.1 group Remote98
1.1.9 confederation nonstandard
Syntax
confederation nonstandard
undo confederation nonstandard
View
BGP view
Default Level
2: System level
Parameters
None
Description
Use the confederation nonstandard command to make the device compatible with devices not compliant with RFC3065 in the confederation.
Use the undo confederation nonstandard command to restore the default.
By default, all devices in the confederation comply with RFC3065.
Related commands: confederation id, confederation peer-as.
Examples
# AS100 contains devices not compliant with RFC3065 and comprises two sub-ASs, 64000 and 65000.
<Sysname> system-view
[Sysname] bgp 64000
[Sysname-bgp] confederation id 100
[Sysname-bgp] confederation peer-as 65000
[Sysname-bgp] confederation nonstandard
1.1.10 confederation peer-as
Syntax
confederation peer-as as-number-list
undo confederation peer-as [ as-number-list ]
View
BGP view
Default Level
2: System level
Parameters
as-number-list: Sub-AS number list. Up to 32 sub-ASs can be configured in one command line. The expression is as-number-list = as-number &<1-32>, in which as-number specifies a sub-AS number, and &<1-32> indicates up to 32 numbers can be specified.
Description
Use the confederation peer-as command to specify confederation peer sub-ASs.
Use the undo confederation peer-as command to remove specified confederation peer sub-ASs.
By default, no confederation peer sub-ASs are configured.
Before this configuration, the confederation id command must be used to specify the confederation for the sub-ASs.
If the undo confederation peer-as command without the as-number-list argument is used, all confederation peer sub-ASs are removed.
Related commands: confederation nonstandard, confederation id.
Examples
# Specify confederation peer sub ASs 2000 and 2001.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] confederation id 10
[Sysname-bgp] confederation peer-as 2000 2001
1.1.11 dampening (BGP/BGP-VPN instance view)
Syntax
dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling | route-policy route-policy-name ] *
undo dampening
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
half-life-reachable: Half-life for reachable routes in minutes. By default, the value is 15 minutes.
half-life-unreachable: Half-life for unreachable routes in minutes. By default, the value is 15 minutes.
reuse: Reuse threshold value for suppressed routes. A suppressed route whose penalty value decreases under the value is reused. By default, the reuse value is 750.
suppress: Suppression threshold. The route with a penalty value higher than the threshold is suppressed. The default value is 2000.
ceiling: Ceiling penalty value, which must be bigger than the suppress value. By default, the value is 16000.
route-policy-name: Routing policy name.
half-life-reachable, half-life-unreachable, reuse, suppress and ceiling are mutually dependent. Once any one is configured, all the others should also be specified accordingly.
Description
Use the dampening command to enable BGP route dampening and/or configure dampening parameters.
Use the undo dampening command to disable route dampening.
By default, no route dampening is configured.
The command dampens only EBGP routes rather than IBGP routes.
Related commands: reset bgp dampening, reset bgp flap-info, display bgp routing-table dampened, display bgp routing-table dampening parameter, display bgp routing-table flap-info.
Examples
# In BGP view, enable BGP route dampening and configure dampening parameters.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] dampening 15 15 1000 2000 10000
# In BGP-VPN instance view, enable BGP route dampening and configure dampening parameters. (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] dampening 15 15 1000 2000 10000
1.1.12 debugging bgp
Syntax
debugging bgp [ ip-address ] { all | detail | event | graceful-restart | timer | { keepalive | open | packet | raw-packet | route-refresh } [ receive | send ] [ verbose ] }
debugging bgp update [ acl acl-number | ip-prefix ip-prefix-name | ipv4 | l2vpn | label-route | vpn-instance vpn-instance-name | vpnv4 ] [ peer { ip-address | group-name } ] [ receive | send ] [ verbose ]
undo debugging bgp [ ip-address ] { all | detail | event | graceful-restart | timer | { keepalive | open | packet | raw-packet | route-refresh } [ receive | send ] [ verbose ] }
undo debugging bgp update [ acl acl-number | ip-prefix ip-prefix-name | ipv4 | l2vpn | label-route | vpn-instance vpn-instance-name | vpnv4 ] [ peer { ip-address | group-name } ] [ receive | send ] [ verbose ]
View
User view
Default Level
1: Monitor level
Parameters
ip-address: IP address of a peer.
all: Enables all BGP debugging.
detail: Enables BGP detailed information debugging.
event: Enables BGP event debugging.
graceful-restart: Enables BGP GR debugging.
timer: Enables BGP timer debugging.
keepalive: Enables BGP keepalive packets debugging.
open: Enables BGP open packets debugging.
packet: Enables BGP packets debugging.
raw-packet: Enables BGP raw packets debugging.
route-refresh: Enables BGP route-refresh packets debugging.
receive: Received BGP packets.
send: Sent BGP packets.
Verbose: Displays detailed debugging information.
update: Enables BGP update packets debugging.
acl acl-number: Uses an ACL to filter output packet debugging information.
ip-prefix ip-prefix-name: Uses an IP prefix list to filter output packet debugging information.
ipv4: Enables IPv4 packet debugging.
l2vpn: Enables L2VPN packet debugging.
label-route: Enables labeled BGP route debugging.
vpnv4: Enables VPNv4 packet debugging.
vpn-instance vpn-instance-name: Enables packet debugging for the VPN instance.
peer ip-address/group-name: Enables BGP packet debugging with the BGP peer or peer group.
Use the debugging bgp command to enable specified BGP debugging.
Use the undo debugging bgp command to disable specified BGP debugging.
Enabling any debugging will decrease system performance; therefore, disable the debugging timely after debugging.
Examples
# Enable BGP detailed debugging when a BGP peer relationship is being established.
<Sysname> debugging bgp detail
*Aug 24 14:12:13:674 2006 Sysname RM/6/RMDEBUG:
BGP_L3VPN: Recv UPDATE with following RD 100:1 destination 11.1.1.1 - Received New VPNv4 Route with Ext-Community NULL..Ignoring Route
// BGP received an UPDATE message with RD 100:1, destination address 11.1.1.1. The Ext-Community of the new VPNv4 route is NULL and therefore the route was ignored.
DeLocRemCross: Deleting route From Target Instance.
// The route was deleted from the instance.
1.1.13 default ipv4-unicast
Syntax
default ipv4-unicast
undo default ipv4-unicast
View
BGP view
Default Level
2: System level
Parameters
None
Description
Use the default ipv4-unicast command to enable the use of IPv4 unicast address family for all peers.
Use the undo default ipv4-unicast command to disable the use of IPv4 unicast address family for all peers.
The use of IPv4 unicast address family is enabled by default.
Examples
# Enable IPv4 unicast address family for all neighbors.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default ipv4-unicast
1.1.14 default local-preference (BGP/BGP-VPN instance view)
Syntax
default local-preference value
undo default local-preference
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
value: Default local preference. The larger the value, the higher the preference.
Description
Use the default local-preference command to configure the default local preference.
Use the undo default local-preference command to restore the default value.
The default local preference is 100.
Using this command can affect BGP route selection.
Examples
# In BGP view, set the default local preference to 180.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default local-preference 180
# In BGP-VPN instance view, set the default local preference to 180 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default local-preference 180
1.1.15 default med (BGP/BGP-VPN instance view)
Syntax
default med med-value
undo default med
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
med-value: Default MED value.
Description
Use the default med command to specify a default MED value.
Use the undo default med command to restore the default.
By default, the default med-value is 0.
Multi-exit discriminator (MED) is an external metric for routes. Different from local preference, MED is exchanged between ASs and will stay in the AS once it enters the AS. The route with a lower MED is preferred. When a device running BGP obtains several routes with an identical destination but different next-hops from various external peers, it will select the best route depending on the MED value. In the case that all other conditions are the same, the system first selects the route with the smallest MED as the best external route.
Examples
# In BGP view, configure the default MED as 25.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default med 25
# In BGP-VPN instance view, configure the default MED as 25 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default med 25
1.1.16 default-route imported (BGP/BGP-VPN instance view)
Syntax
default-route imported
undo default-route imported
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the default-route imported command to allow default route redistribution into the BGP routing table.
Use the undo default-route imported command to disallow the redistribution.
By default, default route redistribution is not allowed.
Using the default-route imported command cannot redistribute default routes. To do so, use the import-route command.
Related commands: import-route.
Examples
# In BGP view, allow default route redistribution from OSPF into BGP.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default-route imported
[Sysname-bgp] import-route ospf 1
# In BGP-VPN instance view, enable redistributing default route from OSPF into BGP (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default-route imported
[Sysname-bgp-vpn1] import-route ospf 1
1.1.17 display bgp group
Syntax
display bgp group [ group-name ]
View
Any view
Default Level
1: Monitor level
Parameters
group-name: Peer group name.
Description
Use the display bgp group command to display the information of the peer group.
Examples
# Display the information of the peer group aaa.
<Sysname> display bgp group aaa
BGP peer-group is aaa
remote AS 200
Type : external
Maximum allowed prefix number: 4294967295
Threshold: 75%
Configured hold timer value: 180
Keepalive timer value: 60
Minimum time between advertisement runs is 30 seconds
Peer Preferred Value: 0
No routing policy is configured
Members:
Peer V AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2.2.2.1 4 200 0 0 0 0 00:00:35 Active
Table 1-2 Description on the fields of the display bgp group command
Field |
Description |
BGP peer-group |
Name of the BGP peer group |
remote AS |
AS number of peer group |
type |
Type of the BGP peer group: IBGP or EBGP |
Maximum allowed prefix number |
Maximum allowed prefix number |
Threshold |
Threshold value |
hold timer value |
Holdtime interval |
Keepalive timer value |
Keepalive interval |
Minimum time between advertisement runs |
Minimum time between advertisement runs |
Peer Preferred Value |
Preferred value of the routes from the peer |
No routing policy is configured |
No routing policy is configured for the peer |
Members |
Detailed information of the members in the peer group |
Peer |
IPv4 address of the peer |
V |
BGP version running on peers |
AS |
AS number of the peers |
MsgRcvd |
Number of messages received |
MsgSent |
Number of messages sent |
OutQ |
Number of messages to be sent |
PrefRcv |
Number of prefixes received |
Up/Down |
The lasting time of a session/the lasting time of present state (when no session is established) |
State |
State machine status of peer |
1.1.18 display bgp network
Syntax
display bgp network
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp network command to display routing information that has been advertised.
Examples
# Display routing information that has been advertised.
<Sysname> display bgp network
BGP Local Router ID is 10.1.4.2.
Local AS Number is 400.
Network Mask Route-policy Short-cut
100.1.2.0 255.255.255.0
100.1.1.0 255.255.255.0 Short-cut
Table 1-3 Description on the fields of the display bgp network command
Field |
Description |
BGP Local Router ID |
BGP Local Router ID |
Local AS Number |
Local AS Number |
Network |
Network address |
Mask |
Mask |
Route-policy |
Routing policy |
Short-cut |
Short-cut route |
1.1.19 display bgp paths
Syntax
display bgp paths [as-regular-expression]
View
Any view
Default Level
1: Monitor level
Parameters
as-regular-expression: AS path regular expression.
Description
Use the display bgp paths command to display information about BGP paths.
Examples
# Display information about BGP paths matching the AS path regular expression.
<Sysname> display bgp paths ^200
Address Hash Refcount MED Path/Origin
0x5917100 11 1 200 300i
Table 1-4 Description on the fields of the display bgp paths command
Field |
Description |
|
Address |
Route address in local database, in dotted hexadecimal notation |
|
Hash |
Hash index |
|
Refcount |
Count of routes that referenced the path |
|
MED |
MED of the path |
|
Path |
AS_PATH attribute of the path, recording the ASs it has passed, for avoiding routing loops |
|
Origin |
Origin attribute of the route: |
|
i |
Indicates the route is interior to the AS. Summary routes and routes defined using the network command are considered IGP routes. |
|
e |
Indicates that a route is learned from the exterior gateway protocol (EGP). |
|
? |
Short for INCOMPLETE. It indicates that the origin of a route is unknown and the route is learned by other means. |
1.1.20 display bgp peer
Syntax
display bgp peer [ ip-address { log-info | verbose } | group-name log-info | verbose ]
View
Any view
Default Level
1: Monitor level
Parameters
ip-address: IP address of an peer to be displayed, in dotted decimal notation.
group-name: Name of a peer group to be displayed.
log-info: Displays the log information of the specified peer.
verbose: Displays the detailed information of the peer/peer group.
Description
Use the display bgp peer command to display peer/peer group information.
Examples
# Display the detailed information of the peer 10.110.25.20.
<Sysname> display bgp peer 10.110.25.20 verbose
Peer: 10.110.25.20 Local: 2.2.2.2
Type: EBGP link
BGP version 4, remote router ID 1.1.1.1
BGP current state: Established, Up for 00h01m51s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port: Local - 1029 Remote - 179
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec
Peer optional capabilities:
Peer support bgp multi-protocol extended
Peer support bgp route refresh capability
Address family IPv4 Unicast: advertised and received
Received: Total 5 messages, Update messages 1
Sent: Total 4 messages, Update messages 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisement runs is 30 seconds
Optional capabilities:
Route refresh capability has been enabled
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
Table 1-5 Description on the fields of the display bgp peer command
Field |
Description |
Peer |
IP address of the peer |
Local |
Local router ID |
Type |
Peer type: Internal as IBGP peers and External as EBGP peers. |
BGP version |
BGP protocol version |
remote router ID |
Router ID of the peer |
BGP current state |
Current state of the peer |
BGP current event |
Current event of the peer |
BGP last state |
Last state of the peer |
Port |
Port number of local router and its peer |
Configured: Active Hold Time |
Local holdtime interval |
Configured: Keepalive Time |
Local keepalive interval |
Received: Active Hold Time |
Remote holdtime interval |
Negotiated: Active Hold Time |
Negotiated holdtime interval |
Peer optional capabilities |
Optional capabilities supported by the peer, including BGP multiple extension and routing refresh. |
Address family IPv4 Unicast |
Routes are advertised and received in the form of IPv4 unicast |
Received |
Total numbers of received packets and updates |
Sent |
Total numbers of sent packets and updates |
Maximum allowed prefix number |
Maximum allowed prefix number |
Threshold |
Threshold value |
Minimum time between advertisement runs |
Minimum time between route advertisements |
Optional capabilities |
Optional capabilities enabled by the peer |
Peer Preferred Value |
Preferred value specified for the routes from the peer |
Routing policy configured |
Local routing policy |
1.1.21 display bgp routing-table
Syntax
display bgp routing-table [ ip-address [ { mask | mask-length } [ longer-prefixes ] ] ]
View
Any view
Default Level
1: Monitor level
Parameters
ip-address: Destination IP address.
mask: Network mask, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
longer-prefixes: Matches the longest prefix.
Description
Use the display bgp routing-table command to display specified BGP routing information in the BGP routing table.
Examples
# Display BGP routing table information.
<Sysname> display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 10.10.10.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 20.20.20.1 0 200 300i
Table 1-6 Description on the fields of the display bgp routing command
Field |
Description |
|
Total Number of Routes |
Total Number of Routes |
|
BGP Local router ID |
BGP Local router ID |
|
Status codes |
Status codes: * – valid > – best d – damped h – history i – internal (IGP) s – summary suppressed (suppressed) S – Stale |
|
Origin |
i – IGP (originated in the AS) e – EGP (learned through EGP) ? – incomplete (learned by other means) |
|
Network |
Destination network address |
|
Next Hop |
Next hop IP address |
|
MED |
MULTI_EXIT_DISC attribute |
|
LocPrf |
Local preference value |
|
PrefVal |
Preferred value of the route |
|
Path |
AS_PATH attribute, recording the ASs the packet has passed to avoid routing loops |
|
PrefVal |
Preferred value |
|
Ogn |
Origin attribute of the route, one of the following values: |
|
i |
Indicates that the route is interior to the AS. Summary routes and the routes configured using the network command are considered IGP routes. |
|
e |
Indicates that the route is learned via the exterior gateway protocol (EGP). |
|
? |
Short for INCOMPLETE. It indicates that the origin of the route is unknown and the route is learned by other means. |
1.1.22 display bgp routing-table as-path-acl
Syntax
display bgp routing-table as-path-acl as-path-acl-number
View
Any view
Default Level
1: Monitor level
Parameters
as-path-acl-number: Displays routing information permitted by the AS path ACL.
Description
Use the display bgp routing as-path-acl command to display BGP routes permitted by an as-path ACL.
Examples
# Display BGP routes permitted by AS path ACL 1.
<Sysname> display bgp routing-table as-path-acl 1
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 1-6 for description on the fields above.
1.1.23 display bgp routing-table cidr
Syntax
display bgp routing-table cidr
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp routing-table cidr command to display BGP CIDR (Classless Inter-Domain Routing) routing information.
Examples
# Display BGP CIDR routing information.
<Sysname> display bgp routing-table cidr
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 1-6 for description on the above fields.
1.1.24 display bgp routing-table community
Syntax
display bgp routing-table community [ aa:nn&<1-13> ] [ no-advertise | no-export | no-export-subconfed ]* [ whole-match ]
View
Any view
Default Level
1: Monitor level
Parameters
aa:nn: Community number.
&<1-13>: Argument before it can be entered up to 13 times.
no-advertise: Displays BGP routes that are not advertised to any peer.
no-export: Displays routes that are not advertised out the AS. If a confederation is configured, it displays routes that are not advertised out the confederation, but can be advertised to other sub ASs in the confederation.
no-export-subconfed: Displays routes that are neither advertised out the AS nor to other sub ASs in a configured confederation.
whole-match: Displays the exactly matched routes.
Description
Use the display bgp routing community command to display BGP routing information with the specified BGP community.
Examples
# Display routing information with the specified BGP community.
<Sysname> display bgp routing-table community 11:22
BGP Local router ID is 10.10.10.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.10.10.0/24 0.0.0.0 0 0 i
*> 40.40.40.0/24 20.20.20.1 0 200 300i
Refer to Table 1-6 for description on the fields above.
1.1.25 display bgp routing-table community-list
Syntax
display bgp routing-table community-list { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16>
View
Any view
Default Level
1: Monitor level
Parameters
basic-community-list-number: Basic community-list number.
adv-community-list-number: Advanced community-list number.
whole-match: Displays routes exactly matching the specified basic-community-list.
&<1-16>: Specifies the argument before it can be entered up to 16 times.
Description
Use the display bgp routing-table community-list command to display BGP routing information matching the specified BGP community list.
Examples
# Display BGP routing information matching BGP community list 100.
<Sysname> display bgp routing-table community-list 100
BGP Local router ID is 1.2.3.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
Network NextHop Metric LocPrf PrefVal Path
*> 3.3.3.0/30 1.2.3.4 0 ?
*> 4.4.0.0/20 1.2.3.4 0 ?
*> 4.5.6.0/26 1.2.3.4 0 ?
Refer to Table 1-6 for description on the fields above.
1.1.26 display bgp routing-table dampened
Syntax
display bgp routing-table dampened
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp routing-table dampened command to display dampened BGP routes.
Examples
# Display dampened BGP routes.
<Sysname> display bgp routing-table dampened
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network From Reuse Path/Origin
*d 77.0.0.0 12.1.1.1 00:29:20 100?
Table 1-7 Description on the fields of the display bgp routing-table dampened command
Field |
Description |
From |
IP address from which the route was received |
Reuse |
Reuse time of the route |
Refer to Table 1-6 for description on the other fields above.
1.1.27 display bgp routing-table dampening parameter
Syntax
display bgp routing-table dampening parameter
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp routing-table dampening parameter command to display BGP route dampening parameters.
Related commands: dampening.
Examples
# Display BGP route dampening parameters.
<Sysname> display bgp routing-table dampening parameter
Maximum Suppress Time(in second) : 3069
Ceiling Value : 16000
Reuse Value : 750
HalfLife Time(in second) : 900
Suppress-Limit : 2000
Table 1-8 Description on the fields of the display bgp routing-table dampening parameter command
Field |
Description |
Maximum Suppress Time |
Maximum Suppress Time |
Ceiling Value |
Upper limit of penalty value |
Reuse Value |
Limit for a route to be desuppressed |
HalfLife Time |
Half-life time of active routes |
Suppress-Limit |
Limit for a route to be suppressed |
1.1.28 display bgp routing-table different-origin-as
Syntax
display bgp routing-table different-origin-as
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp routing-table different-origin-as command to display BGP routes originating from different autonomous systems.
Examples
# Display BGP routes originating from different ASs.
<Sysname> display bgp routing-table different-origin-as
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 55.0.0.0 12.1.1.1 0 0 100?
* 14.1.1.2 0 0 300?
Refer to Table 1-6 for description on the fields above.
1.1.29 display bgp routing-table flap-info
Syntax
display bgp routing-table flap-info [ regular-expression as-regular-expression | as-path-acl as-path-acl-number | ip-address [ { mask | mask-length } [ longer-match ] ] ]
View
Any view
Default Level
1: Monitor level
Parameters
as-regular-expression: Displays route flap information that matches the AS path regular expression.
as-path-acl-number: Displays route flap information matching the AS path ACL.
ip-address: Destination IP address.
mask: Mask, in dotted decimal notation.
mask-length: Mask length.
longer-match: Matches the longest prefix.
Description
Use the display bgp routing-table flap-info command to display BGP route flap statistics. If no parameter is specified, this command displays all BGP route flap statistics.
Examples
# Display BGP route flap statistics.
<Sysname> display bgp routing-table flap-info
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network From Flaps Duration Reuse Path/Origin
*> 55.0.0.0 12.1.1.1 2 00:00:16 100?
*d 77.0.0.0 12.1.1.1 5 00:34:02 00:27:08 100?
Table 1-9 Description on the fields of the display bgp routing flap-info command
Field |
Description |
From |
Source IP address of the route |
Flaps |
Number of routing flaps |
Duration |
Duration time of the flap route |
Reuse |
Reuse time of the flap route |
Refer to Table 1-6 for description on the other fields above.
1.1.30 display bgp routing-table peer
Syntax
display bgp routing-table peer ip-address { advertised-routes | received-routes } [ network-address [ mask | mask-length ] | statistic ]
View
Any view
Default Level
1: Monitor level
Parameters
ip-address: IP address of a peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
network-address: IP address of the destination network.
mask: Mask of the destination network, in dotted decimal notation.
mask-length: Mask length.
statistic: Displays route statistics.
Description
Use the display bgp routing-table peer command to display BGP routing information advertised to or received from the specified BGP peer.
Related commands: display bgp peer.
Examples
# Display BGP routing information advertised to BGP peer 20.20.20.1.
<Sysname> display bgp routing table peer 20.20.20.1 advertised-routes
Total Number of Routes: 2
BGP Local router ID is 30.30.30.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 30.30.30.0/24 0.0.0.0 0 0 i
*> 40.40.40.0/24 0.0.0.0 0 0 i
Refer to Table 1-6 for description on the fields above.
1.1.31 display bgp routing-table regular-expression
Syntax
display bgp routing-table regular-expression as-regular-expression
View
Any view
Default Level
1: Monitor level
Parameters
as-regular-expression: AS regular expression.
Description
Use the display bgp routing-table regular-expression command to display BGP routing information matching the specified AS regular expression.
Examples
# Display BGP routing information matching AS regular expression 300$.
<Sysname> display bgp routing-table regular-expression 300$
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 1-6 for description on the fields above.
1.1.32 display bgp routing-table statistic
Syntax
display bgp routing-table statistic
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display bgp routing-table statistic command to display BGP routing statistics.
Examples
# Display BGP routing statistics.
<Sysname> display bgp routing-table statistic
Total Number of Routes: 4
Table 1-10 Description on the fields of the display bgp routing-table statistic command
Field |
Description |
Total number of routes |
Total number of routes |
1.1.33 ebgp-interface-sensitive
Syntax
ebgp-interface-sensitive
undo ebgp-interface-sensitive
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the ebgp-interface-sensitive command to enable the clearing of EBGP session on any interface that becomes down.
Use the undo ebgp-interface-sensitive command to disable the function.
This function is enabled by default.
Examples
# In BGP view, enable the clearing of EBGP session on any interface that becomes down.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ebgp-interface-sensitive
# In BGP-VPN instance view, enable the clearing of EBGP session on any interface that becomes down (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] ebgp-interface-sensitive
1.1.34 filter-policy export (BGP/BGP-VPN instance view)
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ direct | isis process-id | ospf process-id | rip process-id | static ]
undo filter-policy export [ direct | isis process-id | ospf process-id | rip process-id | static ]
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
acl-number: Number of an ACL used to filter outgoing redistributed routing information.
ip-prefix-name: Name of an IP prefix list used to filter outgoing redistributed routing information.
direct: Filters direct routes.
isis process-id: Filters outgoing routes redistributed from an ISIS process.
ospf process-id: Filters outgoing routes redistributed from the OSPF process.
rip process-id: Filters outgoing routes redistributed from a RIP process.
static: Filters static routes.
If no routing protocol is specified, all outgoing routes are filtered.
Description
Use the filter-policy export command to filter outgoing redistributed routes and only the routes permitted by the specified filter can be advertised.
Use the undo filter-policy export command to remove the filtering.
If no routing protocol is specified, the filtering applies to all outgoing redistributed routes.
By default, the filtering is not configured.
Examples
# In BGP view, reference ACL 2000 to filter all outgoing redistributed routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] filter-policy 2000 export
# In BGP-VPN instance view, reference ACL 2000 to filter all outgoing redistributed routes (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] filter-policy 2000 export
1.1.35 filter-policy import (BGP/BGP-VPN instance view)
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } import
undo filter-policy import
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
acl-number: Number of an ACL used to filter incoming routing information.
ip-prefix-name: Name of an IP prefix list used to filter incoming routing information.
Description
Use the filter-policy import command to configure the filtering of incoming routing information.
Use the undo filter-policy import command to disable the filtering.
By default, incoming routing information is not filtered.
Examples
# In BGP view, reference ACL 2000 to filter incoming routing information.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] filter-policy 2000 import
# In BGP-VPN instance view, reference ACL 2000 to filter incoming routing information (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] filter-policy 2000 import
1.1.36 group (BGP/BGP-VPN instance view)
Syntax
group group-name [ external | internal ]
undo group group-name
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
external: Creates an EBGP peer group, which can be the group of another sub AS in a confederation.
internal: Creates an IBGP peer group; not supported in BGP-VPN instance view.
Description
Use the group command to create a peer group.
Use the undo group command to delete a peer group.
An IBGP peer group is created if neither internal nor external is specified.
Examples
# In BGP view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 200
[Sysname-bgp] peer 10.1.1.1 group test
[Sysname-bgp] peer 10.1.2.1 group test
# In BGP-VPN instance view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 200
[Sysname-bgp-vpn1] peer 10.1.1.1 group test
[Sysname-bgp-vpn1] peer 10.1.2.1 group test
1.1.37 import-route (BGP/BGP-VPN instance view)
Syntax
import-route protocol [ process-id [ med med-value | route-policy route-policy-name ] * ]
undo import-route protocol [ process-id ]
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
protocol: Redistributes routes from the routing protocol, which can be direct, isis, ospf, rip and static at present.
process-id: Process ID. It is available only when the protocol is isis, ospf or rip.
med-value: Specifies the MED value to be applied to redistributed routes, ranging from 0 to 4294967295. If the argument is not specified, the cost of the redistributed route is used as its MED in the BGP routing domain.
route-policy-name: Name of a routing policy used to filter redistributed routes.
Description
Use the import-route command to configure BGP to redistribute routes from a specified routing protocol and advertise redistributed routes.
Use the undo import-route command to disable route redistribution from a routing protocol.
By default, BGP does not redistribute routes from other protocols.
The ORIGIN attribute of routes redistributed with the import-route command is incomplete.
Examples
# In BGP view, redistribute routes from RIP.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] import-route rip
# In BGP-VPN instance view, redistribute routes from RIP (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] import-route rip
1.1.38 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
BGP view
Default Level
2: System level
Parameters
None
Description
Use the log-peer-change command to enable the global BGP logging on peers going up and down.
Use the undo log-peer-change command to disable the function.
By default, the function is enabled.
Examples
# Enable BGP logging on peers going up and down.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] log-peer-change
1.1.39 network (BGP/BGP-VPN instance view)
Syntax
network ip-address [ mask | mask-length ] [ short-cut | route-policy route-policy-name ]
undo network ip-address [ mask | mask-length ] [ short-cut ]
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
ip-address: Destination IP address.
mask: Mask of the network address, in dotted decimal notation.
mask-length: Mask length.
short-cut: Specifies the route to use the local preference. If the route is an EBGP route whose preference is higher than the local one, using this keyword can configure the EBGP route to use the local preference, so the route is hard to become the optimal route.
route-policy-name: Routing policy applied to the route.
Description
Use the network command to advertise a network to the BGP routing table.
Use the undo network command to remove a network from the routing table.
By default, no network route is advertised.
Note that:
l The network route must be in the local IP routing table, and using a routing policy makes route management more flexible.
l The route advertised to the BGP routing table using the network command has the ORIGIN attribute as IGP.
Examples
# In BGP view, advertise the network segment 10.0.0.0/16.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] network 10.0.0.0 255.255.0.0
# In BGP-VPN instance view, advertise the network segment 10.0.0.0/16 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] network 10.0.0.0 255.255.0.0
1.1.40 peer advertise-community (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } advertise-community
undo peer { group-name | ip-address } advertise-community
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer advertise-community command to advertise the community attribute to a peer/peer group.
Use the undo peer advertise-community command to disable the community attribute advertisement to a peer/peer group.
By default, no community attribute is advertised to any peer group/peer.
Related commands: ip community-list, if-match community, and apply community in Routing Policy Commands.
Examples
# In BGP view, advertise the community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test advertise-community
# In BGP-VPN instance view, advertise the community attribute to peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test advertise-community
1.1.41 peer advertise-ext-community (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } advertise-ext-community
undo peer { group-name | ip-address } advertise-ext-community
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer advertise-ext-community command to advertise the extended community attribute to a peer/peer group.
Use the undo peer advertise-ext-community command to disable the advertisement.
By default, no extended community attribute is advertised to a peer/peer group.
For related information, refer to the ip extcommunity-list, if-match extcommunity and apply extcommunity commands in Routing Policy Commands.
Examples
# In BGP view, advertise the extended community attribute to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test advertise-ext-community
# In BGP-VPN view, advertise the extended community attribute to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test advertise-community
1.1.42 peer allow-as-loop (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } allow-as-loop [ number ]
undo peer { group-name | ip-address } allow-as-loop
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
number: Specifies the repeating times of the local AS number. The default number is 1.
Description
Use the peer allow-as-loop command to allow the local AS number to exist in the AS_PATH attribute of routes from a peer/peer group, and to configure the repeating times of the local AS number.
Use the undo peer allow-as-loop command to disable the feature.
By default, the local AS number is not allowed.
Related commands: display bgp routing-table peer.
Examples
# In BGP view, configure the repeating times of the local AS number as 2 for routes from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 allow-as-loop 2
# In BGP-VPN instance view, configure the repeating times of the local AS number as 2 for routes from peer 1.1.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 allow-as-loop 2
1.1.43 peer as-number (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } as-number as-number
undo peer group-name as-number
undo peer ip-address
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
as-number: AS number of the peer or peer group.
Description
Use the peer as-number command to specify the AS number for a peer/peer group.
Use the undo peer as-number command to delete the AS number of a peer group.
Use the undo peer command to delete a peer.
By default, no AS number is configured for a peer/peer group.
Examples
# In BGP view, specify the AS number of the peer group test as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-number 100
# In BGP-VPN instance view, specify the AS number of the peer group test as 100 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-number 100
1.1.44 peer as-path-acl (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
undo peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
as-path-acl-number: AS path ACL number.
export: Filters outgoing routes.
import: Filters incoming routes.
Description
Use the peer as-path-acl command to configure the filtering of routes incoming from or outgoing to a peer/peer group based on a specified AS path ACL.
Use the undo peer as-path-acl command to remove the configuration.
By default, no AS path ACL filtering is configured.
Related commands: ip as-path-acl, if-match as-path, and apply as-path in Routing Policy Commands.
Examples
# In BGP view, reference the AS path ACL 1 to filter routes outgoing to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-path-acl 1 export
# In BGP-VPN instance view, reference the AS path ACL 1 to filter routes outgoing to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-path-acl 1 export
1.1.45 peer capability-advertise conventional
Syntax
peer { group-name | ip-address } capability-advertise conventional
undo peer { group-name | ip-address } capability-advertise conventional
View
BGP view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer capability-advertise conventional command to disable BGP multi-protocol extension and route refresh for a peer/peer group.
Use the undo peer capability-advertise command to enable BGP multi-protocol extension and route refresh for a peer/peer group.
By default, BGP multi-protocol extension and route refresh are enabled.
Examples
# In BGP view, disable multi-protocol extension and route refresh for peer 160.89.2.33.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 160.89.2.33 as-number 100
[Sysname-bgp] peer 160.89.2.33 capability-advertise conventional
1.1.46 peer capability-advertise route-refresh
Syntax
peer { group-name | ip-address } capability-advertise route-refresh
undo peer { group-name | ip-address } capability-advertise route-refresh
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer capability-advertise route-refresh command to enable the BGP route refresh capability.
Use the undo peer capability-advertise route-refresh command to disable the capability.
The capability is enabled by default.
Examples
# In BGP view, enable BGP route refresh for peer 160.89.2.33.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 160.89.2.33 as-number 100
[Sysname-bgp] peer 160.89.2.33 capability-advertise route-refresh
# In BGP-VPN instance view, enable BGP route refresh for peer 160.89.2.33 (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 160.89.2.33 as-number 100
[Sysname-bgp-vpn1] peer 160.89.2.33 capability-advertise route-refresh
1.1.47 peer connect-interface (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } connect-interface interface-type interface-number
undo peer { group-name | ip-address } connect-interface
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
interface-type interface-number: Specifies the type and number of the interface.
Description
Use the peer connect-interface command to specify the source interface for establishing TCP connections to a peer or peer group.
Use the undo peer connect-interface command to restore the default.
By default, BGP uses the outbound interface of the best route to the BGP peer as the source interface for establishing a TCP connection to the peer/peer group.
To establish multiple BGP connections between two BGP devices, you need to specify on the local device the source interfaces for establishing TCP connections to the peers on the peering BGP router respectively; otherwise, the local BGP device may fail to establish TCP connections to the peers when using the outbound interfaces of the best routes as the source interfaces.
Examples
# In BGP view, specify loopback 0 as the source interface for routing updates to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test connect-interface loopback 0
# In BGP-VPN instance view, specify loopback0 as the source interface for routing updates to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test connect-interface loopback 0
1.1.48 peer default-route-advertise (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } default-route-advertise [ route-policy route-policy-name ]
undo peer { group-name | ip-address } default-route-advertise
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
route-policy-name: Routing policy name.
Description
Use the peer default-route-advertise command to advertise a default route to a peer/peer group.
Use the undo peer default-route-advertise command to disable default route advertisement to a peer/peer group.
By default, no default route is advertised to a peer/peer group.
With this command used, the router unconditionally sends a default route with the next hop being itself to the peer/peer group regardless of whether the default route is available in the routing table.
Examples
# In BGP view, advertise a default route to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test default-route-advertise
# In BGP-VPN instance view, advertise a default route to peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test default-route-advertise
1.1.49 peer description (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } description description-text
undo peer { group-name | ip-address } description
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
description-text: Description information for the peer/peer group.
Description
Use the peer description command to configure the description information for a peer/peer group.
Use the undo peer description command to remove the description information of a peer/peer group.
By default, no description information is configured for a peer/peer group.
Create a peer/peer group before configuring a description for it.
Related commands: display bgp peer.
Examples
# In BGP view, configure the description information of the peer group test as ISP1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test description ISP1
# In BGP-VPN instance view, configure the description information of the peer group test as ISP1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test description ISP1
1.1.50 peer ebgp-max-hop (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } ebgp-max-hop [ hop-count ]
undo peer { group-name | ip-address } ebgp-max-hop
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
hop-count: Maximum hop count. The default is 64.
Description
Use the peer ebgp-max-hop command to allow establishing an EBGP connection with a peer/peer group that is on an indirectly connected network.
Use the undo peer ebgp-max-hop command to restore the default.
By default, this feature is disabled.
You can use the argument hop-count to specify the maximum route hop count of the EBGP connection.
Examples
# In BGP view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test ebgp-max-hop
# In BGP-VPN instance view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test ebgp-max-hop
1.1.51 peer enable (BGP view)
Syntax
undo peer ip-address enable
View
BGP view
Default Level
2: System level
Parameters
ip-address: IP address of a peer.
Description
Use the peer enable command to enable the specified peer.
Use the undo peer enable command to disable the specified peer.
By default, the BGP peer is enabled.
If a peer is disabled, the device will not exchange routing information with the peer.
Examples
# Disable peer 18.10.0.9.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 18.10.0.9 group group1
[Sysname-bgp] undo peer 18.10.0.9 enable
1.1.52 peer fake-as (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } fake-as as-number
undo peer { group-name | ip-address } fake-as
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
as-number: Local autonomous system number.
Description
Use the peer fake-as command to configure a fake local AS number for a peer or peer group.
Use the undo peer fake-as command to remove the configuration.
By default, no fake local AS number is configured for a peer or peer group.
& Note:
The peer fake-as command is only applicable to an EBGP peer or peer group.
Examples
# In BGP view, configure a fake AS number of 200 for the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test fake-as 200
# In BGP-VPN instance view, configure a fake AS number of 200 for the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test fake-as 200
1.1.53 peer filter-policy (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } filter-policy acl-number { export | import }
undo peer { group-name | ip-address } filter-policy [ acl-number ] { export | import }
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
acl-number: ACL number.
export: Applies the filter-policy to routes advertised to the peer/peer group.
import: Applies the filter-policy to routes received from the peer/peer group.
Description
Use the peer filter-policy command to configure an ACL-based filter policy for a peer or peer group.
Use the undo peer filter-policy command to remove the configuration.
By default, no ACL-based filter policy is configured for a peer or peer group.
Related commands: peer as-path-acl.
Examples
# In BGP view, apply the ACL 2000 to filter routes advertised to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test filter-policy 2000 export
# In BGP-VPN instance view, apply the ACL 2000 to filter routes advertised to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test filter-policy 2000 export
1.1.54 peer group (BGP/BGP-VPN instance view)
Syntax
peer ip-address group group-name [ as-number as-number ]
undo peer ip-address group group-name
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
as-number: AS number of the peer.
Description
Use the peer group command to add a peer to a peer group.
Use the undo peer group command to delete a specified peer from a peer group.
By default, no peer is added into a peer group.
Examples
# In BGP view, add the peer 10.1.1.1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 2004
[Sysname-bgp] peer 10.1.1.1 group test
# In BGP-VPN view, add the peer 10.1.1.1 to the EBGP peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 2004
[Sysname-bgp-vpn1] peer 10.1.1.1 group test
1.1.55 peer ignore (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } ignore
undo peer { group-name | ip-address } ignore
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer ignore command to disable session establishment with a peer or peer group.
Use the undo peer ignore command to remove the configuration.
By default, session establishment with a peer or peer group is allowed.
After the peer ignore command is executed, the system disables the session with the specified peer or peer group and clears all the related routing information. For a peer group, this means all sessions with the peer group will be tore down.
Examples
# In BGP view, disable session establishment with peer 10.10.10.10.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.10.10.10 ignore
# In BGP-VPN instance view, disable session establishment with peer 10.10.10.10 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.10.10.10 ignore
1.1.56 peer ip-prefix
Syntax
peer { group-name | ip-address } ip-prefix ip-prefix-name { export | import }
undo peer { group-name | ip-address } ip-prefix { export | import }
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
ip-prefix-name: IP prefix list name.
export: Applies the filter to routes advertised to the specified peer/peer group.
import: Applies the filter to routes received from the specified peer/peer group.
Description
Use the peer ip-prefix command to reference an IP prefix list to filter routes received from or advertised to a peer or peer group.
Use the undo peer ip-prefix command to remove the configuration.
By default, no IP prefix list is specified.
Examples
# In BGP view, use the IP prefix list list 1 to filter routes advertised to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test ip-prefix list1 export
# In BGP-VPN view, use the IP prefix list list 1 to filter routes advertised to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test ip-prefix list1 export
1.1.57 peer keep-all-routes (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } keep-all-routes
undo peer { group-name | ip-address } keep-all-routes
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer keep-all-routes command to save original routing information from a peer or peer group, even routes that failed to pass the inbound policy (if configured).
Use the undo peer keep-all-routes command to disable this function.
By default, the function is not enabled.
Examples
# In BGP view, save routing information from peer 131.100.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 131.100.1.1 as-number 200
[Sysname-bgp] peer 131.100.1.1 keep-all-routes
# In BGP-VPN instance view, save routing information from peer 131.100.1.1(the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 131.100.1.1 as-number 200
[Sysname-bgp-vpn1] peer 131.100.1.1 keep-all-routes
1.1.58 peer log-change (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } log-change
undo peer { group-name | ip-address } log-change
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer log-change command to enable the logging of session state and event information for a specified peer or peer group.
Use the undo peer log-change command to remove the configuration.
The logging is enabled by default.
Examples
# In BGP view, enable the logging of session state and event information for peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test log-change
# In BGP-VPN instance view, enable the logging of session state and event information for peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test log-change
1.1.59 peer next-hop-local (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } next-hop-local
undo peer { group-name | ip-address } next-hop-local
View
BGP view /BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer next-hop-local command to specify the router as the next hop for routes to a peer/peer group.
Use the undo peer next-hop-local command to remove the configuration.
By default, routes advertised to an EBGP peer/peer group take the local router as the next hop, while routes to an IBGP peer/peer group do not take the local router as the next hop.
Examples
# In BGP view, set the next hop of routes advertised to peer group test to the router itself.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test next-hop-local
# In BGP-VPN instance view, set the next hop of routes advertised to peer group test to the router itself (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test next-hop-local
1.1.60 peer password
Syntax
peer { group-name | ip-address } password { cipher | simple } password
undo peer { group-name | ip-address } password
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
cipher: Displays the configured password in cipher text format.
simple: Displays the configured password in plain text format.
password: Password, a string of 1 to 80 characters when the keyword simple is used, or when keyword cipher is included and plain text password is input; a string of 24 to 108 characters when cipher text password and the keyword cipher are used.
Description
Use the peer password command to configure BGP to perform MD5 authentication when a TCP connection is being established with a peer/peer group.
Use the undo peer password command to disable the function.
By default, no MD5 authentication is performed for TCP connection establishment.
Once MD5 authentication is enabled, both parties must be configured with the same authentication mode and password. Otherwise, the TCP connection will not be set up.
Examples
# In BGP view, perform MD5 authentication on the TCP connection between the local device 10.1.100.1 and the peer device 10.1.100.2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.1.100.2 password simple aabbcc
# Perform the similar configuration on the peer.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.1.100.1 password simple aabbcc
# In BGP-VPN instance view, perform MD5 authentication on the TCP connection between the local device 10.1.100.1 and the peer device 10.1.100.2 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.2 password simple aabbcc
# Perform the similar configuration on the peer.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.1 password simple aabbcc
1.1.61 peer preferred-value (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } preferred-value value
undo peer { group-name | ip-address } preferred-value
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
value: Preferred value.
Description
Use the peer preferred-value command to assign a preferred value to routes received from a peer or peer group.
Use the undo peer preferred-value command to restore the default value.
The default preferred value is 0.
Routes learned from a peer have an initial preferred value.
Among multiple routes that have the same destination/mask and are learned from different peers, the one with the biggest preferred value is selected as the route to the network.
Note the following:
If you both reference a routing policy and use the peer { group-name | ip-address } preferred-value value command to set a preferred value for routes from a peer, the routing policy sets a non-zero preferred value for routes matching it. Other routes not matching the routing policy uses the value set with the command. If the preferred value in the routing policy is zero, the routes matching it will use the value set with the command. For information about using a routing policy to set a preferred value, refer to the peer { group-name | ip-address } route-policy route-policy-name { export | import } command and the apply preferred-value preferred-value command.
Examples
# In BGP view, configure the preferred value as 50 for routes from peer 131.108.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 131.108.1.1 preferred-value 50
# In BGP-VPN instance view, configure the preferred value as 50 for routes from peer 131.108.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 131.108.1.1 preferred-value 50
1.1.62 peer public-as-only (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } public-as-only
undo peer { group-name | ip-address } public-as-only
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer public-as-only command to not keep private AS numbers in BGP updates sent to a peer/peer group.
Use the undo peer public-as-only command to keep private AS numbers in BGP updates sent to a peer/peer group.
By default, BGP updates carry private AS numbers.
The command does not take effect if the BGP update has both public and private AS numbers. The range of private AS number is from 64512 to 65535.
Examples
# In BGP view, carry no private AS number in BGP updates sent to the peer test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test public-as-only
# In BGP-VPN instance view, carry no private AS number in BGP updates sent to the peer test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test public-as-only
1.1.63 peer reflect-client (BGP view)
Syntax
peer { group-name | ip-address } reflect-client
undo peer { group-name | ip-address } reflect-client
View
BGP view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer reflect-client command to configure the router as a route reflector and specify a peer/peer group as a client.
Use the undo peer reflect-client command to remove the configuration.
By default, neither route reflector nor client is configured.
Related commands: reflect between-clients, reflect cluster-id.
Examples
# In BGP view, configure the local device as a route reflector and specify the peer group test as a client.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test reflect-client
1.1.64 peer route-limit (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } route-limit limit [ percentage ]
undo peer { group-name | ip-address } route-limit
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
limit: Upper limit of IP prefixes that can be received from the peer or peer group.
percentage: If the number of received routes reaches the specified percentage of the upper limit, the system will generate alarm information. The default percentage is 75.
Description
Use the peer route-limit command to set the maximum number of routes that can be received from a peer/peer group.
Use the undo peer route-limit command to restore the default.
The number is unlimited by default.
Examples
# In BGP view, set the number of routes that can be received from peer 129.140.6.6 to 10000.
<Sysname> system-view
[Sysname] bgp 109
[Sysname-bgp] peer 129.140.6.6 as-number 110
[Sysname-bgp] peer 129.140.6.6 route-limit 10000
# In BGP-VPN instance view, set the maximum number of routes that can be received from peer 129.140.6.6 to 10000 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 109
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 129.140.6.6 as-number 110
[Sysname-bgp-vpn1] peer 129.140.6.6 route-limit 10000
1.1.65 peer route-policy (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } route-policy route-policy-name { export | import }
undo peer { group-name | ip-address } route-policy route-policy-name { export | import }
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
route-policy-name: Routing policy name.
export: Applies the routing policy to routes outgoing to the peer (or peer group).
import: Applies the routing policy to routes incoming from the peer (or peer group).
Description
Use the peer route-policy command to apply a routing policy to routes incoming from or outgoing to a peer or peer group.
Use the undo peer route-policy command to remove the configuration.
By default, no inbound/outbound routing policy is configured for the peer/peer group.
The peer route-policy command does not apply the if-match interface clause in the referenced routing policy. Refer to Routing Policy Commands for related commands.
Examples
# In BGP view, apply routing policy test-policy to routes outgoing to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test route-policy test-policy export
# In BGP-VPN instance view, apply routing policy test-policy to routes outgoing to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test route-policy test-policy export
1.1.66 peer route-update-interval (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } route-update-interval seconds
undo peer { group-name | ip-address } route-update-interval
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
seconds: Minimum interval for sending the same update message.
Description
Use the peer route-update-interval command to specify the interval for sending the same update to a peer/peer group.
Use the undo peer route-update-interval command to restore the default value.
By default, the interval is 5 seconds for IBGP peers, and 30 seconds for EBGP peers.
Examples
# In BGP view, specify the interval for sending the same update to peer group test as 10 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-number 100
[Sysname-bgp] peer test route-update-interval 10
# In BGP-VPN instance view, specify the interval for sending the same update to peer group test as 10 seconds (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-number 100
[Sysname-bgp-vpn1] peer test route-update-interval 10
1.1.67 peer substitute-as (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } substitute-as
undo peer { group-name | ip-address } substitute-as
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
Description
Use the peer substitute-as command to replace the AS number of a peer/peer group in the AS_PATH attribute with the local AS number.
Use the undo peer substitute-as command to remove the configuration.
No AS number is replaced by default.
Examples
# In BGP view, substitute local AS number for AS number of peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 substitute-as
# In BGP-VPN instance view, substitute local AS number for AS number of peer 1.1.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 substitute-as
1.1.68 peer timer (BGP/BGP-VPN instance view)
Syntax
peer { group-name | ip-address } timer keepalive keepalive hold holdtime
undo peer { group-name | ip-address } timer
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
group-name: Name of a peer group.
ip-address: IP address of a peer.
keepalive: Keepalive interval in seconds.
holdtime: Holdtime interval in seconds.
Description
Use the undo peer timer command to restore the default.
By default, the keepalive and holdtime are 60s and 180s respectively.
Note that:
l The timer configured with this command is preferred to the timer configured with the timer command.
l The holdtime interval must be at least three times the keepalive interval.
Related commands: timer.
Examples
# In BGP view, configure the keepalive interval and holdtime interval for peer group test as 60s and 180s.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test timer keepalive 60 hold 180
# In BGP-VPN instance view, configure the keepalive interval and holdtime interval for peer group test as 60s and 180s (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test timer keepalive 60 hold 180
1.1.69 preference (BGP/BGP-VPN instance view)
Syntax
preference { external-preference internal-preference local-preference | route-policy route-policy-name }
undo preference
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
external-preference: Preference of EBGP routes.
internal-preference: Preference of IBGP routes.
local-preference: Preference of local routes.
route-policy-name: Routing policy name. Using the routing policy can set a preference for routes passing through it. The default value applies to the routes filtered out.
Description
Use the preference command to configure preferences for external, internal, and local routes.
Use the undo preference command to restore the default.
For external-preference, internal-preference and local-preference, the bigger the preference value is, the lower the preference is. The default values are 255, 255, 130 respectively.
Examples
# In BGP view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] preference 20 20 200
# In BGP-VPN instance view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] preference 20 20 200
1.1.70 reflect between-clients (BGP view)
Syntax
reflect between-clients
undo reflect between-clients
View
BGP view
Default Level
2: System level
Parameters
None
Description
Use the reflect between-clients command to enable route reflection between clients.
Use the undo reflect between-clients command to disable this function.
By default, route reflection between clients is enabled.
After a route reflector is configured, it reflects the routes of a client to other clients. If the clients of a route reflector are fully meshed, you need disable route reflection between clients to reduce routing costs.
Related commands: reflector cluster-id, peer reflect-client.
Examples
# Disable route reflection between clients.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] undo reflect between-clients
1.1.71 reflector cluster-id (BGP view)
Syntax
reflector cluster-id cluster-id
undo reflector cluster-id
View
BGP view
Default Level
2: System level
Parameters
cluster-id: Cluster ID of the route reflector, a decimal integer or an IP address.
Description
Use the reflector cluster-id command to configure the cluster ID of the route reflector.
Use the undo reflector cluster-id command to remove the configured cluster ID.
By default, each route reflector uses its router ID as the cluster ID.
Usually, there is only one route reflector in a cluster. The router ID of the route reflector is the ID of the cluster. You can configure multiple route reflectors to improve the stability of the network. In this case, using this command can configure the identical cluster ID for all the route reflectors to avoid routing loops.
Related commands: reflect between-clients, peer reflect-client.
Examples
# Set the cluster ID to 80.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] reflector cluster-id 80
1.1.72 refresh bgp
Syntax
refresh bgp { all | ip-address | group group-name | external | internal } { export | import }
View
User view
Default Level
1: Monitor level
Parameters
all: Soft-resets all BGP connections.
ip-address: Soft-resets the BGP connection to a peer.
group-name: Soft-resets connections to a peer group.
external: EBGP connection.
internal: IBGP connection.
export: Outbound soft reset.
import: Inbound soft reset.
Description
Use the refresh bgp command to perform soft reset on specified BGP connections. Using this function can refresh the BGP routing table without tearing down BGP connections and apply a newly configured routing policy.
To perform BGP soft reset, all devices in the network must support route-refresh. If a device not supporting route-refresh exists in the network, you need to configure the peer keep-all-routes command to save all routing updates before performing soft reset.
Examples
# Perform inbound BGP soft reset.
<Sysname> refresh bgp all import
1.1.73 reset bgp
Syntax
reset bgp { all | as-number | ip-address [ flap-info ] | group group-name | external | internal }
View
User view
Default Level
1: Monitor level
Parameters
all: Resets all BGP connections.
as-number: Resets BGP connections to peers in the AS.
ip-address: Specifies the IP address of a peer with which to reset the connection.
flap-info: Clears history information of routing flap.
group group-name: Specifies to reset connections with the specified BGP peer group.
external: Resets all the EBGP connections.
internal: Resets all the IBGP connections.
Description
Use the reset bgp command to reset specified BGP connections.
Examples
# Reset all the BGP connections.
<Sysname> reset bgp all
1.1.74 reset bgp dampening
Syntax
reset bgp dampening [ ip-address [ mask | mask-length ] ]
View
User view
Default Level
1: Monitor level
Parameters
ip-address: Destination IP address of a route.
mask: Mask, in dotted decimal notation.
mask-length: Mask length.
Description
Use the reset bgp dampening command to clear route dampening information and release suppressed routes.
Related commands: dampening, display bgp routing-table dampened.
Examples
# Clear damping information of route 20.1.0.0/16 and release suppressed route.
<Sysname> reset bgp dampening 20.1.0.0 255.255.0.0
1.1.75 reset bgp flap-info
Syntax
reset bgp flap-info [ regexp as-path-regexp | as-path-acl as-path-acl-number | ip-address [ mask | mask-length ] ]
View
User view
Default Level
1: Monitor level
Parameters
as-path-regexp: Clears the flap statistics of routes matching the AS path regular expression.
as-path-acl-number: Clears the flap statistics of routes matching an AS path ACL, number of which is in the range 1 to 256.
ip-address: Clears the flap statistics of a route.
mask: Network mask, in dotted decimal notation.
mask-length: Mask length.
Description
Use the reset bgp flap-info command to clear the flap statistics of routes matching the specified filter.
The flap statistics of all the routes will be cleared if no parameter is specified.
Examples
# Clear the flap statistics of all routes matching AS path ACL 10.
<Sysname> reset bgp flap-info as-path-acl 10
1.1.76 reset bgp ipv4 all
Syntax
reset bgp ipv4 all
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the reset bgp ipv4 all command to reset all the BGP connections of IPv4 unicast address family.
Examples
# Reset all the BGP connections of IPv4 unicast address family.
<Sysname> reset bgp ipv4 all
1.1.77 router-id
Syntax
router-id router-id
undo router-id
View
BGP view
Default Level
2: System level
Parameters
router-id: Router ID in IP address format.
Description
Use the router-id command to specify a router ID.
Use the undo router-id command to remove the router ID.
To run BGP, the device must have a router ID, which is an unsigned 32-bit integer, the unique ID of the device in the AS.
You can specify a router ID manually. If not, the system selects an IP address as the router ID. The selection sequence is the highest IP address among loopback interface addresses; if not available, then the highest IP address of interfaces. It is recommended to specify a loopback interface address as the router ID to enhance network reliability.
Only when the interface with the selected Router ID or the manual Router ID is deleted will the system select another ID for the device.
Examples
# Specifies the Router ID as 10.18.4.221.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] router-id 10.18.4.221
1.1.78 summary automatic
Syntax
summary automatic
undo summary automatic
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
None
Description
Use the summary automatic command to enable automatic summarization for redistributed subnets.
Use the undo summary automatic command to disable automatic summarization.
By default, automatic summarization is disabled.
Note that:
l Neither the default route nor the routes imported using the network command can be summarized automatically.
l With this feature enabled, BGP limits the subnets redistribution from IGP to reduce the size of routing table.
Examples
# In BGP view, enable automatic summarization.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] summary automatic
# In BGP-VPN instance view, enable automatic summarization (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] summary automatic
1.1.79 synchronization (BGP view)
Syntax
synchronization
undo synchronization
View
BGP view
Default Level
2: System level
Parameters
None
Description
Use the synchronization command to enable the synchronization between BGP and IGP.
Use the undo synchronization command to disable the synchronization.
The feature is disabled by default.
With this feature enabled and when a non-BGP router is responsible for forwarding packets in an AS, BGP speakers in the AS cannot advertise routing information to other ASs unless all routers in the AS know the latest routing information.
When a BGP device receives an IBGP route, it checks only whether the next hop is reachable by default. If the synchronization is enabled, the IBGP route is synchronized and advertised to EBGP peers only when the route is also advertised by IGP. Otherwise, the IBGP route cannot be advertised to EBGP peers.
Examples
# Enable the synchronization between BGP and IGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] synchronization
1.1.80 timer (BGP/BGP-VPN instance view)
Syntax
timer keepalive keepalive hold holdtime
undo timer
View
BGP view, BGP-VPN instance view
Default Level
2: System level
Parameters
keepalive: Keepalive interval in seconds, ranging from 1 to 21845.
holdtime: Holdtime interval in seconds, ranging from 3 to 65535.
Description
Use the timer command to configure BGP keepalive interval and holdtime interval.
Use the undo timer command to restore the default.
By default, BGP keepalive and holdtime intervals are 60s and 180s.
Note that:
l Timer configured using the peer timer command is preferred to the timer configured using this command.
l The holdtime interval must be at least three times the keepalive interval.
l The configured timer applies to all the BGP peers, while it becomes valid only after the corresponding BGP connections are reset.
Related commands: peer timer.
Examples
# Configure keepalive interval and holdtime interval as 60s and 180s.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] timer keepalive 60 hold 180
# In BGP-VPN instance view, configure keepalive interval and holdtime interval as 60s and 180s (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] timer keepalive 60 hold 180