- Table of Contents
-
- 07-Layer 3—IP Routing Command Reference
- 00-Preface
- 01-Basic IP routing commands
- 02-Static routing commands
- 03-RIP commands
- 04-OSPF commands
- 05-IS-IS commands
- 06-EIGRP commands
- 07-BGP commands
- 08-Policy-based routing commands
- 09-IPv6 static routing commands
- 10-RIPng commands
- 11-OSPFv3 commands
- 12-IPv6 policy-based routing commands
- 13-Routing policy commands
- 14-DCN commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-BGP commands | 1.76 MB |
advertise-between-vrf clear-reflect-attributes
bestroute nexthop-resolved tunnel
bestroute origin-as-validation
bgp apply-policy on-startup duration
bgp update-delay on-startup prefix-list
bgp update-delay wait-other-protocol
bmp server monitor all-vpn-instance
bmp server monitor current-instance
display bgp bmp server monitor-peer
display bgp dampening parameter
display bgp link-state flexible-algorithm-definition
display bgp link-state prefix-sid
display bgp link-state segment-list
display bgp link-state sr-algorithm
display bgp non-stop-routing status
display bgp peer received prefix-list
display bgp routing-table dampened
display bgp routing-table flap-info
display bgp routing-table ipv4 labeled-unicast
display bgp routing-table ipv4 labeled-unicast inlabel
display bgp routing-table ipv4 labeled-unicast outlabel
display bgp routing-table ipv4 multicast
display bgp routing-table ipv4 rtfilter
display bgp routing-table ipv4 unicast
display bgp routing-table ipv6 multicast
display bgp routing-table ipv6 unicast
display bgp routing-table ipv6 unicast inlabel
display bgp routing-table ipv6 unicast outlabel
display ttl-security statistics
extcommunity vpn-target additive
graceful-restart timer purge-time
graceful-restart timer restart
graceful-restart timer wait-for-rib
ip vpn-instance (BGP instance view)
labeled-route ignore-no-tunnel
nexthop recursive-lookup delay
nexthop recursive-lookup longest-match
nexthop recursive-lookup restrain
nexthop recursive-lookup tunnel-backup
peer advertise additional-paths best
peer advertise origin-as-validation
peer advertise-large-community
peer advertise-policy exist-policy
peer advertise-policy non-exist-policy
peer as-number (for a BGP peer group)
peer as-number (for a BGP peer)
peer capability-advertise conventional
peer capability-advertise orf non-standard
peer capability-advertise orf prefix-list
peer capability-advertise route-refresh
peer capability-advertise suppress-4-byte-as
peer ebgp-nexthop-check ignore
peer graceful-restart timer restart extra
peer nexthop-recursive-policy disable
peer path-mtu-discovery enable
reset bgp bmp server statistics
router-id (BGP-VPN instance view)
unicast-route recursive-lookup tunnel
BGP commands
additional-paths select-best
Use additional-paths select-best to set the maximum number of Add-Path optimal routes that can be advertised to all peers.
Use undo additional-paths select-best to restore the default.
Syntax
additional-paths select-best best-number
undo additional-paths select-best
Default
A maximum number of one Add-Path optimal route can be advertised to all peers.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
Predefined user roles
network-admin
Parameters
best-number: Specifies the maximum number of Add-Path optimal routes that can be advertised to all peers, in the range of 2 to 64.
Usage guidelines
The number of optimal routes cannot exceed the maximum number of Add-Path optimal routes that can be advertised to all peers.
Examples
# In BGP IPv4 unicast address family view, set the maximum number to 3 for Add-Path optimal routes that can be advertised to all peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] additional-paths select-best 3
Related commands
peer additional-paths
peer advertise additional-paths best
address-family ipv4
Use address-family ipv4 to create the BGP IPv4 unicast address family, BGP-VPN IPv4 unicast address family, BGP IPv4 RT filter address family, BGP IPv4 labeled unicast address family, BGP-VPN IPv4 labeled unicast address family, or BGP IPv4 multicast address family, and enter its view, or enter the view of the existing address family.
Use undo address-family ipv4 to remove the BGP IPv4 unicast address family, BGP-VPN IPv4 unicast address family, BGP IPv4 RT filter address family, BGP IPv4 labeled unicast address family, BGP-VPN IPv4 labeled unicast address family, or BGP IPv4 multicast address family, and all its configurations.
In BGP instance view:
address-family ipv4 [ labeled-unicast | multicast | rtfilter | unicast ]
undo address-family ipv4 [ labeled-unicast | multicast | rtfilter | unicast ]
In BGP-VPN instance view:
address-family ipv4 [ labeled-unicast | unicast ]
undo address-family ipv4 [ labeled-unicast | unicast ]
No BGP IPv4 unicast address family, BGP-VPN IPv4 unicast address family, BGP IPv4 RT filter address family, BGP IPv4 labeled unicast address family, BGP-VPN IPv4 labeled unicast address family, or BGP IPv4 multicast address family exists.
BGP-VPN instance view
network-admin
labeled-unicast: Specifies the BGP IPv4 labeled unicast address family. If this command is executed with the labeled-unicast keyword in BGP instance view, it places you into BGP IPv4 labeled unicast address family view. If this command is executed with the labeled-unicast keyword in BGP-VPN instance view, it places you into BGP-VPN IPv4 labeled unicast address family view.
multicast: Specifies the IPv4 multicast address family.
rtfilter: Specifies the BGP IPv4 RT filter address family.
unicast: Specifies the IPv4 unicast address family. If this command is executed with the unicast keyword in BGP instance view, it places you into BGP IPv4 unicast address family view. If this command is executed with the unicast keyword in BGP-VPN instance view, it places you into BGP-VPN IPv4 unicast address family view.
Configurations made in BGP IPv4 unicast address family view apply only to the BGP IPv4 unicast routes and peers of the public network.
Configurations made in BGP-VPN IPv4 unicast address family view apply only to the BGP IPv4 unicast routes and peers of the specified VPN instance.
Configurations made in BGP IPv4 labeled unicast address family view apply only to the BGP IPv4 labeled unicast routes and peers of the public network.
Configurations made in BGP-VPN IPv4 labeled unicast address family view apply only to the BGP IPv4 labeled unicast routes and peers of the specified VPN instance.
Configurations made in BGP IPv4 multicast address family view apply only to the BGP IPv4 multicast routes and peers.
Configurations made in BGP IPv4 RT filter address family view apply only to the BGP IPv4 RT filter routes and peers.
By default, the unicast keyword applies if you do not specify the rtfilter, multicast, or unicast keyword.
You can perform either of the following tasks to advertise IPv4 labeled unicast routes to a BGP peer:
· Execute the peer label-route-capability command in BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.
· Create the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family and advertise routes in the address family.
The above two tasks are mutually exclusive. Executing the peer label-route-capability command in BGP IPv4 unicast address family view is mutually exclusive with the creation of the BGP IPv4 labeled unicast address family. Executing the peer label-route-capability command in BGP-VPN IPv4 unicast address family view is mutually exclusive with the creation of the BGP-VPN IPv4 labeled unicast address family.
# In BGP instance view, create the BGP IPv4 unicast address family and enter its view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4]
address-family ipv6
Use address-family ipv6 to create the BGP IPv6 unicast address family, BGP-VPN IPv6 unicast address family, or BGP IPv6 multicast address family, and enter its view, or enter the view of the existing address family.
Use undo address-family ipv6 to remove the BGP IPv6 unicast address family, BGP-VPN IPv6 unicast address family, or BGP IPv6 multicast address family, and all its configurations.
In BGP instance view:
address-family ipv6 [ multicast | unicast ]
undo address-family ipv6 [ multicast | unicast ]
In BGP-VPN instance view:
address-family ipv6 [ unicast ]
undo address-family ipv6 [ unicast ]
No BGP IPv6 unicast address family, BGP-VPN IPv6 unicast address family, or BGP IPv6 multicast address family exists.
BGP-VPN instance view
network-admin
unicast: Specifies the IPv6 unicast address family. If this command is executed with the unicast keyword in BGP instance view, it places you into BGP IPv6 unicast address family view. If this command is executed with the unicast keyword in BGP-VPN instance view, it places you into BGP-VPN IPv6 unicast address family view.
multicast: Specifies the IPv6 multicast address family.
Configurations made in BGP IPv6 unicast address family view apply only to the BGP IPv6 unicast routes and peers of the public network.
Configurations made in BGP-VPN IPv6 unicast address family view apply only to the BGP IPv6 unicast routes and peers of the specified VPN instance.
Configurations made in BGP IPv6 multicast address family view apply only to the BGP IPv6 multicast routes and peers.
By default, the unicast keyword is used if you do not specify the multicast or unicast keyword.
# In BGP instance view, create the BGP IPv6 unicast address family and enter its view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv6 unicast
[Sysname-bgp-default-ipv6]
address-family link-state
Use address-family link-state to create the BGP LS address family and enter its view, or enter the view of the existing address family.
Use undo address-family link-state to remove the BGP LS address family and all its configurations.
Syntax
address-family link-state
undo address-family link-state
Default
No BGP LS address family exists.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
Configurations made in BGP LS address family view apply only to the BGP LS routes and peers of the public network.
Examples
# In BGP instance view, create the BGP LS address family and enter its view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family link-state
[Sysname-bgp-default-ls]
address-family link-state vpn
Use address-family link-state vpn to create the BGP-VPN LS address family and enter its view, or enter the view of the existing address family.
Use undo address-family link-state vpn to remove the BGP-VPN LS address family and all its configurations.
Syntax
address-family link-state vpn
undo address-family link-state vpn
Default
No BGP-VPN LS address family exists.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
BGP LS address family is used to receive and advertise BGP LS information of the public network. BGP-VPN LS address family is used to receive and advertise BGP LS information of all VPNs.
Configurations made in BGP-VPN LS address family view apply only to BGP-VPN LS routes and peers of the public network.
The BGP LS address family and BGP-VPN LS address family must belong to the same BGP instance.
Examples
# In BGP instance view, create the BGP-VPN LS address family and enter its view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family link-state vpn
[Sysname-bgp-default-ls-vpn]
advertise-between-vrf clear-reflect-attributes
Use advertise-between-vrf clear-reflect-attributes to enable BGP to clear the CLUSTER_LIST and ORIGINATOR_ID attributes of a route before forwarding the route.
Use undo advertise-between-vrf clear-reflect-attributes to restore the default.
Syntax
advertise-between-vrf clear-reflect-attributes
undo advertise-between-vrf clear-reflect-attributes
Default
BGP does not clear the CLUSTER_LIST and ORIGINATOR_ID attributes of a route before forwarding the route.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
This command might cause routing loops. Before executing the command, make sure you understand the potential impact on the network.
In route reflection scenarios, BGP compares the CLUSTER_LIST and ORIGINATOR_ID attributes of routes to avoid routing loops. BGP discards a route if its CLUSTER_LIST attribute contains the local CLUSTER_ID or its ORIGINATOR_ID attribute is the same as the local router ID.
This command applies when BGP forwards a route between the public network and a VPN instance or between different VPN instances. In such a scenario, the route reflection attributes carried by the route are meaningless. To avoid traffic loss, execute this command to enable BGP to clear the CLUSTER_LIST and ORIGINATOR_ID attributes of a route before forwarding the route.
After you execute this command, BGP re-advertises all routes to all peers and peer groups.
Examples
# In BGP instance view, enable BGP to clear the CLUSTER_LIST and ORIGINATOR_ID attributes of a route before forwarding the route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] advertise-between-vrf clear-reflect-attributes
advertise-rib-active
Use advertise-rib-active to enable BGP to advertise only the optimal BGP routes in the IP routing table.
Use undo advertise-rib-active to restore the default.
advertise-rib-active
undo advertise-rib-active
In BGP instance view, BGP advertises optimal routes in the BGP routing table, regardless of whether they are optimal in the IP routing table. In other views, the setting is the same as that in BGP instance view.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
network-admin
The advertise-rib-active command does not apply to the following routes:
· Routes redistributed by the import-route command.
· Routes advertised by the network command.
· Default routes redistributed by the default-route imported command.
· VPNv4 routes.
· VPNv6 routes.
· IPv4 multicast routes.
· IPv6 multicast routes.
This command takes effect only on the routes generated after you execute this command. To apply this command to existing routes, use the reset bgp command to reset BGP sessions.
The setting in BGP unicast address family view applies when it is different from that in BGP instance view.
This command is mutually exclusive with the routing-table bgp-rib-only command.
# In BGP instance view, enable BGP to advertise optimal routes in the IP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] advertise-rib-active
aggregate
Use aggregate to create a summary route in the BGP routing table.
Use undo aggregate to remove a summary route from the BGP routing table.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view:
aggregate ipv4-address { mask-length | mask } [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *
undo aggregate ipv4-address { mask-length | mask }
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *
undo aggregate ipv6-address prefix-length
No summary routes are configured.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
ipv4-address: Specifies an IPv4 summary address.
mask-length: Specifies a mask length for the IPv4 summary address, in the range of 0 to 32.
mask: Specifies a mask for the IPv4 summary address, in dotted decimal notation.
ipv6-address: Specifies an IPv6 summary address.
prefix-length: Specifies a prefix length for the IPv6 summary address, in the range of 0 to 128.
as-set: Enables the AS_PATH attribute of the summary route to contain the AS path information for all summarized routes. The AS_PATH attribute is of the AS_SET type that requires no sequence when arranging AS numbers. If you do not specify this keyword, the AS_PATH attribute of the summary route contains only the AS number of the local router.
attribute-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set attributes for the summary route.
detail-suppressed: Advertises only the summary route. If you do not specify this keyword, BGP advertises both the summary route and the more specific routes.
origin-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to select routes to be summarized.
suppress-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter more specific routes to be advertised. Routes permitted by the specified routing policy are not advertised. Routes denied by the specified routing policy are advertised.
This command creates a summary route. If the BGP routing table has routes whose destination addresses fall within the specified network, the summary route is added to the BGP routing table. For example, if two routes 10.1.1.0/24 and 10.1.2.0/24 exist in the BGP routing table, configuring the aggregate 10.1.0.0 16 command creates a summary route 10.1.0.0/16.
If the summarized routes have different ORIGIN attributes, the summary route selects the ORIGIN attribute in the sequence of INCOMPLETE, EGP, and IGP. For example, if the ORIGIN attributes of the summarized routes include INCOMPLETE and IGP, the ORIGIN attribute of the summary route is INCOMPLETE.
The COMMUNITY attribute of the summary route includes all the COMMUNITY (or extended community) attribute values if the routes have the following details:
· Summarized routes have different COMMUNITY (or extended community) attribute values.
· The summary route does not have the ATOMIC_AGGREGATE attribute.
Table 1 Functions of the keywords
Keywords |
Function |
as-set |
Enables the summary route to carry the AS path information for all summarized routes. This feature can help avoid routing loops. However, if many routes are summarized and are changed frequently, do not specify this keyword. This configuration causes the summary route to flap with the more specific routes. |
attribute-policy |
Sets attributes except the AS-PATH attribute for the summary route. The peer route-policy command can achieve the same purpose. |
detail-suppressed |
Disables advertisement of all more specific routes. To disable advertisement of some more specific routes, use the suppress-policy keyword or the peer filter-policy command. |
origin-policy |
Summarizes only routes matching a routing policy. If the destination address of a route falls within the summary network but does not match the routing policy, the route is not summarized. It is not controlled by the detail-suppressed and suppress-policy keywords. There is no need to configure apply clauses for the routing policy applied by the origin-policy keyword because they do not take effect. |
suppress-policy |
Disables advertisement of some more specific routes filtered by a routing policy. The routing policy uses if-match clauses to filter routes. There is no need to configure apply clauses for the routing policy applied by the suppress-policy keyword because they do not take effect. |
# In BGP IPv4 unicast address family view, create summary route 1.1.0.0/16 in the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] aggregate 1.1.0.0 255.255.0.0
display bgp routing-table ipv4 multicast
display bgp routing-table ipv4 unicast
display bgp routing-table ipv6 multicast
display bgp routing-table ipv6 unicast
summary automatic
apply-label per-route pop-go
Use apply-label per-route pop-go to enable the egress node of a BGP LSP to forward packets based on the ILM table.
Use undo apply-label per-route pop-go to restore the default.
Syntax
apply-label per-route pop-go
undo apply-label per-route pop-go
Default
The egress node of a BGP LSP forwards packets based on the FIB.
Views
BGP IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
Predefined user roles
network-admin
Usage guidelines
After you execute this command, when the local device receives data packets encapsulated with a label from BGP LSPs, it performs the following steps:
1. Looks up the ILM table for the outgoing interface based on the label value.
2. Pops the label, and then forwards the data packets through the outgoing interface.
Examples
# Enable the egress node of a BGP LSP to forward packets based on the ILM table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] apply-label per-route pop-go
as-notation dotted
Use as-notation dotted to display 4-byte AS numbers in dotted notation.
Use undo as-notation dotted to restore the default.
Syntax
as-notation dotted
undo as-notation dotted
Default
Four-byte AS numbers are displayed in decimal integer notation.
Views
System view
Predefined user roles
network-admin
Usage guidelines
By default, a BGP display command uses decimal integer notation to represent 4-byte AS numbers. A 4-byte AS number in decimal integer notation tends to be long and not reader-friendly. To resolve this issue, use this command to display AS numbers in dotted notation.
The dotted notation refers to a method of representing AS numbers in X.Y format. The value range for argument Y is 0 to 65535, and the value range for a dotted AS number is 0.1 to 65535.65535. To convert an AS number from dotted notation to decimal integer notation, use the following formula: integer= X x 65536 + Y. For example, if a dotted AS number is 2.1, its decimal integer notation is (2 x 65536 + 1 =131073).
After you use this command, the AS path list can match only 4-byte AS numbers in dotted notation. To avoid route filtering failure, make sure that the AS path list used in a route filtering policy is configured to match 4-byte AS numbers in dotted notation.
This command does not take effect on the 4-byte AS numbers in the system configuration file.
Examples
# Display 4-byte AS numbers in dotted notation.
<Sysname> system-view
[Sysname] as-notation dotted
as-path-limit
Use as-path-limit to set an AS number quantity threshold.
Use undo as-path-limit to restore the default.
Syntax
as-path-limit [ as-numbers ]
undo as-path-limit
Default
No AS number quantity threshold is configured.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
as-numbers: Specifies an AS number quantity threshold in the range of 1 to 2000. The default threshold is 255.
Usage guidelines
This command enables BGP to filter routes based on the quantity of AS numbers contained in the AS_PATH attribute. BGP will discard incoming and outgoing routes, and withdraw routes that have been advertised if they exceed the specified quantity threshold.
This command does not take effect on routes that have been received or on local summary routes.
Examples
# Set the AS number quantity threshold to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] as-path-limit 100
balance
Use balance to enable load balancing and set the maximum number of BGP ECMP routes for load balancing.
Use undo balance to disable load balancing.
balance [ ebgp | eibgp | ibgp ] number
undo balance [ ebgp | eibgp | ibgp ]
Load balancing is disabled.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
ebgp: Enables load balancing over EBGP routes.
eibgp: Enables load balancing between EBGP and IBGP routes.
ibgp: Enables load balancing over IBGP routes.
number: Specifies the maximum number of BGP ECMP routes for load balancing. When it is set to 1, load balancing is disabled.
Unlike IGP, BGP has no explicit metric for making load balancing decision. Instead, it implements load balancing by modifying route selection rules.
If multiple BGP routes destined for a network meet the following conditions, the device selects the specified number of routes for load balancing:
· The routes have the same ORIGIN, LOCAL_PREF, and MED attributes.
· The routes meet one of the following requirements on the AS_PATH attribute:
¡ If the balance as-path-neglect command is configured, the routes can have different AS_PATH attributes.
¡ If only the balance as-path-relax command is configured, the routes can have different AS_PATH attributes, but the length of the AS_PATH attributes must be the same.
¡ If neither the balance as-path-neglect nor the balance as-path-relax command is configured, the routes must have the same AS_PATH attribute.
· The next hops of the routes meet one of the following requirements on IGP metrics:
¡ If the bestroute igp-metric-ignore command is not configured, the next hops of the routes must have the same IGP metric value.
¡ If the bestroute igp-metric-ignore command is configured, the next hops of the routes can have different IGP metric values.
· The routes have the same MPLS label assignment status (labeled or not labeled).
BGP advertises the routes used for load balancing to IBGP peers as follows:
· Without the Add-Path feature configured, BGP advertises only the optimal route among the routes used for load balancing and sets the local device IP as the next hop of that optimal route.
· With the Add-Path feature configured, BGP performs the following tasks:
¡ Advertises the routes used for load balancing. The number of routes that BGP can advertise equals the maximum number of Add-Path optimal routes that can be advertised.
¡ Sets the local device IP as the next hop of the optimal route among the advertised routes.
If you do not specify the ibgp, eibgp, or ebgp keyword, this command enables load balancing over EBGP routes and IBGP routes, but not between EBGP and IBGP routes.
To remove the configuration of the balance eibgp number command, you must execute the undo balance eibgp command.
After you execute the balance eibgp number command, the balance [ ebgp | ibgp ] number command cannot be executed; and vice versa.
# In BGP IPv4 unicast address family view, enable load balancing and set the maximum number of BGP ECMP routes used for load balancing to 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] balance 2
balance as-path-neglect
balance as-path-relax
bestroute igp-metric-ignore
balance as-path-neglect
Use balance as-path-neglect to enable BGP to ignore the AS_PATH attribute when it implements load balancing.
Use undo balance as-path-neglect to restore the default.
balance as-path-neglect
undo balance as-path-neglect
BGP does not ignore the AS_PATH attribute when it implements load balancing.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
For BGP to implement load balancing over routes with different AS_PATH attributes, you must use this command together with the balance command.
After this command is executed, BGP ignores the AS_PATH attributes in the routes for load balancing and changes the attributes of the advertised routes to those of the optimal route. The operations might cause routing loops. In addition, this command might also affect the NetStream data. Therefore, use this command with caution.
# In BGP IPv4 unicast address family view, enable BGP to ignore the AS_PATH attribute when it implements load balancing.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] balance as-path-neglect
balance
balance as-path-relax
Use balance as-path-relax to enable load balancing for routes that have different AS_PATH attributes of the same length.
Use undo balance as-path-relax to restore the default.
Syntax
balance as-path-relax [ ebgp | ibgp ]
undo balance as-path-relax [ ebgp | ibgp ]
Default
BGP cannot perform load balancing for routes that have different AS_PATH attributes of the same length.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
ebgp: Enables load balancing for EBGP routes that have different AS_PATH attributes of the same length.
ibgp: Enables load balancing for IBGP routes that have different AS_PATH attributes of the same length.
Usage guidelines
For BGP to perform load balancing for routes with different AS_PATH attributes of the same length, you must use this command together with the balance command.
If you configure both the balance as-path-relax and balance as-path-neglect commands, the balance as-path-neglect command takes effect.
If you do not specify the ibgp or ebgp keyword when you execute this command, the following rules apply:
· BGP performs load balancing for EBGP routes that have different AS_PATH attributes of the same length.
· BGP performs load balancing for IBGP routes that have different AS_PATH attributes of the same length.
· BGP does not perform load balancing between EBGP and IBGP routes that have different AS_PATH attributes of the same length.
After this command is executed, BGP ignores the AS_PATH attributes in the routes for load balancing and changes the attributes of the advertised routes to those of the optimal route. This might cause routing loops and affect NetStream statistics. Therefore, use this command with caution.
Examples
# In BGP IPv4 unicast address family view, enable load balancing for EBGP routes that have different AS_PATH attributes of the same length.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] balance as-path-relax ebgp
balance igp-metric-ignore
Use balance igp-metric-ignore to enable BGP to use routes with different IGP metrics to the same next hop for load balancing.
Use undo balance igp-metric-ignore to restore the default.
Syntax
balance igp-metric-ignore
undo balance igp-metric-ignore
Default
BGP cannot use routes with different IGP metrics to the same next hop to implement load balancing.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Usage guidelines
After you use the balance and balance igp-metric-ignore commands together, BGP will ignore the IGP metrics of routes and can use routes with different IGP metrics for load balancing.
Both the balance igp-metric-ignore and bestroute igp-metric-ignore commands can enable BGP to use routes with different IGP metrics for load balancing. The two commands are different as follows:
· The balance igp-metric-ignore command can be used only for load balancing. It does not change the rules of optimal route selection. BGP still compares the IGP metric value of each route during optimal route selection.
· The bestroute igp-metric-ignore command takes effect on optimal route selection and route selection for load balancing.
Examples
# In BGP-VPN IPv4 unicast address family view, enable BGP to use routes with different IGP metrics to the same next hop for load balancing.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] address-family ipv4 unicast
[Sysname-bgp-default-ipv4-vpn1] balance igp-metric-ignore
Related commands
balance
bestroute igp-metric-ignore
bestroute as-path-neglect
Use bestroute as-path-neglect to configure BGP to ignore the AS_PATH attribute during optimal route selection.
Use undo bestroute as-path-neglect to restore the default.
bestroute as-path-neglect
undo bestroute as-path-neglect
BGP considers the AS_PATH attribute during optimal route selection.
BGP-VPN instance view
network-admin
# In BGP instance view, ignore AS_PATH during optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute as-path-neglect
bestroute compare-med
Use bestroute compare-med to enable MED comparison for routes on a per-AS basis.
Use undo bestroute compare-med to restore the default.
bestroute compare-med
undo bestroute compare-med
MED comparison for routes on a per-AS basis is disabled.
BGP-VPN instance view
network-admin
By default, BGP does not compare MEDs for routes from the same AS. When a router learns a new route, it compares the route with the optimal route in its BGP routing table. If the new route is more optimal, it becomes the optimal route in the BGP routing table. In this way, route learning sequence might affect optimal route selection.
To solve the selection problem, the router puts routes received from the same AS into a group when the bestroute compare-med command is configured. The router then selects the route with the lowest MED from the same group, and compares routes from different groups.
# In BGP instance view, enable MED comparison for routes on a per-AS basis.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute compare-med
bestroute igp-metric-ignore
Use bestroute igp-metric-ignore to configure BGP to ignore IGP metrics during optimal route selection.
Use undo bestroute igp-metric-ignore to restore the default.
bestroute igp-metric-ignore
undo bestroute igp-metric-ignore
BGP considers IGP metrics during optimal route selection, and selects the route with the smallest IGP metric as the optimal route.
BGP-VPN instance view
network-admin
# In BGP instance view, ignore IGP metrics during optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute igp-metric-ignore
bestroute ipv6-nexthop
Use bestroute ipv6-nexthop to enable BGP to prefer routes with an IPv6 next hop during optimal route selection.
Use undo bestroute ipv6-nexthop to restore the default.
Syntax
bestroute ipv6-nexthop
undo bestroute ipv6-nexthop
Default
BGP prefers routes with an IPv4 next hop during optimal route selection.
Views
BGP EVPN address family view
Predefined user roles
network-admin
Usage guidelines
On an EVPN network, the nexthop type of routes to the same destination might be different. Some next hops are IPv4 and the others are IPv6. In this case, BGP prefer routes with an IPv4 next hop. To forward VXLAN packets through routes with an IPv6 next hop, execute this command.
Examples
# In BGP EVPN address family view, enable BGP to prefer routes with an IPv6 next hop during optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family l2vpn evpn
[Sysname-bgp-default-evpn] bestroute ipv6-nexthop
bestroute med-confederation
Use bestroute med-confederation to enable MED comparison for routes received from confederation peers.
Use undo bestroute med-confederation to restore the default.
bestroute med-confederation
undo bestroute med-confederation
MED comparison is disabled for routes received from confederation peers.
BGP-VPN instance view
network-admin
This command enables BGP to compare the MEDs of routes received from confederation peers. However, if a route from a confederation peer has an AS number that does not belong to the confederation, BGP does not compare the route with other routes. For example, a confederation has three AS numbers 65006, 65007, and 65009. BGP receives three routes from different confederation peers. The AS_PATH attributes of these routes are 65006 65009, 65007 65009, and 65008 65009, and the MED values of them are 2, 3, and 1. Because the third route's AS_PATH attribute contains AS number 65008, which does not belong to the confederation, BGP does not compare it with other routes. As a result, the first route becomes the optimal route.
# In BGP instance view, enable MED comparison for routes received from confederation peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute med-confederation
bestroute nexthop-resolved tunnel
Use bestroute nexthop-resolved tunnel to allow a route that has only a tunnel next hop to participate in optimal route selection.
Use undo bestroute nexthop-resolved to restore the default.
Syntax
bestroute nexthop-resolved tunnel
undo bestroute nexthop-resolved
Default
A route can participate in optimal route selection only when it have an IP next hop.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Examples
# In BGP instance view, allow a route that has only a tunnel next hop to participate in optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute nexthop-resolved tunnel
bestroute nexthop-type
Use bestroute nexthop-type to perform optimal route selection based on the next hop type.
Use undo bestroute nexthop-type to restore the default.
Syntax
bestroute nexthop-type { ip | tunnel } [ preferred ]
undo bestroute nexthop-type
Default
The next hop type of a BGP route does not affect optimal route selection.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
ip: Prefers routes that have an IP next hop.
tunnel: Prefers routes that have a tunnel next hop.
preferred: Configures BGP to use the rule configured by this command to continue route selection if it fails to select an optimal route by using the preferred-value selection rule. If you do not specify the preferred keyword when executing this command, BGP uses the rule configured by this command to continue route selection if it fails to select an optimal route by using the EBGP peer selection rule.
Usage guidelines
You can execute this command to enable BGP to prefer routes that have a tunnel next hop or routes that have an IP next hop.
The next hop of a BGP route can be the following types of tunnels:
· LSP or MPLS TE tunnel.
· Tunnel interface established by GRE or VXLAN.
· SR-MPLS TE policy or SRv6 TE policy tunnel.
The next hop tunnel of a BGP route is uniquely identified by its tunnel ID. You can execute the display bgp routing-table command to view the next hop tunnel of a BGP route.
By default, a route can participate in optimal route selection only when it have an IP next hop. A route that has only a tunnel next hop cannot participate in optimal route selection even if you have executed the bestroute nexthop-type tunnel command. To enable such a route to participate in optimal route selection, execute the bestroute nexthop-resolved tunnel command.
Examples
# In BGP instance view, configure BGP to prefer routes that have a tunnel next hop.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bestroute nexthop-type tunnel
Related commands
bestroute nexthop-resolved tunnel
bestroute origin-as-validation
Use bestroute origin-as-validation to apply the BGP RPKI validation state to optimal route selection.
Use undo bestroute origin-as-validation to restore the default.
Syntax
bestroute origin-as-validation [ allow-invalid ]
undo bestroute origin-as-validation
Default
BGP ignores the BGP RPKI validation state during optimal route selection.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
allow-invalid: Allows routes with a validation state of Invalid to participate in optimal route selection. If you do not specify this keyword, routes with a validation state of Invalid cannot participate in optimal route selection.
Usage guidelines
If multiple routes to the same destination are available, BGP first discards routes with unreachable next hops, and then selects the optimal route according to the following rules:
· Routes with a BGP RPKI validation state of Valid takes precedence over routes with a validation state of Not-found or Invalid.
· Routes with a BGP RPKI validation state of Not-found takes precedence over routes with a validation state of Invalid.
· Routes without a BGP RPKI validation state have the same priority as routes with a BGP RPKI validation state of Not-found.
Examples
# In BGP IPv4 unicast address family view, apply the BGP RPKI validation state to optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] bestroute origin-as-validation
bestroute router-id-ignore
Use bestroute router-id-ignore to configure BGP to ignore router IDs during optimal route selection.
Use undo bestroute router-id-ignore to restore the default.
Syntax
bestroute router-id-ignore
undo bestroute router-id-ignore
Default
BGP compares router IDs during optimal route selection. If multiple routes to the same destination are available, BGP selects the route with the smallest router ID as the optimal route.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Examples
# In BGP instance view, configure BGP to ignore router IDs during optimal route selection.
<Sysname> system-view
[Sysname] bgp 1
[Sysname-bgp-default] bestroute router-id-ignore
Related commands
bestroute as-path-neglect
bestroute igp-metric-ignore
bgp
Use bgp to enable a BGP instance and enter its view.
Use undo bgp to disable a BGP instance.
bgp as-number [ instance instance-name ]
undo bgp [ as-number [ instance instance-name ] ] [ force ]
BGP is disabled and no BGP instances exist.
network-admin
as-number: Specifies a local AS by its number, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command enables the BGP instance default.
force: Forcibly shuts down the BGP process. This keyword might cause errors. Use it with caution.
A router supports 4-byte AS numbers and dotted-decimal AS numbers.
A BGP router can run multiple BGP processes. Each BGP process corresponds to a BGP instance. BGP maintains an independent routing table for each BGP instance.
You can create multiple public address families for a BGP instance. However, each public address family (except for IPv4 unicast address family, IPv6 unicast address family, VPNv4 address family, VPNv6 address family, VPNv4 flowspec address family, VPNv6 flowspec address family, IPv4 RT filter address family, IPv4 SR policy address family, and IPv6 SR policy address family) can belong to only one BGP instance.
You can create multiple VPN instances for a BGP instance, and each VPN instance can have multiple address families. A VPN instance can belong to only one BGP instance.
The IPv4 and IPv6 multicast address families must belong to the same BGP instance.
Different BGP instances can have the same AS number but cannot have the same name.
# Enable BGP instance default, set the local AS number to 100, and enter BGP instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default]
# Enable BGP instance default, set the local AS number to 1.1, and enter BGP instance view.
<Sysname> system-view
[Sysname] bgp 1.1
[Sysname-bgp-default]
# Forcibly shut down the BGP process.
<Sysname> system-view
[Sysname] undo bgp 100 force
If you forcibly delete the BGP process, the process might be corrupted. Continue? [Y/N]:n
bgp apply-policy on-startup duration
Use bgp apply-policy on-startup duration to specify the period after reboot within which the startup policy is effective.
Use undo bgp apply-policy on-startup duration to restore the default.
Syntax
bgp apply-policy on-startup duration seconds
undo bgp apply-policy on-startup duration
Default
The startup policy does not take effect.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
seconds: Specifies the period after reboot within which the startup policy is effective, in the range of 0 to 3600 seconds. The number of 0 indicates that the startup policy is effective permanently.
Usage guidelines
This command allows BGP to send route updates with the attribute values specified in the startup policy within the specified period after reboot. Then, BGP can forward traffic through other devices to avoid traffic loss caused by reboot.
Examples
# In BGP instance view, set the period after reboot to 100 seconds within which the startup policy is effective.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bgp apply-policy on-startup duration 100
Related commands
bgp policy on-startup med
bgp policy on-startup med
Use bgp policy on-startup med to set the MED attribute value in the startup policy.
Use undo bgp policy on-startup med to restore the default.
Syntax
bgp policy on-startup med med-value
undo bgp policy on-startup med
Default
The MED attribute value in the startup policy is 4294967295.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
med-value: Specifies the MED attribute value in the startup policy, in the range of 0 to 4294967295.
Usage guidelines
After you configure this command, BGP uses the specified MED attribute value to send route updates within the specified period after reboot.
Examples
# In BGP instance view, set the MED attribute value in the startup policy to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bgp policy on-startup med 100
Related commands
bgp apply-policy on-startup
bgp update-delay on-startup
Use bgp update-delay on-startup to configure BGP to delay sending route updates after the device restarts and the BGP process recovers.
Use undo bgp update-delay on-startup to restore the default.
bgp update-delay on-startup seconds
undo bgp update-delay on-startup
BGP sends route updates to established peers immediately after the device restarts and the BGP process recovers.
network-admin
seconds: Specifies the delay time in the range of 0 to 3600 seconds. The value of 0 indicates that BGP does not send any route updates after the device restarts and the BGP process recovers.
After you execute this command, BGP redistributes all routes from other neighbors after the device restarts and the BGP process recovers, selects the optimal route, and then advertises it. Using this command can reduce traffic loss caused by reboot.
For BGP EVPN routes, this feature takes effect only on IP prefix routes and MAC/IP advertisement routes that carry IP routing information.
# In BGP instance view, configure BGP to delay sending route updates after the device restarts and the BGP process recovers, and set the delay time to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bgp update-delay on-startup 100
bgp update-delay on-startup prefix-list
bgp update-delay on-startup prefix-list
Use bgp update-delay on-startup prefix-list to configure BGP to immediately send route updates for routes that match a prefix list.
Use undo bgp update-delay on-startup prefix-list to restore the default.
bgp update-delay on-startup prefix-list ipv4-prefix-list-name
undo bgp update-delay on-startup prefix-list
No prefix list is specified to filter routes.
network-admin
ipv4-prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters.
After the bgp update-delay on-startup command is configured, BGP delays sending updates for all routes on reboot. For BGP to immediately send updates for the specified routes, execute the bgp update-delay on-startup prefix-list command.
This command is available only to IPv4 prefix lists.
# In BGP instance view, configure BGP to send updates 100 seconds after the device restarts and the BGP process recovers and immediately send updates for routes that match prefix list aaa.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bgp update-delay on-startup 100
[Sysname-bgp-default] bgp update-delay on-startup prefix-list aaa
bgp update-delay on-startup
bgp update-delay wait-other-protocol
Use bgp update-delay wait-other-protocol to configure the time that BGP must wait for other protocols to complete GR or NSR after BGP completes GR or NSR.
Use undo bgp update-delay wait-other-protocol to restore the default.
Syntax
bgp update-delay wait-other-protocol seconds
undo bgp update-delay wait-other-protocol
Default
After BGP completes GR or NSR, it must wait a maximum of 300 seconds for other protocols to complete GR or NSR.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
seconds: Specifies the time that BGP must wait for other protocols to complete GR or NSR after BGP completes GR or NSR. The value range is 60 to 1200 seconds.
Usage guidelines
After BGP completes GR or NSR, it advertises the updated routes. If the routes rely on other protocols, for example, redistributed OSPF routes, BGP starts a wait timer for the other protocols to complete GR or NSR. This ensures that incorrect and unreachable routes are not advertised. When the following conditions exist, BGP might advertise incomplete routes after completing GR or NSR:
· The routes rely on other protocols.
· BGP maintains a large amount of routing information. In this case, BGP and the protocols take a long time to complete GR or NSR.
For BGP to correctly advertise the routes after BGP and the protocols complete GR or NSR, set a larger wait timer for BGP.
Examples
# Configure BGP to wait a maximum of 600 seconds for other protocols to complete GR or NSR after BGP completes GR or NSR.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bgp update-delay wait-other-protocol 600
Related commands
bgp update-delay on-startup
bgp-policy accounting
Use bgp-policy accounting to enable BGP policy accounting on an interface.
Use undo bgp-policy accounting to disable BGP policy accounting on an interface.
bgp-policy accounting { input | output } * [ source ]
undo bgp-policy accounting { input | output } * [ source ]
BGP policy accounting is disabled on an interface.
network-admin
input: Enables BGP policy accounting for incoming traffic.
output: Enables BGP policy accounting for outgoing traffic.
source: Classifies IP traffic based on the source IP address. If you do not specify this keyword, the command classifies IP traffic based on the destination IP address.
BGP policy accounting provides the following functionalities:
· Classifies IP traffic by BGP path attributes such as NEXT HOP, COMMUNITY, and AS_PATH.
· Assigns an index to each class of traffic.
· Collects statistics based on indexes.
BGP policy accounting supports the following traffic classification policies:
· Source IP address-based policy—BGP searches routes to the source address, obtains the traffic index for the routes, and collects statistics for the traffic identified by the index.
· Destination IP address-based policy—BGP searches routes to the destination address, obtains the traffic index for the routes, and collects statistics for the traffic identified by the index.
Only the following cards support this feature:
CSPEX-1304X, CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X, RX-SPE200, CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L, CSPEX-1802X, CSPEX-1802XA, CSPEX-1812X-E, CSPEX-2304X-G, CEPC-CQ8L, CEPC-CQ8LA, CEPC-CQ16L1, CSPEX-1502XA, RX-SPE200-E
The IP traffic classification rule configured for BGP policy accounting takes effect if you perform the following tasks on the same device:
· Enable BGP policy accounting with the source keyword specified.
· Enable the QPPB feature with the destination keyword specified.
Configure the same traffic classification policy on the interfaces when you enable BGP policy accounting for outgoing traffic on the interfaces of a following card:
CSPEX-1304X,CSPEX-1404X, CSPEX-1502X, CSPEX-1504X, CSPEX-1504XA, CSPEX-1602X, CSPEX-1602XA, CSPEX-1804X, CSPEX-1512X, CSPEX-1612X, CSPEX-1812X, RX-SPE200, CEPC-XP4LX, CEPC-XP24LX, CEPC-XP48RX, CEPC-CP4RX, CEPC-CP4RXA, CEPC-CP4RX-L
# Enable BGP policy accounting based on source IP address for traffic on Ten-GigabitEthernet 3/1/1.
[Sysname] interface ten-gigabitethernet 3/1/1
[Sysname-Ten-GigabitEthernet3/1/1] bgp-policy accounting input output source
aggregate
apply traffic-index
import-route
network
peer default-route-advertise
peer route-policy
bmp server
Use bmp server to create a BGP monitoring protocol (BMP) server and enter BMP server view.
Use undo bmp server to remove a BMP server and all its configurations.
Syntax
bmp server server-number
undo bmp server server-number
Default
No BMP servers exist.
Views
System view
Predefined user roles
network-admin
Parameters
server-number: Specifies a BMP server by its number in the range of 1 to 8.
Examples
# Create BMP server 5 and enter its view.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5]
bmp server monitor all-vpn-instance
Use bmp server monitor all-vpn-instance to enable the specified BMP server to monitor all peers in all BGP-VPN instances.
Use undo bmp server monitor all-vpn-instance to remove the configuration.
Syntax
bmp server server-number monitor all-vpn-instance [ route-mode { adj-rib-in { pre-policy | post-policy | both } | adj-rib-out { pre-policy | post-policy | both } } * ]
undo bmp server server-number monitor all-vpn-instance [ route-mode { adj-rib-in { pre-policy | post-policy | both } | adj-rib-out { pre-policy | post-policy | both } } * ]
Default
A BMP server cannot monitor the peers in a BGP-VPN instance.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
server-number: Specifies a BMP server by its number in the range of 1 to 8. The BMP server must have been created.
route-mode: Sends routes exchanged with a monitored peer or peer group to the BMP server. If you do not specify this keyword, BGP determines whether to send routes exchanged with a peer or peer group to the BMP server based on the following commands:
· peer route-mode
· bmp server monitor current-instance
· route-mode adj-rib-in
· route-mode adj-rib-out
adj-rib-in: Sends routes received from the monitored peer or peer group to the BMP server.
adj-rib-out: Sends routes advertised to the monitored peer or peer group to the BMP server.
pre-policy: Sends routes to the BMP server without route filtering.
post-policy: Sends routes to the BMP server after route filtering.
both: Sends both filtered and unfiltered routes to the BMP server.
Usage guidelines
For a peer, the following rules apply when BGP selects a BMP server:
· The BMP server specified by the peer bmp server command takes precedence over that specified by the bmp server monitor current-instance command.
· The BMP server specified by the bmp server monitor current-instance command takes precedence over that specified by the bmp server monitor all-vpn-instance command.
For a peer, the following rules apply when BGP determines the type of routes to send to the BMP server:
· The route type specified by the peer route-mode command takes precedence over that specified by the bmp server monitor current-instance route-mode command.
· The route type specified by the bmp server monitor current-instance route-mode command takes precedence over that specified by the bmp server monitor all-vpn-instance route-mode command.
· The route type specified by the bmp server monitor all-vpn-instance route-mode command takes precedence over that specified by the route-mode adj-rib-out or route-mode adj-rib-out command.
If you execute this command multiple times for a BGP instance, the most recent configuration takes effect.
Examples
# Enable BMP server 1 to monitor all BGP peers in all BGP-VPN instances.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bmp server 1 monitor all-vpn-instance
Related commands
display bgp bmp server
peer bmp server
peer route-mode
route-mode adj-rib-in
route-mode adj-rib-out
bmp server monitor current-instance
bmp server monitor current-instance
Use bmp server monitor current-instance to enable the specified BMP server to monitor all peers in the current instance.
Use undo bmp server monitor current-instance to remove the configuration.
Syntax
bmp server server-number monitor current-instance [ route-mode { adj-rib-in { pre-policy | post-policy | both } | adj-rib-out { pre-policy | post-policy | both } } * ]
undo bmp server server-number monitor current-instance [ route-mode { adj-rib-in { pre-policy | post-policy | both } | adj-rib-out { pre-policy | post-policy | both } } * ]
Default
A BMP server cannot monitor the peers in the current instance.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
server-number: Specifies a BMP server by its number in the range of 1 to 8. The BMP server must have been created.
route-mode: Sends routes exchanged with a monitored peer or peer group to the BMP server. If you do not specify this keyword, BGP determines whether to send routes exchanged with a peer or peer group to the BMP server based on the following commands:
· peer route-mode
· bmp server monitor current-instance
· route-mode adj-rib-in
· route-mode adj-rib-out
adj-rib-in: Sends routes received from the monitored peer or peer group to the BMP server.
adj-rib-out: Sends routes advertised to the monitored peer or peer group to the BMP server.
pre-policy: Sends routes to the BMP server without route filtering.
post-policy: Sends routes to the BMP server after route filtering.
both: Sends both filtered and unfiltered routes to the BMP server.
Usage guidelines
To enable a BMP server to monitor all BGP peers in the public network, execute this command in BGP instance view. To enable a BMP server to monitor all BGP peers in a VPN instance, execute this command in BGP-VPN instance view.
For a peer, the following rules apply when BGP selects a BMP server:
· The BMP server specified by the peer bmp server command takes precedence over that specified by the bmp server monitor current-instance command.
· The BMP server specified by the bmp server monitor current-instance command takes precedence over that specified by the bmp server monitor all-vpn-instance command.
For a peer, the following rules apply when BGP determines the type of routes to send to the BMP server:
· The route type specified by the peer route-mode command takes precedence over that specified by the bmp server monitor current-instance route-mode command.
· The route type specified by the bmp server monitor current-instance route-mode command takes precedence over that specified by the bmp server monitor all-vpn-instance route-mode command.
· The route type specified by the bmp server monitor all-vpn-instance route-mode command takes precedence over that specified by the route-mode adj-rib-out or route-mode adj-rib-out command.
If you execute this command multiple times for an instance, the most recent configuration takes effect.
Examples
# Enable BMP server 1 to monitor all BGP peers in the public network and VPN instance vpn1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bmp server 1 monitor current-instance
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] bmp server 1 monitor current-instance
Related commands
display bgp bmp server
peer bmp server
peer route-mode
route-mode adj-rib-in
route-mode adj-rib-out
bmp server monitor all-vpn-instance
bmp-route-trace
Use bmp-route-trace to send route trace information to the BMP server.
Use undo bmp-route-trace to restore the default.
Syntax
bmp-route-trace { ip-prefix-list ipv4-prefix-list-name | ipv6-prefix-list ipv6-prefix-list-name } [ rd-list rd-list-number ]
undo bmp-route-trace { ip-prefix-list | ipv6-prefix-list }
Default
Route trace information is not sent to the BMP server.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
ip-prefix-list ipv4-prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
ipv6-prefix-list ipv6-prefix-list-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
rd-list rd-list-number: Specifies an RD list by its number in the range of 1 to 65535. If you do not specify this option, the device does not match RD attributes of BGP routes.
Usage guidelines
BGP routes might have their attributes modified by various policies when they are transmitted among BGP peers. BGP can record the route trace information including the routing policies that have permitted or denied the routes, modified attributes, and attribute values after modification. This command enables the device to send route trace information about received and advertised routes to the BMP server. Based on route trace information collected from each node in the network, the BMP server can fully monitor route changes and implement flexible route and routing policy control.
The device uses the specified prefix list or RD list to match received and advertised BGP routes upon establishing a TCP connection with the BMP server. Route trace information of matching routes will be sent to the BMP server.
Examples
# Send route trace information of received and advertised routes matching IPv4 prefix list 2 to the BMP server.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] bmp-route-trace ip-prefix-list 2
Related commands
display bgp route-trace
check-origin-validation
Use check-origin-validation to enable BGP RPKI validation.
Use undo check-origin-validation to disable BGP RPKI validation.
Syntax
check-origin-validation
undo check-origin-validation
Default
BGP RPKI validation is disabled.
Views
BGP RPKI view
Predefined user roles
network-admin
Usage guidelines
This command enables BGP to validate the prefix and origin AS number of a received route and place the route to one of the following validation states:
· Not-found—No ROA matches the prefix.
· Valid—One or multiple ROAs match both the prefix and origin AS number.
· Invalid—One or multiple ROAs match the prefix, but none of these ROAs matches the origin AS number.
You can configure a routing policy to filter routes based on the BGP RPKI validation state.
Examples
# Enable BGP RPKI validation.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] check-origin-validation
compare-different-as-med
Use compare-different-as-med to enable MED comparison for routes from peers in different ASs.
Use undo compare-different-as-med to restore the default.
compare-different-as-med
undo compare-different-as-med
MED comparison is disabled for routes from peers in different ASs.
BGP-VPN instance view
network-admin
If multiple routes to a destination exist, the route with the smallest MED is selected.
Do not use this command unless relevant ASs adopt the same IGP and routing selection method.
# In BGP instance view, enable MED comparison for routes from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] compare-different-as-med
confederation id
Use confederation id to configure a confederation ID.
Use undo confederation id to restore the default.
confederation id as-number
undo confederation id
No confederation ID is configured.
network-admin
as-number: Specifies an AS number that identifies the confederation. The AS number is an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
You can split an AS into several sub-ASs, and each sub-AS remains fully meshed. These sub-ASs form a confederation. Key path attributes of a route, such as the Next_HOP, MED, and LOCAL_PREF, are not discarded when crossing each sub-AS. The sub-ASs still look like one AS from the perspective of other ASs. The AS number is the confederation ID.
Confederation can ensure the integrity of the former AS, and solve the problem of too many IBGP connections in the AS.
Configure the same confederation ID for all routers in one confederation.
For a non-confederation BGP router that establishes a BGP connection to a router in a confederation, the confederation ID is the AS number of the router.
# Confederation 9 consists of four sub-ASs numbered 38, 39, 40 and 41. Peer 10.1.1.1 is a member of sub-AS 38. Peer 200.1.1.1 is a member outside of confederation 9, which belongs to AS 98. Confederation 9 looks like one AS (with AS number 9) from the perspective of peer 200.1.1.1. This example uses a router in sub-AS 41.
<Sysname> system-view
[Sysname] bgp 41
[Sysname-bgp-default] confederation id 9
[Sysname-bgp-default] confederation peer-as 38 39 40
[Sysname-bgp-default] group Confed38 external
[Sysname-bgp-default] peer Confed38 as-number 38
[Sysname-bgp-default] peer 10.1.1.1 group Confed38
[Sysname-bgp-default] group Remote98 external
[Sysname-bgp-default] peer Remote98 as-number 98
[Sysname-bgp-default] peer 200.1.1.1 group Remote98
confederation nonstandard
confederation nonstandard
Use confederation nonstandard to enable compatibility with routers not compliant with RFC 3065 in the confederation.
Use undo confederation nonstandard to restore the default.
confederation nonstandard
undo confederation nonstandard
The device is compatible with only routers compliant with RFC 3065 in the confederation.
network-admin
Configure this command on all routers compliant with RFC 3065 to interact with those routers not compliant with RFC 3065 in the confederation.
# Confederation 100 consists of two sub-ASs, 64000 and 65000, and contains routers not compliant with RFC 3065. Enable compatibility with routers not compliant with RFC 3065 in the confederation.
<Sysname> system-view
[Sysname] bgp 64000
[Sysname-bgp-default] confederation id 100
[Sysname-bgp-default] confederation peer-as 65000
[Sysname-bgp-default] confederation nonstandard
confederation id
confederation peer-as
confederation peer-as
Use confederation peer-as to specify confederation peer sub-ASs.
Use undo confederation peer-as to remove the specified confederation peer sub-ASs.
confederation peer-as as-number-list
undo confederation peer-as [ as-number-list ]
No confederation peer sub-ASs are specified.
network-admin
as-number-list: Specifies a sub-AS number list. A maximum of 32 sub-ASs can be configured in one command line. The expression is as-number-list = as-number &<1-32>. The as-number argument specifies a sub-AS number, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
Before this configuration, use the confederation id command to specify the confederation ID for the sub-ASs.
If the undo confederation peer-as command is executed without the as-number-list argument, all confederation peer sub-ASs are removed.
# In BGP instance view, specify confederation peer sub-ASs 2000 and 2001.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] confederation id 10
[Sysname-bgp-default] confederation peer-as 2000 2001
confederation id
confederation nonstandard
dampening
Use dampening to enable BGP route dampening.
Use undo dampening to restore the default.
dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling | route-policy route-policy-name ] *
undo dampening
BGP route dampening is disabled.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
BGP EVPN address family view
network-admin
half-life-reachable: Specifies a half-life for active routes, in the range of 1 to 45 minutes. By default, the value is 15 minutes.
half-life-unreachable: Specifies a half-life for suppressed routes, in the range of 1 to 45 minutes. By default, the value is 15 minutes.
reuse: Specifies a reuse threshold value for suppressed routes, in the range of 1 to 20000. A suppressed route whose penalty value decreases under the value is reused. By default, the reuse value is 750. The reuse threshold must be less than the suppression threshold.
suppress: Specifies a suppression threshold in the range of 1 to 20000. The route with a penalty value greater than the threshold is suppressed. The default value is 2000.
ceiling: Specifies a ceiling penalty value in the range of 1001 to 20000. The value must be greater than the suppress value. By default, the value is 16000.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
This command dampens only EBGP routes.
If an EBGP peer goes down after you configure this command, routes coming from the peer are dampened but not deleted.
# In BGP IPv4 unicast address family view, configure BGP route dampening. Set the half-life for both active and suppressed routes to 10 minutes, the reuse threshold to 1000, the suppression threshold to 2000, and the ceiling penalty to 10000.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] dampening 10 10 1000 2000 10000
display bgp dampening parameter
dampening-log size
Use dampening-log size to specify the maximum number of BGP route dampening log entries that can be recorded.
Use undo dampening-log size to restore the default.
Syntax
dampening-log size size-number
undo dampening-log size
Default
The device can record a maximum of 1000 BGP route dampening log entries.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
size-number: Specifies the maximum number of BGP route dampening log entries that can be recorded. The value range for this argument is 0 to 200000. To disable BGP from recording route dampening log entries, you can set the value for this argument to 0.
Usage guidelines
You can check the network condition or troubleshoot network failures by viewing BGP route dampening log entries. However, recording BGP route dampening log entries consumes system memory. To avoid degrading device performance, set an appropriate value for the size-number argument according to the service condition.
Examples
# Specify the maximum number of BGP route dampening log entries that can be recorded to 2000.
<Sysname> sys
[Sysname] bgp 100
[Sysname-bgp-default] dampening-log size 2000
Related commands
display bgp dampening-log
default local-preference
Use default local-preference to configure a default local preference.
Use undo default local-preference to restore the default.
default local-preference value
undo default local-preference
The default local preference is 100.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
value: Specifies a default local preference in the range of 0 to 4294967295. A larger value represents a higher preference.
You can also use the apply local-preference command in a routing policy to configure the local preference for BGP routes. If no routing policy is configured, all BGP routes use the local preference set by the default local-preference command. If a routing policy is configured, BGP routes matching the routing policy use the local preference set by the apply local-preference command. Other BGP routes use the local preference set by the default local-preference command.
# In BGP IPv4 unicast address family view, set the default local preference to 180.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] default local-preference 180
apply local-preference
route-policy
default med
Use default med to specify a default MED value.
Use undo default med to restore the default.
default med med-value
undo default med
The default MED value is 0.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
med-value: Specifies the default MED value in the range of 0 to 4294967295.
BGP selects a MED value in the following order:
1. MED set by the apply cost command.
2. MED set by the med keyword in the import-route command.
3. MED set by the default med command.
4. Original MED of a BGP route, or MED changed from the metric of a redistributed IGP route.
# In BGP IPv4 unicast address family view, set the default MED to 25.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] default med 25
apply cost
import-route
route-policy
default-route imported
Use default-route imported to enable default route redistribution into the BGP routing table.
Use undo default-route imported to restore the default.
default-route imported
undo default-route imported
Default route redistribution into the BGP routing table is disabled.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
By default, BGP does not redistribute default IGP routes. To redistribute default IGP routes into the BGP routing table, you must use the default-route imported command together with the import-route command.
# In BGP IPv4 unicast address family view, enable default route redistribution from OSPF process 1 into the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] default-route imported
[Sysname-bgp-default-ipv4] import-route ospf 1
import-route
default-route update-first
Use default-route update-first to configure BGP to send withdrawal messages of the default route prior to other routes.
Use undo default-route update-first to restore the default.
Syntax
default-route update-first
undo default-route update-first
Default
BGP does not send withdrawal messages of the default route prior to other routes.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
Typically a BGP router does not send withdrawal messages of the default route prior to other routes to its peers. If the peer relationship is down, the default route cannot be withdrawn first. Traffic interruption might occur. Use this command to configure BGP to send the withdrawal messages of the default route prior to other routes. This can reduce the traffic interruption time when the peer relationship is down.
Examples
# In BGP instance view, configure BGP to send withdrawal messages of the default route prior to other routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] default-route update-first
display bgp bmp server
Use display bgp bmp server to display BMP server information.
Syntax
display bgp [ instance instance-name ] bmp server server-number
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BMP server information for the default BGP instance.
server-number: Specifies a BMP server by its number in the range of 1 to 8.
Examples
# Display information about BMP server 1.
<Sysname> display bgp bmp server 1
BMP server number: 1
Server VPN instance name: vpna
Server address: 100.1.1.1 Server port: 6895
Client address: 100.1.1.2 Client port: 21452
BMP server state: Connected Up for 00h41m53s
TCP source interface has been configured
Statistics report interval: 5s
Reported route mode: adj-rib-in pre-policy
Pu-monitor-mode: Enabled
Pd-monitor-mode: Enabled
Message statistics:
Total messages sent: 23
INITIATION: 1
TERMINATION: 0
STATS-REPORT: 0
PEER-UP: 4
PEER-DOWN: 3
ROUTE-MON: 7
ROUTE-TRACE: 8
BGP peers monitored by BMP server:
10.1.1.1
Table 2 Command output
Field |
Description |
Server VPN instance name |
Name of the VPN instance to which the BMP server belongs. If the VPN instance name is followed by character string (Deleted), the VPN instance has been deleted. This field displays -- if the BMP server belongs to the public network. |
Server address |
IP address of the BMP server used by the TCP connection to the BMP client. |
Server port |
Port number of the BMP server used by the TCP connection to the BMP client. |
Client address |
IP address of the BMP client used by the TCP connection to the BMP server. |
Client port |
Port number of the BMP client used by the TCP connection to the BMP server. |
BMP server state |
TCP connection status: · Connected. · Not connected. |
Up for |
Duration of the TCP connection. |
TCP source interface has been configured |
Source interface of TCP connections to the BMP server. |
Statistics report interval |
Interval (in seconds) at which BGP sends statistics information to the BMP server. |
Reported route mode |
Type of routes that BGP sends to the BMP server: · adj-rib-in—Send routes received from the monitored peer or peer group to the BMP server. · adj-rib-out—Send routes advertised to the monitored peer or peer group to the BMP server. · pre-policy—Send routes to the BMP server without route filtering. · post-policy—Send routes to the BMP server after route filtering. · both—Send both filtered and unfiltered routes to the BMP server. · loc-rib—Send the optimal routes in the routing table to the BMP server. |
Pu-monitor-mode |
Whether the peer up notifications that the BMP client sends to the BMP server carry the mode flag. · Enabled—Carry the mode flag. · Disabled—Do not carry the mode flag. |
Pd-monitor-mode |
Whether the peer down notifications that the BMP client sends to the BMP server carry the mode flag. · Enabled—Carry the mode flag. · Disabled—Do not carry the mode flag. |
Total messages sent |
Number of messages that BGP sends to the BMP server. |
INITIATION |
Number of initiation messages that BGP sends to the BMP server. |
TERMINATION |
Number of termination messages that BGP sends to the BMP server. |
STATS-REPORT |
Number of statistics messages that BGP sends to the BMP server. |
PEER-UP |
Number of peer-up messages that BGP sends to the BMP server. |
PEER-DOWN |
Number of peer-down messages that BGP sends to the BMP server. |
ROUTE-MON |
Number of route monitoring messages that BGP sends to the BMP server. |
ROUTE-TRACE |
Number of route trace messages that BGP sends to the BMP server. |
BGP peers monitored by BMP server |
Peers that are monitored by the BMP server. |
Related commands
reset bgp bmp server statistics
display bgp bmp server monitor-peer
Use display bgp bmp server monitor-peer to display information about BGP peers monitored by the specified BMP server for the specified BGP instance.
Syntax
display bgp [ instance instance-name ] bmp server server-number monitor-peer all
display bgp [ instance instance-name ] bmp server server-number monitor-peer [ vpn-instance vpn-instance-name ] { ipv4 | ipv6 } { ipv4-address | ipv6-address }
display bgp [ instance instance-name ] bmp server server-number monitor-peer { l2vpn evpn | vpnv4 | vpnv6 } { ipv4-address | ipv6-address }
display bgp [ instance instance-name ] bmp server server-number monitor-peer vpn-instance vpn-instance-name vpnv4 ipv4-address
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
server-number: Specifies a BMP server by its number in the range of 1 to 8. The BMP server must have been created.
all: Displays information about all BGP peers monitored by the specified BMP server.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays information for the public network.
ipv4: Displays information about monitored BGP peers in IPv4 unicast address family.
ipv6: Displays information about monitored BGP peers in IPv6 unicast address family.
l2vpn evpn: Displays information about monitored BGP peers in BGP EVPN address family.
vpnv4: Displays information about monitored BGP peers in VPNv4 address family.
vpnv6: Displays information about monitored BGP peers in VPNv6 address family.
ipv4-address: Specifies a peer by its IPv4 address.
ipv6-address: Specifies a peer by its IPv6 address.
Examples
# Display information about BGP peers monitored by BMP server 1 for the default BGP instance.
<Sysname> display bgp bmp server 1 monitor-peer all
Server address: 1.1.1.1 Server state: Down
>>BGP IPv4 unicast:
Peer Route mode
10.1.1.1 adj-rib-in post-policy
>>BGP IPv6 unicast:
Peer Route mode
20.1.1.1 adj-rib-in post-policy
>>BGP VPNv4:
Peer Route mode
30.1.1.1 adj-rib-in post-policy
>>BGP VPNv6:
Peer Route mode
40.1.1.1 adj-rib-in post-policy
>>BGP IPv4 unicast VPN instance vpn1:
Peer Route mode
11.1.1.1 adj-rib-in post-policy
12.1.1.1 adj-rib-in post-policy
>>BGP EVPN:
Peer Route mode
50.1.1.1 adj-rib-in post-policy
# Display information about IPv6 unicast peers monitored by BMP server 1 for the public instance.
<Sysname> display bgp bmp server 1 monitor-peer ipv6 20.1.1.1
Server address: 1.1.1.1 Server state: Down
>>BGP IPv6 unicast:
Peer Route mode
20.1.1.1 adj-rib-in post-policy
# Display information about VPNv4 peers monitored by BMP server 1.
<Sysname> display bgp bmp server 1 monitor-peer vpnv4 30.1.1.1
Server address: 1.1.1.1 Server state: Down
>>BGP VPNv4:
Peer Route mode
30.1.1.1 adj-rib-in post-policy
# Display information about VPNv6 peers monitored by BMP server 1.
<Sysname> display bgp bmp server 1 monitor-peer vpnv6 40.1.1.1
Server address: 1.1.1.1 Server state: Down
>>BGP VPNv6:
Peer Route mode
40.1.1.1 adj-rib-in post-policy
# Display information about BGP EVPN peers monitored by BMP server 1.
<Sysname> display bgp bmp server 1 monitor-peer l2vpn evpn 50.1.1.1
Server address: 1.1.1.1 Server state: Down
>>BGP EVPN:
Peer Route mode
50.1.1.1 adj-rib-in post-policy
Table 3 Command output
Field |
Description |
Server address |
IP address of the BMP server. |
Server state |
State of the TCP connection to the BMP server. |
BGP IPv4 unicast |
BGP IPv4 unicast address family. |
BGP IPv6 unicast |
BGP IPv6 unicast address family. |
BGP IPv4 unicast VPN instance |
BGP-VPN instance IPv4 unicast address family. |
BGP IPv6 unicast VPN instance |
BGP-VPN instance IPv6 unicast address family. |
BGP VPNv4 |
BGP VPNv4 address family. |
BGP VPNv6 |
BGP VPNv6 address family. |
BGP VPNv4 VPN instance |
BGP-VPN instance VPNv4 address family. |
BGP EVPN |
BGP EVPN address family. |
Peer |
Address of the monitored peer. |
Route mode |
Type of routes that BGP sends to the BMP server: · adj-rib-in—Send routes received from the monitored peer or peer group to the BMP server. · adj-rib-out—Send routes advertised to the monitored peer or peer group to the BMP server. · pre-policy—Send routes to the BMP server without route filtering. · post-policy—Send routes to the BMP server after route filtering. · both—Send both filtered and unfiltered routes to the BMP server. |
Related commands
display bgp bmp server
reset bgp bmp server statistics
reset bgp bmp server
peer route-mode
route-mode adj-rib-in
route-mode adj-rib-out
route-mode loc-rib
display bgp dampening-log
Use display bgp dampening-log to display BGP route dampening log information.
Syntax
display bgp [ instance instance-name ] dampening-log [ reverse ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP route dampening log information for the default BGP instance.
reverse: Displays BGP route dampening log information in reverse chronological order. If you do not specify this keyword, the command displays BGP route dampening log information events in chronological order.
Examples
# Display BGP route dampening log information.
<Sysname> display bgp dampening-log
2021.07.26 17:20:52 vpna-IPv4-UNC 10.1.1.1/32 dampened, from 2.2.2.2, flaps 4, penalty 2615, duration 00:10:44.
2021.07.26 17:40:52 IPv4-MLC 10.1.1.2/32 reused, from 2.2.2.2, flaps 4, penalty 749, duration 00:30:44.
2021.07.26 18:10:31 IPv4-VPN 20.1.1.1/32 dampened, RD 1:1001, from 2.2.2.2, flaps 4, penalty 2615, duration 00:10:44.
2021.07.26 18:30:31 IPv4-VPN 20.1.1.1/32 reused, RD 1:1001, from 2.2.2.2, path 1, flaps 17, penalty 749, duration 00:30:44.
Table 4 Command output
Field |
Description |
address-family |
BGP address family for which the route dampening log entry was generated. · IPv4-UNC—BGP IPv4 unicast address family. · IPv4-MLC—BGP IPv4 multicast address family. · xxx-IPv4-UNC—BGP-VPN IPv4 unicast address family. The xxx argument represents the name of the VPN instance. · IPv6-UNC—BGP IPv6 unicast address family. · IPv6-MLC—BGP IPv6 multicast address family. · xxx-IPv6-UNC—BGP-VPN IPv6 unicast address family. The xxx argument represents the name of the VPN instance. · IPv4-VPN—BGP VPNv4 address family. |
x/x dampened |
The route was dampened. |
x/x reused |
The route became usable again. |
RD |
RD value for the route. |
from |
IP address of the BGP peer that advertised the route. |
path |
AS path attribute of the route. |
flaps |
Number of route flappings. |
penalty |
Penalty value for the route. |
duration |
Duration of route dampening. |
Related commands
dampening-log size
reset bgp dampening-log
display bgp dampening parameter
Use display bgp dampening parameter to display BGP route dampening parameters.
display bgp [ instance instance-name ] dampening parameter { ipv4 | ipv6 } [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ]
display bgp [ instance instance-name ] dampening parameter vpnv4
display bgp [ instance instance-name ] dampening parameter ipv4 labeled-unicast [ vpn-instance vpn-instance-name ]
display bgp [ instance instance-name ] dampening parameter vpnv6
display bgp [ instance instance-name ] dampening parameter l2vpn evpn
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP route dampening parameters for the default BGP instance.
ipv4: Displays BGP IPv4 route dampening parameters.
ipv6: Displays BGP IPv6 route dampening parameters.
vpnv4: Displays BGP VPNv4 route dampening parameters.
vpnv6: Displays BGP VPNv6 route dampening parameters.
l2vpn evpn: Displays BGP EVPN route dampening parameters.
multicast: Displays BGP multicast route dampening parameters.
unicast: Displays BGP unicast route dampening parameters.
labeled-unicast: Displays BGP IPv4 labeled unicast route dampening parameters.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays BGP route dampening parameters for the public network.
By default, the unicast keyword is used if you do not specify the multicast, labeled-unicast, or unicast keyword.
# Display BGP IPv4 unicast route dampening parameters.
<Sysname> display bgp dampening parameter ipv4
Maximum suppression time (in seconds) : 3973
Ceiling value : 16000
Reuse value : 750
Half-life time for reachable routes (in seconds) : 900
Half-life time for unreachable routes (in seconds) : 900
Suppression threshold : 2000
Field |
Description |
Maximum suppression time |
Maximum time (in seconds) for the penalty value to decrease from the ceiling value to the reuse value. |
Ceiling value |
Penalty ceiling value. |
Reuse value |
Reuse threshold. |
dampening
dampening ibgp (MPLS Command Reference)
display bgp group
Use display bgp group to display BGP peer group information.
display bgp [ instance instance-name ] group ipv4 [ mdt | multicast | mvpn | rtfilter | sr-policy | [ [ labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] ] [ group-name group-name ]
display bgp [ instance instance-name ] group ipv6 [ multicast | mvpn | sr-policy | [ unicast ] [ vpn-instance vpn-instance-name ] ] [ group-name group-name ]
display bgp [ instance instance-name ] group link-state [ vpn ] [ group-name group-name ]
display bgp [ instance instance-name ] group vpnv4 [ vpn-instance vpn-instance-name ] [ group-name group-name ]
display bgp [ instance instance-name ] group l2vpn [ evpn ] [ group-name group-name ]
display bgp [ instance instance-name ] group vpnv6 [ group-name group-name ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP peer group information for the default BGP instance.
ipv4: Displays IPv4 BGP peer group information.
ipv6: Displays IPv6 BGP peer group information.
link-state: Displays BGP LS peer group information.
link-state vpn: Displays BGP-VPN LS peer group information.
mdt: Displays BGP MDT peer group information.
multicast: Displays BGP multicast peer group information.
mvpn: Displays BGP IPv4 or IPv6 MVPN peer group information.
rtfilter: Displays BGP IPv4 RT filter peer group information.
sr-policy: Displays BGP SR policy peer group information.
labeled-unicast: Displays BGP IPv4 labeled unicast peer group information.
unicast: Displays BGP unicast peer group information.
vpnv4: Displays BGP VPNv4 peer group information.
l2vpn: Displays BGP L2VPN peer group information.
evpn: Displays BGP EVPN peer group information.
vpnv6: Displays BGP VPNv6 peer group information.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays BGP peer group information for the public network.
group-name group-name: Specifies a BGP peer group by its name, a case-sensitive string of 1 to 47 characters. If you do not specify a group, this command displays brief information about all BGP peer groups for the specified address family.
By default, the unicast keyword is used if none of the unicast, mdt, labeled-unicast, mvpn, and multicast keywords are specified.
# Display brief information about all BGP IPv4 unicast peer groups.
<Sysname> display bgp group ipv4
BGP peer group: group1
Remote AS: 600
Authentication type configured: None
Type: external
Members:
1.1.1.10
BGP peer group: group2
Remote AS number: not specified
Type: external
Members:
2.2.2.2
# Display detailed information about BGP IPv4 unicast peer group group1.
<Sysname> display bgp group ipv4 group-name group1
BGP peer group: group1
Remote AS: 600
Authentication type configured: None
Type: external
Maximum number of prefixes allowed: 4294967295
Threshold: 75%
Configured hold time: 180 seconds
Keepalive time: 60 seconds
Minimum time between advertisements: 30 seconds
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Members:
* - Dynamically created peer
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
1.1.1.10 600 0 0 0 0 00:00:55 Established
# Display detailed information about BGP IPv6 unicast peer group group2.
<Sysname> display bgp group ipv6 group-name group2
BGP peer group: group2
Remote AS: 600
Authentication type configured: None
Type: external
Maximum number of prefixes allowed: 4294967295
Threshold: 75%
Configured hold time: 180 seconds
Keepalive time: 60 seconds
Minimum time between advertisements: 30 seconds
Peer preferred value: 0
IPsec profile name: profile001
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Members:
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2::2 600 0 0 0 0 00:00:45 Established
3::3 600 0 0 0 0 00:00:40 Established
Table 6 Command output
Field |
Description |
BGP peer group |
Name of the BGP peer group. |
Remote AS |
AS number of the peer group. |
Authentication type configured |
Authentication mode of the peer group: · None. · MD5. · Keychain (keychain-name). |
Type |
Type of the peer groups: · external—EBGP peer group. · internal—IBGP peer group. |
Maximum number of prefixes allowed |
Maximum number of routes allowed to learn from the peer. This field does not apply to BGP L2VPN. |
Threshold |
Percentage of received routes from the peer to maximum routes allowed to learn from the peer. If the percentage is reached, the system generates a log message. This field does not apply to BGP L2VPN. |
Configured hold time |
Configured hold interval in seconds. |
Keepalive time |
Keepalive interval in seconds. |
Minimum time between advertisements |
Minimum route advertisement interval in seconds. |
Peer preferred value |
Preferred value specified for routes from the peer. This field does not apply to BGP L2VPN. |
Site-of-Origin |
SoO for the peer group. |
Routing policy configured |
Routing policy configured for the peer group. If you do not specify a routing policy, this field displays No routing policy is configured. This field does not apply to BGP L2VPN. |
Members |
Information about peers included in the peer group. |
* - Dynamically created peer |
An asterisk (*) before a peer address indicates that the peer is a dynamic peer. |
Peer |
IPv4 or IPv6 address of the peer. |
AS |
AS number of the peer. |
MsgRcvd |
Number of messages received. |
MsgSent |
Number of messages sent. |
OutQ |
Number of messages to be sent. |
PrefRcv |
For the IPv4, IPv6, VPNv4, and VPNv6 address families, this field displays the number of prefixes received from the peer. For MPLS L2VPN, this field displays the number of label blocks received from the peer. For VPLS, this field displays the total number of label blocks and VPLS PEs discovered by BGP. For the IPv4 flowspec address family, this field displays the number of IPv4 flowspec messages received from the peer. For the IPv4 MDT address family, this field displays the number of MDT messages received from the peer. |
Up/Down |
Lasting time of the current BGP session state. |
State |
Current state of the BGP session between the local router and the peer. |
IPsec profile name |
IPsec profile applied to the IPv6 BGP peer group. |
display bgp instance-info
Use display bgp instance-info to display information about all BGP instances.
display bgp instance-info
network-admin
network-operator
# Display information about all BGP instances.
<Sysname> display bgp instance-info
Total BGP instances: 3
BGP instance name AS
BGP1 100
BGP2 200
BGP3 300
Table 7 Command output
Field |
Description |
Total BGP instances |
Number of BGP instances. |
BGP instance name |
BGP instance name. |
AS |
AS number of the BGP instance. |
display bgp link-state
Use display bgp link-state to display BGP LS information.
Syntax
display bgp [ instance instance-name ] link-state [ vpn [ route-distinguisher route-distinguisher ] ] ls-prefix [ advertise-info ]
display bgp [ instance instance-name ] link-state [ vpn [ route-distinguisher route-distinguisher ] ] [ peer { ipv4-address | ipv6-address } { advertised | received } ] [ statistics ] [ type { ipv4-prefix | ipv6-prefix | link | node | srv6-sid | te-policy } ]
display bgp [ instance instance-name ] link-state [ color color-value end-point { ipv4 ipv4-address | ipv6 ipv6-address } ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP LS information for the default BGP instance.
vpn: Displays BGP LS information for VPNs. If you do not specify this keyword, the command displays BGP LS information for the public network.
route-distinguisher route-distinguisher: Specifies a route distinguisher (RD), a string of 3 to 21 characters.
An RD has the following forms:
· 16-bit AS number:32-bit self-defined number. For example, 101:3.
· 32-bit IP address:16-bit self-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit self-defined number. For example, 65536:1. The minimum AS number is 65536.
ls-prefix: Specifies an LS prefix, a case-insensitive string of 1 to 512 characters.
advertise-info: Displays advertisement information for the specified LS prefix of the BGP LS address family or BGP-VPN LS address family.
peer ipv4-address: Specifies a peer by its IPv4 address.
peer ipv6-address: Specifies a peer by its IPv6 address.
advertised: Displays advertised LS information.
received: Displays received LS information.
statistics: Displays statistics about LS messages.
type: Displays the specified type of BGP LS information. If you do not specify this keyword, the command displays all types of BGP LS information.
ipv4-prefix: Displays BGP LS information that describes IPv4 reachable prefixes.
ipv6-prefix: Displays BGP LS information that describes IPv6 reachable prefixes.
link: Displays BGP LS information that describes link state.
node: Displays BGP LS information that describes node state.
srv6-sid: Displays BGP LS information that describes SRv6 SID.
te-policy: Displays BGP LS information that describes SR-MPLS and SRv6 TE policies.
color color-value end-point { ipv4 ipv4-address | ipv6 ipv6-address }: Displays information about the SR-MPLS TE policy/SRv6 TE policy with the specified color attribute and destination node. The color-value argument specifies the color attribute value in the range of 0 to 4294967295. The ipv4 ipv4-address option specifies a destination node by its IPv4 address. The ipv6 ipv6-address option specifies a destination node by its IPv6 address.
Usage guidelines
If you do not specify any parameters, this command displays brief BGP LS information for the public network. If you specify only the vpn keyword, the command displays brief BGP LS information for VPNs.
Examples
# Display brief BGP LS information for the public network.
<Sysname> display bgp link-state
Total number of routes: 2
BGP local router ID is 1.1.2.1
Status codes: * - valid, > - best, d – dampened, h – history,
s – suppressed, S – stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Prefix codes: E link, V node, T4 IPv4 route, T6 IPv6 route, SD SRv6 SID desc
u/U unknown,
I Identifier, N local node, R remote node, L link, P prefix,
L1/L2 ISIS level-1/level-2, O OSPF, O3 OSPFv3,
D direct, S static, B BGP, SS SRv6 SID,
a area-ID, l link-ID, t topology-ID, s ISO-ID,
c confed-ID/ASN, b bgp-identifier, r router-ID,
i if-address, n peer-address, o OSPF Route-type, p IP-prefix
d designated router address/interface ID
ID Link Descriptor Identifier
* >e Network : [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 20i
* >e Network : [T4][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]][P[o0x1][p1.1.1.0/24]]/480
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 20i
# Displays brief BGP LS information for VPNs.
<Sysname> display bgp link-state vpn
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Prefix codes: E link, V node, T4 IPv4 route, T6 IPv6 route, u/U unknown,
I Identifier, N local node, R remote node, L link, P prefix,
L1/L2 ISIS level-1/level-2, O OSPF, O3 OSPFv3,
D direct, S static, B BGP,
a area-ID, l link-ID, t topology-ID, s ISO-ID,
c confed-ID/ASN, b bgp-identifier, r router-ID,
i if-address, n peer-address, o OSPF Route-type, p IP-prefix
d designated router address/interface-ID
Total number of VPN routes: 2
Total number of routes from all PEs: 2
Route distinguisher: 1:1
Total number of routes: 2
* > Network : [V][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.56.24]]/376
NextHop : 0.0.0.0 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED :
Path/Ogn: i
* > Network : [T4][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.56.24]][P[o0x01][p192.168.56.0/24]]/480
NextHop : 0.0.0.0 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED :
Path/Ogn: i
Table 8 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d - dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a - additional-path—Add-Path optimal route. |
Prefix codes |
Route prefix codes: · B—BGP. · E—Link. · V—Node. · T4—IPv4 route. · T6—IPv6 route. · SD—SRv6 SID description. · TEPOLICY SR-MPLS TE Policy/SRv6 TE Policy—SR-MPLS TE policy and SRv6 TE policy description. · u/U—Unknown. · I—Identifier. · N—Local node. · R—Remote node. · L—Link. · P—Prefix. · SS—SRv6 SID. · L1/L2—ISIS level-1/level-2. · O—OSPF. · O3—OSPFv3. · D—Direct. · S—Static. · a—Area-ID. · l—Link-ID. · t—Topology-ID. · s—ISO-ID. · c—Confed-ID/ASN. · b—BGP-identifier. · r—Router-ID. · i—If-address. · n—Peer-address. · o—OSPF Route-type. · p—IP-prefix. · d—Designated router address/interface ID. · ID—Link Descriptor Identifier. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. · e – EGP—Learned through EGP. · ? – incomplete—Unknown origin. |
Total number of VPN routes |
Total number of BGP LS routes of VPNs. |
Total number of routes from all PEs |
Total number of BGP LS routes from PE devices. |
Route distinguisher |
Route distinguisher. |
Total number of routes |
Total number of BGP LS routes with the specified RD value. |
Network |
NLRI for the LS. |
NextHop |
Next hop IP address. |
LocPrf |
Local preference. |
OutLabel |
Outgoing label of the route. |
MED |
MED attribute. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed, which avoids routing loops. · ORIGIN—Identifies the origin of the route. |
TEPOLICY |
The BGP LS route is an SR-MPLS TE policy or SRv6 TE policy route. |
SEGMENT-ROUTING |
Segment routing protocol. |
bgp-ls-identifier |
Area ID of BGP LS. |
bgp-router-id |
BGP router ID. |
TE |
Traffic engineering. |
protocol-origin3 |
Configuration origin. |
Flag |
Flag. |
endpoint |
Destination node address. |
color |
Color attribute. |
originator-as |
AS number. |
originator-address |
Address identifier. |
discriminator |
Path identifier. |
# Display detailed BGP LS information with the specified LS prefix of the public network.
<Sysname> display bgp link-state [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376
BGP local router ID: 1.1.1.2
Local AS number: 20
Paths: 1 available, 1 best
BGP LS information of [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376:
Imported route.
Original nexthop: 0.0.0.0
OutLabel : NULL
LS : Node flag bits: 30[EA] , Local TE router ID: 3006::1
RxPathID : 0x0
TxPathID : 0xffffffff
AS-path : (null)
Origin : igp
Attribute value : pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
# Display detailed BGP LS information with the specified LS prefix of VPNs.
<Sysname> display bgp link-state vpn [V][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.
56.24]]/376
BGP local router ID: 1.1.1.1
Local AS number: 100
Route distinguisher: 1:1
Total number of routes: 1
Paths: 1 available, 1 best
BGP LS information of [V][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.56.24]]/376:
Imported route.
Original nexthop: 0.0.0.0
Out interface : NULL0
Route age : 03h30m59s
OutLabel : NULL
LS : Node flag bits: 30[EA]
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Valid
AS-path : (null)
Origin : igp
Attribute value : pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
# Display detailed BGP EPE LS information with the specified LS prefix.
<Sysname> display bgp link-state [SD][B][I0x0][N[c100][r1.1.1.1]][SS20::100]/408
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP LS information of [SD][B][I0x0][N[c100][r1.1.1.1]][SS20::100]/408:
Imported route.
Original nexthop: 0.0.0.0
Out interface : NULL0
Route age : 00h01m36s
OutLabel : NULL
LS : SRv6 endpoint function: function type=End.X with PSP, algori
thm=0, flag=0 SRv6 BGP Peer Node Sid: RouterID=2.2.2.2, AS n
umber=200, reserved=0, weight=0, flags(B/S/P/C)=0/0/1/0
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Valid
AS-path : (null)
Origin : igp
Attribute value : pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
# Display detailed BGP EPE LS information with the specified LS prefix.
<Sysname> display bgp link-state [SD][B][I0x0][N[c100][r1.1.1.1]][SS20::110]/408
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP LS information of [SD][B][I0x0][N[c100][r1.1.1.1]][SS20::110]/408:
Imported route.
Original nexthop: 0.0.0.0
Out interface : NULL0
Route age : 00h01m36s
OutLabel : NULL
LS : SRv6 endpoint function: function type=End.X with PSP, USP & USD,
algorithm=0, flag=0
SRv6 BGP peer node SID: RouterID=2.2.2.2, AS number=200, reserved=0,
weight=0, flags(B/S/P/C)=0/0/1/0
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Valid
AS-path : (null)
Origin : igp
Attribute value : pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Table 9 Command output
Field |
Description |
Route distinguisher |
Route distinguisher. |
Total number of routes |
Total number of BGP LS routes with the specified RD value. |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
BGP LS information of |
NLRI prefix. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
LS |
LS attribute: · Node flag bits—Node attribute in hexadecimal format: ¡ 10[A]—OSPF/OSPFv3 ABR bit. ¡ 30[E]—OSPF/OSPFv3 External bit. · Metric—Link or prefix cost. · Flex Algo TLV—Flexible algorithm TLV information. ¡ Algorithm—Flexible algorithm ID. ¡ Priority—Flexible algorithm priority. ¡ Metric—Metric type of the flexible algorithm. If the metric type is IGP link cost, this field displays 0. If the metric type is link delay, this field displays 1. If the metric type is TE cost, this field displays 2. · Local TE router ID. · Average delay flag—Flag indicating whether the average delay exceeds 16777215 microseconds. ¡ 0: Stable link state whose average delay is not higher than 16777215 microseconds. ¡ 1: Unstable link state whose average delay is higher than 16777215 microseconds. · Average delay—Average delay in microseconds. · Min/Max delay flag—Flag indicating whether the Min/Max delay exceeds 16777215 microseconds. ¡ 0: Stable link state whose Min/Max delay is not higher than 16777215 microseconds. ¡ 1: Unstable link state whose Min/Max delay is higher than 16777215 microseconds. · Min delay—Minimum delay in microseconds. · Max delay—Maximum delay in microseconds. · Delay variation—Acceptable delay variation in microseconds. · Remaining bandwidth—Available bandwidth in bit/s. · Utilized bandwidth—Used bandwidth in bit/s. · Link loss flag—Whether the measured packet loss rate exceeds 50.331642%: ¡ 0—The measured packet loss rate is smaller than 50.331642%, indicating a stable link. ¡ 1—The measured packet loss rate is equivalent to or larger than 50.331642%, indicating poor link performance. · Link loss—Packet loss rate in percentage. · SRv6 capability—SRv6 capabilities: · SR/SRv6 node MSD—Maximum SID Depths (MSD) information about the SR-MPLS or SRv6 node: ¡ MPLS MSD—Maximum number of SIDs that SR-MPLS can encapsulate in a packet. ¡ Segment Left—Maximum Segment Left value. ¡ End Pop MSD—Maximum number of SIDs that can be popped by end nodes supporting PSP or USP. ¡ T.Insert MSD—Maximum number of SIDs that the transit node can insert into a packet by using an SR policy. ¡ T.Encaps MSD—Maximum number of SIDs that the transit node can encapsulate into a packet by using an SR policy. ¡ End D MSD—Maximum number of SIDs that can be decapsulated by the end node. · SR/SRv6 link MSD—Maximum SID Depths (MSD) information about the SR or SRv6 link. ¡ MPLS MSD—Maximum number of SIDs that SR-MPLS can encapsulate in a packet. · SRv6 End.X SID—SRv6 End.X SID information: ¡ function type—SID function type. Only End.X with PSP is supported in the current software version. End.X SIDs of this type support PSP. ¡ algorithm—SID algorithm. 0 represents the SPF algorithm and 1 represents the strict SPF algorithm. ¡ weight—SID weight. ¡ flags(B/S/P)—SID flag. B represents the backup flag, S represents the set flag, and P represents the persistent flag. · SRv6 LAN End.X SID—SRv6 LAN End.X SID information. ¡ function type—SID function. Only End.X with PSP is supported in the current software version. End.X SIDs of this type support PSP. ¡ algorithm—SID algorithm. 0 represents the SPF algorithm and 1 represents the strict SPF algorithm. ¡ weight—SID weight. ¡ flags(B/S/P)—SID flag. B represents the backup flag, S represents the set flag, and P represents the persistent flag. ¡ neighbor—Neighbor node ID. This field displays system ID for IS-IS and router ID for OSPFv3. · SRv6 locator—SRv6 locator information. ¡ metric—Locator metric. ¡ algorithm—Locator algorithm. 0 represents the SPF algorithm and 1 represents the strict SPF algorithm. ¡ flags(D/A)—Locator flag. D is set when the locator is leaked to an IGP area. A is set when the locator is configured with anycast. · SRv6 SID information—SRv6 SID information: · SRv6 endpoint function—SID attribute information about the SRv6 endpoint. ¡ function type—SID function type. ¡ algorithm—Algorithm associated to the SID. 0 represents the SPF algorithm and 1 represents the strict SPF algorithm. ¡ flags—SID flag. · BSID—SID of the ingress node. · Provisioned BSID—Ingress node SID configured through the command. · Flags(D/B/U/L/F)—Flags. ¡ D—BSID type. If this bit is set, the BSID type is IPv6. If this bit is not set, the BSID type is IPv4. ¡ B—If this bit is set, the BSID is statically assigned. ¡ U—If this bit is set, the BSID configured through the command failed to be assigned. ¡ L—If this bit is set, the BSID is assigned from SRLB. If this bit is not set, the BSID is dynamically assigned. ¡ F—If this bit is set, the BSID is dynamically assigned. · Priority—Priority. · Flags(S/A/B/E/V/O/D/C/I/T)—Flags. ¡ S—If this bit is set, the candidate path is in shutdown state. ¡ A—If this bit is set, the candidate path is active. ¡ B—If this bit is set, the candidate path is a backup path. ¡ E—If this bit is set, the candidate path is valid. ¡ V—If this bit is set, the candidate path has a minimum of one valid seglist. ¡ O—If this bit is set, the policy is generated through ODN. ¡ D—If this bit is set, the candidate path is calculated by the PCE/controller. ¡ C—If this bit is set, the candidate path is deployed by the PCE/controller. ¡ I—If this bit is set, the forwarding path is invalid and the packet is discarded. ¡ T—If this bit is set, the forwarding path is available. · Preference—Priority of the candidate path. · CPathName—Name of the candidate path. · SR Segment List—SID list. · MTID—Multitopology ID. · Alg—Algorithm. · Weight—Weight of the SID list in the candidate path. · Segment(<Type, Flags, SID, SID Descriptor>)—SID list information. ¡ Type—SID type. ¡ Flags—Flag. ¡ SID—SID value. ¡ SID Descriptor—SID descriptor. · ASLA—Application specific link attributes. ¡ SA-length—Standard application identifier bit mask length in bytes. ¡ UDA-length—User defined application identifier bit mask length in bytes. ¡ Standard applications—A value of 0x10 Flex-Algo represents flexible algorithm. ¡ User defined applications—A value of 0x10 Flex-Algo represents flexible algorithm. ¡ E administrative group—Extended administrative group. ¡ TE maximum bandwidth (kbits/sec). ¡ TE maximum reservable bandwidth (kbits/sec). ¡ TE unreserved bandwidth. ¡ TE metric. ¡ Delay flag—Average link delay flag indicating whether the average link delay exceeds 16777215 microseconds. A value of 0 means that the link state is stable because the average delay is shorter than or equivalent to 16777215 microseconds. A value of 1 means that the link state is unstable because the average delay is longer than 16777215 microseconds. ¡ Average delay—Average delay in microseconds. ¡ Delay range flag—Min/Max link delay flag indicating whether the Min/Max link delay exceeds 16777215 microseconds. A value of 0 means that the link state is stable because the Min/Max delay is shorter than or equivalent to 16777215 microseconds. A value of 1 means that the link state is unstable because the Min/Max delay is longer than 16777215 microseconds. ¡ Min delay—Minimum link delay in microseconds. ¡ Max delay—Maximum link delay in microseconds. · SRv6 endpoint function—SID attribute information about the SRv6 endpoint. ¡ function type—SID function type. ¡ algorithm—Algorithm associated to the SID. ¡ flags—SID flag. · SRv6 BGP Peer Node Sid—SID attribute information about the peer node. ¡ RouterID—Router ID. ¡ AS number—AS number. ¡ reserved—SID reserved value. ¡ weight—SID weight. ¡ flags(B/S/P/C)—SID flag. B represents the backup flag, S represents the set flag, P represents the persistent flag, and C represents the compression flag. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
AS-path |
AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
# Display advertisement information for the specified LS prefix of the public network.
<Sysname> display bgp link-state [E][B][I0x0][N[r1.1.1.2]][c65008][R[r44.33.22.11]][c65009]][L[i2.1.1.3][n1.1.1.3]]/536 advertise-info
BGP local router ID: 1.1.1.2
Local AS number: 65008
Paths: 1 best
BGP LS information of [E][B][I0x0][N[r1.1.1.2]][c65008][R[r44.33.22.11]][c65009]][L[i2.1.1.3][n1.1.1.3]]/536
(TxPathID:0):
Advertised to peers (1 in total):
10.1.1.2
LS attribute :
Peer node segment identifier : Flag c0[VL], Metric 0, Label 23001
# Display advertisement information for the specified LS prefix of VPNs.
<Sysname> display bgp link-state-vpn [V][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.
56.24]]/376 advertise-info
BGP local router ID: 1.1.1.1
Local AS number: 100
Route distinguisher: 1:1
Total number of routes: 1
Paths: 1 best
BGP LS information of [V][O][I0x0][N[c100][b1.1.1.1][a0.0.0.0][r192.168.56.24]]/376:
Advertised to peers (1 in total):
1.1.1.2
Table 10 Command output
Field |
Description |
Route distinguisher |
Route distinguisher. |
Total number of routes |
Total number of BGP LS routes with the specified RD value. |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
BGP LS information of |
NLRI prefix. |
Advertised to peers (1 in total) |
Peers to which the information has been advertised, and the total number of such peers. |
Peer node segment identifier |
Peer node SID: · Flag c0[VL]: ¡ V—Value flag. If set, the SID carries a label value. ¡ L—Local flag. If set, the SID has local significance. · Metric—Link cost. · Label—Label value. |
TxPathID |
Add-path ID of advertised routes. |
# Display BGP LS statistics information for the public network.
<sysname> display bgp link-state statistics
Total number of routes: 6
Total number of node routes: 1
Total number of link routes: 2
Total number of IPv4 prefix routes: 3
Total number of IPv6 prefix routes: 0
Total number of TE policy routes: 0
Total number of SRv6-SID routes: 0
Table 11 Command output
Field |
Description |
Total number of routes |
Total number of BGP LS routes. |
Total number of node routes |
Total number of BGP LS routes that describe node state. |
Total number of link routes |
Total number of BGP LS routes that describe link state. |
Total number of IPv4 prefix routes |
Total number of BGP LS routes that describe IPv4 reachable prefix. |
Total number of IPv6 prefix routes |
Total number of BGP LS routes that describe IPv6 reachable prefix. |
Total number of TE policy routes |
Total number of BGP LS routes that describe SR-MPLS and SRv6 TE policies. |
Total number of SRv6-SID routes |
Total number of BGP LS routes that describe SRv6 SID. |
display bgp link-state flexible-algorithm-definition
Use display bgp link-state flexible-algorithm-definition to display flexible algorithm definition information about the BGP LS routes that describe LS node information.
Syntax
display bgp [ instance instance-name ] link-state [ vpn [ route-distinguisher route-distinguisher ] ] [ peer { ipv4-address | ipv6-address } { received | advertised } ] ls-prefix flexible-algorithm-definition
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
vpn: Displays information for the private network. If you do not specify this keyword, the command displays information for the public network.
route-distinguisher route-distinguisher: Specifies a route distinguisher (RD), a string of 3 to 21 characters. If you do not specify an RD, the command displays information for all RDs. You can specify an RD in one of the following formats:
· 16-bit AS number:32-bit user-defined number, such as 101:3.
· 32-bit IP address:16-bit user-defined number, such as 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, such as 65536:1. In this format, the minimum value for the AS number is 65536.
peer { ipv4-address | ipv6-address }: Displays information sent to or received from the specified peer. The ipv4-address argument specifies a peer by its IPv4 address, and the ipv6-address argument specifies a peer by its IPv6 address. If you do not specify this option, the command displays information sent to or received from all peers.
advertised: Displays information advertised to the specified peer.
received: Displays information received from the specified peer.
ls-prefix: Specifies an LS prefix, a case-insensitive string of 1 to 512 characters.
Examples
# Display flexible algorithm definition information about the BGP LS routes that describe LS node information.
<Sysname> display bgp link-state [V][L1][I0x0][N[c2][b1.1.1.9][s00
00.0000.0001.00]]/328 flexible-algorithm-definition
FAD (Flex-Algorithm/Priority/Metric-Type/Calc-Type): (130/255/1/0)
Exclude-Any: 0x00000000 0x00000000 0x00000000 0x00000500
FAD(Flex-Algorithm/Priority/Metric-Type/Calc-Type): (240/250/0/0)
Include-All: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000004 0x00000012
Table 12 Command output
Field |
Description |
FAD(Flex-Algorithm/Priority/Metric-Type/Calc-Type) |
Flexible algorithm definition, including: · Algorithm ID. · Algorithm priority. · Metric used by the algorithm: ¡ 0—IGP link cost. ¡ 1—Link latency. ¡ 2—MPLS TE metric. · Algorithm type. The value range for the algorithm type is 0 to 127 as defined by IANA. |
Exclude-Any |
Exclude-Any rule in the affinity attribute. |
Include-Any |
Include-Any rule in the affinity attribute. |
Include-All |
Include-All rule in the affinity attribute. |
Flags |
FAD flags sub-TLV of the algorithm. |
display bgp link-state prefix-sid
Use display bgp link-state prefix-sid to display SR-MPLS prefix SID information about the BGP LS routes that describe IPv4 reachable prefixes.
Syntax
display bgp [ instance instance-name ] link-state [ vpn [ route-distinguisher route-distinguisher ] ] [ peer { ipv4-address | ipv6-address } { advertised | received } ] ls-prefix prefix-sid
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
vpn: Displays information for the private network. If you do not specify this keyword, the command displays information for the public network.
route-distinguisher route-distinguisher: Specifies a route distinguisher (RD), a string of 3 to 21 characters. If you do not specify an RD, the command displays information for all RDs. You can specify an RD in one of the following formats:
· 16-bit AS number:32-bit user-defined number, such as 101:3.
· 32-bit IP address:16-bit user-defined number, such as 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, such as 65536:1. In this format, the minimum value for the AS number is 65536.
peer { ipv4-address | ipv6-address }: Displays information sent to or received from the specified peer. The ipv4-address argument specifies a peer by its IPv4 address, and the ipv6-address argument specifies a peer by its IPv6 address. If you do not specify this option, the command displays information sent to or received from all peers.
advertised: Displays information advertised to the specified peer.
received: Displays information received from the specified peer.
ls-prefix: Specifies an LS prefix, a case-insensitive string of 1 to 512 characters.
Examples
# Display SR-MPLS prefix SID information about the BGP LS routes that describe IPv4 reachable prefixes.
<Sysname> display bgp link-state [T4][L2][I0x0][N[c2][b1.1.1.9][s0000.0000.0002.00]][P[
p1.1.1.9/32]]/400 prefix-sid
Prefix Segment Identifier (Flags/Algorithm/SID): 0xe0/0/10
Table 13 Command output
Field |
Description |
Prefix Segment Identifier(Flags/Algorithm/SID) |
SR-MPLS prefix SID information: · Flags—Flag, indicating the SID type. · Algorithm—Algorithm associated with the SID. · SID—SID value. |
display bgp link-state segment-list
Use display bgp link-state segment-list to display SID list information about the BGP LS routes that describe SR-MPLS TE policy/SRv6 TE policy information.
Syntax
display bgp [ instance instance-name ] link-state [ peer { ipv4-address | ipv6-address } { received | advertised } ] ls-prefix segment-list
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
peer { ipv4-address | ipv6-address }: Displays information sent to or received from the specified peer. The ipv4-address argument specifies a peer by its IPv4 address, and the ipv6-address argument specifies a peer by its IPv6 address. If you do not specify this option, the command displays information sent to or received from all peers.
advertised: Displays information advertised to the specified peer.
received: Displays information received from the specified peer.
ls-prefix: Specifies an LS prefix, a case-insensitive string of 1 to 512 characters.
Examples
# Display SID list information about the BGP LS routes that describe SR-MPLS TE policy/SRv6 TE policy information.
<Sysname> display bgp link-state [TEPOLICY][SEGMENT-ROUTING][I0x0][N[c2][bgp-ls-identifier1.1.1.9][bgp-router-id1.1.1.9][ipv4-router-id1.1.1.9][ipv6-router-id::]][TE[protocol-origin3][Flag0][endpoint2.2.2.9][color20][originator-as0][originator-address0.0.0.0][discriminator10]]/760 segment-list
SR Segment List:
Flags: 0x7800
MTID: 0
Alg: 0
Weight: 1
Segment(<Type, Flags, SID, SID Descriptor>):
<1, 61440, 16020, 0>, <1, 61440, 16023, 0>
SR Segment List:
Flags: 0xF800
MTID: 0
Alg: 0
Weight: 1
Segment(<Type, Flags, SID, SID Descriptor>):
<2,53248,8000::1,0>, <2,61440,8000::2,0>
<2,61440,8000::3,0>
Table 14 Command output
Field |
Description |
SR Segment List |
SID list. |
Flags |
Flag, indicating the SID list type and state. |
MTID |
ID of the topology to which the SID belongs. This field is not supported in the current software version. |
Alg |
ID of the algorithm associated with the SID. The value range for the algorithm ID is as defined by IANA. |
Weight |
Weight of the SID list in the candidate paths. |
Segment(<Type, Flags, SID, SID Descriptor>) |
SID information. The SID list contains one or multiple SID segments, and a SID segment contains the following fields: · Type—SID type. ¡ 1—SR-MPLS SID. ¡ 2—SRv6 SID. · Flags—Flag, indicating the SID state. · SID—SID value. · SID Descriptor—SID description including SID algorithm information. The description varies by SID type. |
display bgp link-state sr-algorithm
Use display bgp link-state sr-algorithm to display algorithm information about the BGP LS routes that describe LS node information.
Syntax
display bgp [ instance instance-name ] link-state [ vpn [ route-distinguisher route-distinguisher ] ] [ peer { ipv4-address | ipv6-address } { received | advertised } ] ls-prefix sr-algorithm
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
vpn: Displays information for the private network. If you do not specify this keyword, the command displays information for the public network.
route-distinguisher route-distinguisher: Specifies a route distinguisher (RD), a string of 3 to 21 characters. If you do not specify an RD, the command displays information for all RDs. You can specify an RD in one of the following formats:
· 16-bit AS number:32-bit user-defined number, such as 101:3.
· 32-bit IP address:16-bit user-defined number, such as 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, such as 65536:1. In this format, the minimum value for the AS number is 65536.
peer { ipv4-address | ipv6-address }: Displays information sent to or received from the specified peer. The ipv4-address argument specifies a peer by its IPv4 address, and the ipv6-address argument specifies a peer by its IPv6 address. If you do not specify this option, the command displays information sent to or received from all peers.
advertised: Displays information advertised to the specified peer.
received: Displays information received from the specified peer.
ls-prefix: Specifies an LS prefix, a case-insensitive string of 1 to 512 characters.
Examples
# Display algorithm information about the BGP LS routes that describe LS node information.
<Sysname> display bgp link-state [V][L1][I0x0][N[c2][b1.1.1.9][s0000.0000.0001.00]]/328 sr-algorithm
SR-Algorithm: 0, 130, 240
Table 15 Command output
Field |
Description |
SR-Algorithm |
IDs of all algorithms supported by the SRv6 or SR-MPLS node. |
display bgp network
Use display bgp network to display information about routes advertised by the network command and shortcut routes configured by the network short-cut command.
display bgp [ instance instance-name ] network { ipv4 | ipv6 } [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ]
display bgp [ instance instance-name ] network ipv4 labeled-unicast [ vpn-instance vpn-instance-name ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
ipv4: Displays IPv4 address family information.
ipv6: Displays IPv6 address family information.
multicast: Displays BGP multicast address family information.
unicast: Displays BGP unicast address family information.
labeled-unicast: Displays BGP IPv4 labeled unicast address family information.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays routing information for the public network.
By default, the unicast keyword is used if none of the multicast, labeled-unicast, and unicast keywords are specified.
# Display information about routes advertised by the network command and shortcut routes configured by the network short-cut command in the IPv4 unicast address family.
<Sysname> display bgp network ipv4
BGP local router ID: 192.168.1.135
Local AS number: 100
Network Mask Route-policy Short-cut
20.1.1.0 255.255.255.0 No
40.1.1.0 255.255.255.0 abc No
30.1.1.0 255.255.255.0 Yes
# Display information about routes advertised by the network command and shortcut routes configured by the network short-cut command in the IPv6 unicast address family.
<Sysname> display bgp network ipv6
BGP local router ID: 192.168.1.135
Local AS number: 100
Network PrefixLen Route-policy Short-cut
1:: 24 No
2:: 24 No
3:: 64 policy1 No
2:: 24 Yes
Table 16 Command output
Field |
Description |
Network |
Destination network address of the routes advertised by the network command and the shortcut routes. |
Mask |
Mask of the destination network address. |
PrefixLen |
Prefix length of the destination network address. |
Route-policy |
Routing policy that is applied to the route. |
Short-cut |
Whether the route is a shortcut route: · Yes. · No. |
display bgp non-stop-routing status
Use display bgp non-stop-routing status to display BGP NSR status information.
display bgp [ instance instance-name ] non-stop-routing status
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP NSR status information for the default BGP instance.
# Display BGP NSR status information.
<Sysname> display bgp non-stop-routing status
Location of preferred standby process: Chassis 0 slot 1
TCP NSR status: Ready
Table 17 Command output
Field |
Description |
BGP NSR status |
BGP NSR status: · Ready—BGP NSR has backed up BGP neighbor and routing information from the active process to the standby process. In this state, BGP NSR can ensure continuous routing when an active/standby process switchover occurs. · Not ready—BGP NSR is backing up BGP neighbor and routing information from the active process to the standby process. If an active/standby process switchover occurs in this state, traffic is interrupted and the BGP session will be re-established. · Not configured—BGP NSR is disabled. |
Location of preferred standby process |
(In standalone mode.) ID of the slot where the preferred standby process resides. (In IRF mode.) Chassis ID and slot ID where the preferred standby process resides. |
TCP NSR status |
TCP NSR status: · Ready—TCP NSR has backed up TCP connection information from the active process to the standby process. · Not ready—TCP NSR is backing up TCP connection information from the active process to the standby process. |
display bgp paths
Use display bgp paths to display BGP path attribute information.
display bgp [ instance instance-name ] paths [ as-regular-expression ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP path attribute information for the default BGP instance.
as-regular-expression: Displays information about BGP path attributes whose AS_PATH attribute matches the specified regular expression. The as-regular-expression argument is a string of 1 to 256 characters. If you do not specify this argument, the command displays information about all BGP path attributes.
If you specify the as-regular-expression argument, the command does not output the separate or total path attribute statistics.
In the output path attribute list, an entry is formed by combining routes with identical path attributes. The list displays the number of routes in the entry, and the MED, AS_PATH, and ORIGIN attribute values of the routes.
Different entries might have the same MED, AS_PATH, and ORIGIN attribute values.
Examples
# Display information about all BGP path attributes.
<Sysname> display bgp paths
Total path attribute count: 6
As-path: 2, Extcommunity: 3, Community: 0
RefCount MED Path/Origin
3 0 ?
2 0 100i
3 0 100i
1 0 ?
1 0 ?
1 0 ?
Table 18 Command output
Field |
Description |
Total path attribute count |
Total number of path attribute entries. |
As-path |
Number of AS_PATH attributes. Duplicated attributes are counted only once. |
Extcommunity |
Number of extended community attributes. Duplicated attributes are counted only once. |
Community |
Number of community attributes. Duplicated attributes are counted only once. |
RefCount |
Number of BGP routes with identical path attributes. |
MED |
MULTI_EXIT_DISC attribute value of the routes. |
Path/Origin |
AS_PATH and ORIGIN attributes of the routes: · AS_PATH attribute—Records the ASs the routes have passed to avoid routing loops. · ORIGIN attribute—Identifies the origin of the routes: ¡ i—Originated in the AS. The origin of routes advertised with the network command is IGP. ¡ e—Learned through EGP. ¡ ?—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
display bgp peer
Use display bgp peer to display BGP peer or peer group information.
display bgp [ instance instance-name ] peer ipv4 [ mdt | multicast | mvpn | rtfilter | sr-policy | [ flowspec | labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address mask-length | { ipv4-address | group-name group-name } log-info | [ ipv4-address ] verbose ]
display bgp [ instance instance-name ] peer ipv6 [ multicast | mvpn | sr-policy | [ flowspec | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address prefix-length | { ipv6-address | group-name group-name } log-info | [ ipv6-address ] verbose ]
display bgp [ instance instance-name ] peer ipv4 [ multicast | mvpn | sr-policy | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address prefix-length | ipv6-address log-info | [ ipv6-address ] verbose ]
display bgp [ instance instance-name ] peer ipv6 [ multicast | mvpn | sr-policy | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address mask-length | { ipv4-address | group-name group-name } log-info | [ ipv4-address ] verbose ]
display bgp [ instance instance-name ] peer { ipv4 | ipv6 } [ unicast ] vpn-instance-all [ verbose ]
display bgp [ instance instance-name ] peer ipv4 labeled-unicast vpn-instance-all [ verbose ]
display bgp [ instance instance-name ] peer link-state [ vpn ] [ ipv4-address mask-length | ipv6-address prefix-length | { ipv4-address | ipv6-address | group-name group-name } log-info | [ ipv4-address | ipv6-address ] verbose ]
display bgp [ instance instance-name ] peer vpnv4 [ flowspec | vpn-instance vpn-instance-name ] [ ipv4-address mask-length | { ipv4-address | group-name group-name } log-info | [ ipv4-address ] verbose ]
display bgp [ instance instance-name ] peer vpnv4 [ flowspec ] { ipv6-address prefix-length | ipv6-address { log-info | verbose } }
display bgp [ instance instance-name ] peer l2vpn [ ipv4-address mask-length | { ipv4-address | group-name group-name } log-info | [ ipv4-address ] verbose ]
display bgp [ instance instance-name ] peer l2vpn evpn [ ipv4-address mask-length | ipv6-address prefix-length | { ipv4-address | ipv6-address | group-name group-name } log-info | [ ipv4-address | ipv6-address ] verbose ]
display bgp [ instance instance-name ] peer vpnv6 flowspec [ ipv4-address mask-length | { ipv4-address | group-name group-name } log-info | [ ipv4-address ] verbose ]
display bgp [ instance instance-name ] peer vpnv6 flowspec [ ipv6-address prefix-length | ipv6-address log-info | [ ipv6-address ] verbose ]
display bgp [ instance instance-name ] peer vpnv6 [ ipv4-address mask-length | ipv6-address prefix-length | { ipv4-address | ipv6-address | group-name group-name } log-info | [ ipv4-address | ipv6-address ] verbose ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP peer or peer group information for the default BGP instance.
ipv4: Displays information about a BGP peer or peer group in IPv4 address family.
flowspec: Displays information about a BGP peer or peer group in flowspec address family.
labeled-unicast: Displays information about a BGP peer or peer group in BGP IPv4 labeled unicast address family.
ipv6: Displays information about a BGP peer or peer group in IPv6 address family.
link-state: Displays information about a BGP peer or peer group in BGP LS address family.
link-state vpn: Displays information about a BGP peer or peer group in BGP-VPN LS address family.
vpnv4: Displays information about a BGP peer or peer group in VPNv4 address family.
l2vpn: Displays information about a BGP peer or peer group in L2VPN address family.
evpn: Displays information about a BGP peer or peer group in EVPN address family.
vpnv6: Displays information about a BGP peer or peer group in VPNv6 address family.
mdt: Displays information about a BGP peer or peer group in MDT address family.
multicast: Displays information about a BGP peer or peer group in multicast address family.
mvpn: Displays information about a BGP peer or peer group in MVPN address family.
rtfilter: Displays information about a BGP peer or peer group in IPv4 RT filter address family.
sr-policy: Displays information about a BGP peer or peer group in SR policy address family.
unicast: Displays BGP unicast peer or peer group information.
vpn-instance-all: Displays BGP peer or peer group information for all VPN instances.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays BGP peer or peer group information for the public network.
ipv4-address mask-length: Specifies a subnet. The value range for the mask length is 0 to 32. If you specify a subnet, this command displays information about all dynamic peers in the subnet.
ipv4-address: Specifies a peer by its IPv4 address.
ipv6-address prefix-length: Specifies a subnet. The value range for the prefix length is 0 to 128. If you specify a subnet, this command displays information about all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address.
group-name group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters.
log-info: Displays log information.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief BGP peer or peer group information.
If you do not specify any parameters, this command displays brief information about all BGP peers for the specified address family.
By default, the unicast keyword is used if none of the unicast, labeled-unicast, mdt, mvpn, flowspec, and multicast keywords are specified.
# Display brief information about all BGP IPv4 unicast peers.
<Sysname> display bgp peer ipv4
BGP local router ID: 192.168.100.1
Local AS number: 100
Total number of peers: 1 Peers in established state: 1
* - Dynamically created peer
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
10.2.1.2 200 13 16 0 0 00:10:34 Established
# Display brief BGP IPv4 unicast peer information for all VPN instances.
<Sysname> display bgp peer ipv4 vpn-instance-all
Local AS number: 100
* - Dynamically created peer
VPN instance: 1
BGP local router ID: 111.1.1.1
Total number of peers: 2 Peers in established state: 0
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
111.1.1.1 100 0 0 0 0 00:00:34 Connect
111.1.1.2 100 0 0 0 0 00:00:34 Connect
VPN instance: 2
BGP local router ID: 112.1.1.1
Total number of peers: 2 Peers in established state: 0
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
112.1.1.1 100 0 0 0 0 00:00:06 Idle
112.1.1.2 100 0 0 0 0 00:00:06 Idle
Table 19 Command output
Field |
Description |
* - Dynamically created peer |
An asterisk (*) before a peer address indicates that the peer is a dynamic peer. |
VPN instance |
Name of the VPN instance to which the peer belongs. |
Peer |
IPv4 or IPv6 address of the peer. |
AS |
AS number of the peer. |
MsgRcvd |
Number of messages received. |
MsgSent |
Number of messages sent. |
OutQ |
Number of messages to be sent. |
PrefRcv |
For the IPv4, IPv6, VPNv4, and VPNv6 address families, this field displays the number of prefixes that have been received from the peer and added into the local BGP routing table. For MPLS L2VPN, this field displays the number of label blocks received from the peer. For VPLS, this field displays the total number of label blocks and VPLS PEs discovered by BGP. For the IPv4 MDT address family, this field displays the number of MDT messages received from the peer. For the IPv4 flowspec address family, this field displays the number of IPv4 flowspec messages received from the peer. For the IPv6 flowspec address family, this field displays the number of IPv6 flowspec messages received from the peer. For the VPNv4 flowspec address family, this field displays the number of VPNv4 flowspec messages received from the peer. For the VPNv6 flowspec address family, this field displays the number of VPNv6 flowspec messages received from the peer. |
Up/Down |
Lasting time of the current BGP session state. |
State |
Current state of the BGP session between the local router and the peer. |
# Display brief information about all dynamic peers in network 1.1.1.0/24.
<Sysname> display bgp peer ipv4 1.1.1.0 24
Dynamic address range: 1.1.1.0 24
Configured: Active Hold Time: 3 sec Keepalive Time: 1 sec
Address family IPv4 Unicast: Configured
Maximum allowed prefix number: 100
Threshold: 75%
Minimum time between advertisements is 100 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Nexthop self has been configured
Keep-all-routes has been configured
Send community has been configured
Send extend community has been configured
Default route originating has been configured
Multi-hop ebgp has been enabled
Peer preferred value: 100
BFD: Enabled
Site-of-Origin: 1:1
Routing policy configured:
No import as-path-acl list
Export as-path-acl list is: 22
No import prefix list
Export prefix list is: p1
No import route policy
Export route policy is: p1
No import filter-policy
No export filter-policy
Dynamic peers:
# Display brief information about all dynamic peers in network 1::/64.
<Sysname> display bgp peer ipv6 1:: 64
Dynamic address range: 1:: 64
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Address family IPv6 Unicast: Configured
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 15 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Send community has been configured
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Dynamic peers:
1::1
Table 20 Command output
Field |
Description |
Type |
BGP connection type between the local router and the dynamic peer: · IBGP link—IBGP connection. · EBGP link—EBGP connection. |
Configured |
Timers configured on the local router in seconds, including the hold time (Active Hold Time) and keepalive interval (Keepalive Time). |
Address family IPv4 Unicast |
IPv4 unicast address family capability. |
Address family IPv4 Flowspec |
IPv4 flowspec address family capability. |
Address family link-state |
LS address family capability. |
Address family IPv6 Unicast |
IPv6 unicast address family capability. |
Address family IPv6 Flowspec |
IPv6 flowspec address family capability. |
Address family IPv4 Labeled-unicast |
IPv4 labeled unicast address family capability. |
Address family IPv4 Multicast |
IPv4 multicast address family capability. |
Address family IPv6 Multicast |
IPv6 multicast address family capability. |
Address family MDT |
IPv4 MDT address family capability. |
Address family L2VPN |
L2VPN address family capability. |
Address family L2VPN VPWS (Draft) |
L2VPN VPWS address family capability. |
Maximum allowed prefix number |
Maximum number of routes allowed to learn from the peer. This field does not apply to BGP L2VPN. |
Threshold |
Percentage of received routes from the peer to maximum routes allowed to learn from the peer. If the percentage is reached, the system generates alarm messages. This field does not apply to BGP L2VPN. |
Minimum time between advertisements |
Minimum route advertisement interval in seconds. |
Optional capabilities |
Optional capabilities supported by the local end. |
BIER capability has been configured |
BGP routes carrying the BIER path attribute can be exchanged with peers. |
Peer Preferred Value |
Preferred value specified for the routes from the peer. This field does not apply to BGP L2VPN. |
BFD |
Whether BFD is enabled to detect the link to the BGP peers. |
IPsec profile name |
IPsec profile applied to the IPv6 BGP peer. This field is available only for the IPv6 unicast and IPv6 multicast address families. |
Routing policy configured |
Routing policy configured for the peer. If you do not specify a routing policy, this field displays No routing policy is configured. This field does not apply to BGP L2VPN. |
Dynamic peers |
IP addresses of dynamic peers. |
# Display detailed information about BGP peer 10.2.1.2 in IPv4 unicast address family.
<Sysname> display bgp peer ipv4 10.2.1.2 verbose
Peer: 10.2.1.2 Local: 192.168.100.1
Type: EBGP link
BGP version 4, remote router ID 192.168.100.2
Update group ID: 0
BGP current state: Established, Up for 00h11m10s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port: Local - 179 Remote - 60672
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time: 60 sec
Peer optional capabilities:
Peer supports BGP multi-protocol extension
Peer supports BGP route refresh capability
Peer supports BGP route AS4 capability
Address family IPv4 Unicast: advertised and received
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 0
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open 10:38:50-2013.7.23 1 1
10:38:50-2013.7.23 1 1
Update 10:38:51-2013.7.23 1 1
10:38:51-2013.7.23 1 1
Notification - 0 0
- 0 0
Keepalive 10:38:50-2013.7.23 1 1
10:38:50-2013.7.23 1 1
RouteRefresh - 0 0
- 0 0
Total - 3 3
- 3 3
Maximum allowed prefix number: 4294967295
Threshold: 75%
Authentication type configured: MD5
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Path-MTU-discovery has been enabled
TCP-MSS configured value: 200
Peer Preferred Value: 0
GTSM has been enabled, and the maximum number of hops is 10
BFD: Enabled
Min transmit-interval: 10ms
Min receive-interval: 10ms
Detect-multiplier: 10
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Flap dampening: Enabled
Max idle time=1800 sec Min established time=600 sec
# Display detailed information about BGP peer 2::2 in IPv4 unicast address family.
<Sysname> display bgp peer ipv4 2::2 verbose
Peer: 2::2 Local: 2.2.2.2
Type: EBGP link
BGP version 4, remote router ID 3.3.3.3
BGP current state: Established, Up for 00h24m31s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
Port: Local - 179 Remote - 51971
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time: 60 sec
Peer optional capabilities:
Peer supports BGP multi-protocol extension
Peer supports BGP route refresh capability
Peer supports BGP extended nexthop encoding capability
Peer supports BGP route AS4 capability
Address family IPv4 Unicast: advertised and received
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 1
Sent: UnReach NLRI 0, Reach NLRI 5
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open 15:45:52-2019.4.19 1 2
15:45:52-2019.4.19 1 2
Update 15:45:53-2019.4.19 2 4
15:45:52-2019.4.19 6 12
Notification 15:45:50-2019.4.19 0 1
- 0 0
Keepalive 16:09:25-2019.4.19 25 31
16:10:13-2019.4.19 30 36
RouteRefresh - 0 0
- 0 0
Total - 28 38
- 37 50
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Extended nexthop encoding has been enabled
TCP-MSS configured value: 200
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
# Display detailed information about BGP peer 1::2 in IPv6 unicast address family.
<Sysname> display bgp peer ipv6 1::2 verbose
Peer: 1::2 Local: 192.168.1.136
Type: EBGP link
BGP version 4, remote router ID 192.168.1.135
Update group ID: 0
BGP current state: Established, Up for 00h05m48s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port: Local - 13184 Remote - 179
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time: 60 sec
Peer optional capabilities:
Peer supports BGP multi-protocol extension
Peer supports BGP route refresh capability
Peer supports BGP route AS4 capability
Address family IPv6 Unicast: advertised and received
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 3
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open 18:59:15-2013.4.24 1 1
18:59:15-2013.4.24 1 2
Update - 0 0
18:59:16-2013.4.24 1 1
Notification - 0 0
18:59:15-2013.4.24 0 1
Keepalive 18:59:15-2013.4.24 1 1
18:59:15-2013.4.24 1 1
RouteRefresh - 0 0
- 0 0
Total - 2 2
- 3 5
Maximum allowed prefix number: 4294967295
Threshold: 75%
Authentication type configured: MD5
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
TCP-MSS configured value: 200
GTSM has been enabled, and the maximum number of hops is 10
BFD: Enabled
Min transmit-interval: 10ms
Min receive-interval: 10ms
Detect-multiplier: 10
IPsec profile name: profile001
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Flap dampening: Enabled
Max idle time=1800 sec Min established time=600 sec
# Display detailed information about BGP L2VPN peer 10.1.1.1.
<Sysname> display bgp peer l2vpn 10.1.1.1 verbose
Peer: 10.1.1.1 Local: 192.168.1.136
Type: EBGP link
BGP version 4, remote router ID 192.168.1.135
Update group ID: 0
BGP current state: Established, Up for 00h01m25s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
Port: Local - 179 Remote - 1049
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time: 60 sec
Peer optional capabilities:
Peer supports BGP multi-protocol extension
Peer supports BGP route refresh capability
Peer supports BGP route AS4 capability
Address family IPv4 Unicast: advertised and received
Address family L2VPN: advertised
Address family L2VPN VPWS (Draft): advertised and received
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 3
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open 18:59:15-2013.4.24 1 1
18:59:15-2013.4.24 1 2
Update - 0 0
18:59:16-2013.4.24 1 1
Notification - 0 0
18:59:15-2013.4.24 0 1
Keepalive 18:59:15-2013.4.24 1 1
18:59:15-2013.4.24 1 1
RouteRefresh - 0 0
- 0 0
Total - 2 2
- 3 5
Maximum allowed prefix number: 4294967295
Threshold: 75%
Authentication type configured: MD5
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
GTSM has been enabled, and the maximum number of hops is 10
Path-MTU-discovery has been enabled
TCP-MSS configured value: 200
BFD: Enabled
Min transmit-interval: 10ms
Min receive-interval: 10ms
Detect-multiplier: 10
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Flap dampening: Enabled
Max idle time=1800 sec Min established time=600 sec
# Display detailed BGP IPv4 unicast peer information for all VPN instances.
<Sysname> display bgp peer ipv4 vpn-instance-all verbose
Peer: 111.1.1.1 Local: 111.1.1.1
VPN instance: 1
Type: IBGP link
BGP version 4, remote router ID 0.0.0.0
BGP current state: Connect
BGP current event: CRTimerExpired
BGP last state: Connect
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 0
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open - 0 0
- 0 0
Update - 0 0
- 0 0
Notification - 0 0
- 0 0
Keepalive - 0 0
- 0 0
RouteRefresh - 0 0
- 0 0
Total - 0 0
- 0 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 15 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Peer: 111.1.1.2 Local: 111.1.1.1
VPN instance: 1
Type: IBGP link
BGP version 4, remote router ID 0.0.0.0
BGP current state: Connect
BGP current event: CRTimerExpired
BGP last state: Connect
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 0
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open - 0 0
- 0 0
Update - 0 0
- 0 0
Notification - 0 0
- 0 0
Keepalive - 0 0
- 0 0
RouteRefresh - 0 0
- 0 0
Total - 0 0
- 0 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 15 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Peer: 112.1.1.1 Local: 112.1.1.1
VPN instance: 2
Type: IBGP link
BGP version 4, remote router ID 0.0.0.0
BGP current state: Connect
BGP current event: CRTimerExpired
BGP last state: Connect
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 0
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open - 0 0
- 0 0
Update - 0 0
- 0 0
Notification - 0 0
- 0 0
Keepalive - 0 0
- 0 0
RouteRefresh - 0 0
- 0 0
Total - 0 0
- 0 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 15 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Peer: 112.1.1.2 Local: 112.1.1.1
VPN instance: 2
Type: IBGP link
BGP version 4, remote router ID 0.0.0.0
BGP current state: Connect
BGP current event: CRTimerExpired
BGP last state: Connect
InQ updates: 0, OutQ updates: 0
NLRI statistics:
Rcvd: UnReach NLRI 0, Reach NLRI 0
Sent: UnReach NLRI 0, Reach NLRI 0
Message statistics:
Msg type Last rcvd time/ Current rcvd count/ History rcvd count/
Last sent time Current sent count History sent count
Open - 0 0
- 0 0
Update - 0 0
- 0 0
Notification - 0 0
- 0 0
Keepalive - 0 0
- 0 0
RouteRefresh - 0 0
- 0 0
Total - 0 0
- 0 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 15 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer preferred value: 0
Site-of-Origin: Not specified
Routing policy configured:
No routing policy is configured
Flap dampening: Enabled
Max idle time=1800 sec Min established time=600 sec
Table 21 Command output
Field |
Description |
|
Peer |
IPv4 or IPv6 address of the peer. |
|
Local |
Local router ID. |
|
VPN instance |
Name of the VPN instance to which the peer belongs. |
|
Type |
BGP connection type between the local router and the peer: · IBGP link—IBGP connection. · EBGP link—EBGP connection. |
|
remote router ID |
Router ID of the peer. |
|
Update group ID |
ID of the update group to which the BGP peer belongs. This field is displayed only when the BGP peer is in Established state. |
|
BGP current state |
Current state of the BGP session between the local router and the peer. |
|
Up for |
Lasting time of the BGP session. |
|
BGP current event |
Current event of the BGP session between the local router and the peer. |
|
BGP last state |
Previous state of the BGP session. |
|
Port |
TCP port numbers of the local router and its peer. |
|
Configured |
Timers configured on the local router in seconds, including the hold time (Active Hold Time) and keepalive interval (Keepalive Time). |
|
Received |
Received timer (configured on the peer) in seconds, including the hold time (Active Hold Time). |
|
Negotiated |
Negotiated timers in seconds, including the hold time (Active Hold Time) and keepalive interval (Keepalive Time). |
|
Peer optional capabilities |
Optional capabilities supported by the peer. |
|
Peer supports BGP route AS4 capability |
The peer supports 4-byte AS number. |
|
Peer supports BGP extended nexthop encoding capability |
Peers in IPv4 unicast address family support extended next hop encoding capability. |
|
Address family IPv4 Unicast |
IPv4 unicast address family capability: routes of the address family can be advertised and received. |
|
Address family IPv4 Flowspec |
IPv4 flowspec address family capability: routes of the address family can be advertised and received. |
|
Address family IPv4 SR Policy |
IPv4 SR policy address family capability: routes of the address family can be advertised and received. |
|
Address family LS |
LS address family capability: routes of the address family can be advertised and received. |
|
Address family IPv6 Unicast |
IPv6 unicast address family capability: routes of the address family can be advertised and received. |
|
Address family IPv4 Labeled-unicast |
IPv4 labeled unicast address family capability: routes of the address family can be advertised and received. |
|
Address family IPv6 Flowspec |
IPv6 flowspec address family capability: routes of the address family can be advertised and received. |
|
Address family IPv4 Multicast |
IPv4 multicast address family capability: routes of the address family can be advertised and received. |
|
Address family IPv6 Multicast |
IPv6 multicast address family capability: routes of the address family can be advertised and received. |
|
Address family MDT |
IPv4 MDT address family capability: routes of the address family can be advertised and received. |
|
Address family L2VPN |
L2VPN address family capability: routes of the address family can be advertised and received. |
|
Address family L2VPN VPWS (Draft) |
L2VPN VPWS address family capability (draft-kompella-ppvpn-l2vpn-03): routes of the address family can be advertised and received. |
|
InQ updates |
Number of received updates to be processed. |
|
OutQ updates |
Number of updates to be sent to the peer. |
|
NLRI statistics |
Number of the reachable and unreachable routes received from and sent to the peer after the BGP session is established. |
|
Message statistics |
BGP message statistics. |
|
Msg type |
BGP message type. |
|
Last rcvd time/Last sent time |
Time when the most recent BGP message was received from or sent to the peer. |
|
Current rcvd count/Current sent count |
Number of BGP messages received from or sent to the peer on the current BGP session. |
|
History rcvd count/History sent count |
Number of BGP messages received from or sent to the peer since the BGP peer relationship was established. |
|
Total |
Total number of received and sent messages. |
|
Maximum allowed prefix number |
Maximum number of routes allowed to learn from the peer. This field does not apply to BGP L2VPN. |
|
Threshold |
Percentage of received routes from the peer to maximum routes allowed to learn from the peer. If the percentage is reached, the system generates alarm messages. This field does not apply to BGP L2VPN. |
|
Authentication type configured |
Authentication mode of the peer: · None. · MD5. · Keychain (keychain-name). |
|
Minimum time between advertisements |
Minimum route advertisement interval in seconds. |
|
Optional capabilities |
Optional capabilities supported by the local end. |
|
Extended Nexthop Encoding has been enabled |
The local end supports the extended next hop encoding capability. |
|
BIER capability has been configured |
BGP routes carrying the BIER path attribute can be exchanged with peers. |
|
TCP-MSS configured value |
TCP maximum segment size used for TCP connection to the peer. |
|
Peer Preferred Value |
Preferred value specified for the routes from the peer. This field does not apply to BGP L2VPN. |
|
GTSM has been enabled |
GTSM is supported. |
|
the maximum number of hops |
Maximum number of hops to the specified peer. |
|
BFD |
Whether BFD is enabled to detect the link to the BGP peer. |
|
Min transmit-interval |
Minimum interval (in milliseconds) for transmitting BFD control packets. |
|
Min receive-interval |
Minimum interval (in milliseconds) for receiving BFD control packets. |
|
Detect-multiplier |
Detection time multiplier. |
|
IPsec profile name |
IPsec profile applied to the IPv6 BGP peer. This field is available only for the IPv6 unicast and IPv6 multicast address families. |
|
Routing policy configured |
Routing policy configured for the peer. If you do not specify a routing policy, this field displays No routing policy is configured. This field does not apply to BGP L2VPN. |
|
Flap dampening |
Peer flap dampening state. |
|
Max idle time |
Maximum time (in seconds) during which a BGP peer remains in idle state. |
|
Min established time |
Minimum time (in seconds) during which a BGP peer remains in Established state so as to exit the dampened state. |
|
# Display log information for BGP IPv4 unicast peer 1.1.1.1.
<Sysname> display bgp peer ipv4 1.1.1.1 log-info
Date Time State Notification
Error/SubError
06-Feb-2013 22:54:42 Down Send notification with error 6/4
<administrative reset>
Table 22 Command output
Field |
Description |
Peer |
IPv4 or IPv6 address of the peer. |
Date |
Date on which the Notification was sent or received. |
Time |
Time at which the Notification was sent or received. |
State |
BGP session state: · Up—The BGP session is in Established state. · Down—The BGP session is down. |
Notification Error/SubError |
Error code of the Notification, indicating the cause of why the BGP session was down. · Error—Refers to the error code, which identifies the type of the Notification. · SubError—Refers to the error subcode of the Notification, which identifies the specific information about the reported error. |
display bgp peer received prefix-list
Use display bgp peer received prefix-list to display the ORF prefix information received by a peer.
Syntax
display bgp [ instance instance-name ] peer ipv4 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] { ipv4-address | ipv6-address } received prefix-list
display bgp [ instance instance-name ] peer ipv6 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] { ipv4-address | ipv6-address } received prefix-list
display bgp [ instance instance-name ] peer ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] ipv6-address received prefix-list
display bgp [ instance instance-name ] peer ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] ipv4-address received prefix-list
display bgp [ instance instance-name ] peer { vpnv4 | vpnv6 } ipv4-address received prefix-list
display bgp [ instance instance-name ] peer l2vpn evpn { ipv4-address | ipv6-address } received prefix-list
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays ORF prefix information for the default BGP instance.
ipv4: Displays BGP IPv4 peer information.
ipv6: Displays BGP IPv6 peer information.
vpnv4: Displays BGP VPNv4 peer information.
vpnv6: Displays BGP VPNv6 peer information.
multicast: Displays BGP multicast peer information.
unicast: Displays BGP unicast peer information.
l2vpn evpn: Displays BGP EVPN peer information.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify an instance, this command displays information for the public network.
ipv4-address: Specifies a peer by its IPv4 address.
ipv6-address: Specifies a peer by its IPv6 address.
Examples
# Display the ORF prefix information received by peer 10.110.25.20.
<Sysname> display bgp peer ipv4 10.110.25.20 received prefix-list
ORF prefix list entries: 2
index: 10 prefix 1.1.1.0/24 ge 26 le 32
index: 20 prefix 2.1.1.0/24 ge 26 le 32
Table 23 Command output
Field |
Description |
ORF prefix list entries |
Number of ORF prefixes. |
index |
Prefix index. |
prefix |
Prefix information. |
ge |
Greater than or equal to. |
le |
Less than or equal to. |
display bgp route-trace
Use display bgp route-trace to display BGP route trace information.
Syntax
display bgp [ instance instance-name ] route-trace { ipv4-address { mask-length | mask } | ipv6-address prefix-length } [ route-distinguisher route-distinguisher ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP route trace information for the default BGP instance.
ipv4-address: Specifies an IPv4 route by its destination network address.
mask-length: Specifies the mask length in the range of 0 to 32.
mask: Specifies the subnet mask in dotted decimal notation.
ipv6-address prefix-length: Specifies an IPv6 route by its destination network address and prefix length. The value range for the prefix-length argument is 0 to 128.
route-distinguisher route-distinguisher: Specifies an RD, a string of 3 to 21 characters.
An RD has the following forms:
· 16-bit AS number:32-bit self-defined number. For example, 101:3.
· 32-bit IP address:16-bit self-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit self-defined number. For example, 65536:1. The minimum AS number is 65536.
Examples
# Display route trace information for the route destined for 111.1.1.1/32.
<Sysname> display bgp route-trace 111.1.1.1 32
Recv from peer: 12.1.1.1, pre Hop ID: 100.2.3.4, Peer AS Number: 100
Prefix info : RD 1:1, 111.1.1.1/32 (VPN-instance=vpn1, AFI=1, SAFI=1)
State : valid, external, best
Triger timestamp: 15:57:58-2020.1.8
Route age : 00h00m42s
Policy info : Inbound, permit, name=im, match node=10
Attribute value invariable length:
Origin : Prepolicy incomplete, Postpolicy igp
MED : Prepolicy 0, Postpolicy 64
Localpref : Prepolicy 0, Postpolicy 64
Pref-val : Prepolicy 0, Postpolicy 11
Nexthop : 12.1.1.1 (Not changed)
AddPathID : 0 (Not changed)
Post policy variable length attributes:
Cluster list : (null)
AS-path : 100
Community : <1:1>
Ext-Community : <RT: 1:1>, <RT: 10:1>
Pre policy variable length attributes:
Community : (null)
Ext-Community : <RT: 1:1>
Sent to peer: 13.1.1.1, pre Hop ID: 0.0.0.0, next Hop ID: 100.2.3.4, Peer AS Number: 100
Prefix info : RD 1:1, 111.1.1.1/32 (AFI=1, SAFI=128)
State : valid, local, best
Triger timestamp: 15:58:10-2020.1.8
Policy info : Outbound, permit, name= ex, match node= 5, 11
Attribute value invariable length:
Origin : incomplete (Not changed)
MED : Prepolicy 0, Postpolicy 96
Pref-val : 0 (Not changed)
Nexthop : Prepolicy 127.0.0.1, Postpolicy 13.1.1.2
AddPathID : 0 (Not changed)
Post policy variable length attributes:
Community : (null)
Cluster list : (null)
AS-path : 200
Ext-Community : <RT: 1:1>, <RT: 1:11>, <RT: 10:2>
Pre policy variable length attributes:
AS-path : (null)
Ext-Community : <RT: 1:1>, <RT: 1:11>
Table 24 Command output
Field |
Description |
Recv from peer |
IP address of the BGP peer that advertised the route. |
Sent to peer |
IP address of the BGP peer that received the route. |
pre Hop ID |
Router ID of the router that received the route. |
next Hop ID |
Router ID of the router that sent the route. |
Peer AS Number |
AS number of the peer. |
PrefixInfo |
Prefix information, including the RD, destination address, subnet mask, VPN instance name, address family, and sub address family. |
State |
Route state: · valid—Valid route. · internal—Internal route. · external—External route. · local—Locally generated route. · best—Optimal route. · delay—The route will be delayed for optimal route selection. · bgp-rib-only—The route will not be flushed to the routing table. |
Triger timestamp |
Time when the route trace information was generated. |
Route age |
Time that the route trace information has existed since it was generated. |
Policy info |
Routing policy information contained in the route trace information: · Inbound/Outbound—Direction to which the routing policy is applied. · permit/deny—Routing policy execution result. · name—Routing policy name. · match node—Routing policy node number. |
Attribute value invariable length |
Attribute values of invariable length in the route trace information: · Prepolicy—Attribute value before the routing policy is applied. · Postpolicy—Attribute value after the routing policy is applied. |
Origin |
Origin attribute value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
MED(cost) |
MED value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
Localpref |
Local attribute value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
Pref-val(weight) |
Preferred value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
Nexthop |
Next hop value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
AddPathID |
AddPathID value. If the value has been modified by a routing policy, the original value (Prepolicy) and new value (Postpolicy) are displayed, respectively. |
Pre policy variable length attributes |
Attribute values of variable length before the routing policy is applied. |
Post policy variable length attributes |
Attribute values of variable length after the routing policy is applied. Attribute values that have no changes are displayed for this field. |
Community |
Community attribute. |
Ext-community |
Extended community attribute. |
Cluster list |
Router reflector list attribute. |
AS-path |
AS path attribute. |
Related commands
bmp-route-trace
display bgp routing-table dampened
Use display bgp routing-table dampened to display dampened BGP routes.
display bgp [ instance instance-name ] routing-table dampened { ipv4 | ipv6 } [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ]
display bgp [ instance instance-name ] routing-table dampened vpnv4
display bgp [ instance instance-name ] routing-table dampened vpnv6
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays dampened BGP routes for the default BGP instance.
ipv4: Displays dampened BGP IPv4 routes.
ipv6: Displays dampened BGP IPv6 routes.
vpnv4: Displays dampened BGP VPNv4 routes.
vpnv6: Displays dampened BGP VPNv6 routes.
multicast: Displays dampened BGP multicast routes.
unicast: Displays dampened BGP unicast routes.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays dampened BGP routes for the public network.
By default, the unicast keyword is used if neither the multicast keyword nor the unicast keyword is specified.
# Display dampened BGP IPv4 unicast routes.
<Sysname> display bgp routing-table dampened ipv4
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network From Reuse Path/Ogn
de 20.1.1.0/24 10.1.1.2 00:56:27 100i
# Display dampened BGP IPv6 unicast routes.
<Sysname> display bgp routing-table dampened ipv6
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
de Network : 2:: PrefixLen : 64
From : 10.1.1.1 Reuse : 00:39:49
Path/Ogn: 100i
de Network : 2:: PrefixLen : 64
Path/Ogn: 100i
Table 25 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
From |
IP address from which the route was received. |
Reuse |
Reuse time of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH attribute—Records the ASs the route has passed, which avoids routing loops. · ORIGIN attribute—Identifies the origin of the route. |
dampening
dampening ibgp (MPLS Command Reference)
reset bgp dampening
display bgp routing-table flap-info
Use display bgp routing-table flap-info to display BGP route flap statistics.
display bgp [ instance instance-name ] routing-table flap-info ipv4 [ multicast | [ labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address [ { mask-length | mask } [ longest-match ] ] | as-path-acl { as-path-acl-number | as-path-acl-name } ]
display bgp [ instance instance-name ] routing-table flap-info ipv6 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address prefix-length | as-path-acl { as-path-acl-number | as-path-acl-name } ]
display bgp [ instance instance-name ] routing-table flap-info vpnv4 [ ipv4-address [ { mask | mask-length } [ longest-match ] ] | as-path-acl { as-path-acl-number | as-path-acl-name } ]
display bgp [ instance instance-name ] routing-table flap-info vpnv6 [ ipv6-address prefix-length | as-path-acl { as-path-acl-number | as-path-acl-name } ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP route flap statistics for the default BGP instance.
ipv4: Displays BGP IPv4 route flap statistics.
ipv6: Displays BGP IPv6 route flap statistics.
vpnv4: Displays BGP VPNv4 route flap statistics.
vpnv6: Displays BGP VPNv6 route flap statistics.
multicast: Displays BGP multicast route flap statistics.
labeled-unicast: Displays BGP IPv4 labeled unicast route flap statistics.
unicast: Displays BGP unicast route flap statistics.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays BGP route flap statistics for the public network.
ipv4-address: Specifies a destination network address.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
longest-match: Specifies longest match mode, which selects the longest matching route through the following steps:
1. ANDs the specified network address with the mask of each route.
2. Matches a route if the AND result is the same as the network address of the route and the mask of the route is shorter than or equal to the specified mask.
3. Selects the route with the longest mask among the matching routes.
ipv6-address prefix-length: Displays route flap statistics for BGP IPv6 routes that match the specified network address, and match the prefix length in the range of 0 to 128.
as-path-acl as-path-acl-number: Displays route flap statistics for BGP routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays route flap statistics for BGP routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
If you specify only the ipv4-address argument, the system ANDs the network address with the mask of a route. If the result matches the network address of the route, the command displays flap statistics of the route.
If you specify the ipv4-address mask or ipv4-address mask-length argument, and do not specify the longest-match keyword, the command displays flap statistics of the BGP IPv4 unicast, BGP IPv4 labeled unicast, or BGP IPv4 multicast route that matches both the specified destination network address and the mask (or mask length).
By default, the unicast keyword is used if none of the multicast, labeled-unicast, and unicast keywords are specified.
# Display BGP IPv4 unicast route flap statistics.
<Sysname> display bgp routing-table flap-info ipv4
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network From Flaps Duration Reuse Path/Ogn
de 20.1.1.0/24 10.1.1.2 1 00:02:36 00:53:58 100i
# Display BGP IPv6 unicast route flap statistics.
<Sysname> display bgp routing-table flap-info ipv6
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
de Network : 2:: PrefixLen : 64
Duration: 00:03:25 Reuse : 00:39:28
Path/Ogn: 100i
de Network : 2:: PrefixLen : 64
Duration: 00:03:25 Reuse : 00:39:28
Path/Ogn: 100i
Table 26 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
From |
Source IP address of the route. |
Flaps |
Number of routing flaps. |
Duration |
Duration time of the flap route. |
Reuse |
Reuse time of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH attribute—Records the ASs the route has passed, which avoids routing loops. · ORIGIN attribute—Identifies the origin of the route. |
dampening
dampening ibgp (MPLS Command Reference)
reset bgp flap-info
display bgp routing-table ipv4 labeled-unicast
Use display bgp routing-table ipv4 labeled-unicast to display BGP IPv4 labeled unicast routes.
Syntax
display bgp [ instance instance-name ] routing-table ipv4 labeled-unicast [ vpn-instance vpn-instance-name ] [ ipv4-address [ mask-length | mask ][ longest-match ] | ipv4-address [ mask-length | mask ] advertise-info | as-path-acl { as-path-acl-number | as-path-acl-name } | [ statistics ] { community [ community-number&<1-32> | aa:nn&<1-32> ] [ internet | no-advertise | no-export | no-export-subconfed ] [ whole-match ] | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } } | peer ipv4-address { advertised-routes | received-routes } [ ipv4-address [ mask-length | mask ] [ verbose ] | statistics ] | statistics ]
display bgp [ instance instance-name ] routing-table ipv4 labeled-unicast [ vpn-instance vpn-instance-name ] [ ipv4-address [ mask-length | mask ] ] [ statistics ] { large-community [ aa:bb:cc&<1-32> ] | large-community-list { basic-large-community-list-number | adv-large-community-list-number | large-comm-list-name } } [ whole-match ]
display bgp [ instance instance-name ] routing-table ipv4 labeled-unicast [ vpn-instance vpn-instance-name ] peer ipv4-address { accepted-routes | not-accepted-routes }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv4 labeled unicast routing information for the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays the BGP IPv4 labeled unicast routing information for the public network.
ipv4-address: Specifies a destination network address.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
verbose: Displays detailed route information. If you do not specify this keyword, the command displays brief route information.
longest-match: Displays the longest matching BGP IPv4 labeled unicast route. The system first ANDs the specified network address with the mask of each route, and then selects the longest matching BGP IPv4 labeled unicast route as follows:
· If you specify a mask, the system selects routes whose network address matches the AND result and whose mask is shorter than or equal to the specified mask. The command displays brief information about the route with the longest mask among the matching routes.
· If you do not specify a mask, the system selects routes whose network address matches the AND result. The command displays detailed information about the route with the longest mask among the matching routes.
advertise-info: Displays advertisement information for BGP IPv4 labeled unicast routes.
as-path-acl as-path-acl-number: Displays BGP IPv4 labeled unicast routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv4 labeled unicast routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
community: Displays BGP IPv4 labeled unicast routes that match the specified community attribute. You can specify a community attribute by its community number or community sequence number.
community-number&<1-32>: Specifies a community sequence number. The value range for the community-number argument is 1 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified.
aa:nn&<1-32>: Specifies a community number. Both aa and nn are in the range of 0 to 65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
internet: Displays BGP IPv4 labeled unicast routes that have the INTERNET community attribute. Routes with this attribute can be advertised to all BGP peers. By default, all routes have this attribute.
no-advertise: Displays BGP IPv4 labeled unicast routes that have the NO_ADVERTISE community attribute. Routes with this attribute cannot be advertised to any peers.
no-export: Displays BGP IPv4 labeled unicast routes that have the NO_EXPORT community attribute. Routes with this attribute cannot be advertised outside the local AS or confederation, but can be advertised to other sub-ASs in the confederation.
no-export-subconfed: Displays BGP IPv4 labeled unicast routes that have the NO_EXPORT_SUBCONFED community attribute. Routes with this attribute cannot be advertised outside the local AS or to other sub-ASs in the confederation.
community-list: Displays BGP IPv4 labeled unicast routes that match a community list.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays BGP IPv4 labeled unicast routes that exactly match the specified community list, community attribute, large community list, or large community attribute. If you do not specify this keyword, the command displays BGP IPv4 labeled unicast routes that meet one of the following requirements:
· The community attributes of the routes include one or more attributes in the specified community list.
· The community attributes of the routes include the specified community attribute.
· The large community attributes of the routes include one or more attributes in the specified large community list.
· The large community attributes of the routes include the specified large community attribute.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.
large-community: Displays BGP IPv4 labeled unicast routes that match the specified large community attribute. You can specify a large community attribute by its community number.
aa:bb:cc&<1-32>: Specifies a large community number. aa, bb, and cc are all in the range of 0 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified. If you do not specify this argument, this command displays information about all BGP IPv4 labeled unicast routes that has a large community attribute.
large-community-list: Displays BGP IPv4 labeled unicast routes that match the specified large community list.
basic-large-comm-list-number: Specifies a basic large community list by its number. The value range for this argument is 1 to 99.
adv-large-comm-list-number: Specifies an advanced large community list by its number. The value range for this argument is 100 to 199.
large-comm-list-name: Specifies a large community list by its name. A large community list name is a case-sensitive string of 1 to 63 characters and cannot contain only digits.
peer ipv4-address: Displays BGP IPv4 labeled unicast routing information advertised to or received from the specified IPv4 peer.
peer ipv6-address: Displays BGP IPv4 labeled unicast routing information advertised to or received from the specified IPv6 peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
statistics: Displays routing statistics.
accepted-routes: Displays routes that are received from the specified peer and match the routing policy.
not-accepted-routes: Displays routes that are received from the specified peer but do not match the routing policy.
Usage guidelines
If you specify the ipv4-address mask or ipv4-address mask-length argument, this command displays detailed information about the BGP IPv4 labeled unicast route that exactly matches the specified address and mask.
If you specify the ipv4-address argument, the system ANDs the specified network address with the mask of each route. If the network address of a route matches the AND result, this command displays detailed information about the route.
You can perform either of the following tasks to advertise IPv4 labeled unicast routes to a BGP peer:
· Execute the peer label-route-capability command in BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.
· Create the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family and advertise routes in the address family.
This command displays only the IPv4 labeled unicast routes advertised in the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family. To view IPv4 labeled unicast routes advertised by using the peer label-route-capability command, execute the display bgp routing-table ipv4 unicast inlabel command.
Examples
# Display brief information about all BGP IPv4 labeled unicast routes.
<Sysname> display bgp routing-table ipv4 labeled-unicast
Total number of routes: 4
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 10.2.1.0/24 10.2.1.1 0 0 i
e 10.2.1.2 0 0 4294967295
4294967294 4294967293 4294967292 4294967291 4294967290 4294967215 4294967225 4294967235 4294967245 4294967295 4294967294 4294967293 4294967292 4294967291 4294967290... i
* > 192.168.1.0 192.168.1.135 0 0 i
* e 10.2.1.2 0 0 200i
# Display information about BGP IPv4 labeled unicast routes that match AS path list 1.
<Sysname> display bgp routing-table ipv4 labeled-unicast as-path-acl 1
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 30.1.1.0/24 20.1.1.1 0 200i
# Display information about all public network BGP IPv4 labeled unicast routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 labeled-unicast peer 10.2.1.2 advertised-routes
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history
s - suppressed, S - Stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 10.2.1.0/24 10.2.1.1 0 0 i
* > 192.168.1.0 192.168.1.135 0 0 i
# Display information about all public network BGP IPv4 labeled unicast routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 labeled-unicast peer 10.2.1.2 received-routes
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history
s - suppressed, S - Stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
e 10.2.1.0/24 10.2.1.2 0 0 200i
* e 192.168.1.0 10.2.1.2 0 0 200i
# Display information about all BGP IPv4 labeled unicast routes that have a community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv4 community
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Community
* > 10.2.1.0/24 10.2.1.1 0 0 <1:1>
* > 192.168.1.0 192.168.1.135 0 0 <1:2>
# Display information about all BGP IPv4 labeled unicast routes that have a large community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv4 large-community
Total number of routes: 3
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Large-community
* > 10.2.1.0/24 10.2.1.1 0 0 <1:1:1>
* > 192.168.1.0 192.168.1.135 0 0 <1:1:2>
Table 27 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
MED |
MULTI_EXIT_DISC attribute. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed, which avoids routing loops. A maximum of 16 AS numbers can be displayed in this field. Exceeding AS numbers are omitted and are available by displaying detailed routing information. · ORIGIN—Identifies the origin of the route. |
Community |
Community attribute. |
Large-community |
Large community attribute. |
# Display detailed information about BGP IPv4 labeled unicast routes destined to network 10.2.1.0/24.
<Sysname> display bgp routing-table ipv4 labeled-unicast 10.2.1.0 24
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 2 available, 1 best
BGP routing table information of 10.2.1.0/24:
Imported route.
Original nexthop: 10.2.1.1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h30m23s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : (null)
Origin : igp
Attribute value : MED 0, pref-val 0, pre 0
State : valid, local, best, delay, bgp-rib-only
Originator : 176.1.1.2
Cluster list : 80
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
From : 10.2.1.2 (192.168.100.2)
Rely nexthop : not resolved
Original nexthop: 10.2.1.2
OutLabel : 1279
Org-validation : Not found
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0, pre 255
State : external
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# Display detailed information about the BGP IPv4 labeled unicast route destined to network 1.1.1.1/32.
<Sysname> display bgp routing-table ipv4 labeled-unicast 1.1.1.1 32
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 2 available, 1 best
BGP routing table information of 1.1.1.1/32:
From : 10.2.1.1 (192.168.100.3)
Rely nexthop : 10.2.1.1
Original nexthop: 10.2.1.1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h35m24s
OutLabel : 16201
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : (null)
Origin : igp
PrefixSID : Label index 201
SRMS-PrefixSID : Label index 202
Attribute value : MED 0, pref-val 0, pre 0
State : valid, local, best, delay
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Backup route.
From : 10.2.1.2 (192.168.100.2)
Rely nexthop : 10.2.1.2
Original nexthop: 10.2.1.2
Out interface : Ten-GigabitEthernet3/1/3
Route age : 01h38m25s
OutLabel : 16202
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0, pre 255
State : external
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# Display detailed information about the longest matching BGP IPv4 labeled unicast route destined to 20.1.1.1.
<Sysname> display bgp routing-table ipv4 labeled-unicast 20.1.1.1 longest-match
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 20.1.1.1/31:
Imported route.
Original nexthop: 0.0.0.0
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h30m23s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
Table 28 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
BGP routing table information of 10.2.1.0/24 |
Information about the BGP route to network 10.2.1.0/24. |
Imported route |
This route is an imported route. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
Out interface |
Next hop output interface information. |
Route age |
Time elapsed since the most recent route update. |
OutLabel |
Outgoing label of the route. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
Org-validation |
BGP RPKI validation state: · Valid. · Not found. · Invalid. |
AS-path |
AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
PrefixSID |
Prefix SID: · Label index—Label index. · SRGB—SRGB range. |
SRMS-PrefixSID |
SRMS prefix label attribute. The value of this field is the label index, which represents the SID index. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
Inlabel |
Incoming label of the route. |
Originator |
Peer that generated the route. |
Cluster list |
CLUSTER_LIST attribute of the route. This field is not displayed if no CLUSTER_LIST attribute exists. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · bgp-rib-only—The route will not be flushed to the routing table. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
Originator |
Router ID of the peer that advertised the route to the reflector. |
Cluster list |
Cluster ID of the route reflector. |
From |
IP address of the BGP peer that advertised the route. |
Rely Nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
Backup route |
This route is a backup route. |
Tunnel policy |
Tunnel policy that takes effect. NULL indicates that no tunnel policy takes effect. |
Rely Tunnel IDs |
Tunnel index IDs after route recursion. This field displays multiple tunnel index IDs if ECMP tunnels exist and displays N/A if no tunnels are found by route recursion. |
# Display statistics for public network BGP IPv4 labeled unicast routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 labeled-unicast peer 10.2.1.2 advertised-routes statistics
Advertised routes total: 2
# Display statistics for public network BGP IPv4 labeled unicast routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 labeled-unicast peer 10.2.1.2 received-routes statistics
Received routes total: 2
Table 29 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv4 labeled unicast route statistics.
<Sysname> display bgp routing-table ipv4 labeled-unicast statistics
Total number of routes: 4
Table 30 Command output
Field |
Description |
Total number of routes |
Total number of routes. |
# Display advertisement information for the BGP IPv4 labeled unicast route destined to network 10.2.1.0/24.
<Sysname> display bgp routing-table ipv4 labeled-unicast 10.2.1.0 24 advertise-info
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 1 best
BGP routing table information of 10.2.1.0/24(TxPathID:0):
Advertised to peers (1 in total):
10.2.1.2
Table 31 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of optimal routes to the destination. |
BGP routing table information of 10.2.1.0/24(TxPathID:0) |
Advertisement information for network 10.2.1.0/24. |
Advertised to peers (1 in total) |
Peers to which the network has been advertised. |
display bgp routing-table ipv4 labeled-unicast inlabel
Use display bgp routing-table ipv4 labeled-unicast inlabel to display incoming labels for BGP IPv4 labeled unicast routes.
Syntax
display bgp [ instance instance-name ] routing-table ipv4 labeled-unicast [ vpn-instance vpn-instance-name ] inlabel
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays incoming labels of BGP IPv4 labeled unicast routes in the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays incoming labels for BGP IPv4 labeled unicast routes of the public network.
Usage guidelines
You can perform either of the following tasks to advertise IPv4 labeled unicast routes to a BGP peer:
· Execute the peer label-route-capability command in BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.
· Create the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family and advertise routes in the address family.
This command displays only the incoming labels for IPv4 labeled unicast routes advertised in the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family. To view the incoming labels for IPv4 labeled unicast routes advertised by using the peer label-route-capability command, execute the display bgp routing-table ipv4 unicast inlabel command.
Examples
# Display incoming labels for all BGP IPv4 labeled unicast routes.
<Sysname> display bgp routing-table ipv4 labeled-unicast inlabel
Total number of routes: 2
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop OutLabel InLabel
* > 2.2.2.9/32 1.1.1.2 1151 1279
Table 32 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d - dampened—Dampened route. · h – history—History route. · i – internal—Internal route. · e – external—External route. · s – suppressed—Suppressed route. · S – stale—Stale route. · a - additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
OutLabel |
Outgoing label, which is allocated by the peer. |
InLabel |
Incoming label, which is allocated by the local device. |
display bgp routing-table ipv4 labeled-unicast outlabel
Use display bgp routing-table ipv4 labeled-unicast outlabel to display outgoing labels for BGP IPv4 labeled unicast routes.
Syntax
display bgp [ instance instance-name ] routing-table ipv4 labeled-unicast [ vpn-instance vpn-instance-name ] outlabel
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays outgoing labels of BGP IPv4 labeled unicast routes in the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays outgoing labels for BGP IPv4 labeled unicast routes of the public network.
Usage guidelines
You can perform either of the following tasks to advertise IPv4 labeled unicast routes to a BGP peer:
· Execute the peer label-route-capability command in BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.
· Create the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family and advertise routes in the address family.
This command displays only the outgoing labels for IPv4 labeled unicast routes advertised in the BGP IPv4 labeled unicast address family or BGP-VPN IPv4 labeled unicast address family. To view the outgoing labels for IPv4 labeled unicast routes advertised by using the peer label-route-capability command, execute the display bgp routing-table ipv4 unicast inlabel command.
Examples
# Display outgoing labels for all BGP IPv4 labeled unicast routes.
<Sysname> display bgp routing-table ipv4 labeled-unicast outlabel
Total number of routes: 2
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop OutLabel
* > 2.2.2.9/32 1.1.1.2 1151
Table 33 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · i – internal—Internal route. · e – external—External route. · s – suppressed—Suppressed route. · S – stale—Stale route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
OutLabel |
Outgoing label, which is allocated by the peer. |
display bgp routing-table ipv4 multicast
Use display bgp routing-table ipv4 multicast to display BGP IPv4 multicast routing information.
display bgp [ instance instance-name ] routing-table ipv4 multicast [ ipv4-address [ mask-length | mask ][ longest-match ] | ipv4-address [ mask-length | mask ] advertise-info | as-path-acl { as-path-acl-number | as-path-acl-name } | as-path-regular-expression regular-expression | [ statistics ] { community [ community-number&<1-32> | aa:nn&<1-32> ] [ internet | no-advertise | no-export | no-export-subconfed ] [ whole-match ] | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } } | peer { ipv4-address | ipv6-address } { advertised-routes | received-routes } [ ipv4-address [ mask-length | mask ] [ verbose ] | statistics ] | statistics ]
display bgp [ instance instance-name ] routing-table ipv4 multicast [ ipv4-address [ mask-length | mask ] ] [ statistics ] { large-community [ aa:bb:cc&<1-32> ] | large-community-list { basic-large-comm-list-number | adv-large-comm-list-number | large-comm-list-name } } [ whole-match ]
display bgp [ instance instance-name ] routing-table ipv4 multicast peer { ipv4-address | ipv6-address } { accepted-routes | not-accepted-routes }
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv4 multicast routing information for the default BGP instance.
ipv4-address: Specifies a destination network address.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
longest-match: Displays the longest matching BGP IPv4 multicast route. The system first ANDs the specified network address with the mask of each route, and then selects the longest matching BGP IPv4 multicast route as follows:
· If you specify a mask, the system selects routes whose network address matches the AND result and whose mask is shorter than or equal to the specified mask. The command displays brief information about the route with the longest mask among the matching routes.
· If you do not specify a mask, the system selects routes whose network address matches the AND result. The command displays detailed information about the route with the longest mask among the matching routes.
advertise-info: Displays advertisement information for BGP IPv4 multicast routes.
as-path-acl as-path-acl-number: Displays BGP IPv4 multicast routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv4 multicast routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
as-path-regular-expression regular-expression: Displays BGP IPv4 multicast routes with an AS path attribute matching the specified regular expression. The regular-expression argument represents the regular expression, a case-sensitive string of 1 to 256 characters.
community: Displays BGP IPv4 multicast routes that match the specified community attribute. You can specify a community attribute by its community number or community sequence number.
community-number&<1-32>: Specifies a community sequence number. The value range for the community-number argument is 1 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified.
aa:nn&<1-32>: Specifies a community number. Both aa and nn are in the range of 0 to 65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
internet: Displays BGP IPv4 multicast routes that have the INTERNET community attribute. Routes with this attribute can be advertised to all BGP peers. By default, all routes have this attribute.
no-advertise: Displays BGP IPv4 multicast routes that have the NO_ADVERTISE community attribute. Routes with this attribute cannot be advertised to any peers.
no-export: Displays BGP IPv4 multicast routes that have the NO_EXPORT community attribute. Routes with this attribute cannot be advertised outside the local AS or confederation, but can be advertised to other sub-ASs in the confederation.
no-export-subconfed: Displays BGP IPv4 multicast routes that have the NO_EXPORT_SUBCONFED community attribute. Routes with this attribute cannot be advertised outside the local AS or to other sub-ASs in the confederation.
community-list: Displays BGP IPv4 multicast routes that match the specified community list.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays BGP IPv4 multicast routes that exactly match the specified community list, community attribute, large community list, or large community attribute. If you do not specify this keyword, the command displays BGP IPv4 multicast routes that meet one of the following requirements:
· The community attributes of the routes include one or more attributes in the specified community list.
· The community attributes of the routes include the specified community attribute.
· The large community attributes of the routes include one or more attributes in the specified large community list.
· The large community attributes of the routes include the specified large community attribute.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.
large-community: Displays BGP IPv4 multicast routes that match the specified large community attribute. You can specify a large community attribute by its community number.
aa:bb:cc&<1-32>: Specifies a large community number. aa, bb, and cc are all in the range of 0 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified. If you do not specify this argument, this command displays information about all BGP IPv4 multicast routes that have a large community attribute.
large-community-list: Displays BGP IPv4 multicast routes that match the specified large community list.
basic-large-comm-list-number: Specifies a basic large community list by its number. The value range for this argument is 1 to 99.
adv-large-comm-list-number: Specifies an advanced large community list by its number. The value range for this argument is 100 to 199.
large-comm-list-name: Specifies a large community list by its name. A large community list name is a case-sensitive string of 1 to 63 characters and cannot contain only digits.
peer { ipv4-address | ipv6-address }: Specifies a peer by its IPv4 or IPv6 address.
advertised-routes: Displays BGP IPv4 multicast routing information advertised to the specified peer.
received-routes: Displays BGP IPv4 multicast routing information received from the specified peer.
verbose: Displays detailed route information. If you do not specify this keyword, the command displays brief route information.
statistics: Displays routing statistics.
accepted-routes: Displays routes that are received from the specified peer and match the routing policy.
not-accepted-routes: Displays routes that are received from the specified peer but do not match the routing policy.
If you do not specify any parameters, this command displays brief information about all BGP IPv4 multicast routes.
If you specify only ipv4-address mask or ipv4-address mask-length, this command displays detailed information about the BGP IPv4 multicast route that exactly matches the specified address and mask.
If you specify only ipv4-address, the system ANDs the specified network address with the mask of each route. If the network address of a route matches the AND result, this command displays detailed information about the route.
If you specify the adv-large-community-list-number argument together with the whole-match keyword, the whole-match keyword does not take effect.
# Display brief information about all BGP IPv4 multicast routes.
<Sysname> display bgp routing-table ipv4 multicast
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 5.5.5.5/32 127.0.0.1 0 32768 ?
* > 192.168.1.0 192.168.1.62 0 32768 ?
* > 192.168.1.62/32 127.0.0.1 0 32768 ?
# Display information about BGP IPv4 multicast routes with any AS path attributes.
<Sysname> display bgp routing-table ipv4 multicast as-path-regular-expression ^.*
Total number of routes: 3
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 5.5.5.5/32 127.0.0.1 0 32768 ?
* > 192.168.1.0 192.168.1.62 0 32768 ?
* > 192.168.1.62/32 127.0.0.1 0 32768 ?
# Display information about BGP IPv4 multicast routes that match AS path list 20.
<Sysname> display bgp routing-table ipv4 multicast as-path-acl 20
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 5.5.5.5/32 127.0.0.1 0 32768 ?
* > 192.168.1.0 192.168.1.62 0 32768 ?
* > 192.168.1.62/32 127.0.0.1 0 32768 ?
# Display information about BGP IPv4 multicast routes that match BGP community list 100.
<Sysname> display bgp routing-table ipv4 multicast community-list 100
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 5.5.5.5/32 127.0.0.1 0 32768 ?
* > 192.168.1.0 192.168.1.62 0 32768 ?
* > 192.168.1.62/32 127.0.0.1 0 32768 ?
# Display information about all BGP IPv4 multicast routes advertised to peer 192.168.1.139.
<Sysname> display bgp routing-table ipv4 multicast peer 192.168.1.139 advertised-routes
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf Path/Ogn
* > 5.5.5.5/32 127.0.0.1 0 100 ?
* > 192.168.1.0 192.168.1.62 0 100 ?
# Display information about all BGP IPv4 multicast routes received from peer 192.168.1.139.
<Sysname> display bgp routing-table ipv4 multicast peer 192.168.1.139 received-routes
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i 8.8.8.8/32 192.168.1.139 0 100 0 ?
* i 192.168.1.0 192.168.1.139 0 100 0 ?
# Display information about all BGP IPv4 multicast routes that have a community attribute.
<Sysname> display bgp routing-table ipv4 multicast community
Total number of routes: 1
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Community
* > 5.5.5.5/32 127.0.0.1 0 32768 <1:1>
# Display information about all BGP IPv4 multicast routes that have a large community attribute for the default BGP instance.
<Sysname> display bgp routing-table ipv4 multicast large-community
Total number of routes: 3
BGP local router ID is 192.168.1.62
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Large-community
* > 5.5.5.5/32 127.0.0.1 0 32768 <1:1:1>
* > 192.168.1.0 192.168.1.62 0 32768 <1:1:2>
* > 192.168.1.62/32 127.0.0.1 0 32768 <1:1:3>
# Display BGP IPv4 multicast routes that are received from peer 1.1.1.8 and match the routing policy.
<Sysname> display bgp routing-table ipv4 multicast peer 1.1.1.8 accepted-routes
Total number of routes: 2
BGP local router ID is 192.168.56.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i 1.1.1.1/32 1.1.1.8 0 100 0 ?
* >i 3.4.5.3/32 1.1.1.8 0 100 0 ?
# Display BGP IPv4 multicast routes that are received from peer 1.1.1.8 but do not match the routing policy.
<Sysname> display bgp routing-table ipv4 multicast peer 1.1.1.8 not-accepted-routes
Total number of routes: 1
BGP local router ID is 192.168.56.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
i 2.2.2.2/32 1.1.1.8 0 100 0 ?
Table 34 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
MED |
MULTI_EXIT_DISC attribute. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed. · ORIGIN—Identifies the origin of the route. |
Community |
Community attribute. |
Large-community |
Large community attribute. |
# Display detailed information about BGP IPv4 multicast routes destined to network 5.5.5.5/32.
<Sysname> display bgp routing-table ipv4 multicast 5.5.5.5 32
BGP local router ID: 192.168.1.139
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 5.5.5.5/32:
From : 192.168.1.62 (192.168.1.62)
Rely nexthop : 192.168.1.62
Original nexthop: 192.168.1.62
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h26m11s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, localpref 100, pref-val 0
State : valid, internal, not preferred for preferred-value, not ECMP for preferred-value, delay
Originator : 176.1.1.2
Cluster list : 80
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
# Display detailed information about the longest matching BGP IPv4 multicast route destined to network 1.1.1.0.
<Sysname> display bgp routing-table ipv4 multicast 1.1.1.0 longest-match
BGP local router ID: 192.168.1.139
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 1.1.1.0/31:
Imported route.
Original nexthop: 0.0.0.0
OutLabel : NULL
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h30m30s
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best, delay
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Table 35 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
From |
IP address of BGP peer that advertised the route. |
Rely nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
Out interface |
Next hop output interface information. |
Route age |
Time elapsed since the most recent route update. |
OutLabel |
Outgoing label of the route. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
AS-path |
AS_PATH attribute of the route. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
Originator |
Peer that generated the route. |
Cluster list |
CLUSTER_LIST attribute of the route. This field is not displayed if no CLUSTER_LIST attribute exists. |
Advertised to peers (1 in total) |
Peers to which the route has been advertised. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
Originator |
Router ID of the peer that advertised the route to the reflector. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
Table 36 Reason why the route is not selected as the optimal route
Reason |
Description |
preferred-value |
Routes with larger preferred values exist. |
local-preference |
Routes with larger local preference values exist. |
local-origin-route |
There are routes whose local-origin-route attribute has a higher priority. BGP selects the optimal route from local routes in this order: route generated by the network command, route redistributed by the import-route command, and summary route. |
aigp |
Routes carrying the AIGP attribute or routes with smaller AIGP attribute values exist. |
as-path |
Routes with smaller AS_PATH attribute values exist. |
origin |
There are routes whose origin has a higher priority. The route origins are IGP, EGP, and INCOMPLETE in descending order of priority. |
med |
Routes with smaller MED values exist. |
remote-route |
There are routes whose remote-route attribute has a higher priority. BGP selects the optimal route from remote routes in this order: · Route learned from an EBGP peer. · Route learned from a confederation EBGP peer. · Route learned from a confederation IBGP peer. · Route learned from an IBGP peer. |
igp-cost |
Routes with smaller IGP metrics exist. |
relydepth |
Routes with smaller recursion depth values exist. |
rfc5004 |
A route received from an EBGP peer is the current optimal route. BGP does not change the optimal route when it receives routes from other EBGP peers. |
router-id |
Routes with smaller router IDs exist. If one of the routes is advertised by a route reflector, BGP compares the ORIGINATOR_ID of the route with the router IDs of other routes. Then, BGP selects the route with the smallest ID as the optimal route. |
cluster-list |
Routes with smaller CLUSTER_LIST attribute values exist. |
peer-address |
Routes advertised by peers with lower IP addresses exist. |
redist-route |
Routes of the current VPN instance exist. |
rpki |
Routes with higher RPKI validation state preferences exist. |
received |
Earlier learned routes exist. |
evpn-macip-mobile |
There are EVPN MAC/IP advertisement routes carrying the MAC mobility extended community attribute. |
evpn-macip-mobile-static |
There are EVPN MAC/IP advertisement routes whose static flag in the MAC mobility extended community attribute is set. |
evpn-macip-mobile-seq |
There are EVPN MAC/IP advertisement routes carrying a larger sequence number in the MAC mobility extended community attribute. |
evpn-macip-mobile-routerid |
There are EVPN MAC/IP advertisement routes carrying a smaller router ID in the MAC mobility extended community attribute. |
color-relay |
There are routes that carry color attributes. |
srv6-route |
There are routes that carry non-local SIDs. |
Table 37 Reason why the route does not form ECMP routes with other routes
Reason |
Description |
preferred-value |
The preferred value of the route is different than other routes. |
local-preference |
The local preference of the route is different than other routes. |
local-origin-route |
The way for generating the route is different than other routes. |
aigp |
The AIGP attribute state (whether or not the attribute is carried) or the AIGP attribute value of the route is different than other routes. |
as-path |
The AS_PATH attribute of the route is different than other routes. |
origin |
The ORIGIN attribute of the route is different than other routes. |
med |
The MED attribute of the route is different than other routes. |
remote-route |
The route comes from a different EBGP, confederation EBGP, confederation IBGP, or IBGP peer than other routes. |
igp-cost |
The IGP metric of the route is different than other routes. |
local-redist-route |
The route is redistributed from another VPN instance. |
label-route |
The labelling state of the route is different than other routes. |
samenexthop |
The route has the same next hop with another route. |
evpn-macip-label |
The L3VNI state (whether or not L3VNI is carried) of the route is different than other routes. |
evpn-other-type |
The route is the only EVPN MAC/IP advertisement route or the route is not an EVPN MAC/IP advertisement route. |
color-relay |
The color attribute state (whether or not the attribute is carried) of the route is different than other routes. |
srv6-route |
The non-local SID state (whether or not the non-local SID is carried) of the route is different than other routes. |
# Display statistics for BGP IPv4 multicast routes advertised to peer 192.168.1.62.
<Sysname> display bgp routing-table ipv4 multicast peer 192.168.1.62 advertised-routes statistics
# Display statistics for BGP IPv4 multicast routes received from peer 192.168.1.62.
<Sysname> display bgp routing-table ipv4 multicast peer 192.168.1.62 received-routes statistics
Table 38 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv4 multicast route statistics.
<Sysname> display bgp routing-table ipv4 multicast statistics
# Display statistics about BGP IPv4 multicast routes that have a community attribute.
<Sysname> display bgp routing-table ipv4 multicast statistics community
Total number of routes: 1
# Display statistics about BGP IPv4 multicast routes that have a large community attribute.
<Sysname> display bgp routing-table ipv4 multicast statistics large-community
Total number of routes: 3
Table 39 Command output
Field |
Description |
Total number of routes |
Total number of routes. |
# Display advertisement information for the BGP IPv4 multicast route destined to network 8.8.8.8/32.
<Sysname> display bgp routing-table ipv4 multicast 8.8.8.8 32 advertise-info
BGP local router ID: 192.168.1.139
Local AS number: 100
BGP routing table information of 8.8.8.8/32(TxPathID:0):
Advertised to peers (1 in total):
Table 40 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of optimal routes to the destination. |
BGP routing table information of 8.8.8.8/32(TxPathID:0) |
Advertisement information for network 8.8.8.8/32. TxPathID represents the Add-path ID of routes advertised to the network. |
Advertised to peers (1 in total) |
Peers to which the network has been advertised. |
# Display information about all BGP IPv4 multicast routes that have a large community attribute and are destined for network 5.5.5.5/32.
<Sysname> display bgp routing-table ipv4 multicast 5.5.5.5 32 large-community
BGP local router ID: 1.1.1.9
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 5.5.5.5/32:
Large-community: <1:1:2>, <1:1:3>
Table 41 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of routes to the destination. · available—Number of available routes. · best—Number of optimal routes. |
BGP routing table information of 5.5.5.5/32 |
Information about all BGP IPv4 multicast routes that have a large community attribute and are destined for network 5.5.5.5/32. |
Large-community |
Large community attribute. |
ip as-path
ip community-list
display bgp routing-table ipv4 rtfilter
Use display bgp routing-table ipv4 rtfilter to display BGP IPv4 RT filter routing information.
Syntax
display bgp [ instance instance-name ] routing-table ipv4 rtfilter [ default-rt [ advertise-info ] | [ origin-as as-number ] [ route-target [ advertise-info ] ] | as-path-acl { as-path-acl-number | as-path-acl-name } | as-path-regular-expression regular-expression | peer ipv4-address { advertised-routes | received-routes } [ default-rt | [ origin-as as-number ] [ route-target ] | statistics ] | statistics ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv4 RT filter routing information for the default BGP instance.
default-rt: Displays BGP IPv4 RT filter routing information for an all-zero RT.
origin-as as-number: Specifies an origin AS by its number.
route-target: Specifies an RT, a string of 3 to 21 characters.
An RT has the following forms:
· 16-bit AS number:32-bit self-defined number. For example, 101:3.
· 32-bit IP address:16-bit self-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit self-defined number. For example, 65536:1. The minimum AS number is 65536.
advertise-info: Displays advertised information for BGP IPv4 RT filter routes.
as-path-acl as-path-acl-number: Displays BGP IPv4 RT filter routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv4 RT filter routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
as-path-regular-expression regular-expression: Displays BGP IPv4 RT filter routes with an AS path attribute matching the specified regular expression. The regular-expression argument represents the regular expression, a case-sensitive string of 1 to 256 characters.
peer ipv4-address: Displays BGP IPv4 RT filter routing information advertised to or received from the specified peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
statistics: Displays routing statistics.
Usage guidelines
If you do not specify any parameters, this command displays brief information about all BGP IPv4 RT filter routes.
Examples
# Display brief information about all BGP IPv4 RT filter routes.
<Sysname> display bgp routing-table ipv4 rtfilter
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Total number of routes from all PEs: 2
Origin AS: 100
Total number of routes: 2
* >e Network : <100:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
* >e Network : <1.1.1.1:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
# Display information about BGP IPv4 RT filter routes that match AS path list 20.
<Sysname> display bgp routing-table ipv4 rtfilter as-path-acl 20
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Total number of routes from all PEs: 2
Origin AS: 100
Total number of routes: 2
* >e Network : <100:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
* >e Network : <1.1.1.1:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
# Display information about BGP IPv4 RT filter routes with any AS path attributes.
<Sysname> display bgp routing-table ipv4 rtfilter as-path-regular-expression ^.*
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Total number of routes from all PEs: 2
Origin AS: 100
Total number of routes: 2
* >e Network : <100:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
* >e Network : <1.1.1.1:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
# Display information about BGP IPv4 RT filter routes that match origin AS 100.
<Sysname> display bgp routing-table ipv4 rtfilter origin-as 100
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Origin AS: 100
Total number of routes: 2
* >e Network : <100:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
* >e Network : <1.1.1.1:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
PrefVal : 0
MED :
Path/Ogn: 100i
# Display information about all public BGP IPv4 RT filter routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 rtfilter peer 10.2.1.2 advertised-routes
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Origin AS: 100
Total number of routes: 1
* > Network : <100:1> PrefixLen : 96
NextHop : 1.1.1.2 LocPrf :
MED : 0
Path/Ogn: i
# Display information about all public BGP IPv4 RT filter routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 rtfilter peer 10.2.1.2 received-routes
Total number of routes: 1
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Origin AS: 100
Total number of routes: 1
* >e Network : <100:1> PrefixLen : 96
NextHop : 10.1.1.1 LocPrf :
PrefVal : 0
MED : 0
Path/Ogn: 100i
Table 42 Command output
Field |
Description |
Total number of routes from all PEs |
Total number of RT filter routes from all PEs. |
Origin AS |
Origin AS of the RT filter routes. |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a - additional-path—Add-path optimal route. |
Origin |
Origin of the route: · I – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
MED |
MULTI_EXIT_DISC attribute. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed. · ORIGIN—Identifies the origin of the route. |
# Display detailed information about BGP IPv4 RT filter route 100:1.
<Sysname> display bgp routing-table ipv4 rtfilter 100:1
BGP local router ID: 192.168.100.1
Local AS number: 100
Origin AS: 100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of <100:1>/96:
Imported route.
Original nexthop: 10.2.1.1
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : igp
Attribute value : MED 0, pref-val 32768, pre 0
State : valid, local, best, delay
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Table 43 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
Imported route |
The BGP RT filter route is locally generated. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
OutLabel |
Outgoing label of the route. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path of advertised routes. |
AS-path |
AS_PATH attribute of the route. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
From |
IP address of BGP peer that advertised the route. |
Rely Nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
# Display statistics for BGP IPv4 RT filter routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 rtfilter peer 10.2.1.2 advertised-routes statistics
Advertised routes total: 2
# Display statistics for BGP IPv4 RT filter routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 rtfilter peer 10.2.1.2 received-routes statistics
Received routes total: 2
Table 44 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv4 RT filter route statistics.
<Sysname> display bgp routing-table ipv4 rtfilter statistics
Total number of routes from all PEs: 6
Origin AS: 100
Total number of routes: 2
Origin AS: 200
Total number of routes: 4
# Display advertisement information for the BGP IPv4 RT filter route 1.1.1.1:1/96.
<Sysname> display bgp routing-table ipv4 rtfilter 1.1.1.1:1 advertise-info
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 1 best
Origin AS: 100
Total number of routes: 1
Paths: 1 best
BGP route-target filter information of <1.1.1.1:1>/96:
Advertised to VPN peers (1 in total):
1.1.1.2
Origin AS: 200
Total number of routes: 1
Paths: 1 best
BGP route-target filter information of <1.1.1.1:1>/96:
Advertised to VPN peers (1 in total):
1.1.1.2
Table 45 Command output
Field |
Description |
Paths |
Number of optimal routes to the destination. |
BGP route-target filter information of <1.1.1.1:1>/96 |
BGP RT filter routing table information for network <1.1.1.1:1>/96. |
Advertised to VPN peers (1 in total) |
Peers to which the route has been advertised. |
display bgp routing-table ipv4 unicast
Use display bgp routing-table ipv4 unicast to display BGP IPv4 unicast routing information.
display bgp [ instance instance-name ] routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ ipv4-address [ mask-length | mask ][ longest-match ] | ipv4-address [ mask-length | mask ] advertise-info | as-path-acl { as-path-acl-number | as-path-acl-name } | as-path-regular-expression regular-expression | [ statistics ] { community [ community-number&<1-32> | aa:nn&<1-32> ] [ internet | no-advertise | no-export | no-export-subconfed ] [ whole-match ] | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } } | peer { ipv4-address | ipv6-address } { advertised-routes | received-routes } [ ipv4-address [ mask-length | mask ] [ verbose ] | statistics ] | statistics ]
display bgp [ instance instance-name ] routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ ipv4-address [ mask-length | mask ] ] [ statistics ] { large-community [ aa:bb:cc&<1-32> ] | large-community-list { basic-large-community-list-number | adv-large-community-list-number | large-comm-list-name } } [ whole-match ]
display bgp [ instance instance-name ] routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] peer { ipv4-address | ipv6-address } { accepted-routes | not-accepted-routes }
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv4 unicast routing information for the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays the BGP IPv4 unicast routing information for the public network.
ipv4-address: Specifies a destination network address.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
verbose: Displays detailed route information. If you do not specify this keyword, the command displays brief route information.
longest-match: Displays the longest matching BGP IPv4 unicast route. The system first ANDs the specified network address with the mask of each route, and then selects the longest matching BGP IPv4 unicast route as follows:
· If you specify a mask, the system selects routes whose network address matches the AND result and whose mask is shorter than or equal to the specified mask. The command displays brief information about the route with the longest mask among the matching routes.
· If you do not specify a mask, the system selects routes whose network address matches the AND result. The command displays detailed information about the route with the longest mask among the matching routes.
advertise-info: Displays advertisement information for BGP IPv4 unicast routes.
as-path-acl as-path-acl-number: Displays BGP IPv4 unicast routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv4 unicast routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
as-path-regular-expression regular-expression: Displays BGP IPv4 unicast routes with an AS path attribute matching the specified regular expression. The regular-expression argument represents the regular expression, a case-sensitive string of 1 to 256 characters.
community: Displays BGP IPv4 unicast routes that match the specified community attribute. You can specify a community attribute by its community number or community sequence number.
community-number&<1-32>: Specifies a community sequence number. The value range for the community-number argument is 1 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified.
aa:nn&<1-32>: Specifies a community number. Both aa and nn are in the range of 0 to 65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
internet: Displays BGP IPv4 unicast routes that have the INTERNET community attribute. Routes with this attribute can be advertised to all BGP peers. By default, all routes have this attribute.
no-advertise: Displays BGP IPv4 unicast routes that have the NO_ADVERTISE community attribute. Routes with this attribute cannot be advertised to any peers.
no-export: Displays BGP IPv4 unicast routes that have the NO_EXPORT community attribute. Routes with this attribute cannot be advertised outside the local AS or confederation, but can be advertised to other sub-ASs in the confederation.
no-export-subconfed: Displays BGP IPv4 unicast routes that have the NO_EXPORT_SUBCONFED community attribute. Routes with this attribute cannot be advertised outside the local AS or to other sub-ASs in the confederation.
community-list: Displays BGP IPv4 unicast routes that match a community list.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays BGP IPv4 unicast routes that exactly match the specified community list, community attribute, large community list, or large community attribute. If you do not specify this keyword, the command displays BGP IPv4 unicast routes that meet one of the following requirements:
· The community attributes of the routes include one or more attributes in the specified community list.
· The community attributes of the routes include the specified community attribute.
· The large community attributes of the routes include one or more attributes in the specified large community list.
· The large community attributes of the routes include the specified large community attribute.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.
large-community: Displays BGP IPv4 unicast routes that match the specified large community attribute. You can specify a large community attribute by its community number.
aa:bb:cc&<1-32>: Specifies a large community number. aa, bb, and cc are all in the range of 0 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified. If you do not specify this argument, this command displays information about all BGP IPv4 unicast routes that has a large community attribute.
large-community-list: Displays BGP IPv4 unicast routes that match the specified large community list.
basic-large-comm-list-number: Specifies a basic large community list by its number. The value range for this argument is 1 to 99.
adv-large-comm-list-number: Specifies an advanced large community list by its number. The value range for this argument is 100 to 199.
large-comm-list-name: Specifies a large community list by its name. A large community list name is a case-sensitive string of 1 to 63 characters and cannot contain only digits.
peer ipv4-address: Displays BGP IPv4 unicast routing information advertised to or received from the specified IPv4 peer.
peer ipv6-address: Displays BGP IPv4 unicast routing information advertised to or received from the specified IPv6 peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
statistics: Displays routing statistics.
accepted-routes: Displays routes that are received from the specified peer and match the routing policy.
not-accepted-routes: Displays routes that are received from the specified peer but do not match the routing policy.
If you do not specify any parameters, this command displays brief information about all BGP IPv4 unicast routes.
If you specify only ipv4-address mask or ipv4-address mask-length, this command displays detailed information about the BGP IPv4 unicast route that exactly matches the specified address and mask.
If you specify only ipv4-address, the system ANDs the specified network address with the mask of each route. If the network address of a route matches the AND result, this command displays detailed information about the route.
If you specify the adv-large-community-list-number argument together with the whole-match keyword, the whole-match keyword does not take effect.
This command displays BGP IPv4 unicast routing information regardless of whether the unicast keyword is specified.
# Display brief information about all BGP IPv4 unicast routes.
<Sysname> display bgp routing-table ipv4
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 10.2.1.0/24 10.2.1.1 0 0 i
e 10.2.1.2 0 0 4294967295
4294967294 4294967293 4294967292 4294967291 4294967290 4294967215 4294967225 4294967235 4294967245 4294967295 4294967294 4294967293 4294967292 4294967291 4294967290... i
* > 192.168.1.0 192.168.1.135 0 0 i
* e 10.2.1.2 0 0 200i
# Display information about BGP IPv4 unicast routes with any AS path attributes.
<Sysname> display bgp routing-table ipv4 as-path-regular-expression ^.*
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 30.1.1.0/24 20.1.1.1 0 200i
# Display information about BGP IPv4 unicast routes that match AS path list 1.
<Sysname> display bgp routing-table ipv4 as-path-acl 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 30.1.1.0/24 20.1.1.1 0 200i
# Display information about all public BGP IPv4 unicast routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 advertised-routes
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history
s - suppressed, S - Stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 10.2.1.0/24 10.2.1.1 0 0 i
* > 192.168.1.0 192.168.1.135 0 0 i
# Display information about all public BGP IPv4 unicast routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 received-routes
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history
s - suppressed, S - Stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
e 10.2.1.0/24 10.2.1.2 0 0 200i
* e 192.168.1.0 10.2.1.2 0 0 200i
# Display information about all BGP IPv4 unicast routes that have a community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv4 community
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Community
* > 10.2.1.0/24 10.2.1.1 0 0 <1:1>
* > 192.168.1.0 192.168.1.135 0 0 <1:2>
# Display information about all BGP IPv4 unicast routes that have a large community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv4 large-community
Total number of routes: 3
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Large-community
* > 10.2.1.0/24 10.2.1.1 0 0 <1:1:1>
* > 192.168.1.0 192.168.1.135 0 0 <1:1:2>
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
NextHop |
Next hop IP address. |
MED |
MULTI_EXIT_DISC attribute. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed, which avoids routing loops. A maximum of 16 AS numbers can be displayed in this field. Exceeding AS numbers are omitted and are available by displaying detailed routing information. · ORIGIN—Identifies the origin of the route. |
Community |
Community attribute. |
Large-community |
Large community attribute. |
# Display detailed information about BGP IPv4 unicast routes destined to network 10.2.1.0/24.
<Sysname> display bgp routing-table ipv4 10.2.1.0 24
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 2 available, 1 best
BGP routing table information of 10.2.1.0/24:
Imported route.
Original nexthop: 10.2.1.1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h30m23s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : (null)
Origin : igp
Attribute value : MED 0, pref-val 0, pre 0
State : valid, local, best, delay, bgp-rib-only
Originator : 176.1.1.2
Cluster list : 80
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
From : 10.2.1.2 (192.168.100.2)
Rely nexthop : not resolved
Original nexthop: 10.2.1.2
OutLabel : NULL
Org-validation : Not found
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0, pre 255
State : external
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# Display detailed information about the BGP IPv4 unicast route destined to address 1.1.1.1/32.
<Sysname> display bgp routing-table ipv4 1.1.1.1 32
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 2 available, 1 best
BGP routing table information of 1.1.1.1/32:
From : 10.2.1.1 (192.168.100.3)
Rely nexthop : 10.2.1.1
Original nexthop: 10.2.1.1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h35m24s
OutLabel : 16201
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : (null)
Origin : igp
PrefixSID : Label index 201
SRMS-PrefixSID : Label index 202
Attribute value : MED 0, pref-val 0, pre 0
State : valid, local, best, delay
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Backup route.
From : 10.2.1.2 (192.168.100.2)
Rely nexthop : 10.2.1.2
Original nexthop: 10.2.1.2
Out interface : Ten-GigabitEthernet3/1/3
Route age : 01h38m25s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
Org-validation : Not found
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0, pre 255
State : external
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# Display detailed information about the longest matching BGP IPv4 unicast route destined to 20.1.1.1.
<Sysname> display bgp routing-table ipv4 20.1.1.1 longest-match
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 20.1.1.1/31:
Imported route.
Original nexthop: 0.0.0.0
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h30m23s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : 20971333
RelyBkTunnelID : 20971522
Table 47 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
Out interface |
Next hop output interface information. |
Route age |
Time elapsed since the most recent route update. |
OutLabel |
Outgoing label of the route. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
Org-validation |
BGP RPKI validation state: · Valid. · Not found. · Invalid. |
AS-path |
AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
PrefixSID |
Prefix SID: · Label index—Label index. · SRGB—SRGB range. |
SRMS-PrefixSID |
SRMS prefix label attribute. The value of this field is the label index, which represents the SID index. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
Inlabel |
Incoming label of the route. |
Originator |
Peer that generated the route. |
Cluster list |
CLUSTER_LIST attribute of the route. This field is not displayed if no CLUSTER_LIST attribute exists. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. · localredist—If the state of a route is localredist, the route can be one of the following routes: ¡ Route that is redistributed from another local VPN instance or the public instance to the current VPN instance. ¡ Route that is redistributed from a VPN instance to the public instance. · remoteredist—Route that is received from a peer and is redistributed to a local VPN instance. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · bgp-rib-only—The route will not be flushed to the routing table. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
Originator |
Router ID of the peer that advertised the route to the reflector. |
From |
IP address of the BGP peer that advertised the route. |
Rely Nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
Tunnel policy |
Tunnel policy that takes effect. NULL indicates that no tunnel policy takes effect. |
Rely Tunnel IDs |
Tunnel index IDs or primary tunnel index ID after route recursion. This field displays multiple tunnel index IDs if ECMP tunnels exist and displays N/A if no tunnels are found by route recursion. |
RelyBkTunnelID |
Backup tunnel index ID after route recursion. This field displays N/A if no backup tunnel is found after route recursion. |
# Display statistics for public BGP IPv4 unicast routes advertised to peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 advertised-routes statistics
# Display statistics for public BGP IPv4 unicast routes received from peer 10.2.1.2.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 received-routes statistics
Table 48 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv4 unicast route statistics.
<Sysname> display bgp routing-table ipv4 statistics
# Display statistics about all BGP IPv4 unicast routes that has a community attribute.
<Sysname> display bgp routing-table ipv4 statistics community
Total number of routes: 1
# Display statistics about all BGP IPv4 unicast routes that has a large community attribute.
<Sysname> display bgp routing-table ipv4 statistics large-community
Total number of routes: 1
Table 49 Command output
Field |
Description |
Total number of routes |
Total number of routes. |
# Display advertisement information for the BGP IPv4 unicast route destined to network 10.2.1.0/24.
<Sysname> display bgp routing-table ipv4 10.2.1.0 24 advertise-info
BGP local router ID: 192.168.100.1
Local AS number: 100
BGP routing table information of 10.2.1.0/24(TxPathID:0):
Advertised to peers (1 in total):
Table 50 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of optimal routes to the destination. |
BGP routing table information of 10.2.1.0/24(TxPathID:0) |
Advertisement information for network 10.2.1.0/24. |
Advertised to peers (1 in total) |
Peers to which the network has been advertised. |
# Display information about all BGP IPv4 unicast routes that have a large community attribute and are destined for network 10.3.1.0/24.
<Sysname> display bgp routing-table ipv4 10.3.1.0 24 large-community
BGP local router ID: 1.1.1.9
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 10.3.1.0/24:
Large-community: <1:1:2>, <1:1:3>
Table 51 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of routes to the destination. · available—Number of available routes. · best—Number of optimal routes. |
BGP routing table information of 10.3.1.0/24 |
Information about all BGP IPv4 unicast routes that have a large community attribute and are destined for network 10.3.1.0/24. |
Large-community |
Large community attribute. |
ip as-path
ip community-list
display bgp routing-table ipv6 multicast
Use display bgp routing-table ipv6 multicast to display BGP IPv6 multicast routing information.
display bgp [ instance instance-name ] routing-table ipv6 multicast [ ipv6-address prefix-length [ advertise-info ] | as-path-acl { as-path-acl-number | as-path-acl-name } | as-path-regular-expression regular-expression | [ statistics ] { community [ community-number&<1-32> | aa:nn&<1-32> ] [ internet | no-advertise | no-export | no-export-subconfed ] [ whole-match ] | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } } | peer { ipv4-address | ipv6-address } { advertised-routes | received-routes } [ ipv6-address prefix-length [ verbose ] | statistics ] | statistics ]
display bgp [ instance instance-name ] routing-table ipv6 multicast [ ipv6-address prefix-length ] [ statistics ] { large-community [ aa:bb:cc&<1-32> ] | large-community-list { basic-large-comm-list-number | adv-large-comm-list-number | large-comm-list-name } } [ whole-match ]
display bgp [ instance instance-name ] routing-table ipv6 multicast peer { ipv4-address | ipv6-address } { accepted-routes | not-accepted-routes }
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv6 multicast routing information for the default BGP instance.
ipv6-address prefix-length: Specifies the destination network address and prefix length. The value range for the prefix-length argument is 0 to 128. If you do not specify this argument, the command displays brief information about all BGP IPv6 multicast routing information.
verbose: Displays detailed route information. If you do not specify this keyword, the command displays brief route information.
advertise-info: Displays advertisement information for BGP IPv6 multicast routes. If you do not specify this keyword, the command displays the BGP IPv6 multicast routing table.
as-path-acl as-path-acl-number: Displays BGP IPv6 multicast routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv6 multicast routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
as-path-regular-expression regular-expression: Displays BGP IPv6 multicast routes with an AS path attribute matching the specified regular expression. The regular-expression argument represents the regular expression, a case-sensitive string of 1 to 256 characters.
community: Displays BGP IPv6 multicast routes that match the specified community attribute. You can specify a community attribute by its community number or community sequence number.
community-number&<1-32>: Specifies a community sequence number. The value range for the community-number argument is 1 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified.
aa:nn&<1-32>: Specifies a community number. Both aa and nn are in the range of 0 to 65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
internet: Displays BGP IPv6 multicast routes that have the INTERNET community attribute. Routes with this attribute can be advertised to all BGP peers. By default, all routes have this attribute.
no-advertise: Displays BGP IPv6 multicast routes that have the NO_ADVERTISE community attribute. Routes with this attribute cannot be advertised to any peers.
no-export: Displays BGP IPv6 multicast routes that have the NO_EXPORT community attribute. Routes with this attribute cannot be advertised outside the local AS or confederation, but can be advertised to other sub-ASs in the confederation.
no-export-subconfed: Displays BGP IPv6 multicast routes that have the NO_EXPORT_SUBCONFED community attribute. Routes with this attribute cannot be advertised outside the local AS or to other sub-ASs in the confederation.
community-list: Displays BGP IPv6 multicast routes that match a community list.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays BGP IPv6 multicast routes that exactly match the specified community list, community attribute, large community list, or large community attribute. If you do not specify this keyword, the command displays BGP IPv6 multicast routes that meet one of the following requirements:
· The community attributes of the routes include one or more attributes in the specified community list.
· The community attributes of the routes include the specified community attribute.
· The large community attributes of the routes include one or more attributes in the specified large community list.
· The large community attributes of the routes include the specified large community attribute.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.
large-community: Displays BGP IPv6 multicast routes that match the specified large community attribute. You can specify a large community attribute by its community number.
aa:bb:cc&<1-32>: Specifies a large community number. aa, bb, and cc are all in the range of 0 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified. If you do not specify this argument, this command displays information about all BGP IPv6 multicast routes that has a large community attribute.
large-community-list: Displays BGP IPv6 multicast routes that match the specified large community list.
basic-large-comm-list-number: Specifies a basic large community list by its number. The value range for this argument is 1 to 99.
adv-large-comm-list-number: Specifies an advanced large community list by its number. The value range for this argument is 100 to 199.
large-comm-list-name: Specifies a large community list by its name. A large community list name is a case-sensitive string of 1 to 63 characters and cannot contain only digits.
peer{ ipv4-address | ipv6-address }: Specifies a peer by its IPv4 or IPv6 address.
advertised-routes: Displays BGP IPv6 multicast routing information advertised to the specified peer.
received-routes: Displays BGP IPv6 multicast routing information received from the specified peer.
statistics: Displays routing statistics.
accepted-routes: Displays routes that are received from the specified peer and match the routing policy.
not-accepted-routes: Displays routes that are received from the specified peer but do not match the routing policy.
Usage guidelines
If you specify the adv-large-community-list-number argument together with the whole-match keyword, the whole-match keyword does not take effect.
# Display brief information about all BGP IPv6 multicast routes.
<Sysname> display bgp routing-table ipv6 multicast
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 1::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* >i Network : 5::5 PrefixLen : 128
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
# Display information about BGP IPv6 multicast routes that match AS path list 1.
<Sysname> display bgp routing-table ipv6 multicast as-path-acl 1
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 1::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* >i Network : 5::5 PrefixLen : 128
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
# Display information about BGP IPv6 multicast routes with any AS path attributes.
<Sysname> display bgp routing-table ipv6 multicast as-path-regular-expression ^.*
Total number of routes: 5
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 1::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* >i Network : 5::5 PrefixLen : 128
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
# Display information about BGP IPv6 multicast routes that match BGP community list 100.
<Sysname> display bgp routing-table ipv6 multicast community-list 100
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 1::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: ?
* >i Network : 5::5 PrefixLen : 128
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
# Display information about all BGP IPv6 multicast routes advertised to peer 1::1.
<Sysname> display bgp routing-table ipv6 multicast peer 1::1 advertised-routes
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf : 100
MED : 0 OutLabel : NULL
Path/Ogn: ?
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf : 100
MED : 0 OutLabel : NULL
Path/Ogn: ?
# Display information about all BGP IPv6 multicast routes received from peer 1::1.
<Sysname> display bgp routing-table ipv6 multicast peer 1::1 received-routes
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
* >i Network : 5::5 PrefixLen : 128
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: ?
# Display information about all BGP IPv6 multicast routes that have a community attribute.
<Sysname> display bgp routing-table ipv6 multicast community
Total number of routes: 1
BGP local router ID is 192.168.1.139
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* i Network : 1:: PrefixLen : 64
NextHop : 1::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Community: <1:1>
# Display information about all BGP IPv6 multicast routes that have a large community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv6 multicast large-community
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Large-community: <1:1:1>
* > Network : 2::2 PrefixLen : 128
NextHop : ::1 LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Large-community: <1:1:2>
Table 52 Command output
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
PrefixLen |
Prefix length of the destination network address. |
NextHop |
Next hop IP address. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
OutLabel |
Outgoing label of the route. |
MED |
MULTI_EXIT_DISC attribute. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH—Records the ASs the route has passed, which avoids routing loops. · ORIGIN—Identifies the origin of the route. |
Community |
Community attribute. |
Large-community |
Large community attribute. |
# Display detailed information about BGP IPv6 multicast routes destined to network 2::2/128.
<Sysname> display bgp routing-table ipv6 multicast 2::2 128
BGP local router ID: 192.168.1.139
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 2::2/128:
Imported route.
Original nexthop: ::1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h28m32s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best, delay
Originator : 176.1.1.2
Cluster list : 80
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Table 53 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
Out interface |
Next hop output interface information. |
Route age |
Time elapsed since the most recent route update. |
OutLabel |
Outgoing label of the route. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
AS-path |
AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
Originator |
Peer that generated the route. |
Cluster list |
CLUSTER_LIST attribute of the route. This field is not displayed if no CLUSTER_LIST attribute exists. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
Originator |
Router ID of the peer that advertised the route to the reflector. |
From |
IP address of the BGP peer that advertised the route. |
Rely Nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
# Display advertisement information for BGP IPv6 multicast routes destined to network 2::2/128.
<Sysname> display bgp routing-table ipv6 multicast 2::2 128 advertise-info
BGP local router ID: 192.168.1.139
Local AS number: 100
BGP routing table information of 2::2/128(TxPathID:0):
Advertised to peers (1 in total):
Table 54 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of optimal routes to the destination. |
BGP routing table information of 2::2/128(TxPathID:0) |
Advertisement information for network 2::2/128. |
Advertised to peers (1 in total) |
Peers to which the network has been advertised. |
# Display statistics for BGP IPv6 multicast routes advertised to peer 1::1.
<Sysname> display bgp routing-table ipv6 multicast peer 1::1 advertised-routes statistics
# Display statistics for BGP IPv6 multicast routes received from peer 1::1.
<Sysname> display bgp routing-table ipv6 multicast peer 1::1 received-routes statistics
Table 55 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv6 multicast route statistics.
<Sysname> display bgp routing-table ipv6 multicast statistics
# Display statistics about all BGP IPv6 multicast routes that has a community attribute.
<Sysname> display bgp routing-table ipv6 multicast statistics community
Total number of routes: 1
# Display statistics about all BGP IPv6 multicast routes that has a large community attribute.
<Sysname> display bgp routing-table ipv6 multicast statistics large-community
Total number of routes: 3
Table 56 Command output
Field |
Description |
Total number of routes |
Total number of routes. |
# Display information about all BGP IPv6 multicast routes that have a large community attribute and are destined for network 2::2/128.
<Sysname> display bgp routing-table ipv6 multicast 2::2 128 large-community
BGP local router ID: 1.1.1.9
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 2::2/128:
Large-community: <1:1:2>, <1:1:3>
Table 57 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of routes to the destination. · available—Number of available routes. · best—Number of optimal routes. |
BGP routing table information of 2::2/128 |
Information about all BGP IPv6 multicast routes that have a large community attribute and are destined for network 2::2/128. |
Large-community |
Large community attribute. |
ip as-path
ip community-list
display bgp routing-table ipv6 unicast
Use display bgp routing-table ipv6 unicast to display BGP IPv6 unicast routing information.
display bgp [ instance instance-name ] routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] [ ipv6-address prefix-length [ advertise-info ] | as-path-acl { as-path-acl-number | as-path-acl-name } | as-path-regular-expression regular-expression | [ statistics ] { community [ community-number&<1-32> | aa:nn&<1-32> ] [ internet | no-advertise | no-export | no-export-subconfed ] [ whole-match ] | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } } | peer { ipv4-address | ipv6-address } { advertised-routes | received-routes } [ ipv6-address prefix-length [ verbose ] | statistics ] | statistics ]
display bgp [ instance instance-name ] routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] [ ipv6-address prefix-length ] [ statistics ] { large-community [ aa:bb:cc&<1-32> ] | large-community-list { basic-large-comm-list-number | adv-large-comm-list-number | large-comm-list-name } } [ whole-match ]
display bgp [ instance instance-name ] routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] peer { ipv4-address | ipv6-address } { accepted-routes | not-accepted-routes }
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP IPv6 unicast routing information for the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays the BGP IPv6 unicast routing information for the public network.
ipv6-address prefix-length: Specifies the destination network address and prefix length. The value range for the prefix-length argument is 0 to 128. If you do not specify this argument, the command displays brief information about all BGP IPv6 unicast routing information.
verbose: Displays detailed route information. If you do not specify this keyword, the command displays brief route information.
advertise-info: Displays advertisement information for BGP IPv6 unicast routes. If you do not specify this keyword, the command displays the BGP IPv6 unicast routing table.
as-path-acl as-path-acl-number: Displays BGP IPv6 unicast routes that match the AS path list specified by its number in the range of 1 to 256.
as-path-acl as-path-acl-name: Displays BGP IPv6 unicast routes that match the AS path list specified by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
as-path-regular-expression regular-expression: Displays BGP IPv6 unicast routes with an AS path attribute matching the specified regular expression. The regular-expression argument represents the regular expression, a case-sensitive string of 1 to 256 characters.
community: Displays BGP IPv6 unicast routes that match the specified community attribute. You can specify a community attribute by its community number or community sequence number.
community-number&<1-32>: Specifies a community sequence number. The value range for the community-number argument is 1 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified.
aa:nn&<1-32>: Specifies a community number. Both aa and nn are in the range of 0 to 65535. &<1-32> indicates that a maximum of 32 numbers can be specified.
internet: Displays BGP IPv6 unicast routes that have the INTERNET community attribute. Routes with this attribute can be advertised to all BGP peers. By default, all routes have this attribute.
no-advertise: Displays BGP IPv6 unicast routes that have the NO_ADVERTISE community attribute. Routes with this attribute cannot be advertised to any peers.
no-export: Displays BGP IPv6 unicast routes that have the NO_EXPORT community attribute. Routes with this attribute cannot be advertised outside the local AS or confederation, but can be advertised to other sub-ASs in the confederation.
no-export-subconfed: Displays BGP IPv6 unicast routes that have the NO_EXPORT_SUBCONFED community attribute. Routes with this attribute cannot be advertised outside the local AS or to other sub-ASs in the confederation.
community-list: Displays BGP IPv6 unicast routes that match a community list.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays BGP IPv6 unicast routes that exactly match the specified community list, community attribute, large community list, or large community attribute. If you do not specify this keyword, the command displays BGP IPv6 unicast routes that meet one of the following requirements:
· The community attributes of the routes include one or more attributes in the specified community list.
· The community attributes of the routes include the specified community attribute.
· The large community attributes of the routes include one or more attributes in the specified large community list.
· The large community attributes of the routes include the specified large community attribute.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.
large-community: Displays BGP IPv6 unicast routes that match the specified large community attribute. You can specify a large community attribute by its community number.
aa:bb:cc&<1-32>: Specifies a large community number. aa, bb, and cc are all in the range of 0 to 4294967295. &<1-32> indicates that a maximum of 32 numbers can be specified. If you do not specify this argument, this command displays information about all BGP IPv6 unicast routes that has a large community attribute.
large-community-list: Displays BGP IPv6 unicast routes that match the specified large community list.
basic-large-comm-list-number: Specifies a basic large community list by its number. The value range for this argument is 1 to 99.
adv-large-comm-list-number: Specifies an advanced large community list by its number. The value range for this argument is 100 to 199.
large-comm-list-name: Specifies a large community list by its name. A large community list name is a case-sensitive string of 1 to 63 characters and cannot contain only digits.
peer: Displays BGP IPv6 unicast routing information advertised to or received from the specified peer.
ipv4-address: Specifies the peer IPv4 address.
ipv6-address: Specifies the peer IPv6 address.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
statistics: Displays routing statistics.
accepted-routes: Displays routes that are received from the specified peer and match the routing policy.
not-accepted-routes: Displays routes that are received from the specified peer but do not match the routing policy.
This command displays BGP IPv6 unicast routing information regardless of whether the unicast keyword is specified.
If you specify the adv-large-community-list-number argument together with the whole-match keyword, the whole-match keyword does not take effect.
# Display brief information about all BGP IPv6 unicast routes.
<Sysname> display bgp routing-table ipv6
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 4294967295 4294967294 4294967293 4294967292 4294967291 4294967290 4294967215 4294967225 4294967235 4294967245 4294967295 4294967294 4294967293 4294967292 4294967291 4294967290... i
# Display information about BGP IPv6 unicast routes that match AS path list 1.
<Sysname> display bgp routing-table ipv6 as-path-acl 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 2:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
# Display information about BGP IPv6 unicast routes with any AS path attributes.
<Sysname> display bgp routing-table ipv6 as-path-regular-expression ^.*
Total number of routes: 2
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 2:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
# Display information about BGP IPv6 unicast routes that match BGP community list 100.
<Sysname> display bgp routing-table ipv6 community-list 100
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 2:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Path/Ogn: 100i
# Display information about all BGP IPv6 unicast routes advertised to peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 advertised-routes
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 2:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 OutLabel : NULL
Path/Ogn: i
# Display information about all BGP IPv6 unicast routes received from peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 received-routes
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 2:: PrefixLen : 64
NextHop : ::FFFF:10.1.1.1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 100i
# Display information about all BGP IPv6 unicast routes that have a community attribute.
<Sysname> display bgp routing-table ipv6 community
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Community: <1:1>
# Display information about all BGP IPv6 unicast routes that have a large community attribute on the public network for the default BGP instance.
<Sysname> display bgp routing-table ipv6 large-community
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a – additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 3:: PrefixLen : 64
NextHop : 1::2 LocPrf :
PrefVal : 0 OutLabel : NULL
MED :
Large-community: <1:1:1>
Field |
Description |
Status codes |
Status codes: · * – valid—Valid route. · > – best—Optimal route. · d – dampened—Dampened route. · h – history—History route. · s – suppressed—Suppressed route. · S – stale—Stale route. · i – internal—Internal route. · e – external—External route. · a – additional-path—Add-Path optimal route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP. · e – EGP—Learned through EGP. · ?– incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Network |
Destination network address. |
PrefixLen |
Prefix length of the destination network address. |
NextHop |
Next hop IPv6 address. |
LocPrf |
Local preference value. |
PrefVal |
Preferred value of the route. |
OutLabel |
Outgoing label of the route. |
MED |
MULTI_EXIT_DISC attribute. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route: · AS_PATH attribute—Records the ASs the route has passed, which avoids routing loops. A maximum of 16 AS numbers can be displayed in this field. Exceeding AS numbers are omitted and are available by displaying detailed routing information. · ORIGIN attribute—Identifies the origin of the route. |
Community |
Community attribute. |
Large-community |
Large community attribute. |
# Display detailed information about BGP IPv6 unicast routes destined to network 2::/64.
<Sysname> display bgp routing-table ipv6 2:: 64
BGP local router ID: 192.168.1.135
Local AS number: 200
Paths: 2 available, 1 best
BGP routing table information of 2::/64:
From : 10.1.1.1 (192.168.1.136)
Rely nexthop : ::FFFF:10.1.1.1
Original nexthop: ::FFFF:10.1.1.1
Out interface : Ten-GigabitEthernet3/1/2
Route age : 01h45m22s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
Org-validation :Not found
BIER Path : <Sub-domain ID 18, BFD-ID 13398, G-BIER encap><BSL info: [1,
255],[2,254],[3,253],[4,252],[5,251],[6,250],[7, 249]><MPRA
12::34><BFR-ID range, Count 3, [18, 25],[27, 40],[41, 60]>
AS-path : 100
Origin : igp
Attribute value : MED 0, pref-val 0
State : valid, external, best, delay, bgp-rib-only
Originator : 176.1.1.2
Cluster list : 80
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
Backup route.
From : 1::1 (192.168.1.136)
Rely nexthop : 1::1
Original nexthop: 1::1
Out interface : Ten-GigabitEthernet3/1/3
Route age : 01h50m35s
OutLabel : NULL
RxPathID : 0x0
TxPathID : 0x0
Org-validation :Not found
AS-path : 100
Origin : igp
Attribute value : MED 0, pref-val 0
State : valid, external
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : 20971123
RelyBkTunnelIDs : 20971522
Table 59 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP UPDATE message, the original next hop is the next hop IP address in the message. |
Out interface |
Next hop output interface information. |
Route age |
Time elapsed since the most recent route update. |
OutLabel |
Outgoing label of the route. |
Org-validation |
BGP RPKI validation state: · Valid. · Not found. · Invalid. |
RxPathID |
Add-path ID of received routes. |
TxPathID |
Add-path ID of advertised routes. |
BIER Path |
BIER path attribute: · Sub-domain ID—BIER subdomain ID. · BFR-ID—BFR ID in the subdomain. · G-BIER encap—The BIER information uses G-BIER encapsulation. · BSL info—Bit string length information. · MPRA—Multicast policy reserved address. · BFR-ID range—BFR-ID range. · Count—Number of BFR-ID groups. |
AS-path |
AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised with the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGPs is INCOMPLETE. |
Attribute value |
BGP path attributes: · MED—MED value. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference. |
Inlabel |
Incoming label of the route. |
Originator |
Peer that generated the route. |
Cluster list |
CLUSTER_LIST attribute of the route. This field is not displayed if no CLUSTER_LIST attribute exists. |
State |
Current state of the route: · valid. · internal. · external. · local. · best. · localredist—If the state of a route is localredist, the route can be one of the following routes: ¡ Route that is redistributed from another local VPN instance or the public instance to the current VPN instance. ¡ Route that is redistributed from a VPN instance to the public instance. · remoteredist—Route that is received from a peer and is redistributed to a local VPN instance. · delay—The route will be delayed for optimal route selection. This field is displayed only in the detailed command output. · bgp-rib-only—The route will not be flushed to the routing table. This field is displayed only in the detailed command output. · not preferred for reason—Reason why the route is not selected as the optimal route. For more information, see Table 36. · not ECMP for reason—Reason why the route does not form ECMP routes with other routes. For more information, see Table 37. |
Originator |
Router ID of the peer that advertised the route to the reflector. |
From |
IP address of the BGP peer that advertised the route. |
Relay Nexthop |
Next hop found by route recursion. If no next hop is found, this field displays not resolved. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field. |
Tag |
Route tag. |
Tunnel policy |
Tunnel policy that takes effect. NULL indicates that no tunnel policy takes effect. |
Rely Tunnel IDs |
Tunnel index IDs or primary index ID after route recursion. This field displays multiple tunnel index IDs if ECMP tunnels exist and displays N/A if no tunnels are found by route recursion |
RelyBkTunnelID |
Backup index ID after route recursion. This field displays N/A if no backup tunnel is found after route recursion. |
# Display advertisement information for BGP IPv6 unicast routes destined to network 2::/64.
<Sysname> display bgp routing-table ipv6 2:: 64 advertise-info
BGP local router ID: 192.168.1.136
Local AS number: 100
BGP routing table information of 2::/64(TxPathID:0):
Advertised to peers (2 in total):
10.1.1.2
1::2
Table 60 Command output
Field |
Description |
Paths |
Number of optimal routes destined to the specified network. |
BGP routing table information of 2::/64(TxPathID:0) |
Advertisement information for BGP routes destined to network 2::/64. |
Advertised to peers (2 in total) |
Peers to which the route has been advertised, and the number of peers. |
# Display statistics for BGP IPv6 unicast routes advertised to peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 advertised-routes statistics
# Display statistics for BGP IPv6 unicast routes received from peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 received-routes statistics
Table 61 Command output
Field |
Description |
Advertised routes total |
Total number of advertised routes. |
Received routes total |
Total number of received routes. |
# Display BGP IPv6 unicast route statistics.
<Sysname> display bgp routing-table ipv6 statistics
# Display statistics about all BGP IPv6 unicast routes that have a community attribute.
<Sysname> display bgp routing-table ipv6 statistics community
Total number of routes: 1
# Display statistics about all BGP IPv6 unicast routes that have a large community attribute.
<Sysname> display bgp routing-table ipv6 statistics large-community
Total number of routes: 1
Table 62 Command output
Field |
Description |
Total number of routes |
Total number of routes. |
# Display information about all BGP IPv6 unicast routes that have a large community attribute and are destined for network 2:: /64.
<Sysname> display bgp routing-table ipv6 2:: 64 large-community
BGP local router ID: 1.1.1.9
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 2::/64:
Large-community: <1:1:2>, <1:1:3>
Table 63 Command output
Field |
Description |
BGP local router ID |
Local BGP router ID. |
Local AS number |
Local AS number. |
Paths |
Number of routes to the destination. · available—Number of available routes. · best—Number of optimal routes. |
BGP routing table information of 2::/64 |
Information about all BGP IPv6 unicast routes that have a large community attribute and are destined for network 2::/64. |
Large-community |
Large community attribute. |
ip as-path
ip community-list
display bgp routing-table ipv6 unicast inlabel
Use display bgp routing-table ipv6 unicast inlabel to display incoming labels for BGP IPv6 unicast routes.
display bgp [ instance instance-name ] routing-table ipv6 [ unicast ] inlabel
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays incoming labels of BGP IPv6 unicast routes in the default BGP instance.
This command displays incoming labels for BGP IPv6 unicast routes regardless of whether the unicast keyword is specified.
# Display incoming labels for all BGP IPv6 unicast routes.
<Sysname> display bgp routing-table ipv6 inlabel
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 1::1 PrefixLen : 128
NextHop : 10::1 OutLabel : NULL
InLabel : 1279
* > Network : 10:: PrefixLen : 64
NextHop : :: OutLabel : NULL
Table 64 Command output
Field |
Description |
Status codes |
Status codes. For more information, see Table 58. |
Origin |
Origin of the route. For more information, see Table 58. |
Network |
Destination network address. |
PrefixLen |
Prefix length of the destination network address. |
NextHop |
Next hop IPv6 address. |
OutLabel |
Outgoing label of the IPv6 unicast route, which is assigned by the peer 6PE device. |
InLabel |
Incoming label of the IPv6 unicast route, which is assigned by the local 6PE device. |
display bgp routing-table ipv6 unicast outlabel
Use display bgp routing-table ipv6 unicast outlabel to display outgoing labels for BGP IPv6 unicast routes.
display bgp [ instance instance-name ] routing-table ipv6 [ unicast ] outlabel
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays outgoing labels of BGP IPv6 unicast routes in the default BGP instance.
This command displays outgoing labels for BGP IPv6 unicast routes regardless of whether the unicast keyword is specified.
# Display outgoing labels for all BGP IPv6 unicast routes.
<Sysname> display bgp routing-table ipv6 outlabel
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >i Network : 4::4 PrefixLen : 128
NextHop : ::FFFF:3.3.3.3 OutLabel : 1279
* >i Network : 20:: PrefixLen : 64
NextHop : ::FFFF:3.3.3.3 OutLabel : 1278
Table 65 Command output
Field |
Description |
Status codes |
Status codes. For more information, see Table 58. |
Origin |
Origin of the route. For more information, see Table 58. |
Network |
Destination network address. |
PrefixLen |
Prefix length of the destination network address. |
NextHop |
Next hop IPv6 address. |
OutLabel |
Outgoing label of the IPv6 unicast route, which is assigned by the peer 6PE device. |
display bgp rpki server
Use display bgp rpki server to display information about connections to RPKI servers.
Syntax
display bgp [ instance instance-name ] rpki server [ ipv4-address | ipv6-address | vpn-instance vpn-instance-name { ipv4-address | ipv6-address } ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
ipv4-address: Specifies an RPKI server by its IPv4 address.
ipv6-address: Specifies an RPKI server by its IPv6 address.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the public network.
Examples
# Display brief information about connections to RPKI servers.
<Sysname> display bgp rpki server
Server VPN-index Port State Time ROAs(IPv4/IPv6)
1.1.1.2 0 1234 Establish 00:05:51 1/0
2.2.2.2 0 1234 Establish 00:06:07 3/1
Table 66 Command output
Field |
Description |
Server |
IP address of the RPKI server. |
Port |
Port number of the RPKI server. |
State |
Connection state: · Establish—BGP has established a connection to the RPKI server. · Connect—BGP is establishing a connection to the RPKI server. · Shutdown—BGP has not established a connection to the RPKI server. |
Time |
Duration of the current connection state. |
ROAs(IPv4/IPv6) |
Number of IPv4/IPv6 ROAs. |
# Display detailed information about the connection to RPKI server 2.2.2.1.
<Sysname> display bgp rpki server 2.2.2.1
RPKI Cache-Server 2.2.2.1
Port: TCP port 1234
Local addr: 2.2.2.2, Local port: 14342
Connect state: Establish
Total byte Rx: 72
Total byte Tx: 8
Session ID: 1
Serial number: 1
Last PDU type 7, Time: 00:00:15
Last disconnect reason: Response timer expired
Table 67 Command output
Field |
Description |
RPKI Cache-Server |
IP address of the RPKI server. |
Port |
Port number of the RPKI server. |
Local addr |
Local IP address of the connection. |
Local port |
Local port number of the connection. |
Connect state |
Connection state: · Establish—BGP has established a connection to the RPKI server. · Connect—BGP is establishing a connection to the RPKI server. · Shutdown—BGP has not established a connection to the RPKI server. |
Total byte Rx |
Number of received bytes. |
Total byte Tx |
Number of sent bytes. |
Session ID |
Session ID assigned by the RPKI server. |
Serial number |
Serial number assigned by the RPKI server. |
Last PDU Type |
Type of the most recently received PDU. |
Time |
Duration of the current connection state. |
Last disconnect reason |
Reason for the most recent connection interruption: · Configure reset—The port number used to establish the connection was changed or the reset bgp rpki server command was executed. · Receive error report PDU—Received error report packets from the server. · Response timer expired—No response was received within the response time from the RPKI server. · Receive error PDU—Received error packets. · TCP connect failed—The TCP connection was down. · Shutdown port—No port number was specified. · Not enough memory—The memory was insufficient. · Receive cache reset PDU—Received reset packets from the RPKI server. · Maximum number of ROAs reached—The number of received ROAs has exceeded the limit specified with the rpki-limit command. |
display bgp rpki table
Use display bgp rpki table to display the ROA information obtained from RPKI servers.
Syntax
display bgp [ instance instance-name ] rpki table { ipv4 [ ipv4-address min min-length max max-length ] | ipv6 [ ipv6-address min min-length max max-length ] }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
ipv4: Displays information about ROAs with IPv4 prefixes.
ipv4-address: Specifies an IPv4 prefix. If you do not specify an IPv4 prefix, the command displays information about all IPv4 ROAs.
ipv6: Displays information about ROAs with IPv6 prefixes.
ipv6-address: Specifies an IPv6 prefix. If you do not specify an IPv6 prefix, the command displays information about all IPv6 ROAs.
min-length: Specifies the minimum mask or prefix length. The value range for this argument is 0 to 32 for IPv4 prefixes and 0 to 128 for IPv6 prefixes.
max-length: Specifies the maximum mask or prefix length. The value range for this argument is 0 to 32 for IPv4 prefixes and 0 to 128 for IPv6 prefixes.
Examples
# Display brief information about ROAs with IPv4 prefixes.
<Sysname> display bgp rpki table ipv4
Total number of entries: 4
Status codes: S - stale, U - used
Network Mask-range Origin-AS Server Status
1.2.3.4 8-32 100 1.1.1.2 U
5.2.3.4 8-32 100 2.2.2.2 U
6.6.6.6 8-32 100 2.2.2.2 U
7.7.7.7 8-32 20 2.2.2.2 U
Table 68 Command output
Description |
|
Total number of entries |
Total number of ROAs. |
Network |
Network address. |
Mask-range |
Mask or prefix length range. |
Server |
IP address of the RPKI server. |
Status |
ROA state: · U—The ROA is available. · S—The ROA is in aging state. |
# Display detailed information about ROAs with IPv4 prefixes.
<Sysname> display bgp rpki table ipv4 5.2.3.4 min 8 max 32
RPKI ROA entry for 5.2.3.4/8-32
Origin-AS: 100 from 2.2.2.1, used
Table 69 Command output
Field |
Description |
Origin-AS |
ROA information: · AS number. · IP address of the RPKI server. · ROA state: ¡ used—The ROA is available. ¡ stale—The ROA is in aging state. |
display bgp summary
Use display bgp summary to display BGP peer and route summary information.
Syntax
display bgp [ instance instance-name ] { { ipv4 | ipv6 } vpn-instance vpn-instance-name | vpnv4 | vpnv6 } summary
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP peer and route summary information in the default BGP instance.
ipv4: Specifies the IPv4 address family.
ipv6: Specifies the IPv6 address family.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters.
vpnv4: Specifies the VPNv4 address family.
vpnv6: Specifies the VPNv6 address family.
Examples
# Display BGP peer and route summary information for the VPNv4 address family.
<Sysname> display bgp vpnv4 summary
VPNv4:
RD Num Peer Num Route Num
1 2 3
VPN-Instance(IPv4-family):
VPN-Instance Name Peer Num Route Num
vpn1 2 3
vpn2 2 3
1234567890123456789012345678901 2 3
# Display BGP peer and route summary information in the VPN instance vpn1.
<Sysname> display bgp ipv4 vpn-instance vpn1 summary
VPN-Instance(IPv4-family):
VPN-Instance Name Peer Num Route Num
vpn1 2 3
Table 70 Command output
Field |
Description |
RD Num |
Route distinguisher for the VPN instance. |
VPN-Instance Name |
VPN instance name. |
Peer Num |
Number of BGP peers. |
Route Num |
Number of BGP routes. |
display bgp troubleshooting
Use display bgp troubleshooting to display information about BGP peer relationship down events.
Syntax
display bgp [ instance instance-name ] troubleshooting [ event-count ] [ reverse ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays information for the default BGP instance.
event-count: Specifies the number of peer relationship down events to display, in the range of 1 to 1000. If you do not specify this argument, the command displays information about the earliest or most recent 20 events based on the configuration of the reverse keyword.
Usage guidelines
Configure this command to display information about BGP peer relationship down events, including the time, reason, and recommended action.
This command records BGP peer relationship down events caused by the expiration of the neighbor hold timer only when you execute the maintenance-probe enable command.
Examples
# Display reasons why BGP peer relationships went down.
<Sysname> display bgp troubleshooting
Total number: 1
Date Time Event description
-----------------------------------------------------------------------
2018-10-06 09:39:18 The BGP peer 10.1.1.1 went down because the
peer ignore command was configured manually.
Please check local BGP configuration.
-----------------------------------------------------------------------
Table 71 Command output
Description |
|
Total number |
Total number of peer relationships that went down. |
Date |
Date (in YYYY-MM-DD format) on which a specific BGP peer relationship went down. |
Time |
Time (in hh:mm:ss format) when a specific BGP peer relationship went down. |
Event description |
Description for a specific peer down event. The description format is The BGP peer ip-address went down because peer-down-reason. Please treatment-suggestion. ip-address represents the IP address of the peer, peer-down-reason represents the down reason, and treatment-suggestion represents the recommended action to take. |
Related commands
maintenance-probe enable
display bgp update-group
Use display bgp update-group to display information about BGP update groups.
display bgp [ instance instance-name ] update-group ipv4 [ mdt | multicast | mvpn | rtfilter | [ flowspec | labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address ]
display bgp [ instance instance-name ] update-group ipv6 [ multicast | [ flowspec | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address ]
display bgp [ instance instance-name ] update-group ipv4 [ multicast | mvpn | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address ]
display bgp [ instance instance-name ] update-group ipv6 [ multicast | mvpn | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address ]
display bgp [ instance instance-name ] update-group link-state [ vpn ] [ ipv4-address | ipv6-address ]
display bgp [ instance instance-name ] update-group vpnv4 [ flowspec | vpn-instance vpn-instance-name ] [ ipv4-address ]
display bgp [ instance instance-name ] update-group vpnv4 [ flowspec ] ipv6-address
display bgp [ instance instance-name ] update-group l2vpn [ ipv4-address ]
display bgp [ instance instance-name ] update-group l2vpn evpn [ ipv4-address | ipv6-address ]
display bgp [ instance instance-name ] update-group vpnv6 flowspec [ ipv4-address | ipv6-address ]
display bgp [ instance instance-name ] update-group vpnv6 [ ipv4-address | ipv6-address ]
display bgp [ instance instance-name ] update-group ipv4 sr-policy [ ipv4-address | ipv6-address ]
display bgp [ instance instance-name ] update-group ipv6 sr-policy [ ipv4-address | ipv6-address ]
network-admin
network-operator
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP update group information for the default BGP instance.
ipv4: Displays BGP update group information for IPv4 address family.
flowspec: Displays BGP update group information for flowspec address family.
ipv6: Displays BGP update group information for IPv6 address family.
link-state: Displays BGP update group information for BGP LS address family.
link-state vpn: Displays BGP update group information for BGP-VPN LS address family.
vpnv4: Displays BGP update group information for VPNv4 address family.
l2vpn: Displays BGP update group information for L2VPN address family.
evpn: Displays BGP update group information for EVPN address family.
vpnv6: Displays BGP update group information for VPNv6 address family.
mdt: Displays BGP update group information for MDT address family.
multicast: Displays BGP update group information for multicast address family.
mvpn: Displays BGP update group information for MVPN address family.
rtfilter: Displays BGP update group information for IPv4 RT filter address family.
labeled-unicast: Displays BGP update group information for IPv4 labeled unicast address family.
sr-policy: Displays BGP update group information for SR policy address family.
unicast: Displays BGP update group information for unicast address family.
vpn-instance vpn-instance-name: Displays BGP update group information for the MPLS L3VPN instance specified by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays update group information for the public network.
ipv4-address: Displays BGP update group information for the specified BGP peer.
ipv6-address: Displays BGP update group information for the specified IPv6 BGP peer.
The update group feature classifies BGP peers that have the same export policy into an update group. When BGP advertises routes to the peers in the update group, it uses the export policy to filter the routes and generates route updates for all the peers only once.
With this feature, BGP performs one-time policy filtering and encapsulation for a prefix before advertising the prefix to all the peers in the update group. For example, BGP advertises 1000 prefixes to 1000 peers that have the same export policy (in data centers for example). Without the update group feature, BGP matches the export policy 1000 × 1000 times. With the update group feature, BGP matches the export policy only 1000 × 1 times, improving encapsulation efficiency 1000 times.
If you do not specify any parameters, this command displays all update groups for the specified address family on the public network.
By default, the unicast keyword is used if none of the multicast, labeled-unicast, mdt, mvpn, flowspec, and unicast keywords are specified.
# Display information about all BGP update groups for the IPv4 unicast address family.
<Sysname> display bgp update-group ipv4
Type: EBGP link
4-byte AS number: Supported
Site-of-Origin: Not specified
Minimum time between advertisements: 30 seconds
OutQ: 0
Members: 1
99.1.1.1
# Display update group information for BGP VPNv4 peer 1.1.1.2 in VPN instance vpn1.
<Sysname> display bgp update-group vpnv4 vpn-instance vpn1 1.1.1.2
Type: EBGP link
4-byte AS number: Supported
Site-of-Origin: Not specified
Nesting VPN: vpn1
Minimum time between advertisements: 30 seconds
OutQ: 0
Members: 2
1.1.1.2
1.1.1.3
# Display all update group information for the BGP L2VPN address family.
<Sysname> display bgp update-group l2vpn
Type: IBGP link
4-byte AS number: Supported
Site-of-Origin: Not specified
L2VPN signaling (VPLS): Supported
L2VPN signaling (VPWS): RFC mode
L2VPN auto-discovery: RFC mode
Minimum time between advertisements: 15 seconds
OutQ: 0
Members: 2
2.2.2.9
3.3.3.9
Table 72 Command output
Field |
Description |
Update-group ID |
ID of the update group. |
Type |
BGP link type: · IBGP link. · EBGP link. · Confed IBGP link—Confederation IBGP link. · Confed EBGP link—Confederation EBGP link. |
Label capability: Supported |
The peers in the update group support labeled routes. |
4-byte AS number: Supported |
4-byte AS number suppression is disabled for the peers in the update group. The peers in the update group support 4-byte AS numbers. |
4-byte AS number: Suppressed |
4-byte AS number suppression is enabled for the peers in the update group. |
Fake AS |
A fake local AS number is configured for the peers in the update group. |
Public-AS-Only: Yes |
BGP route updates advertised to the peers in the update group only carry the public AS number without the private AS number. · Yes—If a peer uses a private AS number, the AS number is used as an update group classification criterion. If a peer uses a public AS number, the AS number is not used as an update group classification criterion. · No—The AS number is not used as an update group classification criterion. |
Substitute-AS: Yes |
AS number substitution is enabled. |
Minimum time between advertisements: number seconds |
Minimum time between advertisements. |
Advertising community: Yes |
Community advertisement to peers in the update group is enabled. |
Route-reflect client: Yes |
The peer is a client of the route reflector. |
Advertising extended community: Yes |
Extended community advertisement to peers in the update group is enabled. |
RFC-compatible: Yes |
Advertise the RFC-specified attribute ID for the redirection next hop to peers in the update group. |
Export AS-path-ACL |
AS path ACL used to filter BGP routes advertised to peers in the update group. |
Export prefix list |
Prefix list used to filter BGP routes advertised to peers in the update group. |
Export route policy |
Routing policy used to filter BGP routes advertised to peers in the update group. |
Export filter-policy |
ACL used to filter BGP routes advertised to peers in the update group. |
OutQ |
Number of prefixes to be advertised to peers in the update group. |
Members |
Number and IP addresses of peers in the update group. |
Nesting VPN |
Peers in the update group support nesting VPN. |
UPE: Yes |
Peers in the update group are UPE devices. |
UPE export route policy |
An outgoing routing policy is applied to peers in the update group. |
L2VPN signaling (VPLS): Supported |
Peers in the update group support using NLRI defined in RFC 4761 to advertise VPLS label blocks. |
L2VPN signaling (VPWS): RFC mode |
Peers in the update group support using NLRI defined in RFC 4761 to advertise MPLS L2VPN label blocks. |
L2VPN signaling (VPWS): Draft mode |
Peers in the update group support using NLRI defined in the draft draft-kompella-ppvpn-l2vpn-03 to advertise MPLS L2VPN label blocks. |
L2VPN auto-discovery: RFC mode |
Peers in the update group support using NLRI defined in RFC 6074 to exchange VPLS PE information. |
L2VPN auto-discovery: Non-standard mode |
Peers in the update group support using non-standard NLRI to exchange VPLS PE information. |
display bgp-policy statistics
Use display bgp-policy statistics to display BGP policy accounting information.
display bgp-policy { ip | ipv6 } statistics { input | output } [ interface interface-type interface-number ]
network-admin
network-operator
ip: Displays BGP policy accounting information for IPv4 traffic.
ipv6: Displays BGP policy accounting information for IPv6 traffic.
input: Displays BGP policy accounting information for incoming traffic.
output: Displays BGP policy accounting information for outgoing traffic.
interface interface-type interface-number: Displays BGP policy accounting information on an interface specified by the interface type and number. If you do not specify an interface, this command displays global BGP policy accounting information.
# Display global BGP policy accounting information for incoming IPv4 traffic.
<Sysname> display bgp-policy ip statistics input
Statistics for the inbound direction:
Traffic Packets Bytes pps bps
Index (Last 30sec) (Last 30sec)
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
7 0 0 0 0
8 0 0 0 0
9 0 0 0 0
10 0 0 0 0
# Display global BGP policy accounting information for incoming IPv6 traffic.
<Sysname> display bgp-policy ipv6 statistics input
Statistics for the inbound direction:
Traffic Packets Bytes pps bps
Index (Last 30sec) (Last 30sec)
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
7 0 0 0 0
8 0 0 0 0
9 0 0 0 0
10 0 0 0 0
# Display BGP policy accounting information for outgoing IPv4 traffic on Ten-GigabitEthernet 3/1/1.
<Sysname> display bgp-policy ip statistics output interface ten-gigabitethernet 3/1/1
Statistics for Ten-GigabitEthernet3/1/1 in the outbound direction:
Traffic Packets Bytes pps bps
Index (Last 30sec) (Last 30sec)
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
7 0 0 0 0
8 0 0 0 0
9 0 0 0 0
10 0 0 0 0
# Display BGP policy accounting information for outgoing IPv6 traffic on Ten-GigabitEthernet 3/1/1.
<Sysname> display bgp-policy ipv6 statistics output interface ten-gigabitethernet 3/1/1
Statistics for Ten-GigabitEthernet3/1/1 in the outbound direction:
Traffic Packets Bytes pps bps
Index (Last 30sec) (Last 30sec)
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0
6 0 0 0 0
7 0 0 0 0
8 0 0 0 0
9 0 0 0 0
10 0 0 0 0
Table 73 Command output
Field |
Description |
Packets |
Number of packets for traffic with an index. |
Bytes |
Number of bytes for traffic with an index. |
pps (Last 30sec) |
Number of packets per second. For incoming traffic, the field displays the number of packets received per second. For outgoing traffic, the field displays the number of packets sent per second. |
bps (Last 30sec) |
Number of bits per second. For incoming traffic, the field displays the number of bits received per second. For outgoing traffic, the field displays the number of bits sent per second. |
bgp-policy accounting
reset bgp-policy statistics
display ttl-security statistics
Use display ttl-security statistics to display statistics information about packets discarded by GTSM.
Syntax
In standalone mode:
display ttl-security statistics [ slot slot-number [ cpu cpu-number ] ]
In IRF mode:
display ttl-security statistics [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays information for all cards. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays information for all cards on all IRF member devices. (In IRF mode.)
cpu cpu-number: Specifies a CPU by its number. This option is available only if multiple CPUs are available on the specified slot.
Examples
# (In standalone mode.) Display statistics information about packets discarded by GTSM.
<Sysname> display ttl-security statistics slot 1
Slot 1 CPU 1
Protocol Drop Counters
BGP 56
BGP4+ 83
OSPF 15
OSPFv3 0
LDP 0
LDPv6 0
Slot 1 CPU 2
Protocol Drop Counters
BGP 62
BGP4+ 34
OSPF 20
OSPFv3 6
LDP 0
LDPv6 0
Table 74 Command output
Field |
Description |
CPU |
CPU number |
Protocol |
Protocol: · BGP. · BGP4+. · OSPF. · OSPFv3. (This protocol is not supported in the current software version.) · LDP. (This protocol is not supported in the current software version.) · LDPv6. (This protocol is not supported in the current software version.) |
Drop Counters |
Statistics information about discarded packets. |
Related commands
ospf ttl-security
peer ttl-security
reset ttl-security statistics
ttl-security
domain-distinguisher
Use domain-distinguisher to specify an AS number and a router ID for BGP LS messages.
Use undo domain-distinguisher to restore the default.
Syntax
domain-distinguisher as-number:router-id
undo domain-distinguisher
Default
The AS number and router ID of the current BGP process are used.
Views
BGP LS address family view
Predefined user roles
network-admin
Parameters
as-number:router-id: Specifies the AS number and router ID. The value range for the as-number argument is 1 to 4294967295, and the router ID is in IP address format.
Examples
# Set the AS number and router ID for BGP LS messages to 65009 and 1.1.1.1, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family link-state
[Sysname-bgp-default-ls] domain-distinguisher 65009:1.1.1.1
ebgp-interface-sensitive
Use ebgp-interface-sensitive to enable immediate re-establishment of direct EBGP sessions.
Use undo ebgp-interface-sensitive to disable immediate re-establishment of direct EBGP sessions.
ebgp-interface-sensitive
undo ebgp-interface-sensitive
Immediate re-establishment of direct EBGP sessions is enabled.
network-admin
If the feature is enabled, BGP tears down the session and re-establishes a session to the peer immediately when a direct link to an EBGP peer fails. If the feature is not enabled, BGP does not tear down the session until the hold time expires. However, disabling this feature can prevent routing flaps from affecting EBGP session state.
This command applies only to direct EBGP sessions.
# Enable immediate re-establishment of direct EBGP sessions.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ebgp-interface-sensitive
extcommunity vpn-target additive
Use extcommunity vpn-target additive to enable BGP to append the local RT attribute to the extended community attribute list of a received private route.
Use undo extcommunity vpn-target additive to restore the default.
Syntax
extcommunity vpn-target additive
undo extcommunity vpn-target additive
Default
BGP uses the local RT attribute to replace the original RT attribute in a received private route.
Views
BGP-VPN instance view
Predefined user roles
network-admin
Usage guidelines
Execute this command on a PE to enable the PE to append the local RT attribute to a private route received from a CE instead of replacing the original RT attribute in the route.
If you have configured a routing policy and executed the apply extcommunity rt command without the additive keyword, the RT attribute specified in the routing policy takes effect.
Examples
# In BGP-VPN instance view, enable BGP to append the local RT attribute to the extended community attribute list of a received private route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn
[Sysname-bgp-default-vpn] extcommunity vpn-target additive
Related commands
vpn-target
fast-reroute route-policy
Use fast-reroute route-policy to apply a routing policy to fast reroute (FRR) for a BGP address family.
Use undo fast-reroute route-policy to restore the default.
fast-reroute route-policy route-policy-name
undo fast-reroute route-policy
No routing policy is applied to FRR.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
network-admin
route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
You can use the following methods to configure BGP FRR:
· Method 1—Execute the pic command in BGP address family view. BGP calculates a backup next hop for a BGP route in the address family if there are two or more unequal-cost routes to reach the destination.
· Method 2—Execute the fast-reroute route-policy command to use a routing policy in which a backup next hop is specified by using the command apply [ ipv6 ] fast-reroute backup-nexthop. For BGP to generate a backup next hop for the primary route, the backup next hop calculated by BGP must be the same as the specified backup next hop. You can also configure if-match clauses in the routing policy to identify the routes protected by FRR.
If both methods are configured, Method 2 takes precedence over Method 1.
# Apply routing policy frr-policy to FRR in BGP IPv4 unicast address family view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] fast-reroute route-policy frr-policy
apply fast-reroute
apply ipv6 fast-reroute
pic
route-policy
filter-policy export
Use filter-policy export to filter advertised BGP routes.
Use undo filter-policy export to remove the route filter.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv4 multicast address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
filter-policy { ipv4-acl-number | name ipv4-acl-name | prefix-list ipv4-prefix-list-name } export [ direct | { isis | ospf | rip } process-id | static | unr ]
undo filter-policy export [ direct | { isis | ospf | rip } process-id | static | unr ]
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv6 multicast address family view:
filter-policy { ipv6-acl-number | name ipv6-acl-name | prefix-list ipv6-prefix-list-name } export [ direct | { isisv6 | ospfv3 | ripng } process-id | static | unr ]
undo filter-policy export [ direct | { isisv6 | ospfv3 | ripng } process-id | static | unr]
In BGP EVPN address family view:
filter-policy { mac-acl-number | name mac-acl-name } export
undo filter-policy export
Advertised BGP routes are not filtered.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
network-admin
ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999, to match routes by destination.
ipv6-acl-number: Specifies an IPv6 ACL by its number in the range of 2000 to 3999, to match routes by destination.
mac-acl-number: Specifies a Layer 2 ACL by its number in the range of 4000 to 4999, to match routes by destination.
name ipv4-acl-name: Specifies an IPv4 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
name ipv6-acl-name: Specifies an IPv6 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
name mac-acl-name: Specifies a Layer 2 ACL to match the destination MAC addresses of routes. The mac-acl-name argument represents the name of the Layer 2 ACL, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
prefix-list ipv4-prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
prefix-list ipv6-prefix-list-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
direct: Filters redistributed direct routes.
isis: Filters redistributed IS-IS routes.
isisv6: Filters redistributed IPv6 IS-IS routes.
ospf: Filters redistributed OSPF routes.
ospfv3: Filters redistributed OSPFv3 routes.
rip: Filters redistributed RIP routes.
ripng: Filters redistributed RIPng routes.
static: Filters redistributed static routes.
process-id: Specifies a process by its ID in the range of 1 to 65535.
unr: Filters redistributed user network routes.
If you specify a protocol (such as direct and isis), this command filters only routes redistributed from the specified protocol. If you do not specify a protocol, this command filters all advertised routes, including the following routes:
· Redistributed from IGP.
· Injected by the network command.
· Learned from BGP peers.
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny | permit } source source-address source-wildcard command, the command matches routes whose destination network addresses match the source-address source-wildcard argument. However, it does not match the masks of the destination addresses.
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following steps:
· To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.
· To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the destination address. For the mask configuration to take effect, specify a contiguous subnet mask.
When you use a Layer 2 ACL (with a number from 4000 to 4999) to match routes, follow these restrictions and guidelines:
· To deny/permit routes with the specified destination MAC address, use the rule [ rule-id ] { deny | permit } dest-mac dest-address dest-mask command.
· The match criteria specified by using the rule [ rule-id ] { deny | permit } source-mac source-address source-mask and rule [ rule-id ] { deny | permit } source-mac source-address source-mask dest-mac dest-address dest-mask commands do not take effect.
# In BGP IPv4 unicast address family view, use IPv4 basic ACL 2000 to filter advertised BGP IPv4 routes.
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] filter-policy 2000 export
filter-policy import
peer as-path-acl
peer filter-policy
peer prefix-list
peer route-policy
filter-policy import
Use filter-policy import to filter received BGP routes.
Use undo filter-policy import to restore the default.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv4 multicast address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
filter-policy { ipv4-acl-number | name ipv4-acl-name | prefix-list ipv4-prefix-list-name } import
undo filter-policy import
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv6 multicast address family view:
filter-policy { ipv6-acl-number | name ipv6-acl-name | prefix-list ipv6-prefix-list-name } import
undo filter-policy import
In BGP EVPN address family view:
filter-policy { mac-acl-number | name mac-acl-name } import
undo filter-policy import
Received BGP routes are not filtered.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
network-admin
ipv4-acl-number: Specifies an IPv4 ACL by its number in the range of 2000 to 3999, to match routes by destination.
ipv6-acl-number: Specifies an IPv6 ACL by its number in the range of 2000 to 3999, to match routes by destination.
mac-acl-number: Specifies a Layer 2 ACL by its number in the range of 4000 to 4999, to match routes by destination.
name ipv4-acl-name: Specifies an IPv4 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
name ipv6-acl-name: Specifies an IPv6 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
name mac-acl-name: Specifies a Layer 2 ACL to match the destination MAC addresses of routes. The mac-acl-name argument represents the name of the Layer 2 ACL, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
prefix-list ipv4-prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
prefix-list ipv6-prefix-list-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters, to match routes by destination.
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny | permit } source source-address source-wildcard command, the command matches routes whose destination network addresses match the source-address source-wildcard argument. However, it does not match the masks of the destination addresses.
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following steps:
· To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.
· To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the destination address. For the mask configuration to take effect, specify a contiguous subnet mask.
When you use a Layer 2 ACL (with a number from 4000 to 4999) to match routes, follow these restrictions and guidelines:
· To deny/permit routes with the specified destination MAC address, use the rule [ rule-id ] { deny | permit } dest-mac dest-address dest-mask command.
· The match criteria specified by using the rule [ rule-id ] { deny | permit } source-mac source-address source-mask and rule [ rule-id ] { deny | permit } source-mac source-address source-mask dest-mac dest-address dest-mask commands do not take effect.
# In BGP IPv4 unicast address family view, use IPv4 basic ACL 2000 to filter received BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] filter-policy 2000 import
filter-policy export
peer as-path-acl
peer filter-policy
peer prefix-list
peer route-policy
flush suboptimal-route
Use flush suboptimal-route to enable BGP to flush the suboptimal BGP route to the RIB.
Use undo flush suboptimal-route to disable BGP from flushing the suboptimal BGP route to the RIB.
flush suboptimal-route
undo flush suboptimal-route
BGP is disabled from flushing the suboptimal BGP route to the RIB. Only the optimal route is flushed to the RIB.
network-admin
This command flushes the suboptimal BGP route to the RIB when the following conditions are met:
· The optimal route is generated by the network command or is redistributed by the import-route command.
· The suboptimal route is received from a BGP peer.
After the suboptimal route is flushed to the RIB on a network, BGP immediately switches traffic to the suboptimal route when the optimal route fails.
For example, the device has a static route to the subnet 1.1.1.0/24 that has a higher priority than a BGP route. BGP redistributes the static route and receives a route to 1.1.1.0/24 from a peer. After the flush suboptimal-route command is executed, BGP flushes the received BGP route to the RIB as the suboptimal route. When the static route fails, BGP immediately switches traffic to the suboptimal route if inter-protocol FRR is enabled. For more information about inter-protocol FRR, see Layer 3—IP Routing Configuration Guide.
# Enable BGP to flush the suboptimal BGP route to the RIB.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] flush suboptimal-route
graceful-restart
Use graceful-restart to enable BGP Graceful Restart (GR) capability.
Use undo graceful-restart to disable BGP GR capability.
graceful-restart
undo graceful-restart
BGP GR capability is disabled.
network-admin
CAUTION: After you enable or disable GR, the device re-establishes BGP sessions. |
GR ensures continuous forwarding when BGP restarts or an active/standby switchover occurs.
BGP peers exchange OPEN messages containing GR information. If both parties have GR capability, they establish a GR-capable session.
# Enable GR capability for BGP process 100.
[Sysname] bgp 100
[Sysname-bgp-default] graceful-restart
Warning: Executing this command will re-establish all peer sessions. Continue? [Y/N]:y
graceful-restart timer purge-time
graceful-restart timer restart
graceful-restart timer wait-for-rib
graceful-restart peer-reset
Use graceful-restart peer-reset to enable BGP to reset peer sessions gracefully.
Use undo graceful-restart peer-reset to disable BGP from resetting peer sessions gracefully.
Syntax
graceful-restart peer-reset [ all ]
undo graceful-restart peer-reset
Default
BGP does not reset peer sessions gracefully.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
all: Enables BGP to reset peer sessions gracefully when the TCP connection goes down, the hold timer expires, or the address families supporting route exchange change. If you do not specify this keyword, BGP resets peer sessions gracefully only when the address families supporting route exchange change.
Usage guidelines
When the TCP connection goes down, the hold timer expires, or the address families supporting route exchange change, BGP tears down and then re-establishes the peer sessions, which will cause traffic interruption. To avoid traffic interruption in these cases, execute this command to enable BGP to reset peer sessions gracefully.
Examples
# Enable BGP to reset peer sessions gracefully.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] graceful-restart
[Sysname-bgp-default] graceful-restart peer-reset
Related commands
graceful-restart
graceful-restart timer purge-time
Use graceful-restart timer purge-time to set the Routing Information Base (RIB) purge timer.
Use undo graceful-restart timer purge-time to restore the default.
graceful-restart timer purge-time timer
undo graceful-restart timer purge-time
The RIB purge timer is 480 seconds.
network-admin
timer: Sets the RIB purge timer in the range of 1 to 6000 seconds.
BGP starts the RIB purge timer when an active/standby switchover occurs or BGP restarts. If BGP route exchange is not completed within the RIB purge timer, the GR restarter quits the GR process. It updates the RIB with the BGP routes already learned, and removes the stale routes from RIB.
Enable BGP GR before you execute this command.
Set the RIB purge timer to be long enough to complete GR, especially when large numbers of BGP routes exist.
As a best practice, set the RIB purge timer in the following way:
· Set the timer to be greater than the timer set by the graceful-restart timer wait-for-rib command
· Set the timer to be less than the timer set by the protocol lifetime command.
# Set the RIB purge timer to 300 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] graceful-restart
[Sysname-bgp-default] graceful-restart timer purge-time 300
graceful-restart
graceful-restart timer restart
graceful-restart timer wait-for-rib
protocol lifetime (Layer 3—IP Routing Command Reference)
graceful-restart timer restart
Use graceful-restart timer restart to configure the GR timer.
Use undo graceful-restart timer restart to restore the default.
graceful-restart timer restart timer
undo graceful-restart timer restart
The GR timer is 150 seconds.
network-admin
timer: Specifies the GR timer in the range of 3 to 600 seconds.
The GR restarter sends the GR timer to the GR helper in an OPEN message. When the GR helper detects that an active/standby switchover or a BGP restart occurred on the GR restarter, the GR helper performs the following operations:
1. Marks all routes learned from the GR restarter as stale.
2. Starts the GR timer.
3. If no BGP session is established before the GR timer expires, the GR helper removes the stale routes.
Before you configure this command, enable the BGP GR capability.
To apply a new GR timer, you must re-establish BGP sessions.
# Set the GR timer to 300 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] graceful-restart
[Sysname-bgp-default] graceful-restart timer restart 300
graceful-restart timer purge-time
graceful-restart timer wait-for-rib
graceful-restart timer wait-for-rib
Use graceful-restart timer wait-for-rib to configure the time to wait for the End-of-RIB marker.
Use undo graceful-restart timer wait-for-rib to restore the default.
graceful-restart timer wait-for-rib timer
undo graceful-restart timer wait-for-rib
The time to wait for the End-of-RIB marker is 600 seconds.
network-admin
timer: Specifies the time to wait for the End-of-RIB marker, in the range of 3 to 3600 seconds.
BGP uses this timer to control the time to receive updates from the peer. The timer is not advertised to the peer.
After the GR restarter and GR helper re-establish a BGP session, they start this timer. If they do not complete route exchange within the time period, the GR restarter does not receive new routes. It updates its routing table and forwarding table with learned BGP routes, and the GR helper removes the stale routes.
This command controls the routing convergence speed. A smaller timer value means faster routing convergence but possibly results in incomplete routing information. If a large number of routes exist, set a large timer value to make sure all routes can be exchanged.
Before configuring this command, you must enable the BGP GR capability.
# Set the time to wait for the End-of-RIB marker on the local end to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] graceful-restart
[Sysname-bgp-default] graceful-restart timer wait-for-rib 100
graceful-restart
graceful-restart timer purge-time
graceful-restart timer restart
group
Use group to create a peer group.
Use undo group to delete a peer group.
group group-name [ external | internal ]
undo group group-name
No peer groups exist.
BGP-VPN instance view
network-admin
group-name: Specifies a name for the peer group, a case-sensitive string of 1 to 47 characters.
external: Creates an EBGP peer group.
internal: Creates an IBGP peer group.
In a large-scale network, many peers can use the same route selection policy. You can configure a peer group and add these peers into this group. In this way, peers can share the same policy as the peer group. When the policy of the group is modified, the modification also applies to peers in it.
If you do not specify the internal or external keyword, this command creates an IBGP peer group.
If you perform configurations on a peer group and peers of the peer group, the most recent configuration takes effect.
After you create a peer group, you must use the peer enable command to enable BGP to exchange routing information with the specified peer group.
# In BGP instance view, create 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-default] group test external
[Sysname-bgp-default] peer test as-number 200
[Sysname-bgp-default] peer 10.1.1.1 group test
[Sysname-bgp-default] peer 10.1.2.1 group test
display bgp group
peer enable
ignore all-peers
Use ignore all-peers to disable BGP session establishment with all peers and peer groups.
Use undo ignore all-peers to restore the default.
Syntax
ignore all-peers [ graceful graceful-time { community { community-number | aa:nn } | local-preference preference | med med } * ]
undo ignore all-peers
Default
BGP can establish sessions to all peers and peer groups.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
graceful graceful-time: Gracefully shuts down BGP sessions to all peers and peer groups in the specified graceful shutdown period of time. The value range for the graceful-time argument is 60 to 65535 seconds. If you do not specify this option, the command immediately shuts down the sessions to all peers and peer groups.
community { community-number | aa:nn }: Specifies the community attribute for routes advertised to all peers and peer groups. The community-number argument represents the community sequence number in the range of 1 to 4294967295. The aa:nn argument represents the community number. Both aa and nn are in the range of 0 to 65535. If you do not specify this option, the command does not change the community attribute for routes advertised to all peers and peer groups.
local-preference preference: Specifies the local preference for routes advertised to all peers and peer groups, in the range of 0 to 4294967295. A larger value represents a higher preference. If you do not specify this option, the command does not change the local preference for routes advertised to all peers and peer groups.
med med: Specifies the MED value for routes advertised to all peers and peer groups, in the range of 0 to 4294967295. The smaller the MED value, the higher the route priority. If you do not specify this option, the command does not change the MED value for routes advertised to all peers and peer groups.
Usage guidelines
CAUTION: Executing the ignore all-peers command tears down all existing sessions to peers and peer groups and clears all related routing information. |
This command enables you to temporarily tear down the BGP sessions to all peers and peer groups. You can perform network upgrade and maintenance without needing to delete and reconfigure the peers and peer groups. To recover the sessions, execute the undo ignore all-peers command.
If you specify the graceful keyword in the ignore all-peers command, BGP performs the following tasks:
· Gracefully shuts down the sessions to all peers and peer groups in the specified graceful shutdown period of time.
· Advertises all routes to all peers and peer groups and changes the attribute for the advertised routes to the specified value.
For a BGP peer or peer group, the configuration made by the peer ignore command takes precedence over the configuration made by the ignore all-peers command.
Examples
# In BGP instance view, configure BGP to gracefully shut down the sessions to all peers and peer groups in 60 seconds, advertise all routes to all peers and peer groups, and change the community attribute and local preference for the advertised routes to 1:1 and 200, respectively.
<Sysname> system-view
[Sysname] bgp 1
[Sysname-bgp-default] ignore all-peers graceful 60 community 1:1 local-preference 200
Related commands
peer ignore
ignore-first-as
Use ignore-first-as to configure BGP to ignore the first AS number of EBGP route updates.
Use undo ignore-first-as to restore the default.
ignore-first-as
undo ignore-first-as
BGP checks the first AS number of an EBGP-learned route update. If the first AS number is neither that of the BGP peer nor a private AS number, the BGP router disconnects the BGP session to the peer.
network-admin
# Configure BGP to ignore the first AS number of EBGP route updates.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ignore-first-as
Related commands
peer ignore-first-as
import-rib
Use import-rib to configure BGP IPv4 unicast route and BGP IPv4 labeled unicast route redistribution.
Use undo import-rib to cancel the configuration.
Syntax
import-rib { public | vpn-instance vpn-instance-name } [ labeled-unicast ] [ valid-route ] [ route-policy route-policy-name | filter-policy { ipv4-acl-number | name ipv4-acl-name | prefix-list ipv4-prefix-list-name } ]
undo import-rib { public | vpn-instance vpn-instance-name } [ labeled-unicast ]
Default
The BGP IPv4 labeled unicast address family and BGP IPv4 unicast address family cannot redistribute routes from each other. The public instance and a VPN instance cannot redistribute BGP IPv4 labeled unicast routes or BGP IPv4 unicast routes from each other. Different VPN instances cannot redistribute BGP IPv4 labeled unicast routes from each other. Different VPN instances can redistribute BGP IPv4 unicast routes from each other if the VPN instances have matching route targets.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
Predefined user roles
network-admin
Parameters
public: Redistributes BGP IPv4 labeled unicast routes or BGP IPv4 unicast routes in the public instance to the BGP routing table of the current address family.
vpn-instance vpn-instance-name: Redistributes BGP IPv4 labeled unicast routes or BGP IPv4 unicast routes in the specified VPN instance to the BGP routing table of the current address family. The vpn-instance-name argument specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters.
labeled-unicast: Redistributes BGP IPv4 labeled unicast routes to the BGP routing table of the current address family. If you do not specify this keyword, the command redistributes BGP IPv4 unicast routes to the BGP routing table of the current address family.
valid-route: Redistributes valid routes. If you do not specify this keyword, the command redistributes only the optimal routes.
route-policy route-policy-name: Specifies a routing policy to filter routes to be redistributed and configure route attributes for the redistributed routes. The route-policy-name argument represents the name of the routing policy, a case-sensitive string of 1 to 63 characters. If the specified routing policy does not exist, this command redistributes all IPv4 labeled unicast routes or IPv4 unicast routes in the specified address family.
filter-policy ipv4-acl-number: Specifies an ACL to filter routes to be redistributed. The ipv4-acl-number argument represents the ACL number in the range of 2000 to 3999.
filter-policy name ipv4-acl-name: Specifies an ACL to filter routes to be redistributed. The ipv4-acl-name argument represents the ACL name, a case-insensitive string of 1 to 63 characters. The ACL name must start with a letter and cannot be all.
filter-policy prefix-list ipv4-prefix-list-name: Specifies an IPv4 prefix list to filter routes to be redistributed. The ipv4-prefix-list-name argument represents the IPv4 prefix list name, a case-sensitive string of 1 to 63 characters.
Usage guidelines
Execute this command to enable mutual route redistribution between the BGP IPv4 unicast address family and BGP IPv4 labeled unicast address family, between the public instance and a VPN instance, or between different VPN instances.
In the MPLS L3VPN inter-AS option C scenario, execute this command to redistribute BGP IPv4 labeled unicast routes to the BGP IPv4 unicast routing table. Then, networks of other ASs can be added to the local IP routing table of the public network, enabling PEs to establish inter-AS MP-EBGP sessions. For more information about the inter-AS option C scenario, see MPLS L3VPN configuration in MPLS Configuration Guide.
When you filter the routes to be redistributed by using an ACL, the source IPv4 address in the ACL will be used to match the destination addresses in the routes, and the other matching rules in the ACL will not take effect. If the specified ACL does not contain a source IPv4 address matching rule, the routes will not be filtered.
If you do not specify the route-policy route-policy-name or filter-policy { ipv4-acl-number | name ipv4-acl-name | prefix-list ipv4-prefix-list-name } option when executing this command, the command does not filter routes to be redistributed.
Before redistributing the BGP IPv4 labeled unicast routes or BGP IPv4 unicast routes of a VPN instance to the current address family, make sure the BGP IPv4 labeled unicast address family or BGP IPv4 unicast address family has been created in the VPN instance.
Both the import-rib and route-replicate enable commands can implement inter-VPN BGP route redistribution. They are different as follows:
· The import-rib command redistributes BGP routes in the specified VPN instance or the public instance to the VPN instance or public instance of the current address family, regardless of whether the instances have matching route targets. After you execute the route-replicate enable command, BGP routes can be redistributed between the public instance and any VPN instance or between any two VPN instances as long as the instances have matching route targets.
· The import-rib command can redistribute BGP IPv4 labeled unicast routes, but the route-replicate enable command cannot.
Examples
# Redistribute all valid labeled unicast routes in the public instance BGP IPv4 labeled unicast address family to the BGP-VPN IPv4 unicast routing table of VPN instance vpn1.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] route-distinguisher 100:1
[Sysname-vpn-instance-vpn1] vpn-target 100:1
[Sysname-vpn-instance-vpn1] quit
[Sysname] bgp 100
[Sysname-bgp-default]address-family ipv4 labeled-unicast
[Sysname-bgp-default-labeled-ipv4]quit
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] address-family ipv4 unicast
[Sysname-bgp-default-ipv4-vpn1] import-rib public labeled-unicast
Related commands
route-replicate enable (MPLS Command Reference)
import-route
Use import-route to enable BGP to redistribute routes from an IGP.
Use undo import-route to disable route redistribution from an IGP.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
import-route { isis | ospf | rip } [ { process-id | all-processes } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
import-route { direct | static | unr } [ med med-value | route-policy route-policy-name ] *
import-route eigrp [ { eigrp-as | all-as } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
import-route local-aggregate [ route-policy route-policy-name ]
undo import-route { direct | eigrp [ eigrp-as | all-as ] | { isis | ospf | rip } [ process-id | all-processes ] | static | unr }
undo import-route local-aggregate
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
import-route { isisv6 | ospfv3 | ripng } [ { process-id | all-processes } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
import-route { direct | static | unr } [ med med-value | route-policy route-policy-name ] *
undo import-route { direct | { isisv6 | ospfv3 | ripng } [ process-id | all-processes ] | static | unr }
BGP does not redistribute IGP routes.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
direct: Redistributes direct routes.
eigrp: Redistributes EIGRP routes.
isis: Redistributes IS-IS routes.
isisv6: Redistributes IPv6 IS-IS routes.
ospf: Redistributes OSPF routes.
ospfv3: Redistributes OSPFv3 routes.
rip: Redistributes RIP routes.
ripng: Redistributes RIPng routes.
static: Redistributes static routes.
unr: Redistributes user network routes. User network routes are generated by access devices for online users.
local-aggregate: Redistributes the local network route specified by the network command in the public instance or a VPN instance.
process-id: Specifies a process by its number in the range of 1 to 65535.
all-processes: Redistributes routes from all processes of the specified routing protocol.
eigrp-as: Specifies an EIGRP process by its number in the range of 1 to 65535.
all-as: Redistributes routes from all EIGRP processes.
allow-direct: Redistributes the networks of the local interfaces enabled with the specified routing protocol. By default, the networks of the local interfaces are not redistributed. If you specify both the allow-direct keyword and the route-policy route-policy-name option, make sure the if-match rule defined in the routing policy does not conflict with the allow-direct keyword. For example, if you specify the allow-direct keyword, do not configure the if-match route-type rule for the routing policy. Otherwise, the allow-direct keyword does not take effect.
med med-value: Specifies a MED value for redistributed routes, in the range of 0 to 4294967295. If you do not specify an MED, the metric of a redistributed route is used as its MED.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter redistributed routes or set route attributes for redistributed routes.
The import-route command cannot redistribute default IGP routes. To redistribute default IGP routes, use the default-route imported command together with the import-route command.
Only active routes can be redistributed. You can use the display ip routing-table protocol or display ipv6 routing-table protocol command to view route state information.
If you do not specify a process when you configure BGP to redistribute EIGRP routes, BGP redistributes the routes of EIGRP process 1. If you do not specify a process when you configure BGP to redistribute IS-IS, IPv6 IS-IS, OSPF, OSPFv3, RIP, or RIPng routes, BGP redistributes the routes of process 1.
When you execute the undo form of the command, per-process setting has higher priority than the all-processes setting. The undo import-route eigrp all-as command cannot remove the setting configured for an EIGRP process by using the import-route eigrp eigrp-as command. To remove the setting for that process, you must specify the process number in the undo form of the command.
The ORIGIN attribute is IGP for routes redistributed by the import-route local-aggregate command. The ORIGIN attribute of routes redistributed by the import-route command is INCOMPLETE.
If you execute the import-route command multiple times for an IGP process, the most recent configuration takes effect.
After you redistribute routes from all processes of a routing protocol by using the all-processes keyword, this command does not take effect on any processes of the protocol.
# In BGP IPv4 unicast address family view, redistribute routes from RIP process 1, and set the MED value for redistributed routes to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] import-route rip 1 med 100
display ip routing-table protocol
display ipv6 routing-table protocol
import-route-append
import-route multipath
Use import-route multipath to redistribute all routes with the same destination address to BGP.
Use undo import-route multipath to restore the default.
Syntax
import-route multipath
undo import-route multipath
Default
When multiple routes with the same destination address exist, BGP redistributes only the optimal routes to its routing table.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
Predefined user roles
network-admin
Usage guidelines
This command takes effect only on the routes redistributed by the import-route command or the import-route-append command in the same address family.
By default, the import-route command and the import-route-append command redistribute only the optimal routes to BGP when multiple routes with the same destination address exist. To redistribute all routes with the same destination address to BGP, execute this command and BGP can advertise these routes to its peers.
Examples
# In BGP IPv4 unicast address family view, enable BGP to redistribute all routes with the same destination address.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] import-route multipath
Related commands
import-route
import-route-append
import-route-append
Use import-route-append to redistribute routes from an IGP without overwriting the routes redistributed by the import-route command.
Use undo import-route-append to remove the redistributed routes.
Syntax
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
import-route-append { isis | ospf | rip } [ { process-id | all-processes } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
import-route-append { direct | static | unr } [ med med-value | route-policy route-policy-name ] *
import-route-append eigrp [ { eigrp-as | all-as } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
undo import-route-append { direct | eigrp [ eigrp-as | all-as ] | { isis | ospf | rip } [ process-id | all-processes ] | static | unr }
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
import-route-append { isisv6 | ospfv3 | ripng } [ { process-id | all-processes } [ allow-direct | med med-value | route-policy route-policy-name ] * ]
import-route-append { direct | static | unr } [ med med-value | route-policy route-policy-name ] *
undo import-route-append { direct | { isisv6 | ospfv3 | ripng } [ process-id | all-processes ] | static | unr }
Default
BGP does not redistribute IGP routes.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
direct: Redistributes direct routes.
eigrp: Redistributes EIGRP routes.
isis: Redistributes IS-IS routes.
isisv6: Redistributes IPv6 IS-IS routes.
ospf: Redistributes OSPF routes.
ospfv3: Redistributes OSPFv3 routes.
rip: Redistributes RIP routes.
ripng: Redistributes RIPng routes.
static: Redistributes static routes.
unr: Redistributes user network routes. User network routes are generated by access devices for online users.
process-id: Specifies a process by its number in the range of 1 to 65535.
all-processes: Redistributes routes from all processes of the specified routing protocol.
eigrp-as: Specifies an EIGRP process by its number in the range of 1 to 65535.
all-as: Redistributes routes from all EIGRP processes.
allow-direct: Redistributes the networks of the local interfaces enabled with the specified routing protocol. By default, the networks of the local interfaces are not redistributed. If you specify both the allow-direct keyword and the route-policy route-policy-name option, make sure the if-match rule defined in the routing policy does not conflict with the allow-direct keyword. For example, if you specify the allow-direct keyword, do not configure the if-match route-type rule for the routing policy. Otherwise, the allow-direct keyword does not take effect.
med med-value: Specifies a MED value for redistributed routes, in the range of 0 to 4294967295. If you do not specify an MED, the metric of a redistributed route is used as its MED.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter redistributed routes or set route attributes for redistributed routes.
Usage guidelines
If you execute the import-route-append command without executing the import-route command, the import-route-append command has the same effect as the import-route command.
If you execute both the import-route and import-route-append commands for an IGP process, the commands take effect as follows:
· A route is redistributed as long as it matches the criteria of either command.
· If a route matches the criteria of both commands, the route is redistributed, and the apply clauses in the routing policies specified in the two commands take effect as follows:
¡ If the apply clauses do not conflict, all apply clauses take effect.
¡ If conflicts occur between the apply clauses, only the apply clauses in the import-route-append command take effect.
· The MED value specified by the import-route-append command takes precedence over that specified by the import-route command.
If you execute the import-route-append command multiple times for an IGP process, the most recent configuration takes effect.
After you redistribute routes from all processes of a routing protocol by using the all-processes keyword, this command does not take effect on any processes of the protocol.
Examples
# In BGP IPv4 unicast address family view, redistribute routes matching routing policy policy1 from IS-IS process 1 without overwriting the routes redistributed by the import-route command.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] import-route isis 1
[Sysname-bgp-default-ipv4] import-route-append isis 1 route-policy policy1
Related commands
display ip routing-table protocol
display ipv6 routing-table protocol
import-route
ip vpn-instance (BGP instance view)
Use ip vpn-instance to create a BGP-VPN instance and enter its view, or enter the view of an existing BGP-VPN instance.
Use undo ip vpn-instance to remove a BGP-VPN instance and all its configurations.
ip vpn-instance vpn-instance-name
undo ip vpn-instance vpn-instance-name
No BGP-VPN instances exist.
network-admin
vpn-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters.
After you create a BGP peer in BGP-VPN instance view, the BGP routes learned from the peer are added into the routing table of the specified VPN instance.
This command and all commands in BGP-VPN instance view are typically executed on provider edge (PE) or Multi-VPN-Instance CE (MCE) devices. The commands add routes learned from different sites into different VPN instances.
Before you execute this command, you must perform the following tasks:
· Use the ip vpn-instance command to create the VPN instance in system view.
· Use the route-distinguisher command to configure a route distinguisher (RD) for the VPN instance.
# Create a BGP-VPN instance and enter its view.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] route-distinguisher 100:1
[Sysname-vpn-instance-vpn1] quit
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1]
ip vpn-instance (system view) (MPLS Command Reference)
route-distinguisher (MPLS Command Reference)
isolate enable
Use isolate enable to enable BGP isolation.
Use undo isolate enable to restore the default.
Syntax
isolate enable
undo isolate enable
Default
BGP isolation is disabled.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
To maintain a BGP network device, you can use BGP isolation to remove the device from the network. This feature reduces configuration workload and impact on the network by retaining the device configuration during the maintenance. After maintenance, you can disable BGP isolation to add the device back to the network.
BGP isolation works as follows:
1. BGP withdraws all routes advertised by the device except for the direct routes.
2. BGP keeps all routes learned from its peers.
3. Each peer of the device reselects an optimal route and updates the FIB table. During optimal route selection, the peers can still use the routes advertised by the device to forward traffic.
4. After an optimal route is selected and the FIB table is updated, the peers stop forwarding packets except for those destined for the device to the device. The device is fully isolated from the network and you can upgrade it.
5. After the maintenance, disable BGP isolation on the device to gracefully add it back to the network. After returning to the network, the device advertises and learns routes as follows:
¡ Advertises routes to its peers.
¡ Learns routes if BGP was reset during the isolation.
To avoid isolation failure, do not use this feature when GR or NSR is enabled for the device.
Examples
# Isolate the device from the network in BGP instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] isolate enable
keep-all-routes
Use keep-all-routes to save all route updates from all peers and peer groups, regardless of whether the routes have passed the configured routing policy.
Use undo keep-all-routes to remove the configuration.
Syntax
keep-all-routes
undo keep-all-routes
Default
Route updates are not saved.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
To implement BGP session soft-reset when the local router and a peer or peer group do not support the route refresh feature, use the keep-all-routes command. The command saves all route updates received from the peer or peer group. After modifying the route selection policy, filter all saved routes with the new policy to refresh the routing table. This method avoids tearing down BGP sessions.
The keep-all-routes command applies to all peers and peer groups. You cannot disable this feature by executing the undo peer keep-all-routes command for a specific peer or peer group in the corresponding address family view. To enable the feature for only certain peers or peer groups, perform the following operations:
· Execute the peer keep-all-routes command in the associated address family view.
· Make sure the keep-all-routes command is not executed in BGP instance view.
Examples
# In BGP instance view, save route updates from all peers and peer groups.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] keep-all-routes
Related commands
peer keep-all-routes
label-allocation-mode
Use label-allocation-mode to specify a label allocation mode.
Use undo label-allocation-mode to restore the default.
label-allocation-mode { per-prefix | per-vrf }
undo label-allocation-mode
BGP allocates labels on a per-next-hop basis.
network-admin
per-prefix: Allocates a label to each route prefix.
per-vrf: Allocates a label to each VPN instance.
Usage guidelines
CAUTION: A change to the label allocation mode enables BGP to re-advertise all routes, which will cause temporary service interruption. Use this command with caution. |
BGP supports the following label allocation modes:
· Per-prefix—Allocates a label to each route prefix.
· Per-next-hop—Allocates a label to each next hop. This mode is applicable when the number of labels required by the per-prefix mode exceeds the maximum number of labels supported by the device.
· Per-VPN-instance—Allocates a label to each VPN instance. This mode is applicable when the number of labels required by the per-next-hop mode exceeds the maximum number of labels supported by the device.
When you specify the per-prefix or per-next-hop label allocation mode, you can execute the vpn popgo command to specify the POPGO forwarding mode on an egress PE. The egress PE will pop the label for each packet and forward the packet out of the interface corresponding to the label.
When you specify the per-VPN instance label allocation mode, do not execute the vpn popgo command because it is mutually exclusive with the label-allocation-mode per-vrf command. The egress PE will pop the label for each packet and forward the packet through the FIB table.
# Enable per-prefix label allocation.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] label-allocation-mode per-prefix
Related commands
vpn popgo (MPLS Command Reference)
labeled-route ignore-no-tunnel
Use labeled-route ignore-no-tunnel to disable optimal route selection for labeled routes without tunnel information.
Use undo labeled-route ignore-no-tunnel to restore the default.
labeled-route ignore-no-tunnel
undo labeled-route ignore-no-tunnel
Labeled routes without tunnel information can participate in optimal route selection.
network-admin
# Disable optimal route selection for labeled routes without tunnel information.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] labeled-route ignore-no-tunnel
log-peer-change
Use log-peer-change to enable logging for BGP session state changes globally.
Use undo log-peer-change to disable logging for BGP session state changes globally.
log-peer-change
undo log-peer-change
Logging for BGP session state changes is enabled globally.
network-admin
After you execute both the log-peer-change and peer log-change commands, BGP logs session establishment and disconnection events for the peer or peer group. To display the log information, use the display bgp peer ipv4 unicast log-info command or the display bgp peer ipv6 unicast log-info command. The logs are sent to the information center of the device. The output rules of the logs (whether to output the logs and where to output) are determined by the information center configuration. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.
If you disable logging for BGP session state changes globally or disable logging for a peer or peer group, BGP does not generate logs for session establishments and disconnections.
# Enable logging for session state changes globally.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] log-peer-change
display bgp peer
log-route-flap
Use log-route-flap to enable logging for BGP route flapping.
Use undo log-route-flap to restore the default.
log-route-flap monitor-time monitor-count [ route-policy route-policy-name ] [ log-count-limit ]
undo log-route-flap
Logging for BGP route flapping is disabled.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
monitor-time: Specifies the monitoring interval for route flapping, in the range of 1 to 600 minutes.
monitor-count: Specifies the number of route flaps for triggering a log, in the range of 2 to 8.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
log-count-limit: Specifies the maximum number of logs allowed to be generated in a minute. The value range for this argument is 1 to 600, and the default value is 200.
This feature enables BGP to generate logs for BGP route flappings that trigger log generation. The generated logs are sent to the information center. For the logs to be output correctly, you must also configure information center on the device. For more information about the information center, see Network Management and Monitoring Configuration Guide.
This command is applicable only to incoming routes of the specified address family.
# In BGP IPv4 unicast address family view, enable logging for BGP route flapping. Set the monitoring interval to 10 minutes, the number of route flaps for triggering a log to 5, and the maximum number of allowed logs in a minute to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] log-route-flap 10 5 100
network
Use network to inject a network to the BGP routing table and configure BGP to advertise the network.
Use undo network to remove a local network.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
network ipv4-address [ mask-length | mask ] [ route-policy route-policy-name ]
undo network ipv4-address [ mask-length | mask ]
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
network ipv6-address prefix-length [ route-policy route-policy-name ]
undo network ipv6-address prefix-length
BGP does not advertise local networks.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
ipv4-address: Specifies an IPv4 network address. If you do not specify the mask or mask-length argument, natural mask is used.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a mask in dotted decimal notation.
ipv6-address: Specifies an IPv6 network address.
prefix-length: Specifies a prefix length in the range of 0 to 128.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter routes or set the route attributes.
The network to be injected must be available and active in the local IP routing table.
The ORIGIN attribute of the route injected with the network command is IGP.
When you execute the undo network command, you must specify the same mask or mask length/prefix length that you specified for the network command. Otherwise, the configuration cannot be removed.
# In BGP IPv4 unicast address family view, inject local network 10.0.0.0/16 to the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] network 10.0.0.0 255.255.0.0
network short-cut
Use network short-cut to increase the preference for a received EBGP route. This EBGP route is called a shortcut route.
Use undo network short-cut to remove the configuration.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view:
network ipv4-address [ mask-length | mask ] short-cut
undo network ipv4-address [ mask-length | mask ] short-cut
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
network ipv6-address prefix-length short-cut
undo network ipv6-address prefix-length short-cut
A received EBGP route has a preference of 255.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
ipv4-address: Specifies an IPv4 network address. If you do not specify the mask or mask-length argument, natural mask is used.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a mask for the network address, in dotted decimal notation.
ipv6-address: Specifies an IPv6 network address.
prefix-length: Specifies a prefix length in the range of 0 to 128.
Different routing protocols might find different routes to the same destination. However, not all of those routes are optimal. For route selection, routing protocols, direct routes, and static routes are assigned different preferences. The route with the highest preference is preferred.
By default, the preference of an EBGP route is lower than a local route. If a device has an EBGP route and a local route to reach the same destination, the device does not select the EBGP route. You can use the network shortcut command to configure the EBGP route to have the same preference as the local route so the EBGP route is more likely to become the optimal route.
You can use the preference command to modify the preferences for external and local BGP routes.
# In BGP IPv4 unicast address family view, increase the preference of EBGP route 10.0.0.0/16.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] network 10.0.0.0 255.255.0.0 short-cut
preference
nexthop recursive-lookup delay
Use nexthop recursive-lookup delay to set the delay time for responding to recursive next hop changes.
Use undo nexthop recursive-lookup delay to disable BGP from delaying responding to recursive next hop changes.
Syntax
nexthop recursive-lookup [ non-critical-event ] delay [ delay-value ]
undo nexthop recursive-lookup [ non-critical-event ] delay
Default
BGP responds to recursive next hop changes immediately.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP LS address family view
BGP-VPN LS address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
non-critical-event: Delays responding to noncritical next hop changes. If you do not specify this keyword, BGP delays responding to both critical and noncritical next hop changes.
Next hop changes include the following types:
· Critical route recursion changes—Changes that cause route unreachability and service interruption. For example, a BGP route cannot find a recursive next hop or tunnel because of network failures.
· Noncritical route recursion changes—A recursive or related route changes but the change will not cause route unreachability or service interruption. For example, the recursive interface or tunnel of a BGP route changes but traffic forwarding is not affected.
delay-value: Specifies a delay time in the range of 1 to 240 seconds. The default delay time is 5 seconds.
Usage guidelines
When recursive or related routes change frequently, configure this command to reduce unnecessary path selection and update messages and prevent traffic loss.
To avoid traffic loss, do not configure this command if only one route is available to a specific destination.
Set an appropriate delay time based on your network condition. A short delay time cannot reduce unnecessary path selection or update messages, and a long delay time might cause traffic loss.
When you configure both the nexthop recursive-lookup delay and nexthop recursive-lookup non-critical-event delay commands for an address family, follow these guidelines:
· BGP delays responding to both critical and noncritical next hop changes in the address family.
· For noncritical next hop changes, the delay time specified by the nexthop recursive-lookup non-critical-event delay command takes effect.
If you execute the nexthop recursive-lookup delay command multiple times, the most recent configuration takes effect.
If you execute the nexthop recursive-lookup non-critical-event delay command multiple times, the most recent configuration takes effect.
Examples
# In BGP IPv4 unicast address family view, set the delay time for responding to recursive next hop changes to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] nexthop recursive-lookup delay 100
nexthop recursive-lookup longest-match
Use nexthop recursive-lookup longest-match to specify the longest match principle for BGP next hop recursion.
Use undo nexthop recursive-lookup longest-match to restore the default.
Syntax
nexthop recursive-lookup longest-match [ route-policy route-policy-name ]
undo nexthop recursive-lookup longest-match
Default
By default, BGP first looks up in its directly connected routes for a recursive route during a route recursion. If no matching routes exist, BGP will look up in routes generated by all routing protocols based on the longest match principle.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
Usage guidelines
The default method for next hop recursion might cause packet forwarding failure. The device considers the next hop of a received BGP route as directly connected when the next hop belongs to the same subnet as a direct route. As a result, packet forwarding failure will occur when the device uses this BGP route to forward matching packets.
To resolve this issue, you can use this feature to ensure the recursive route is reachable. BGP will directly look up in routes generated by all routing protocols and select a matching route based on the longest match principle.
The nexthop recursive-lookup longest-match command applies to all BGP routes received from peers in one of the following scenarios:
· The route-policy route-policy-name option is not specified.
· The specified routing policy does not exist.
Examples
# Specify the longest match principle to iterate the routes that pass routing policy policy1 in BGP IPv4 unicast address family view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] nexthop recursive-lookup longest-match route-policy policy1
nexthop recursive-lookup restrain
Use nexthop recursive-lookup restrain to configure BGP route recursion suppression.
Use undo nexthop recursive-lookup restrain to restore the default.
Syntax
nexthop recursive-lookup restrain { maximum-interval [ minimum-interval [ incremental-interval ] ] | millisecond interval }
undo nexthop recursive-lookup restrain
Default
BGP route recursion suppression is disabled.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
maximum-interval: Specifies the maximum suppression timer in the range of 1 to 60 seconds.
minimum-interval: Specifies the minimum suppression timer in the range of 10 to 60000 milliseconds. The default value is 50.
incremental-interval: Specifies the incremental timer in the range of 10 to 60000 milliseconds. The default value is 200.
millisecond interval: Specifies a fixed suppression timer in the range of 10 to 10000 milliseconds.
Usage guidelines
Application scenarios
BGP performs nexthop recursion for a BGP route to obtain a route or tunnel for real traffic forwarding. When the obtained route or tunnel changes, BGP performs nexthop recursion for the BGP route again. Upon frequent network flapping, BGP also performs route recursion repeatedly, which causes high CPU usage. To resolve this issue, configure BGP route recursion suppression. BGP can obtain the nexthop recursion result of a route only after the suppression timer expires. This feature helps reduce nexthop recursion frequency and CPU usage.
Operating mechanism
With the suppression timer for route recursion configured, BGP will not update the route recursion result until the suppression timer expires.
Restrictions and guidelines
· The value for the minimum-interval or incremental-interval argument cannot be greater than that for the maximum-interval argument.
· The view in which you should execute this command varies by next hop location as follows:
¡ If the next hop of a BGP route is on the public network, execute this command in BGP instance view.
¡ If the next hop of a BGP route is on a VPN instance, execute this command in the BGP-VPN instance view of that VPN instance.
To determine the location of a next hop, perform the following task:
a. Execute the display ip routing-table verbose or display ipv6 routing-table verbose command, find the target BGP route in the command output, and then check the value of the NibID field.
b. Execute the display rib nib or display ipv6 rib nib command with the NIB ID obtained above, and then check the value of the VrfNthp field. This field displays index of the VPN instance to which a next hop belongs.
For more information about the following commands, see IP routing basics commands in Layer 3—IP Routing Command Reference:
¡ display ip routing-table verbose
¡ display ipv6 routing-table verbose
¡ display rib nib
¡ display ipv6 rib nib
· You can execute this command multiple times with different configurations to modify the suppression timer settings. However, only the most recent configuration can take effect. The suppression timer modification does not takes effect immediately. Instead, it takes effect on the next-round route recursion.
· If you use the following commands together, BGP must wait the sum of the suppression timer and the delay timer before using the route recursion result for traffic forwarding:
¡ nexthop recursive-lookup restrain (in BGP instance view or BGP-VPN instance view)
¡ nexthop recursive-lookup delay
· If you use the following commands together, the actual suppression timer equals the sum of the suppression timers configured in those commands:
¡ nexthop recursive-lookup restrain (in BGP instance view or BGP-VPN instance view)
¡ nexthop recursive-lookup restrain (in RIB IPv4 address family view or RIB IPv6 address family view)
· Configuring this feature can result in low route recursion efficiency and slow route convergence. As a best practice, use this feature according to the network condition and make sure the suppression timer settings are appropriate.
Examples
# In BGP instance view, set the maximum suppression timer, minimum suppression timer, and incremental timer for BGP route recursion to 60 seconds, 500 milliseconds, and 1000 milliseconds, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] nexthop recursive-lookup restrain 60 500 1000
# In BGP instance view, set the fixed suppression timer for BGP route recursion to 1000 milliseconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] nexthop recursive-lookup restrain millisecond 1000
Related commands
nexthop recursive-lookup delay
nexthop recursive-lookup restrain (Layer 3—IP Routing Command Reference)
nexthop recursive-lookup tunnel-backup
Use nexthop recursive-lookup tunnel-backup to allow route recursion to primary and backup tunnels.
Use undo nexthop recursive-lookup tunnel-backup to restore the default.
Syntax
In BGP IPv4 unicast address family view/BGP IPv6 unicast address family view:
nexthop recursive-lookup tunnel-backup
undo nexthop recursive-lookup tunnel-backup
In BGP-VPN IPv4 unicast address family view/BGP-VPN IPv6 unicast address family view:
nexthop recursive-lookup tunnel-backup [ evpn ]
undo nexthop recursive-lookup tunnel-backup [ evpn ]
Default
A BGP route can be iterated to only one tunnel.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
evpn: Specifies the BGP EVPN routes installed into the BGP-VPN instance routing table. Only these BGP EVPN routes support route recursion to primary and backup tunnels. If you do not specify this keyword, all BGP routes in the current address family support route recursion to primary and backup tunnels.
Usage guidelines
Application scenarios
This command is applicable to MPLS VPN networks. You can use this command to enable support for BGP route recursion to primary and backup tunnels. The obtained primary and backup tunnels work together to ensure traffic forwarding reliability. BGP forwards the matching traffic through the primary tunnel as long as the primary tunnel is available. When the primary tunnel fails, the backup tunnel immediately takes over to forward traffic. This mechanism avoids long-time traffic forwarding interruption.
Operating mechanism
After you configure this command, a BGP route can be iterated to primary and backup tunnels. These tunnels are of different types and are single tunnels without load balancing.
With this command configured, the device determines the types of primary and backup tunnels according to the configuration of the select-seq load-balance-number command. For example, the type of primary tunnel is SRLSP and the type of backup tunnel is CRLSP for BGP IPv4 unicast routes if you perform the following task:
1. Configure the select-seq sr-lsp cr-lsp load-balance-number command in the view of a tunnel policy.
2. Apply the tunnel selector associated with the tunnel policy above to BGP IPv4 unicast routes.
|
NOTE: · If you specify only one tunnel type in the select-seq load-balance-number command, route recursion to primary and backup tunnels is not supported for BGP routes. In the current software version, only the cr-lsp and sr-lsp keywords are supported in the select-seq load-balance-number command. When a BGP route is iterated to primary and backup tunnels, these tunnels can only be CRLSP tunnels and SRLSP tunnels. · When you apply the tunnel selector associated with a tunnel policy to an address family, the tunnel policy might not be configured with the select-seq load-balance-number command. In this situation, the nexthop recursive-lookup tunnel-backup command uses the default tunnel selection order of the select-seq load-balance-number command for BGP route recursion to primary and backup tunnels. The tunnel type of primary tunnel is CRLSP and the tunnel type of backup tunnel is SRLSP. · For more information about the select-seq load-balance-number command and tunnel policies, see tunnel policy commands in MPLS Command Reference. |
Restrictions and guidelines
This command only allows BGP route recursion to intra-AS primary and backup tunnels and does not take effect on labeled BGP routes. Therefore, this command is not supported when the network scheme is inter-AS VPN option B or inter-AS VPN option C.
Examples
# In BGP IPv4 unicast address family view, allow route recursion to primary and backup tunnels.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] nexthop recursive-lookup tunnel-backup
Related commands
select-seq load-balance-number (MPLS Command Reference)
passwords
Use passwords to set the MD5 authentication password.
Use undo passwords to restore the default.
Syntax
passwords { cipher | simple } string
undo passwords
Default
The MD5 authentication password is not set.
Views
BGP RPKI server view
Predefined user roles
network-admin
Parameters
cipher: Specifies a password in encrypted form.
simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.
string: Specifies the password. Its encrypted form is a case-sensitive string of 33 to 137 characters. Its plaintext form is a case-sensitive string of 1 to 80 characters.
Usage guidelines
This command can enhance security in the following ways:
· Perform MD5 authentication when establishing TCP connections. Only the two parties that have the same password configured can establish TCP connections.
· Perform MD5 calculation on the packets transmitted over the TCP connections to avoid packet modification.
Examples
# In BGP RPKI server view, set the MD5 authentication password to 123456.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] passwords simple 123456
path-mtu-discovery enable
Use path-mtu-discovery enable to enable path MTU discovery for TCP connections globally.
Use undo path-mtu-discovery enable to restore the default.
Syntax
path-mtu-discovery enable
undo path-mtu-discovery enable
Default
BGP does not perform path MTU discovery before establishing a TCP connection.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
This feature enables BGP to perform path MTU discovery before establishing a TCP connection with a peer. Then, BGP uses the detected path MTU to calculate the MSS to avoid IP fragmentation by intermediate devices. For more information about path MTU discovery, see IP performance optimization configuration in Layer 3—IP Services Configuration Guide.
This command takes effect on only TCP connections established through IPv4 addresses.
To enable path MTU discovery for TCP connections with a specific peer, use the peer path-mtu-discovery enable command.
You can configure the peer path-mtu-discovery enable command together with the peer path-mtu-discovery enable command. The configuration of the latter command takes precedence over that of the former.
Examples
# Enable path MTU discovery for TCP connections globally.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] path-mtu-discovery enable
Related commands
peer path-mtu-discovery enable
pd-monitor-mode enable
Use pd-monitor-mode enable to configure the BMP client to send peer down notifications with mode flags to the BMP server.
Use undo pd-monitor-mode enable to restore the default.
Syntax
pd-monitor-mode enable
undo pd-monitor-mode enable
Default
The BMP client sends peer down notifications without mode flags to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Usage guidelines
Execute this command to configure the BMP client to send peer down notifications with the following flags to the BMP server:
· Adj-RIB-In—The BMP client sends routes received from monitored peers to the BMP server.
· Adj-RIB-Out—The BMP client sends routes advertised to monitored peers to the BMP server.
· pre-policy—The BMP client sends routes to the BMP server without filtering.
· post-policy—The BMP client sends routes to the BMP server after filtering.
By default, the BMP client sends peer down notifications with the Adj-RIB-In and pre-policy flags to the BMP server after you execute this command.
After you delete the route sending mode by executing the route-mode adj-rib-in, route-mode adj-rib-out, or peer route-mode command, the BMP client will send peer down notifications with the new mode flag to the BMP server.
Examples
# Configure the BMP client to send peer down notifications with mode flags to the BMP server.
<Sysname> system-view
[Sysname] bmp server 1
[Sysname-bmpserver-1] pd-monitor-mode enable
Related commands
peer route-mode
route-mode adj-rib-in
route-mode adj-rib-out
peer additional-paths
Use peer additional-paths to configure the BGP Additional Paths capabilities.
Use undo peer additional-paths to remove the configuration.
Syntax
In BGP-VPN VPNv4 address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } additional-paths { receive | send } *
undo peer { group-name | ipv4-address [ mask-length ] } additional-paths { receive | send } *
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP EVPN address family view/BGP IPv4 MVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } additional-paths { receive | send } *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } additional-paths { receive | send } *
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv6 MVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } additional-paths { receive | send } *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } additional-paths { receive | send } *
Default
No BGP Additional Paths capabilities are configured.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures the BGP Additional Paths capabilities for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures the BGP Additional Paths capabilities for all dynamic peers in the subnet.
receive: Enables the BGP additional path receiving capability.
send: Enables the BGP additional path sending capability.
Usage guidelines
You can enable the BGP additional path sending, receiving, or both sending and receiving capabilities on a BGP router. For two BGP peers to successfully negotiate the Additional Paths capabilities, make sure one end has the sending capability and the other end has the receiving capability.
Examples
# In BGP IPv4 unicast address family view, enable the BGP additional path receiving capability.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 additional-paths receive
peer advertise additional-paths best
Use peer advertise additional-paths best to set the maximum number of Add-Path optimal routes that can be advertised to a peer or peer group.
Use undo peer advertise additional-paths best to remove the configuration.
Syntax
In BGP VPNv4 address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 labeled unicast address family/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } advertise additional-paths best number
undo peer { group-name | ipv4-address [ mask-length ] } advertise additional-paths best
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP EVPN address family view/BGP IPv4 MVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise additional-paths best number
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise additional-paths best
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv6 MVPN address family view:
peer { group-name | ipv6-address [ prefix-length ] } advertise additional-paths best number
undo peer { group-name | ipv6-address [ prefix-length ] } advertise additional-paths best
Default
A maximum number of one Add-Path optimal route can be advertised to a peer or peer group.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command sets the maximum number of Add-Path optimal routes that can be advertised to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command sets the maximum number of Add-Path optimal routes that can be advertised to all dynamic peers in the subnet.
number: Specifies the maximum number of Add-Path optimal routes that can be advertised to a peer or peer group, in the range of 2 to 64.
Usage guidelines
If the number of Add-Path optimal routes advertised to a peer or peer group exceeds the number of optimal routes, the number of optimal routes takes effect.
Examples
# In BGP IPv4 unicast address family view, set the maximum number to 3 for Add-Path optimal routes that can be advertised to peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 advertise additional-paths best 3
Related commands
additional-paths select-best
peer additional-paths
peer advertise origin-as-validation
Use peer advertise origin-as-validation to configure BGP to advertise the BGP RPKI validation state to a peer or peer group.
Use undo peer advertise origin-as-validation to restore the default.
Syntax
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise origin-as-validation
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise origin-as-validation
In BGP-VPNv4 address family view/BGP-VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] } advertise origin-as-validation
undo peer { group-name | ipv4-address [ mask-length ] } advertise origin-as-validation
Default
BGP does not advertise the BGP RPKI validation state to any peer or peer groups.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP-VPNv4 address family view
BGP-VPNv6 address family view
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
Usage guidelines
BGP advertises the BGP RPKI validation state to a peer or peer group through the extended community attribute. To configure this command, you must first enable BGP to advertise the extended community attribute to the peer or peer group.
In the current software version, BGP can advertise the BGP RPKI validation state only to IBGP peers and peer groups.
Examples
# In BGP IPv4 unicast address family view, configure BGP to advertise the BGP RPKI validation state to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test advertise-ext-community
[Sysname-bgp-default-ipv4] peer test advertise origin-as-validation
peer advertise-community
Use peer advertise-community to advertise the COMMUNITY attribute to a peer or peer group.
Use undo peer advertise-community to disable the COMMUNITY attribute advertisement to a peer or peer group.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } advertise-community
undo peer { group-name | ipv4-address [ mask-length ] } advertise-community
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 flowspec address family view/BGP-VPN IPv4 flowspec address family view/BGP VPNv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv6 flowspec address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-community
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-community
The device does not advertise the COMMUNITY attribute to any peers or peer groups.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises the COMMUNITY attribute to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises the COMMUNITY attribute to all dynamic peers in the subnet.
The COMMUNITY attribute is a group of specific data carried in UPDATE messages. A route can carry one or more COMMUNITY attribute values (each is represented by a 4-byte integer). The receiving router processes the route (for example, determining whether to advertise the route and the scope for advertising the route) based on the COMMUNITY attribute values.
After you execute the peer advertise-community command, routing updates advertised to the peer carry the COMMUNITY attribute.
After you execute the undo peer advertise-community command, BGP, upon receiving a route with the COMMUNITY attribute, removes the COMMUNITY attribute before sending the route to the peer or peer group.
# In BGP IPv4 unicast address family view, advertise the COMMUNITY attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test advertise-community
apply community
if-match community
ip community-list
peer advertise-ext-community
Use peer advertise-ext-community to advertise the extended community attribute to a peer or peer group.
Use undo peer advertise-ext-community to disable the extended community attribute advertisement to a peer or peer group.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } advertise-ext-community
undo peer { group-name | ipv4-address [ mask-length ] } advertise-ext-community
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-ext-community
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-ext-community
The device does not advertise the extended community attribute to any peers or peer groups.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises the extended community attribute to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises the extended community attribute to all dynamic peers in the subnet.
To meet increasing user demands, BGP defines a new attribute—extended community attribute. The extended community attribute has the following advantages over the COMMUNITY attribute:
· The extended community attribute has an 8-byte length.
· The extended community attribute supports various types. You can select an extended community attribute type as needed to implement route filtering and control. This simplifies configuration and management.
After you execute the peer advertise-ext-community command, route updates sent to the peer or peer group carry the extended community attribute.
After you execute the undo peer advertise-ext-community command, BGP, upon receiving a route with the extended community attribute, removes the extended community attribute before sending the route to the peer or peer group.
# In BGP IPv4 unicast address family view, advertise the extended community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test advertise-ext-community
apply extcommunity
if-match extcommunity
ip extcommunity-list
peer advertise-large-community
Use peer advertise-large-community to advertise the large community attribute to a peer or peer group.
Use undo peer advertise-large-community to disable large community attribute advertisement to a peer or peer group.
Syntax
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } advertise-large-community
undo peer { group-name | ipv4-address [ mask-length ] } advertise-large-community
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-large-community
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-large-community
Default
The device does not advertise the large community attribute to any peers or peer groups.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises the large community attribute to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises the large community attribute to all dynamic peers in the subnet.
Usage guidelines
The large community attribute is defined to address the shortcomings of the community attribute and the extended community attribute. It is a group of specific data carried in UPDATE messages. A route can carry one or more large community attribute values. The receiving router processes the route (for example, determining whether to receive or advertise the route) based on the large community attribute values.
After you execute the peer advertise-large-community command, routing updates advertised to the peer carry the large community attribute.
After you execute the undo peer advertise-large-community command, BGP removes the large community attribute from the received routes before sending them to a peer or peer group.
Examples
# In BGP IPv4 unicast address family view, advertise the large community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test advertise-large-community
Related commands
apply large-community
apply large-comm-list delete
if-match large-community
ip large-community-list
peer advertise-policy exist-policy
Use peer advertise-policy exist-policy to specify an existent policy to control route advertisement.
Use undo peer advertise-policy exist-policy to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-policy advertise-policy-name exist-policy exist-policy-name
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-policy exist-policy
Default
No existent policy is specified to control route advertisement.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
advertise-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. The routing policy is used as the route advertisement policy.
exist-policy exist-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. The routing policy is used as the existent policy.
Usage guidelines
After you configure this command, routes that match the route advertisement policy can be advertised only when the BGP routing table contains prefixes that match the existent policy.
The existent policy does not apply to routes that do not match the route advertisement policy.
Examples
# In BGP IPv4 unicast address family view, configure BGP to advertise routes matching routing policy adv-policy to peer 1.1.1.1 only when the BGP routing table contains prefixes matching routing policy ex-policy.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 advertise-policy adv-policy exist-policy ex-policy
Related commands
filter-policy export
filter-policy import
peer as-path-acl
peer filter-policy
peer prefix-list
peer route-policy
peer advertise-policy non-exist-policy
route-policy
peer advertise-policy non-exist-policy
Use peer advertise-policy non-exist-policy to specify a nonexistent policy to control route advertisement.
Use undo peer advertise-policy non-exist-policy to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-policy advertise-policy-name non-exist-policy non-exist-policy-name
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-policy non-exist-policy
Default
No nonexistent policy is specified to control route advertisement.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
advertise-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. The routing policy is used as the route advertisement policy.
non-exist-policy non-exist-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. The routing policy is used as the nonexistent policy.
Usage guidelines
After you configure this command, routes that match the route advertisement policy can be advertised only when the BGP routing table does not contain any prefixes that match the nonexistent policy.
The nonexistent policy does not apply to routes that do not match the route advertisement policy.
Examples
# In BGP IPv4 unicast address family view, configure BGP to advertise routes matching routing policy adv-policy to peer 1.1.1.1 only when the BGP routing table does not contain any prefixes matching routing policy n-ex-policy.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 advertise-policy adv-policy non-exist-policy n-ex-policy
Related commands
filter-policy export
filter-policy import
peer as-path-acl
peer filter-policy
peer prefix-list
peer route-policy
peer advertise-policy exist-policy
peer aigp
Use peer aigp to configure BGP to advertise the AIGP attribute to a peer or peer group.
Use undo peer aigp to disable BGP from advertising the AIGP attribute to a peer or peer group.
Syntax
In BGP VPNv4 address family view/BGP VPNv6 address family view/BGP IPv4 labeled unicast address family/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } aigp
undo peer { group-name | ipv4-address [ mask-length ] } aigp
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp
Default
BGP does not advertise the AIGP attribute to a peer or peer group and ignores the AIGP attributes in routes received from the peer or peer group.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
Usage guidelines
As a best practice, do not configure the peer aigp command on border routers of an AIGP administrative domain.
When a router receives a route not carrying the AIGP attribute, it does not advertise the AIGP attribute to a peer or peer group if you configure only the peer aigp command. To enable the router to carry the AIGP attribute, you must configure both the peer aigp and apply aigp command. For information about the apply aigp command, see "Configuring routing policies."
Examples
# In BGP IPv4 unicast address family view, configure BGP to advertise the AIGP attribute to peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 aigp
Related commands
apply aigp
peer aigp send med
Use peer aigp send med to configure BGP to replace the MED value with AIGP value in routes advertised to a peer or peer group.
Use undo peer aigp send med to disable BGP from replacing the MED value with AIGP value in routes advertised to the peer or peer group.
Syntax
In BGP VPNv4 address family view /BGP VPNv6 address family view/BGP IPv4 labeled unicast address family/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } aigp send med
undo peer { group-name | ipv4-address [ mask-length ] } aigp send med
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp send med
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp send med
In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp send med
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } aigp send med
Default
BGP does not replace the MED value with AIGP value in routes advertised to a peer or peer group.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
Usage guidelines
Use this command to send the AIGP attribute to a peer or peer group that does not support AIGP.
Examples
# In BGP IPv4 unicast address family view, configure BGP to replace the MED value with AIGP value in routes advertised to peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 aigp send med
Related commands
apply aigp
peer allow-as-loop
Use peer allow-as-loop to allow a local AS number to exist in the AS_PATH attribute of routes from a peer or peer group, and to set the number of times the local AS number can appear.
Use undo peer allow-as-loop to remove the configuration.
In BGP L2VPN address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } allow-as-loop [ number ]
undo peer { group-name | ipv4-address [ mask-length ] } allow-as-loop
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } allow-as-loop [ number ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } allow-as-loop
The local AS number is not allowed to exist in the AS_PATH attribute of routes from a peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP allows a local AS number to exist in the AS_PATH attribute of routes from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP allows a local AS number to exist in the AS_PATH attribute of routes from all dynamic peers in the subnet.
number: Specifies the number of times for which the local AS number can appear, in the range of 1 to 10. The default number is 1. If the number of times for which the local AS number appears in a route is more than the specified number, BGP considers that a routing loop occurs and discards the route.
By default, BGP does not receive routes that contain the local AS number in the AS_PATH attribute to avoid routing loops. However, in some network environments, the AS_PATH attribute of a route from a peer must be allowed to contain the local AS number (for example, a Hub&Spoke network in MPLS L3VPN). Otherwise, the route cannot be advertised correctly.
# In BGP IPv4 unicast address family view, set the number of times the local AS number can appear in AS_PATH attribute of routes from peer group test to 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test allow-as-loop 2
peer as-number (for a BGP peer group)
Use peer as-number to specify an AS number for a peer group.
Use undo peer as-number to delete the AS number of a peer group.
peer group-name as-number as-number
undo peer group-name as-number
No AS number is specified for a peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a name for a peer group, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
as-number: Specifies an AS number for a peer group, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
This command applies only to a peer group with no peers in it.
When you specify an AS number for a peer group and want to add peers to it, make sure the AS number of the peers is the same as the peer group.
If you do not specify an AS number for a peer group, peers added to it can use their own AS numbers.
# In BGP instance view, set the AS number for peer group test to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test as-number 100
peer as-number (for a BGP peer)
Use peer as-number to create a BGP peer and specify its AS number.
Use undo peer to delete a BGP peer.
peer { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } as-number as-number
undo peer { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] }
No BGP peers exist.
BGP-VPN instance view
network-admin
ipv4-address: Specifies the IPv4 address of a peer.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP to establish dynamic peer relationships with all devices in the subnet.
ipv6-address: Specifies the IPv6 address of a peer.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP to establish dynamic peer relationships with all devices in the subnet.
as-number: Specifies an AS number for the peer, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535. If the AS numbers of the peer and the local router are the same, the peer is an IBGP peer. If they are different, the peer is an EBGP peer.
You can also create a peer and add it to a peer group by using the peer group command.
To modify the AS number of a peer, do not execute the peer as-number command repeatedly. Instead, you must first delete the peer and configure it again.
After you create a peer, you must use the peer enable command to enable BGP to exchange routing information with the specified peer.
To specify a BGP peer by its IPv6 link-local address, you must make sure the BGP peer is directly connected to the local router. On the local router, you must use the peer connect-interface command to specify the interface directly connected to the BGP peer as the source interface of TCP connections.
For a remote device to establish a peer relationship with the local device, you must specify the IP address of the local device on the remote device.
After you configure this command, BGP adds the created BGP peer to the dynamic whitelist. When the control plane is congested, the traffic that matches the dynamic whitelist is preferentially sent to the control plane. For more information about dynamic whitelists, see QoS configuration in ACL and QoS Configuration Guide.
# In BGP instance view, create BGP peer 1.1.1.1 and set its AS number to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 100
display bgp peer
peer enable
peer group
peer as-path-acl
Use peer as-path-acl to specify an AS path list to filter routes incoming from or outgoing to a peer or peer group.
Use undo peer as-path-acl to delete the AS path list specified to filter routes incoming from or outgoing to a peer or peer group.
In BGP VPNv4 address family view/BGP VPNv6 address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } as-path-acl { as-path-acl-number | as-path-acl-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] } as-path-acl [ as-path-acl-number | as-path-acl-name ] { export | import }
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } as-path-acl { as-path-acl-number | as-path-acl-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } as-path-acl [ as-path-acl-number | as-path-acl-name ] { export | import }
No AS path list is specified for filtering.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies an AS path list to filter routes incoming from or outgoing to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies an AS path list to filter routes incoming from or outgoing to all dynamic peers in the subnet.
as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256.
as-path-acl-name: Specifies an AS path list by its name, a case-sensitive string of 1 to 51 characters. The AS path list name cannot contain only digits.
export: Filters outgoing routes.
import: Filters incoming routes.
The specified AS path list must have been created with the ip as-path command in system view. If you specify a nonexistent AS path list, all routes can pass the AS path list.
# In BGP IPv4 unicast address family view, specify AS path list 1 to filter routes outgoing to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test as-path-acl 1 export
filter-policy export
filter-policy import
ip as-path
peer filter-policy
peer prefix-list
peer route-policy
peer bandwidth
Use peer bandwidth to add the link bandwidth attribute to routes received from an EBGP peer or peer group.
Use undo peer bandwidth to remove the configuration.
Syntax
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP-VPN VPNv4 address family view/BGP VPNv6 address family view/BGP IPv4 multicast address family view:
peer { group-name | ipv4-address [ mask-length ] } bandwidth
undo peer { group-name | ipv4-address [ mask-length ] } bandwidth
In BGP IPv6 unicast address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bandwidth
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bandwidth
In BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
peer { group-name | ipv6-address [ prefix-length ] } bandwidth
undo peer { group-name | ipv6-address [ prefix-length ] } bandwidth
Default
BGP does not add the link bandwidth attribute to routes received from an EBGP peer or peer group.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
Usage guidelines
Use this command to add the link bandwidth extended community attribute to routes received from a directly connected EBGP peer or peer group. The link bandwidth is the bandwidth of the interface directly connected to the EBGP peer or peer group. After BGP advertises the routes received from the EBGP peer or peer group to other IBGP peers, the IBGP peers can filter routes based on the link bandwidth attribute.
This command is applicable only to directly connected EBGP peers and peer groups.
If a directly connected EBGP peer or peer group changes to an indirectly connected one, BGP stops adding the link bandwidth attribute to routes received from the EBGP peer or peer group.
Examples
# In BGP IPv4 unicast address family view, enable BGP to add the link bandwidth attribute to routes received from EBGP peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 bandwidth
Related commands
apply extcommunity
ip extcommunity-list
peer bfd
Use peer bfd to enable BFD for the link to a BGP peer or peer group.
Use undo peer bfd to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bfd [ echo | [ multi-hop | single-hop ] [ compatible ] ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bfd
BFD is disabled for the link to a BGP peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables BFD for links to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables BFD for links to all dynamic peers in the subnet.
echo: Specifies the echo packet mode for BFD.
multi-hop: Specifies the control packet mode for multi-hop BFD.
single-hop: Specifies the control packet mode for single-hop BFD.
compatible: Allows the local router to establish a control packet-mode BFD session to the non-H3C device. The local router then uses the BFD session to detect the link to the non-H3C device. If you do not specify this keyword, enabling control packet-mode BFD for the non-H3C device might not be supported.
When you specify none of the multi-hop, single-hop, and echo keywords:
· If an IBGP peer or peer group is specified, this command enables multi-hop BFD in control packet mode for the IBGP peer or peer group.
· If a directly connected EBGP peer or peer group is specified and the peer ebgp-max-hop command is not configured, this command enables single-hop BFD in control packet mode for the EBGP peer or peer group. If the EBGP peer or peer group is not directly connected or the peer ebgp-max-hop command is configured, this command enables multi-hop BFD in control packet mode for the EBGP peer or peer group.
Follow these restrictions and guidelines when you configure echo packet mode BFD:
· Echo packet mode BFD is applicable only to directly connected BGP peers.
· Echo packet mode BFD is not applicable to the BGP peers established by using loopback interfaces.
· For successful BFD session establishment, make sure a source address has been specified for echo packets by using the bfd echo-source-ip or bfd echo-source-ipv6 command.
To detect the link to a BGP peer established through link-local addresses, you must configure single-hop BFD in control packet mode.
When you enable control packet-mode BFD for a BGP peer on an H3C device (local router), follow these restrictions and guidelines:
· If the BGP peer is an H3C device, you must configure the same BFD detection mode (multi-hop or single-hop) on the local router and the BGP peer.
· If the BGP peer is a non-H3C device, make sure the local router and the BGP peer meet the following requirements:
¡ The local router and the BGP peer must use the same UDP destination port when they exchange BFD packets.
¡ If the BGP peer sends BFD packets with TTL less than 255 to the local router, the TTL must be less than 255 for the local router's BFD packets.
If the BGP peer sends BFD packets with TTL 255 to the local router, the TTL must be 255 for the local router's BFD packets.
As shown in Table 75, the UDP destination port and the TTL for BFD packets depends on the BGP session type and the configuration of the peer bfd command.
Table 75 UDP destination port and TTL
Whether the multi-hop or single-hop keyword is specified |
Whether the compatible keyword is specified |
Directly-connected IBGP peer |
Indirectly-connected IBGP peer |
Directly-connected EBGP peer |
Indirectly-connected EBGP peer |
No |
No |
· UDP destination port: 4784 · TTL: 64 |
· UDP destination port: 4784 · TTL: 64 |
· UDP destination port: 3784 · TTL: 255 |
· UDP destination port: 4784 · TTL: 64 |
No |
Yes |
· UDP destination port: 4784 · TTL: 255 |
· UDP destination port: 4784 · TTL: 255 |
· UDP destination port: 3784 · TTL: 64 |
· UDP destination port: 4784 · TTL: 255 |
The single-hop keyword is specified. |
No |
· UDP destination port: 3784 · TTL: 255 |
· UDP destination port: 3784 · TTL: 255 |
· UDP destination port: 3784 · TTL: 255 |
· UDP destination port: 3784 · TTL: 255 |
The single-hop keyword is specified. |
Yes |
· UDP destination port: 3784 · TTL: 64 |
· UDP destination port: 3784 · TTL: 64 |
· UDP destination port: 3784 · TTL: 64 |
· UDP destination port: 3784 · TTL: 64 |
The multi-hop keyword is specified. |
No |
· UDP destination port: 4784 · TTL: 64 |
· UDP destination port: 4784 · TTL: 64 |
· UDP destination port: 4784 · TTL: 64 |
· UDP destination port: 4784 · TTL: 64 |
The multi-hop keyword is specified. |
Yes |
· UDP destination port: 4784 · TTL: 255 |
· UDP destination port: 4784 · TTL: 255 |
· UDP destination port: 4784 · TTL: 255 |
· UDP destination port: 4784 · TTL: 255 |
When you specify the compatible keyword, make sure other services do not share a BFD session with BGP as a best practice. Specifying the compatible keyword will interrupt the services that use the same BFD session as BGP.
For more information about BFD, see BFD configuration in High Availability Configuration Guide.
BFD helps speed up BGP routing convergence upon link failures. However, if you have enabled GR, use BFD with caution. BFD might detect a failure before the system performs GR, resulting in GR failure. If you have enabled both BFD and GR for BGP, do not disable BFD during a GR process to avoid GR failure.
# In BGP instance view, enable control packet mode single-hop BFD for the link to BGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test bfd single-hop
bfd echo-source-ip (High Availability Command Reference)
bfd echo-source-ipv6 (High Availability Command Reference)
display bfd session (High Availability Command Reference)
display bgp peer
peer bfd parameters
peer bfd parameters
Use peer bfd parameters to configure BFD parameters for the specified BGP peer or peer group.
Use undo peer bfd parameters to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bfd parameters { detect-multiplier detect-multiplier | min-receive-interval min-receive-interval | min-transmit-interval min-transmit-interval } *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bfd parameters { detect-multiplier | min-receive-interval | min-transmit-interval } *
Default
BFD parameters are not configured for a BGP peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command takes effect on all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command takes effect on all dynamic peers in the subnet.
detect-multiplier detect-multiplier: Specifies the detection time multiplier.The value range for the detect-multiplier argument is 3 to 50.
min-receive-interval min-receive-interval: Specifies the minimum interval for receiving BFD control packets, in milliseconds. The value range for the min-receive-interval argument is 3 to 10000.
min-transmit-interval min-transmit-interval: Specifies the minimum interval for transmitting BFD control packets, in milliseconds. The value range for the min-transmit-interval argument is 3 to 10000.
Usage guidelines
When you configure BFD parameters for a BGP peer or peer group, follow these restrictions and guidelines:
· When you add a peer to a peer group, the peer will inherit the BFD parameters of the peer group.
· When you configure BFD parameters for a peer group, the configuration takes effect on all peers in the peer group.
· If you configure a BFD parameter multiple times for a peer or peer group, the most recent configuration takes effect.
Examples
# Configure BFD parameters for peer 2.2.2.9.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 2.2.2.9 bfd parameters min-transmit-interval 100 min-receive-interval 100 detect-multiplier 5
Related commands
display bfd session (High Availability Command Reference)
display bgp peer
peer bfd
peer bmp server
Use peer bmp server to specify a peer or peer group to be monitored by the specified BMP servers.
Use undo peer bmp server to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bmp server server-number-list
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } bmp server
Default
No peer or peer group is specified.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
server-number-list: Specifies a list of up to 8 BMP servers. The value range for the BMP server number is 1 to 8. The BMP servers must have been created.
Usage guidelines
For a peer, the following rules apply when BGP selects a BMP server:
· The BMP server specified by the peer bmp server command takes precedence over that specified by the bmp server monitor current-instance command.
· The BMP server specified by the bmp server monitor current-instance command takes precedence over that specified by the bmp server monitor all-vpn-instance command.
If you execute this command multiple times for an instance, the most recent configuration takes effect.
Examples
# In BGP instance view, configure BMP server 1 to monitor peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 bmp server 1
Related commands
bmp server
bmp server monitor current-instance
bmp server monitor all-vpn-instance
peer capability-advertise conventional
Use peer capability-advertise conventional to disable the BGP multi-protocol extension, route refresh, and 4-byte AS number features for a peer or peer group.
Use undo peer capability-advertise conventional to enable the BGP multi-protocol extension, route refresh, and 4-byte AS number features for a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise conventional
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise conventional
The BGP multi-protocol extension, route refresh, and 4-byte AS number features are enabled.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command disables BGP multi-protocol extension and route refresh for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command disables BGP multi-protocol extension and route refresh for all dynamic peers in the subnet.
The route refresh feature enables BGP to send and receive ROUTE-REFRESH messages and implement BGP session soft-reset.
The multi-protocol extension feature enables BGP to advertise and receive routing information for various protocols (for example, IPv6 routing information).
The 4-byte AS number feature enables BGP to use 4-byte AS numbers in the range of 1 to 4294967295.
If both the peer capability-advertise conventional and peer capability-advertise route-refresh commands are executed, the most recent configuration takes effect.
# In BGP instance view, disable the multi-protocol extension, route refresh, and 4-byte AS number features for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 100
[Sysname-bgp-default] peer 1.1.1.1 capability-advertise conventional
display bgp peer
peer capability-advertise route-refresh
peer capability-advertise orf non-standard
Use peer capability-advertise orf non-standard to enable nonstandard ORF capabilities negotiation for a peer or peer group.
Use undo peer capability-advertise orf non-standard to disable nonstandard ORF capabilities negotiation for a peer or peer group.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise orf non-standard
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise orf non-standard
Default
Nonstandard ORF capabilities negotiation is disabled for a peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ip-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP to negotiate nonstandard ORF capabilities with all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP to negotiate nonstandard ORF capabilities with all dynamic peers in the subnet.
Usage guidelines
To enable BGP peers to negotiate nonstandard ORF capabilities, you must configure this command together with the peer capability-advertise orf prefix-list command.
Examples
# Enable nonstandard ORF capabilities negotiation for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 capability-advertise orf non-standard
Related commands
peer capability-advertise orf prefix-list
peer capability-advertise orf prefix-list
Use peer capability-advertise orf prefix-list to enable BGP ORF capabilities negotiation for a peer or peer group.
Use undo peer capability-advertise orf prefix-list to disable BGP ORF capabilities negotiation for a peer or peer group.
Syntax
In BGP VPNv4 address family view/BGP VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] } capability-advertise orf prefix-list { both | receive | send }
undo peer { group-name | ipv4-address [ mask-length ] } capability-advertise orf prefix-list { both | receive | send }
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise orf prefix-list { both | receive | send }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise orf prefix-list { both | receive | send }
Default
BGP ORF capabilities are disabled.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
both: Enables BGP to send and receive route fresh messages that carry the ORF information.
receive: Enables BGP to receive route fresh messages that carry the ORF information.
send: Enables BGP to send route fresh messages that carry the ORF information.
Usage guidelines
After you configure this command, the BGP peers negotiate the ORF capabilities through Open messages. After completing the negotiation process, the BGP peers can exchange ORF information through route refresh messages. ORF information sent to BGP peers includes the prefix list that the local device uses to filter received BGP routes. After receiving ORF information from the local device, the BGP peers return only the BGP routes that matches the prefix list to the local device. This reduces the usage of device resources and network bandwidth.
To enable the peers to exchange nonstandard ORF information, you must also configure the peer capability-advertise orf non-standard command.
After you configure this command in BGP EVPN address family view, the device filters only IPv4 MAC/IP advertisement and IPv4 prefix routes.
When you use this command or the vpn-orf enable command in BGP EVPN address family view, the following rules apply:
· This command filters BGP EVPN routes by IP prefix list. The vpn-orf enable command filters BGP EVPN routes by route target. The two commands takes effect independently and do not affect each other.
· This command takes effect on only MAC/IP advertisement and IP prefix routes, but the vpn-orf enable command takes effect on all BGP EVPN routes.
Examples
# Enables BGP ORF capabilities negotiation for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 capability-advertise orf prefix-list both
Related commands
peer capability-advertise orf non-standard
peer prefix-list
vpn-orf enable (EVPN Command Reference)
peer capability-advertise route-refresh
Use peer capability-advertise route-refresh to enable BGP route refresh for a peer or peer group.
Use undo peer capability-advertise route-refresh to disable BGP route refresh for a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise route-refresh
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise route-refresh
BGP route refresh is enabled for a peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP route refresh for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables BGP route refresh for all dynamic peers in the subnet.
The route refresh feature enables BGP to send and receive ROUTE-REFRESH messages.
BGP uses the route refresh feature to implement BGP session soft-reset. After a policy is modified, the router advertises a ROUTE-REFRESH message to the peers. The peers resend their routing information to the router. After receiving the routing information, the router filters the routing information by using the new policy. This method allows you to refresh the BGP routing table and apply the new route selection policy without tearing down BGP sessions.
BGP route refresh requires that both the local router and the peer support route refresh.
If both the peer capability-advertise route-refresh and peer capability-advertise conventional commands are executed, the most recent configuration takes effect.
# In BGP instance view, enable BGP route refresh for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 100
[Sysname-bgp-default] peer 1.1.1.1 capability-advertise route-refresh
display bgp peer
peer capability-advertise conventional
peer keep-all-routes
refresh bgp
peer capability-advertise suppress-4-byte-as
Use peer capability-advertise suppress-4-byte-as to enable 4-byte AS number suppression.
Use undo peer capability-advertise suppress-4-byte-as to disable 4-byte AS number suppression.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise suppress-4-byte-as
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } capability-advertise suppress-4-byte-as
The 4-byte AS number suppression feature is disabled.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables 4-byte AS number suppression for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables 4-byte AS number suppression for all dynamic peers in the subnet.
BGP supports 4-byte AS numbers. The 4-byte AS number occupies four bytes, in the range of 1 to 4294967295. By default, a device sends an OPEN message to the peer device for session establishment. The OPEN message indicates that the device supports 4-byte AS numbers. If the peer device supports 2-byte AS numbers instead of 4-byte AS numbers, the session cannot be established. To resolve this issue, enable the 4-byte AS number suppression feature. The device then sends an OPEN message to inform the peer that it does not support 4-byte AS numbers, so the BGP session can be established.
If the peer device supports 4-byte AS numbers, do not enable the 4-byte AS number suppression feature. If this feature is enabled, the BGP session cannot be established.
# In BGP instance view, enable 4-byte AS number suppression for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 100
[Sysname-bgp-default] peer 1.1.1.1 capability-advertise suppress-4-byte-as
display bgp peer
peer connect-interface
Use peer connect-interface to specify a source interface (IPv4 address/IPv6 address) for establishing TCP connections to a peer or peer group.
Use undo peer connect-interface to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } connect-interface interface-type interface-number
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } connect-interface
BGP uses the primary IPv4 or IPv6 address of the output interface in the optimal route destined for the BGP peer or peer group as the source address.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies a source interface for establishing TCP connections to all dynamic peers in the network.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies a source interface for establishing TCP connections to all dynamic peers in the subnet.
interface-type interface-number: Specifies an interface by its type and number.
The peer connect-interface command and the peer source-address command can both change the source address for establishing TCP connections. If you execute both commands, the most recent configuration takes effect.
The peer source-address and peer connect-interface commands are applicable to the following scenarios:
· If the peer's IPv4/IPv6 address does not belong to the interface directly connected to the local router. To ensure successful TCP connection establishment, use one of the following methods:
¡ Specify the interface to which the IPv4/IPv6 address belongs as the source interface on the peer.
¡ Specify the IPv4/IPv6 address of the interface directly connected to the local router as the source address on the peer.
· A BGP peer at an IPv6 link-local address must be directly connected to the local router. On the local router, you must use the peer connect-interface command to specify the interface directly connected to the BGP peer as the source interface of TCP connections.
· On a BGP router that has multiple links to a peer, the source interface for TCP connection changes because the primary source interface fails. To avoid this problem, specify a loopback interface as the source interface or specify the IP address of a loopback interface as the source address.
· You want to establish multiple BGP sessions to a router. In this case, BGP might fail to determine the source address for each TCP connection based on the optimal route to the peer. To prevent this problem, use one of the following methods:
¡ If the BGP sessions use IP addresses of different interfaces, specify a source interface or source address for each session.
¡ If the BGP sessions use different IP addresses of the same interface, specify a source address for each session.
· The source address of a TCP connection is borrowed by another interface. When the status of the interface changes, the BGP session cannot respond to the changes correctly. To resolve this problem, you must use the peer connect-interface command to specify the interface that borrows the source address as the source interface of the TCP connection.
The source interfaces on the local router and the peer must be reachable to each other.
BGP immediately tears down the session to an IBGP peer or peer group when the following conditions exist:
· The source interface of TCP connections to the IBGP peer or peer group is a physical interface.
· The source interface fails and the link to the IBGP peer or peer group goes down.
To specify an indirectly connected interface on an EBGP peer as the source interface, use the peer ebgp-max-hop command. The command allows the establishment of an EBGP session to the indirectly connected peer.
If an interface has multiple IPv4 addresses, BGP uses the primary IPv4 address to establish TCP connections. If an interface has multiple IPv6 addresses, BGP selects a source IPv6 address. To use an IPv6 address as the source address, specify that IPv6 address by using the peer source-address command.
You cannot specify a virtual template (VT) interface as the source interface for establishing TCP connections because a VT interface cannot process services.
# In BGP instance view, specify loopback 0 as the source interface for TCP connections to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test connect-interface loopback 0
peer ebgp-max-hop
peer source-address
peer cluster-id
Use peer cluster-id to set the cluster ID of the route reflector for a peer or peer group.
Use undo peer cluster-id to remove the cluster ID of the route reflector for a peer or peer group.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } cluster-id cluster-id
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } cluster-id
Default
The cluster ID of the route reflector is not set for a peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the network.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
cluster-id: Specifies the cluster ID. The cluster ID can be an integer in the range of 1 to 4294967295 or an IPv4 address.
Usage guidelines
When a route reflector connects to multiple clusters, you can use this command to configure different cluster IDs for different peers or peer groups.
If you do not configure the peer cluster-id command for a peer or peer group, the peer or peer group uses the cluster ID configured by the reflector cluster-id command.
For a peer or peer group, the cluster ID configured by the peer cluster-id command takes precedence over the cluster ID configured by the reflector cluster-id command.
Do not configure the router ID of a client as the cluster ID.
Examples
# In BGP IPv4 unicast address family view, set the cluster ID to 80 for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as 100
[Sysname-bgp-default] peer 1.1.1.1 cluster-id 80
Related commands
peer reflect-client
reflector cluster-id
peer default-route-advertise
Use peer default-route-advertise to advertise a default route to a peer or peer group.
Use undo peer default-route-advertise to disable default route advertisement to a peer or peer group.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } default-route-advertise [ route-policy route-policy-name ] [ conditional-policy route-policy-name ]
undo peer { group-name | ipv4-address [ mask-length ] } default-route-advertise
In BGP VPNv4 address family view/BGP VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] } default-route-advertise vpn-instance vpn-instance-name
undo peer { group-name | ipv4-address [ mask-length ] } default-route-advertise vpn-instance vpn-instance-name
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } default-route-advertise [ route-policy route-policy-name ] [ conditional-policy route-policy-name ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } default-route-advertise
In BGP IPv4 RT filter address family view:
peer { group-name | ipv4-address [ mask-length ] } default-route-advertise [ route-policy route-policy-name ]
undo peer { group-name | ipv4-address [ mask-length ] } default-route-advertise
In BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } default-route-advertise { ipv4 | ipv6 } vpn-instance vpn-instance-name
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } default-route-advertise { ipv4 | ipv6 } vpn-instance vpn-instance-name
No default route is advertised to any peers or peer groups.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 RT-Filter address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises a default route to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises a default route to all dynamic peers in the subnet.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to modify the route attribute of the advertised default route.
conditional-policy route-policy-name: Specifies a routing policy to determine whether to advertise the default route. BGP advertises the default route only when the current routing table contains a route that matches the permit-mode node of the specified routing policy. The route-policy-name argument represents the routing policy name, a case-sensitive string of 1 to 63 characters.
ipv4: Specifies the IPv4 default route.
ipv6: Specifies the IPv6 default route.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters.
This command enables the router to send a default route with the next hop being itself to the peer or peer group regardless of whether the default route exists in the routing table.
# In BGP IPv4 unicast address family view, advertise a default route to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test default-route-advertise
peer description
Use peer description to configure a description for a peer or peer group.
Use undo peer description to remove the description for a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } description text
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } description
No description information is configured for a peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures a description for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures a description for all dynamic peers in the subnet.
text: Specifies a description for a peer or peer group, a case-sensitive string of 1 to 79 characters.
# In BGP instance view, set the description for peer group test to ISP1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test description ISP1
peer dscp
Use peer dscp to set a DSCP value for outgoing BGP packets.
Use undo peer dscp to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } dscp dscp-value
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } dscp
The DSCP value for outgoing BGP packets is 48.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies a DSCP value for outgoing BGP packets to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies a DSCP value for outgoing BGP packets to all dynamic peers in the subnet.
dscp-value: Specifies a DSCP value in the range of 0 to 63.
The DSCP value of an IP packet specifies the priority level of the packet and affects the transmission priority of the packet. A larger DSCP value represents a higher priority.
# In BGP instance view, set the DSCP value to 10 for outgoing BGP packets to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test dscp 10
peer ebgp-max-hop
Use peer ebgp-max-hop to enable BGP to establish an EBGP session to an indirectly connected peer or peer group and specify the maximum hop count.
Use undo peer ebgp-max-hop to disable BGP to establish an EBGP session to an indirectly connected peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ebgp-max-hop [ hop-count ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ebgp-max-hop
BGP does not establish an EBGP session to an indirectly connected peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP establishes EBGP sessions to all indirectly connected dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP establishes EBGP sessions to all indirectly connected dynamic peers in the subnet.
hop-count: Specifies the maximum number of hop counts, in the range of 1 to 255. The default is 64.
To become EBGP peers, two routers must be directly connected and use directly connected interfaces to establish an EBGP session. If they are not directly connected, use the peer ebgp-max-hop command to establish an EBGP session over multiple hops between two peers.
This command takes effect only on the routes generated after you execute this command. To apply this command to existing routes, you must use the refresh bgp command to soft-reset BGP sessions.
When the BGP GTSM feature is enabled, two peers can establish an EBGP session after passing GTSM check, regardless of whether the maximum number of hops is reached.
# In BGP instance view, enable BGP to establish EBGP sessions to indirectly connected EBGP peer group test, and set the maximum hop count to 64 (default).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test ebgp-max-hop
peer ttl-security
peer ebgp-nexthop-check ignore
Use peer ebgp-nexthop-check ignore to disable BGP from checking the next hop addresses of EBGP routes received from the specified peer or peer group.
Use undo peer ebgp-nexthop-check ignore to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ebgp-nexthop-check ignore
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ebgp-nexthop-check ignore
Default
BGP checks the next hop address of a route received from a directly connected EBGP peer or peer group. If the next hop address of the route does not belong to a directly connected network, BGP determines that the EBGP route is invalid and does not add it to the BGP routing table. BGP does not check the next hop addresses of routes received from indirectly EBGP peers or peer groups.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, the command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, the command specifies all dynamic peers in the subnet.
Usage guidelines
After you configure this feature, BGP will send route-refresh messages to the specified peer or peer group. After the peer or peer group resends routes to BGP, BGP will not check the next hop addresses of EBGP routes sent by the peer or peer group.
If you specify an IBGP peer or peer group when executing this command, the execution of the command will fail.
After you execute the undo peer ebgp-nexthop-check ignore command to remove the configuration of the peer ebgp-nexthop-check ignore command, BGP will check all routes received from the specified peer or peer group and remove those with invalid next hop addresses. Then, BGP will advertise the route updates to other peers and peer groups based on the route advertisement rules.
Examples
# In BGP instance view, disable BGP from checking the next hop addresses of EBGP routes received from the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test ebgp-nexthop-check ignore
peer enable
Use peer enable to enable BGP to exchange routing information for an address family with a peer or peer group.
Use undo peer enable to disable BGP from exchanging routing information for an address family with a peer or peer group.
In BGP-VPN VPNv4 address family view/BGP L2VPN address family view/BGP IPv4 MDT address family view/BGP IPv4 RT filter address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } enable
undo peer { group-name | ipv4-address [ mask-length ] } enable
In BGP IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv4 multicast address family view/BGP IPv6 multicast address family view/BGP LS address family view/BGP EVPN address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP-VPN LS address family view/BGP IPv4 flowspec address family view/BGP-VPN IPv4 flowspec address family view/BGP VPNv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv6 flowspec address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } enable
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } enable
BGP cannot exchange routing information with a peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP LS address family view
BGP-VPN LS address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 MDT address family view
BGP IPv4 flowspec address family view
BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view
BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view
BGP VPNv6 flowspec address family view
BGP IPv4 RT filter address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP exchanges routing information for an address family with all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP exchanges routing information for an address family with all dynamic peers in the subnet.
Executing the peer enable command in different views enables BGP to exchange routing information for the corresponding address families with the specified peer.
· In BGP IPv4 unicast address family view, the command enables the capability to exchange IPv4 unicast routing information. It also adds the learned routes to the BGP routing table of the public network.
· In BGP-VPN IPv4 unicast address family view, the command enables the capability to exchange IPv4 unicast routing information. It also adds the learned routes to the BGP routing table of the specified VPN instance.
· In BGP IPv4 labeled unicast address family view, the command enables the capability to exchange IPv4 labeled unicast routing information. It also adds the learned routes to the BGP IPv4 labeled unicast routing table of the public network.
· In BGP-VPN IPv4 labeled unicast address family view, the command enables the capability to exchange IPv4 labeled unicast routing information. It also adds the learned routes to the routing table of the IPv4 labeled unicast address family in the specified VPN instance.
· In BGP VPNv4 address family view, the command enables the capability to exchange VPNv4 routing information. In an MPLS L3VPN or SRv6 VPN network, execute the command on PE devices in BGP VPNv4 address family view.
· In BGP-VPN VPNv4 address family view, the command enables the capability to exchange VPNv4 routing information. In a nested VPN network, execute this command on ISP PE devices in BGP-VPN VPNv4 address family view to do the following:
¡ Enable the PE devices to exchange BGP VPNv4 routing information with ISP CEs.
¡ Add the VPNv4 routes learned by the PE devices to the routing table of the specified VPN instance.
· In BGP IPv6 unicast address family view, the command enables the capability to exchange IPv6 unicast routing information. It also adds the learned routes to the IPv6 BGP routing table of the public network.
· In BGP-VPN IPv6 unicast address family view, the command enables the capability to exchange IPv6 unicast routing information. It also adds the learned routes to the IPv6 BGP routing table of the specified VPN instance.
· In BGP VPNv6 address family view, the command enables the capability to exchange VPNv6 routing information. In an IPv6 MPLS L3VPN network, execute the command on PE devices in BGP VPNv6 address family view.
· In BGP L2VPN address family view, the command enables the capability to exchange L2VPN information. In an MPLS L2VPN or a VPLS network, execute the command on PE devices in BGP L2VPN address family view.
· In BGP IPv4 multicast address family view, the command enables the capability to exchange IPv4 unicast routes used for RPF check. For information about RPF check, see IP Multicast Configuration Guide.
· In BGP IPv6 multicast address family view, the command enables the capability to exchange IPv6 unicast routes used for RPF check. For information about RPF check, see IP Multicast Configuration Guide.
· In BGP IPv4 MDT address family view, the command enables the capability to exchange MDT information. For multicast VPNs, you must configure this command in BGP IPv4 MDT address family view on PEs.
· In BGP IPv4 MVPN address family view, the command enables the capability to exchange IPv4 MVPN routes. For multicast VPNs, you must enable PEs to exchange IPv4 MVPN routes.
· In BGP IPv6 MVPN address family view, the command enables the capability to exchange IPv6 MVPN routes. For multicast VPNs, you must enable PEs to exchange IPv6 MVPN routes.
· In BGP IPv4 flowspec address family view, the command enables the capability to exchange IPv4 flowspec routing information. It also adds the learned routes to the BGP IPv4 flowspec routing table.
· In BGP IPv6 flowspec address family view, the command enables the capability to exchange IPv6 flowspec routing information.
· In BGP-VPN IPv4 flowspec address family view, the command enables the capability to exchange IPv4 flowspec routing information. It also adds the learned routes to the BGP IPv4 flowspec routing table of the VPN instance.
· In BGP-VPN IPv6 flowspec address family view, the command enables the capability to exchange IPv6 flowspec routing information. It also adds the learned routes to the BGP IPv6 flowspec routing table of the VPN instance.
· In BGP VPNv4 flowspec address family view, the command enables the capability to exchange VPNv4 flowspec routing information. It also adds the learned routes to the BGP VPNv4 flowspec routing table of the VPN instance. In an MPLS L3VPN network, execute the command on PE devices in BGP VPNv4 flowspec address family view.
· In BGP VPNv6 flowspec address family view, the command enables the capability to exchange VPNv6 flowspec routing information. It also adds the learned routes to the BGP VPNv6 flowspec routing table of the VPN instance. In an IPv6 MPLS L3VPN network, execute the command on PE devices in BGP VPNv6 flowspec address family view.
· In BGP IPv4 RT filter address family view, the command enables the capability to exchange IPv4 RT filter routing information. In an MPLS L3VPN network, execute the command on PE devices in BGP IPv4 RT filter address family view.
The undo peer enable command disables BGP to exchange routing information for the corresponding address family with the peer.
Executing the peer enable command for a peer group might cause session re-establishment to some peers in the peer group. Make sure you fully understand this impact on the network before executing the command.
# In BGP IPv4 unicast address family view, enable BGP to exchange IPv4 unicast routing information with peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 enable
display bgp peer
peer fake-as
Use peer fake-as to advertise a fake AS number to a peer or peer group.
Use undo peer fake-as to remove the fake AS number advertised to a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } fake-as as-number [ dual-as | prepend-fake-as | prepend-global-as ] *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } fake-as
No fake local AS number is advertised to a peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises a fake AS number to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises a fake AS number to all dynamic peers in the subnet.
as-number: Specifies a fake AS number, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
dual-as: Supports both the real AS number and fake AS number for peer establishment.
prepend-fake-as: Adds the fake AS number to the AS_PATH attribute in packets received from a peer.
prepend-global-as: Adds the real AS number to the AS_PATH attribute in packets sent to a peer.
After you move a BGP router from an AS to another AS (from AS 2 to AS 3 for example), you have to modify the AS number of the router on all its EBGP peers. To avoid such modifications, you can configure the router to advertise a fake AS number 2 to its EBGP peers so that the EBGP peers still think that Router A is in AS 2.
If you execute the peer fake-as command on the local router, specify the local router's AS number on the peer as the fake local AS number specified in the command.
The prepend-fake-as and prepend-global-as keywords take effect only when BGP establishes a session to its peer using a fake AS number.
When you specify the dual-as keyword, BGP initiates session requests to a peer using the real AS number and fake AS number in turn until a session is established. The first session request contains the real AS number. When the session goes down and BGP re-initiates session requests to the peer, the first session request contains the most recent AS number before the session goes down.
The peer fake-as command is applicable only to EBGP peers or peer groups. When you execute the peer fake-as command and set the fake AS number to the AS number of the peer, follow these restrictions and guidelines:
· If the BGP connection is established successfully by using the fake AS number, BGP considers the peer as an IBGP peer. If the BGP connection is established successfully by using the actual AS number, BGP considers the peer as an EBGP peer.
· You can configure features supported only by IBGP peers and features supported only by EBGP peers for the peer, but only features supported by the peer take effect.
· BGP clears configuration taking effect on only IBGP peers for the peer after you perform either of the following tasks:
¡ Execute the peer fake-as command and set the value of the as-number argument to a different value from that of the peer as-number command.
¡ Execute the undo peer fake-as command.
# In BGP instance view, advertise a fake AS number of 200 to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test fake-as 200
peer filter-policy
Use peer filter-policy to filter routes advertised to or received from a peer or peer group by using an ACL.
Use undo peer filter-policy to remove the ACL specified to filter routes advertised to or received from a peer or peer group.
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy { ipv4-acl-number | name ipv4-acl-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy [ ipv4-acl-number | name ipv4-acl-name ] { export | import }
In BGP VPNv4 address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } filter-policy { acl-number | name acl-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] } filter-policy [acl-number | name acl-name ] { export | import }
In BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy { acl6-number | name acl6-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy [acl6-number | name acl6-name ] { export | import }
In BGP VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] } filter-policy { acl6-number | name acl6-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] } filter-policy [acl6-number | name acl6-name ] { export | import }
In BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy { mac-acl-number | name mac-acl-name } { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } filter-policy [ mac-acl-number | name mac-acl-name ] { export | import }
No ACL-based filtering is configured.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command filters routes advertised to or received from all dynamic peers in the subnet by using an ACL.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command filters routes advertised to or received from all dynamic peers in the subnet by using an ACL.
acl-number: Specifies an ACL by its number in the range of 2000 to 3999.
name acl-name: Specifies an IPv4 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
acl6-number: Specifies an IPv6 ACL by its number in the range of 2000 to 3999.
name acl6-name: Specifies an IPv6 ACL by its name, a case-insensitive string of 1 to 63 characters starting with a letter. The ACL name cannot be all.
mac-acl-number: Specifies a Layer 2 ACL by its number in the range of 4000 to 4999.
name mac-acl-number: Specifies an ACL to match the MAC addresses in the routes. The mac-acl-number argument specifies a Layer 2 ACL by its name, a case-insensitive string of 1 to 63 characters. The ACL name must start with a letter and cannot be all.
export: Filters routes advertised to the peer/peer group.
import: Filters routes received from the peer/peer group.
The specified ACL used by the peer filter-policy command must have been created with the acl command in system view. Otherwise, all routes can pass the ACL.
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny | permit } source source-address source-wildcard command, the command matches routes whose destination network addresses match the source-address source-wildcard argument without matching the masks of the destination addresses.
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using one of the following steps:
· To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command.
· To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the destination address. For the mask configuration to take effect, specify a contiguous subnet mask.
When you filter BGP EVPN routes by using a Layer 2 ACL, the rule configured by using the rule [ rule-id ] { deny | permit } dest-mac dest-address dest-mask command matches the MAC addresses in MAC/IP advertisement routes, and the other rules in this ACL do not take effect.
# In BGP IPv4 unicast address family view, apply ACL 2000 to filter routes advertised to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test filter-policy 2000 export
acl (ACL and QoS Command Reference)
filter-policy export
filter-policy import
peer as-path-acl
peer prefix-list
peer route-policy
peer flap-dampen
Use peer flap-dampen to configure flap dampening for a peer or peer group.
Use undo peer flap-dampen to disable flap dampening for a peer or peer group.
Syntax
peer { group-name | ipv4-address | ipv6-address } flap-dampen [ max-idle-time max-time | min-established-time min-time ]*
undo peer { group-name | ipv4-address | ipv6-address } flap-dampen
Default
Flap dampening is disabled for all peers and peer groups.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
max-time: Specifies the maximum time during which a BGP peer remains in idle state. The value range for this argument is 1 to 65536 seconds, and the default value is 1800 seconds.
min-time: Specifies the minimum time during which a BGP peer remains in Established state so as to exit the dampened state. The value range for this argument is 1 to 4294967295 seconds, and the default value is 600 seconds.
Usage guidelines
Execute this command to dampen a BGP peer when the peer state frequently changes between up and down. BGP increases the idle time of the peer each time the peer comes up until the maximum idle time is reached. To exit the dampened state, the peer must remain in Established state for a time period longer than the minimum established time. After the peer exits the dampened state, BGP resets the idle time of the peer when the peer comes up again.
Set a maximum idle time and a minimum established time based on your network condition.
Examples
# In BGP instance view, enable flap dampening for peer group test, and set the maximum idle time and minimum established time to 800 seconds and 2000 seconds, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test flap-dampen max-idle-time 800 min-established-time 2000
peer graceful-restart timer restart extra
Use peer graceful-restart timer restart extra to set the extra time to wait after the restart timer expires.
Use undo peer graceful-restart timer restart extra to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } graceful-restart timer restart extra { time | no-limit }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } graceful-restart timer restart extra
Default
The extra time to wait after the restart timer expires is 0 seconds.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
time: Specifies the extra time to wait after the restart timer expires, in the range of 0 to 86400 seconds.
no-limit: Sets an unlimited time to wait for BGP session re-establishment.
Usage guidelines
After the active/standby switchover or BGP restart completes, the GR helper marks the routes it learned from the GR restarter as stale routes. If the GR helper fails to establish a BGP session after both the GR timer and the extra timer to wait expire, the GR helper removes the stale routes.
Examples
# Set the extra time to wait after the restart timer expires to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 10.1.100.2 graceful-restart timer restart extra 100
Related commands
graceful-restart timer restart
peer group
Use peer group to add a peer to a peer group.
Use undo peer group to delete a peer from a peer group.
peer { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } group group-name [ as-number as-number ]
undo peer { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } group group-name
No peers exist in a peer group.
BGP-VPN instance view
network-admin
ipv4-address: Specifies a peer by its IPv4 address.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command adds all dynamic peers in the subnet to a peer group.
ipv6-address: Specifies a peer by its IPv6 address.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command adds all dynamic peers in the subnet to a peer group.
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
as-number as-number: Specifies an AS for a peer by its number, an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
You can add a peer to a peer group in the following ways:
· Use the peer as-number command to create a peer and specify its AS number, and then use the peer group command to add the peer to the peer group.
¡ You can specify the as-number keyword for the peer group command. The AS number must be the same as the AS number specified in the peer as-number command.
¡ If you have specified the AS number of the peer group with the peer as-number command, the peer to be added must have the same AS number as the peer group.
¡ To add a peer to an IBGP peer group, the peer must be an IBGP peer.
· Use the peer group command to create a peer and add it to the peer group.
¡ If you have specified the AS number of the peer group with the peer as-number command, you do not need to specify the as-number keyword when you execute the peer group command. This is because the AS number of the peer is the same as the peer group. To specify the as-number keyword for the peer group command, make sure the AS number is the same as the peer group.
¡ If no AS number is specified for an EBGP peer group, specify the as-number keyword when you execute the peer group command.
¡ If no AS number is specified for an IBGP peer group, you do not need to specify the as-number keyword when you execute the peer group command. This is because the AS number of the IBGP peer group is the local AS number. To specify the as-number keyword for the peer group command, make sure the AS number is the same as the local AS number.
If you have specified the AS number of a peer group with the peer as-number command, only the peers with the same AS number can be added to the peer group. All peers in the group share the same AS number. If you have not specified the AS number for a peer group, peers added to it can use their own AS numbers.
After you add a peer to a peer group, you must use the peer enable command to enable BGP to exchange routing information with the peer group.
# In BGP instance view, add peer 10.1.1.1 to EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] group test external
[Sysname-bgp-default] peer 10.1.1.1 group test as-number 2004
group
peer as-number
peer enable
peer high-priority
Use peer high-priority to set a high priority for BGP routes learned from a peer or peer group during optimal route selection.
Use undo peer high-priority to remove the configuration.
Syntax
In BGP IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv4 multicast address family view/BGP IPv6 multicast address family view/BGP LS address family view/BGP VPNv4 address family view/BGP VPNv6 address family view/BGP-VPN IPv4 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP-VPN LS address family view/BGP EVPN address family view/BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } high-priority
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } high-priority
In BGP-VPN VPNv4 address family view/BGP IPv4 RT filter address family view/BGP IPv4 MDT address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } high-priority
undo peer { group-name | ipv4-address [ mask-length ] } high-priority
Default
BGP does not prefer routes learned from any peer or peer groups during optimal route selection.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP LS address family view
BGP VPNv4 address family view/BGP VPNv6 address family view/BGP-VPN VPNv4 address family view
BGP-VPN IPv4 unicast address family view/BGP-VPN IPv6 unicast address family view
BGP-VPN LS address family view
BGP EVPN address family view
BGP IPv4 RT filter address family view
BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view
BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view
BGP IPv4 MDT address family view
BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP prefers routes learned from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP prefers routes learned from all dynamic peers in the subnet.
Usage guidelines
Routes learned from the specified peer or peer group take precedence over routes learned from other peers or peer groups if these routes have the same prefix. BGP uses this rule to continue route selection if it fails to select an optimal route by using the peer type selection rule. If BGP still fails route selection, it uses the IGP metric selection rule to select an optimal route. For more information about the peer type selection and IGP metric selection rules, see BGP route selection in BGP Configuration Guide.
This command takes effect only on BGP routes that are learned in the current address family, and it does not take effect on BGP routes that are added to the routing tables of other instances or address families.
Examples
# In BGP IPv4 unicast address family view, set a high priority for BGP routes learned from peer group test during optimal route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test high-priority
peer ignore
Use peer ignore to disable BGP session establishment with a peer or peer group.
Use undo peer ignore to enable BGP session establishment with a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore [ graceful graceful-time { community { community-number | aa:nn } | local-preference preference | med med } * ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore
BGP can establish a session to a peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP tears down sessions to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP tears down sessions to all dynamic peers in the subnet.
graceful graceful-time: Gracefully shuts down the session to a peer or peer group in the specified graceful shutdown period of time. The value range for the graceful-time argument is 60 to 65535 seconds. If you do not specify this option, the command immediately shuts down the session to the peer or peer group.
community { community-number | aa:nn }: Specifies the community attribute for advertised routes. The community-number argument represents the community sequence number in the range of 1 to 4294967295. The aa:nn argument represents the community number. Both aa and nn are in the range of 0 to 65535. If you do not specify this option, the command does not change the community attribute for advertised routes.
local-preference preference: Specifies the local preference for advertised routes, in the range of 0 to 4294967295. A larger value represents a higher preference. If you do not specify this option, the command does not change the local preference for advertised routes.
med med: Specifies the MED value for advertised routes, in the range of 0 to 4294967295. The smaller the MED value, the higher the route priority. If you do not specify this option, the command does not change the MED value for advertised routes.
CAUTION: · If a session has been established to a peer, executing this command for the peer tears down the session and clears all related routing information. · If sessions have been established to a peer group, executing this command for the peer group tears down the sessions to all peers in the group and clears all related routing information. |
This command enables you to temporarily tear down the BGP session to a peer or peer group. Then you can perform network upgrade and maintenance without needing to delete and reconfigure the peer or peer group. To recover the session, execute the undo peer ignore command.
If you specify the graceful keyword in the peer ignore command, BGP performs the following tasks:
· Gracefully shuts down the session to the specified peer or peer group in the specified graceful shutdown period of time.
· Advertises all routes to the specified peer or peer group and changes the attribute for the advertised routes to the specified value.
· Advertises routes from the specified peer or peer group to other IBGP peers and peer groups and changes the attribute for the advertised routes to the specified value.
For a BGP peer or peer group, the configuration made by the peer ignore command takes precedence over the configuration made by the ignore all-peers command.
# In BGP instance view, disable session establishment with peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 ignore
# In BGP instance view, configure BGP to gracefully shut down the session to peer 1.1.1.1 in 60 seconds, advertise all routes to peer 1.1.1.1, and change the community attribute and local preference for the advertised routes to 1:1 and 200, respectively.
<Sysname> system-view
[Sysname] bgp 1
[Sysname-bgp-default] peer 1.1.1.1 ignore graceful 60 community 1:1 local-preference 200
Related commands
ignore all-peers
peer ignore-first-as
Use peer ignore-first-as to configure BGP to ignore the first AS number of EBGP route updates received from a peer or peer group.
Use undo peer ignore-first-as to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore-first-as
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore-first-as
Default
BGP checks the first AS number of an EBGP-learned route update. If the first AS number is neither that of the BGP peer nor a private AS number, the BGP router disconnects the BGP session to the peer.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP ignores the first AS number of EBGP route updates received from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP ignores the first AS number of EBGP route updates received from all dynamic peers in the subnet.
Usage guidelines
This command takes effect only on the EBGP routes received after you execute this command. If you execute the peer ignore-first-as and then the undo peer ignore-first-as commands, BGP advertises a ROUTE-REFRESH message to request the routing information from the EBGP peer or peer group.
Examples
# In BGP instance view, configure BGP to ignore the first AS number of EBGP route updates received from peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test ignore-first-as
Related commands
ignore-first-as
peer ignore-originatorid
Use peer ignore-originatorid to configure BGP to ignore the ORIGINATOR_ID attribute in BGP route updates.
Use undo peer ignore-originatorid to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore-originatorid
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore-originatorid
BGP does not ignore the ORIGINATOR_ID attribute in BGP route updates.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP ignores the ORIGINATOR_ID attribute in BGP route updates from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP ignores the ORIGINATOR_ID attribute in BGP route updates from all dynamic peers in the subnet.
Before using this command, make sure it does not cause any routing loops to the network.
Before forwarding a route received from a client, the route reflector adds an ORIGINATOR_ID attribute (the router ID of the client) to the route. By default, BGP drops incoming route updates whose ORIGINATOR_ID attribute is the same as the local router ID.
Some networks such as firewall networks require BGP to accept such route updates. To meet the requirement, you must configure BGP to ignore the ORIGINATOR_ID attribute.
After you execute this command, BGP also ignores the CLUSTER_LIST attribute.
# In BGP instance view, configure BGP to ignore the ORIGINATOR_ID attribute in BGP route updates from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 ignore-originatorid
peer ipsec-profile
Use peer ipsec-profile to apply an IPsec profile to an IPv6 BGP peer or peer group.
Use undo peer ipsec-profile to remove the IPsec profile from an IPv6 BGP peer or peer group.
peer { group-name | ipv6-address [ prefix-length ] } ipsec-profile profile-name
undo peer { group-name | ipv6-address [ prefix-length ] } ipsec-profile
No IPsec profile is configured for any IPv6 BGP peers or peer groups.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command applies an IPsec profile to all dynamic peers in the subnet.
profile-name: Specifies an IPsec profile by its name, a case-sensitive string of 1 to 63 characters.
IPsec can protect IPv6 BGP packets from data eavesdropping, tampering, and attacks caused by forged IPv6 BGP packets.
When two IPv6 BGP neighbor devices, for example Device A and Device B, are configured with IPsec, Device A encapsulates an IPv6 BGP packet with IPsec before sending it to Device B. If Device B successfully receives and decapsulates the packet, it establishes an IPv6 BGP peer relationship with Device A or learns IPv6 BGP routes to Device A. If Device B receives but fails to decapsulate the packet, or receives a packet not protected by IPsec, it discards the packet.
To use IPsec to protect IPv6 BGP packets, take the following steps:
1. Configure an IPsec transform set.
2. Configure a manual IPsec profile.
3. Execute this command to apply the IPsec profile to an IPv6 BGP peer or peer group.
For more information about IPsec transform sets and IPsec profiles, see Security Configuration Guide.
This command supports only IPsec profiles in manual mode.
If you configure IPsec on a device, you must configure IPsec on its IPv6 BGP peer. Otherwise, the peer cannot receive IPv6 BGP packets from the device.
# In BGP instance view, apply IPsec profile profile001 to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test ipsec-profile profile001
display bgp group
display bgp peer
peer keep-all-routes
Use peer keep-all-routes to save all route updates from a peer or peer group, regardless of whether the routes have passed the configured routing policy.
Use undo peer keep-all-routes to remove the configuration.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } keep-all-routes
undo peer { group-name | ipv4-address [ mask-length ] } keep-all-routes
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } keep-all-routes
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } keep-all-routes
Route updates from a peer or peer group are not saved.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command saves all route updates from all dynamic peers in the subnet, regardless of whether the routes have passed the configured routing policy.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command saves all route updates from all dynamic peers in the subnet, regardless of whether the routes have passed the configured routing policy.
To implement BGP session soft-reset when the local router and a peer or peer group do not support the route refresh feature, use the peer keep-all-routes command. The command saves all route updates received from the peer or peer group. After modifying the route selection policy, filter all saved routes with the new policy to refresh the routing table. This method avoids tearing down BGP sessions.
When you configure this command, follow these restrictions and guidelines:
· For a peer that has negotiated with BGP to support route refresh, BGP sends a route-refresh message to the peer after you execute this command.
· For a peer that has not negotiated with BGP to support route refresh, this command takes effect only on routes received after the command is executed. To save all routes received before this command is executed, use the reset bgp command to reset the BGP session.
# In BGP IPv4 unicast address family view, save all route updates from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 keep-all-routes
keep-all-routes
peer capability-advertise route-refresh
peer keychain
Use peer keychain to enable keychain authentication for a BGP peer or peer group.
Use undo peer keychain to remove keychain authentication for a BGP peer or peer group.
peer { group-name | ip-address [ mask-length ] | ipv6-address [ prefix-length ] } keychain keychain-name
undo peer { group-name | ip-address [ mask-length ] | ipv6-address [ prefix-length ] } keychain
Keychain authentication is disabled.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ip-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ip-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables keychain authentication for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables keychain authentication for all dynamic peers in the subnet.
keychain-name: Specifies a keychain by its name, a case-sensitive string of 1 to 63 characters. The keychain must have been created.
Keychain authentication enhances the security of BGP in the following ways:
· BGP peers can establish TCP connections only when they use the same key for keychain authentication.
· The keys used by the BGP peers at the same time must have the same ID.
· The keys with the same ID must use the same authentication algorithm and key string.
BGP supports the HMAC-MD5, MD5, HMAC-SHA-256, HMAC-SM3, and SM3 authentication algorithms. To specify an authentication algorithm for a key, use the authentication-algorithm command.
The ID of keys used for authentication can only be in the range of 0 to 63. To create a key, use the key command.
The peer keychain and peer password commands are mutually exclusive.
# In BGP instance view, configure peer 10.1.1.1 to use keychain abc for authentication.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 10.1.1.1 as-number 100
[Sysname-bgp-default] peer 10.1.1.1 keychain abc
authentication-algorithm (Security Command Reference)
key (Security Command Reference)
peer label-route-capability
Use peer label-route-capability to enable BGP to exchange labeled routes with a peer or peer group.
Use undo peer label-route-capability to disable BGP from exchanging labeled routes with a peer or peer group.
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } label-route-capability
undo peer { group-name | ipv4-address [ mask-length ] } label-route-capability
In BGP-VPN IPv6 unicast address family view:
peer ipv4-address [ mask-length ] label-route-capability
undo peer ipv4-address [ mask-length ] label-route-capability
BGP cannot exchange labeled routes with a peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP exchanges labeled routes with all dynamic peers in the subnet.
On an inter-AS option C network, use this command in BGP IPv4 unicast or BGP-VPN IPv4 unicast address family view to exchange labeled IPv4 unicast routes for inter-AS public LSP establishment.
On a 6PE network, use this command in BGP IPv6 unicast address family view to exchange labeled IPv6 unicast routes for forwarding IPv6 packets over an IPv4 network.
# In BGP IPv4 unicast address family view, enable BGP to exchange labeled IPv4 routes with peer 2.2.2.2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 2.2.2.2 label-route-capability
peer log-change
Use peer log-change to enable logging for BGP session state changes for a peer or peer group.
Use undo peer log-change to disable logging for BGP session state changes for a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } log-change
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } log-change
Logging for BGP session state changes is enabled for all peers or peer groups.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must already exist.
ipv4-address: Specifies the IPv4 address of a peer. The peer must already exist.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables the logging of BGP session state changes for all dynamic peers in the subnet.
ipv6-address: Specifies the IPv6 address of a peer. The peer must already exist.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables the logging of BGP session state changes for all dynamic peers in the subnet.
After you execute both the log-peer-change and peer log-change commands, BGP logs session establishment and disconnection events for the peer or peer group. To view the log information, use the display bgp peer ipv4 unicast log-info command or the display bgp peer ipv6 unicast log-info command. The logs are sent to the information center of the device. The output rules of the logs (whether to output the logs and where to output) are determined by the information center configuration. For more information about information center configuration, see Network Management and Monitoring Configuration Guide.
If you disable logging for BGP session state changes globally or disable logging for a peer or peer group, BGP does not generate logs for session establishments and disconnections.
# In BGP instance view, enable logging for BGP session state changes for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 200
[Sysname-bgp-default] peer 1.1.1.1 log-change
display bgp peer
log-peer-change
peer low-memory-exempt
Use peer low-memory-exempt to configure BGP to protect EBGP peers or peer groups when the memory usage reaches level 2 threshold.
Use undo peer low-memory-exempt to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } low-memory-exempt
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } low-memory-exempt
When the memory usage reaches level 2 threshold, BGP tears down an EBGP session to release memory resources periodically.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP protects all dynamic peers in the subnet when the memory usage reaches level 2 threshold.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP protects all dynamic peers in the subnet when the memory usage reaches level 2 threshold.
When level 2 memory usage threshold is reached, BGP tears down an EBGP session to release memory resources periodically until the memory usage is exempt from level 2 threshold. You can use this command to avoid tearing down the BGP session to an EBGP peer when memory usage reaches level 2 threshold. For more information about thresholds, see Fundamentals Configuration Guide.
# In BGP instance view, configure BGP to protect EBGP peer 1.1.1.1 when the memory usage reaches level 2 threshold.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 200
[Sysname-bgp-default] peer 1.1.1.1 low-memory-exempt
peer mpls-local-ifnet disable
Use peer mpls-local-ifnet disable to disable MPLS local IFNET tunnel establishment to the specified EBGP peer or peer group.
Use undo peer mpls-local-ifnet disable to restore the default.
Syntax
peer { group name | ipv4-address [ mask-length ] } mpls-local-ifnet disable
undo peer { group name | ipv4-address [ mask-length ] } mpls-local-ifnet disable
Default
MPLS local IFNET tunnel establishment is enabled. Two MP-EBGP peers automatically establish an MPLS local IFNET tunnel after they exchange labeled routes and VPNv4 routes.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, the command takes effect on all dynamic peers in the subnet.
Usage guidelines
An MPLS local IFNET tunnel is automatically established between MP-EBGP peers. Only directly connected MP-EBGP peers are able to forward traffic through this tunnel.
For two indirectly connected MP-EBGP peers, traffic between them is interrupted upon failover to the MPLS local IFNET tunnel. To avoid this issue, you can disable BGP from establishing MPLS local IFNET tunnels to the specified EBGP peer or peer group.
When you configure this command, follow these restrictions and guidelines:
· Disabling MPLS local IFNET tunnel establishment deletes the MPLS local IFNET tunnels already established to the specified EBGP peer or peer group.
· Disabling BGP from establishing MPLS local IFNET tunnels to directly connected EBGP peers and peer groups will cause traffic loss. Make sure you fully understand the impact before performing the operation.
Examples
# In BGP instance view, create an EBGP peer 1.1.1.1, and then disable MPLS local IFNET tunnel establishment to EBGP peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 200
[Sysname-bgp-default] peer 1.1.1.1 mpls-local-ifnet disable
Related commands
display mpls lsp (MPLS Command Reference)
peer next-hop-invariable
Use peer next-hop-invariable to disable the device from changing the next hop of routes advertised to a peer or peer group.
Use undo peer next-hop-invariable to remove the configuration.
Syntax
In BGP IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP VPNv4 address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } next-hop-invariable
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } next-hop-invariable
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } next-hop-invariable
undo peer { group-name | ipv4-address [ mask-length ] } next-hop-invariable
Default
BGP sets the local device as the next hop for all routes advertised to an EBGP peer or peer group.
BGP sets the local device as the next hop for EBGP routes advertised to an IBGP peer or peer group for BGP VPNv4 and VPNv6 address families. It does not set the local device as the next hop for EBGP routes advertised to an IBGP peer or peer group for other address families. When BGP sends ECMP routes to IBGP peers, it sets the local device IP as the next hop of the optimal route among these routes.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 flowspec address family view
BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view
BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view
BGP VPNv6 flowspec address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command does not change the next hop of routes advertised to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command does not change the next hop of routes advertised to all dynamic peers in the subnet.
Usage guidelines
Two PE devices (for example, PE1 and PE2) in different access networks can communicate and exchange IPv4 and IPv6 routes with each other over the public network. To ensure service scheduling, the next hop of routes on PE1 must be PE2, and vice versa. The PEs need to establish an EBGP relationship with an edge device on the backbone network before exchanging routes with each other. In this case, if the edge device receives routes from a PE, the device will change the next hop of the routes before forwarding them to another PE. To resolve this issue, you can use the peer next-hop-invariable command to disable the edge device from changing the next hop of routes.
The following commands are mutually exclusive when you execute them for the same peer or peer group:
· peer next-hop-local
· peer next-hop-invariable
Examples
# In BGP IPv4 unicast address family view, disable the device from changing the next hop of routes advertised to peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 next-hop-invariable
Related commands
peer next-hop-local
peer next-hop-local
Use peer next-hop-local to set the local device as the next hop for routes sent to a peer or peer group.
Use undo peer next-hop-local to remove the configuration.
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } next-hop-local
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } next-hop-local
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } next-hop-local
undo peer { group-name | ipv4-address [ mask-length ] } next-hop-local
BGP sets the local device as the next hop for all routes sent to an EBGP peer or peer group.
BGP sets the local device as the next hop for EBGP routes sent to an IBGP peer or peer group for BGP VPNv4 and VPNv6 address families. It does not set the local device as the next hop for EBGP routes sent to an IBGP peer or peer group for other address families. When BGP sends ECMP routes to IBGP peers, it sets the local device IP as the next hop of the optimal route among these routes.
BGP IPv4 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command sets the local device as the next hop for routes sent to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command sets the local device as the next hop for routes sent to all dynamic peers in the subnet.
By default, BGP does not set the local device as the next hop for EBGP routes sent to an IBGP peer or peer group. To ensure that an IBGP peer can find the next hop, you can use this command to specify the device as the next hop for routes sent to the IBGP peer.
The following commands are mutually exclusive when you execute them for the same peer or peer group:
· peer next-hop-local
· peer next-hop-invariable
# In BGP IPv4 unicast address family view, specify the device as the next hop for routes sent to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test next-hop-local
Related commands
peer next-hop-invariable
peer nexthop-recursive-policy disable
Use peer nexthop-recursive-policy disable to disable route recursion policy control for routes received from the specified peer or peer group.
Use undo peer nexthop-recursive-policy disable to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } nexthop-recursive-policy disable
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } nexthop-recursive-policy disable
Default
The route recursion policy applies to routes received from the specified peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
Usage guidelines
If you configure routing policy-based recursive lookup for BGP routes, this route recursion policy applies to BGP routes learned from all peers. This command allows you to disable route recursion policy control for routes learned from certain peers, for example, direct EBGP peers.
Examples
# In BGP instance view, disable route recursion policy control for routes received from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 200
[Sysname-bgp-default] peer 1.1.1.1 nexthop-recursive-policy disable
Related commands
protocol nexthop recursive-lookup
peer password
Use peer password to enable MD5 authentication for a BGP peer or peer group.
Use undo peer password to remove MD5 authentication for a BGP peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } password { cipher | simple } password
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } password
MD5 authentication is disabled for a BGP peer or peer group.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables MD5 authentication for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables MD5 authentication for all dynamic peers in the subnet.
cipher: Specifies a password in encrypted form.
simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.
password: Specifies the password. Its encrypted form is a case-sensitive string of 33 to 137 characters. Its plaintext form is a case-sensitive string of 1 to 80 characters.
You can enable MD5 authentication to enhance security using the following methods:
· Perform MD5 authentication when establishing TCP connections. Only the two parties that have the same password configured can establish TCP connections.
· Perform MD5 calculation on TCP segments to avoid modification to the encapsulated BGP packets.
The peer password and peer keychain commands are mutually exclusive.
# In BGP instance view, perform MD5 authentication on the TCP connection between local router 10.1.100.1 and peer router 10.1.100.2. Set the authentication password to aabbcc in plaintext form.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 10.1.100.2 password simple aabbcc
peer path-mtu-discovery enable
Use peer path-mtu-discovery enable to enable path MTU discovery for TCP connections with a peer.
Use undo peer path-mtu-discovery enable to restore the default.
Syntax
peer ipv4-address [ mask-length ] path-mtu-discovery enable
undo peer ipv4-address [ mask-length ] path-mtu-discovery enable
Default
BGP does not perform path MTU discovery for TCP connections with a specific peer.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command applies to all dynamic peers in the subnet.
Usage guidelines
This feature enables BGP to perform path MTU discovery before establishing a TCP connection with the specified peer. Then, BGP uses the detected path MTU to calculate the MSS to avoid IP fragmentation by intermediate devices. For more information about path MTU discovery, see IP performance optimization configuration in Layer 3—IP Services Configuration Guide.
To enable path MTU discovery for all IPv4 TCP connections, use the peer path-mtu-discovery enable command.
You can configure the peer path-mtu-discovery enable command together with the peer path-mtu-discovery enable command. The configuration of the latter command takes precedence over that of the former.
Examples
# Enable path MTU discovery for TCP connections with peer 10.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 10.1.1.1 path-mtu-discovery enable
Related commands
path-mtu-discovery enable
peer preferred-value
Use peer preferred-value to set a preferred value for routes received from a peer or peer group.
Use undo peer preferred-value to remove the configuration.
In BGP IPv4 RT filter address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } preferred-value value
undo peer { group-name | ipv4-address [ mask-length ] } preferred-value
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } preferred-value value
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } preferred-value
The preferred value is 0 for routes received from a peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 RT filter address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies a preferred value for routes received from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies a preferred value for routes received from all dynamic peers in the subnet.
value: Specifies a preferred value in the range of 0 to 65535.
If multiple routes that have the same destination are learned from different peers, you can specify different preferred values for the routes as needed to control BGP path selection. The one with the greatest preferred value is selected as the optimal route to the destination.
The preferred value is used for route selection on the local router and is not advertised to the peer. It has only local significance.
You can also use the apply preferred-value command in a routing policy to configure the preferred value for BGP routes. If both the peer preferred-value and apply preferred-value commands are configured, the apply preferred-value command applies. If the preferred value is not set in the routing policy or no routing policy is configured, the peer preferred-value command applies.
# In BGP IPv4 unicast address family view, set the preferred value to 50 for routes from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 preferred-value 50
apply preferred-value
route-policy
peer prefix-list
Use peer prefix-list to specify a prefix list to filter routes received from or advertised to a peer or peer group.
Use undo peer prefix-list to remove the prefix list specified to filter routes received from or advertised to a peer or peer group.
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv4 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length } prefix-list ipv4-prefix-list-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length } prefix-list [ ipv4-prefix-list-name ] { export | import }
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } prefix-list ipv4-prefix-list-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] } prefix-list [ ipv4-prefix-list-name ] { export | import }
In BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } prefix-list ipv6-prefix-list-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } prefix-list [ ipv6-prefix-list-name ] { export | import }
In BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ipv6 prefix-list ipv6-prefix-list-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ipv6 prefix-list [ ipv6-prefix-list-name ] { export | import }
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } prefix-list ipv4-prefix-list-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } prefix-list [ ipv4-prefix-list-name ] { export | import }
No prefix list based filtering is configured.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command uses a prefix list to filter routes received from or advertised to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command uses a prefix list to filter routes received from or advertised to all dynamic peers in the subnet.
ipv6: Uses the specified prefix list to filter IPv6 EVPN routes. In BGP EVPN address family view, this command filters IPv4 EVPN routes if you do not specify this keyword.
ipv4-prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters.
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.
The specified IPv4 prefix list or IPv6 prefix list must have been created with the ip prefix-list or ipv6 prefix-list command in system view. If you specify a nonexistent IPv4/IPv6 prefix list, all routes can pass the prefix list.
In BGP EVPN address family view, this command can filter only IP prefix advertisement routes and MAC/IP advertisement routes that contain host route information.
# In BGP IPv4 unicast address family view, use IPv4 prefix list list1 to filter routes advertised to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test prefix-list list1 export
filter-policy export
filter-policy import
ip prefix-list
ipv6 prefix-list
peer as-path-acl
peer filter-policy
peer route-policy
peer public-as-only
Use peer public-as-only to remove or replace private AS numbers with the local AS number in BGP updates sent to an EBGP peer or peer group.
Use undo peer public-as-only to remove the configuration.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } public-as-only [ { force | limited } [ replace ] [ include-peer-as ] ]
peer { group-name | ipv4-address [ mask-length ] } public-as-only [ force [ include-peer-as ] ] keep-local-as
undo peer { group-name | ipv4-address [ mask-length ] } public-as-only
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } public-as-only [ { force | limited } [ replace ] [ include-peer-as ] ]
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } public-as-only [ force [ include-peer-as ] ] keep-local-as
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } public-as-only
In BGP VPNv4 address family view/BGP VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } public-as-only [ { force | limited } [ replace ] [ include-peer-as ] ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } public-as-only
BGP updates sent to an EBGP peer or peer group can carry both public and private AS numbers.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command removes private AS numbers in BGP updates sent to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command removes private AS numbers in BGP updates sent to all dynamic peers in the subnet.
force: Removes or replaces all private AS numbers with the local AS number.
limited: Removes or replaces all private AS numbers on the left of the first non-private AS number.
replace: Replaces all private AS numbers with the local AS number. If you do not specify this keyword, this command removes all private AS numbers in BGP updates.
include-peer-as: Removes or replaces the AS number of the specified peer or peer group if it is a private AS. If you do not specify this keyword, this command does not remove or replace the AS number of the specified peer or peer group.
keep-local-as: Removes all private AS numbers except for the local one from the AS path attribute.
IMPORTANT: Use this feature with caution, because changing the AS_PATH attribute might cause routing loops. |
Private AS numbers are typically used in test networks, and need not be transmitted in public networks. The range of private AS numbers is from 64512 to 65535.
After you execute the command without specifying the force keyword or the limited keyword, you can get the following results:
· If the AS_PATH attribute of a BGP update carries only private AS numbers, the device removes the AS numbers before sending the update to the EBGP peer or peer group.
· The command does not take effect in either of the following situations:
¡ The AS_PATH attribute carries both public and private AS numbers.
¡ The AS_PATH attribute carries AS numbers of the peer or peer group.
This command is applicable only to EBGP peers and peer groups.
# In BGP IPv4 unicast address family view, remove private AS numbers in BGP updates sent to EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test public-as-only
peer reflect-client
Use peer reflect-client to configure the device as a route reflector and specify a peer or peer group as a client.
Use undo peer reflect-client to remove the configuration.
In BGP L2VPN address family view/BGP IPv4 MDT address family view/BGP IPv4 RT filter address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } reflect-client
undo peer { group-name | ipv4-address [ mask-length ] } reflect-client
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP LS address family view/BGP-VPN LS address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } reflect-client
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } reflect-client
Neither the route reflector nor the client is configured.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP LS address family view
BGP-VPN LS address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 MDT address family view
BGP IPv4 RT filter address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures the device as a route reflector and specifies all dynamic peers in the subnet as clients.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures the device as a route reflector and specifies all dynamic peers in the subnet as clients.
Using route reflectors can solve the issue brought by too many IBGP connections. After you configure a device as a route reflector in an AS, it advertises routes as follows:
· Advertises routes received from a non-client IBGP peer to all clients.
· Advertises routes received from an IBGP peer that acts as a client to all peers.
· Advertises routes received from an EBGP peer to all peers.
# In BGP IPv4 unicast address family view, configure the local device as a route reflector and specify IBGP peer group test as a client.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test reflect-client
reflect between-clients
reflect change-path-attribute
reflector cluster-id
peer reflect-nearby-group
Use peer reflect-nearby-group to specify a peer or peer group as a client of the nearby cluster.
Use undo peer reflect-nearby-group to remove a peer or peer group from the nearby cluster.
Syntax
In BGP VPNv4 address family view/BGP VPNv6 address family view:
peer { group-name | ipv4-address [ mask-length ] } reflect-nearby-group
undo peer { group-name | ipv4-address [ mask-length ] } reflect-nearby-group
In BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } reflect-nearby-group
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } reflect-nearby-group
Default
The nearby cluster does not have any clients.
Views
BGP EVPN address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet as clients of the nearby cluster.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet as clients of the nearby cluster.
Usage guidelines
The RR does not change the next hop of routes reflected to clients in the nearby cluster.
After you specify the RR as the next hop of routes to be reflected, you can execute this command to add a peer or peer group to the nearby cluster. Then, the RR does not change the next hop of routes reflected to the peer or peer group.
To specify the RR as the next hop of routes to be reflected, perform one of the following tasks:
· Execute the reflect change-path-attribute command on the RR to allow the RR to change the attributes of routes to be reflected. Then, execute the peer next-hop-local command to set the local router as the next hop of routes sent to a peer or peer group.
· Execute the reflect change-path-attribute command on the RR to allow the RR to change the attributes of routes to be reflected. Then, use a routing policy to set the RR as the next hop of routes to be reflected.
Examples
# In BGP VPNv4 address family view, specify peer 1.1.1.1 as a client of the nearby cluster.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family vpnv4
[Sysname-bgp-default-vpnv4] peer 1.1.1.1 reflect-nearby-group
peer route-limit
Use peer route-limit to set the maximum number of routes that can be received from a peer or peer group.
Use undo peer route-limit to remove the configuration.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view/BGP IPv4 RT filter address family view/BGP L2VPN address family view/BGP IPv4 MDT address family view:
peer { group-name | ipv4-address [ mask-length ] } route-limit prefix-number [ { alert-only | discard | reconnect reconnect-time } | percentage-value ] *
undo peer { group-name | ipv4-address [ mask-length ] } route-limit
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP IPv4 flowspec address family view/BGP-VPN IPv4 flowspec address family view/BGP VPNv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv6 flowspec address family view/BGP EVPN address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view/BGP IPv4 MVPN address family view/BGP IPv6 MVPN address family view/BGP LS address family view/BGP-VPN LS address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-limit prefix-number [ { alert-only | discard | reconnect reconnect-time } | percentage-value ] *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-limit
The number of routes that can be received from a peer or peer group is not limited.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP VPNv6 address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view
BGP EVPN address family view
BGP IPv4 RT filter address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP LS address family view
BGP-VPN LS address family view
BGP L2VPN address family view
BGP IPv4 MDT address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies the maximum number of routes that can be received from all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies the maximum number of routes that can be received from all dynamic peers in the subnet.
prefix-number: Specifies the number of routes that can be received from the peer or peer group. The value range for this argument is 1 to 4294967295. The router will tear down the session to the peer or peer group if the following conditions exist:
· The alert-only, discard, and reconnect keywords are not specified.
· The number of routes received from the peer or peer group reaches the prefix-number.
The router will not attempt to re-establish the session to a dynamic BGP peer until the router receives a connection request from the peer. For other peers, you can use the reset bgp command to re-establish the sessions.
alert-only: If the number of routes received from the peer or peer group reaches the prefix-number, the router generates a log message instead of tearing down the session to the peer or peer group. The router can continue to receive routes from the peer or peer group.
discard: If the number of routes received from the peer or peer group reaches the prefix-number, the router retains the session to the peer or peer group. However, it discards excess routes and generates a log message. After the number of routes received from the peer or peer group falls below the prefix-number, the router can continue to receive routes from the peer or peer group. To restore the discarded routes, use the refresh bgp import command to request the peer or peer group to resend the routes.
reconnect reconnect-time: Specifies a reconnect time. After the specified time is reached, the router re-establishes a session to the peer or peer group when the number of routes received from the peer or peer group reaches the prefix-number. The value range for the reconnect-time argument is 1 to 65535 seconds. This option is not available for dynamic BGP peers.
percentage-value: Specifies the threshold value for the router to generate a log message (the router generates a log message when the ratio of the number of received routes to the prefix-number exceeds the percentage value). The value range for this argument is 1 to 100, and the default is 75.
Usage guidelines
In BGP EVPN address family view, follow these guidelines when you use the peer route-limit or peer macip-route-limit command:
· Both the peer route-limit and peer macip-route-limit commands can control the number of BGP EVPN routes that can be received from a peer or peer group.
¡ The peer route-limit command takes effect on all types of EVPN routes.
¡ The peer macip-route-limit command takes effect only on MAC/IP advertisement routes.
· If you specify the discard keyword and the number of routes received from the specified peer or peer group is larger than the value of the prefix-number argument, routes that are already received will not be discarded, but subsequent routes from the specified peer or peer group will be discarded.
· For the same peer or peer group, the peer route-limit command is mutually exclusive with the peer macip-route-limit command.
# In BGP IPv4 unicast address family view, set the maximum number of routes that can be received from peer 1.1.1.1 to 10000. Configure the router to tear down the session to the peer if the number is exceeded.
<Sysname> system-view
[Sysname] bgp 109
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 route-limit 10000
Related commands
peer macip-route-limit (EVPN Command Reference)
peer route-mode
Use peer route-mode enable BGP to send routes exchanged with the specified monitored peer or peer group to the BMP server
Use undo peer route-mode to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-mode { adj-rib-in { pre-policy | post-policy | both } | adj-rib-out { pre-policy | post-policy | both } } *
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-mode
Default
BGP determines whether to send routes exchanged with a peer or peer group to the BMP server based on the following configurations:
· Configuration of the route-mode adj-rib-in command in BMP server view.
· Configuration of the route-mode adj-rib-out command in BMP server view.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies all dynamic peers in the subnet.
adj-rib-in: Sends routes received from the specified monitored peer or peer group to the BMP server.
adj-rib-out: Sends routes advertised to the specified monitored peer and peer group to the BMP server.
pre-policy: Sends routes to the BMP server without route filtering.
post-policy: Sends routes to the BMP server after route filtering.
both: Sends both filtered and unfiltered routes to the BMP server.
Usage guidelines
To enable BGP to send routes exchanged with a peer or peer group to the BMP server, make sure BGP has established a TCP connection to the BMP server.
The configuration of the route-mode adj-rib-in or route-mode adj-rib-out command in BMP server view takes effect on all peers and peer groups. The configuration of the peer route-mode command in BGP instance view or BGP-VPN instance view takes effect only on the specified peer or peer group.
For a peer, the following rules apply when BGP determines the type of routes to send to the BMP server:
· The route type specified by the peer route-mode command takes precedence over that specified by the bmp server monitor current-instance route-mode command.
· The route type specified by the bmp server monitor current-instance route-mode command takes precedence over that specified by the bmp server monitor all-vpn-instance route-mode command.
· The route type specified by the bmp server monitor all-vpn-instance route-mode command takes precedence over that specified by the route-mode adj-rib-out or route-mode adj-rib-out command.
If you execute this command multiple times for a peer or peer group, the most recent configuration takes effect.
Examples
# Send routes received from peer 1.1.1.1 to the BMP server without route filtering.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 route-mode adj-rib-in pre-policy
Related commands
bmp server monitor current-instance
bmp server monitor all-vpn-instance
route-mode adj-rib-in
route-mode adj-rib-out
peer route-policy
Use peer route-policy to apply a routing policy to routes incoming from or outgoing to a peer or peer group.
Use undo peer route-policy to remove the configuration.
In BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } route-policy route-policy-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] } route-policy { export | import }
In BGP-VPN VPNv4 address family view:
peer { group-name | ipv4-address [ mask-length ] } route-policy route-policy-name import
undo peer { group-name | ipv4-address [ mask-length ] } route-policy import
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view/BGP IPv4 flowspec address family view/BGP-VPN IPv4 flowspec address family view/BGP VPNv4 flowspec address family view/BGP IPv6 flowspec address family view/BGP-VPN IPv6 flowspec address family view/BGP VPNv6 flowspec address family view/BGP IPv4 SR policy address family view/BGP IPv6 SR policy address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-policy route-policy-name { export | import }
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-policy { export | import }
No routing policy is applied to routes incoming from or outgoing to a peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
BGP IPv4 flowspec address family view/BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view/BGP-VPN IPv6 flowspec address family view
BGP VPNv4 flowspec address family view/BGP VPNv6 flowspec address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command applies a routing policy to routes incoming from or outgoing to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command applies a routing policy to routes incoming from or outgoing to all dynamic peers in the subnet.
route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
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.
The specified routing policy must have been configured with the route-policy command in system view. If you specify a nonexistent routing policy, the following rules apply:
· If the route-policy non-exist-deny command is not executed, all routes can pass the routing policy.
· If the route-policy non-existent-deny command is executed, no route can pass the routing policy.
The apply clause used to modify the AS_PATH attributes in the specified routing policy does not take effect on routes advertised to IBGP peers or peer groups.
The if-match interface command, if configured for the applied routing policy, does not take effect on routes.
# In BGP IPv4 unicast address family view, apply routing policy test-policy to routes outgoing to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test route-policy test-policy export
filter-policy export
filter-policy import
peer as-path-acl
peer filter-policy
peer prefix-list
route-policy
route-policy non-exist-deny
peer route-server-client
Use peer route-server-client to configure the device as a route server and specify a peer or peer group as a client.
Use undo peer route-server-client to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-server-client
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-server-client
Default
Neither the route server nor the client is configured.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures the device as a route server and specifies all dynamic peers in the subnet as clients.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures the device as a route server and specifies all dynamic peers in the subnet as clients.
Usage guidelines
Some networks require the border devices in multiple ASs to establish full mesh connections, which consumes many network resources and reduces device performance. To resolve this issue, configure a device as a route server and the border devices in different ASs as its clients as needed. The route server advertises routes to the clients without changing their AS path, next hop, and MED attributes. The clients can exchange routes without establishing EBGP connections and forward traffic to each other without route server configuration.
The packets advertised to the clients does not carry the AS number of the route server. To avoid peer establishment failures, execute the peer ignore-first-as command on the clients.
This command is mutually exclusive with one of the following commands:
· peer label-route-capability
· confederation id
· confederation peer-as
· confederation nonstandard
Examples
# Configure peer group test as a client in BGP IPv4 unicast address family view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer test route-server-client
peer route-update-interval
Use peer route-update-interval to specify an interval for sending the same update to a peer or peer group.
Use undo peer route-update-interval to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-update-interval interval
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } route-update-interval
The interval for sending the same update to an IBGP peer is 15 seconds and the interval for sending the same update to an EBGP peer is 30 seconds.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies an interval for sending the same update to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies an interval for sending the same update to all dynamic peers in the subnet.
interval: Specifies a minimum interval for sending the same UPDATE message, in the range of 0 to 600 seconds.
A BGP router sends an UPDATE message to its peers when a route is changed. If the route changes frequently, the BGP router sends many updates for the route, resulting in routing flaps. By configuring the interval for sending the same update to a peer or peer group, you can avoid such routing flaps.
This command does not take effect on withdrawn routes. For withdrawn routes, BGP sends the withdrawal messages immediately.
# In BGP instance view, set the interval for sending the same update to peer group test to 10 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test as-number 100
[Sysname-bgp-default] peer test route-update-interval 10
peer soo
Use peer soo to configure the Site of Origin (SoO) attribute for a BGP peer or peer group.
Use undo peer soo to remove the configuration.
In BGP-VPN VPNv4 address family view/BGP IPv4 labeled unicast address family view/BGP-VPN IPv4 labeled unicast address family view:
peer { group-name | ipv4-address [ mask-length ] } soo site-of-origin
undo peer { group-name | ipv4-address [ mask-length ] } soo
In BGP IPv4 unicast address family view/BGP IPv4 multicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP IPv6 unicast address family view/BGP IPv6 multicast address family view/BGP-VPN IPv6 unicast address family view/BGP VPNv6 address family view/BGP EVPN address family view:
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } soo site-of-origin
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } soo
No SoO attribute is configured for a BGP peer or peer group.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP-VPN VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP EVPN address family view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures the SoO attribute for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures the SoO attribute for all dynamic peers in the subnet.
site-of-origin: Specifies the SoO attribute, a string of 3 to 21 characters. The SoO attribute has the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 100:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, where the minimum value of the AS number is 65536. For example, 65536:1.
· 32-bit IP address/IPv4 address mask length:16-bit user-defined number. For example, 192.168.122.15/24:1.
· 32-bit AS number in dotted format:16-bit user-defined number. For example, 65535.65535:1.
The SoO attribute specifies the site where the route was originated. It prevents advertising a route back to the originating site. If the AS-path attribute is lost, the router can use the SoO attribute to avoid routing loops.
After you configure the SoO attribute for a BGP peer or peer group, BGP adds the SoO attribute into the route updates received from the BGP peer or peer group. Before advertising route updates to the peer or peer group, BGP checks the SoO attribute of the route update against the configured SoO attribute. If they are the same, BGP does not advertise the route updates to the BGP peer or peer group to avoid loops.
If a PE configured with AS number substitution connects to multiple CEs in the same VPN site through different interfaces, routing loops will occur. To avoid routing loops, configure the same SoO attribute for the CEs on the PE.
# In BGP IPv4 unicast address family view, set the SoO attribute to 100:1 for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] peer 1.1.1.1 soo 100:1
peer substitute-as
peer source-address
Use peer source-address to specify a source IPv4 or IPv6 address for establishing TCP connections to a peer or peer group.
Use undo peer source-address to remove the configuration.
peer ipv4-address [ mask-length ] source-address source-ipv4-address
peer ipv6-address [ prefix-length ] source-address source-ipv6-address
undo peer { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } source-address
peer group-name source-address { source-ipv4-address | source-ipv6-address } *
undo peer group-name source-address [ source-ipv4-address | source-ipv6-address ]
BGP uses the primary IPv4 or IPv6 address of the output interface in the optimal route destined for the BGP peer or peer group as the source address for TCP connection establishment.
BGP-VPN instance view
network-admin
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command specifies a source IP address for establishing TCP connections to all dynamic peers in the subnet.
source-ipv4-address: Specifies a source IPv4 address.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command specifies a source IPv6 address for establishing TCP connections to all dynamic peers in the subnet.
source-ipv6-address: Specifies a source IPv6 address.
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
The peer connect-interface command and the peer source-address command can both change the source address for establishing TCP connections. If you execute both commands, the most recent configuration takes effect.
The peer source-address and peer connect-interface commands are applicable to the following scenarios:
· If the peer's IPv4/IPv6 address does not belong to the interface directly connected to the local router. To ensure successful TCP connection establishment, use one of the following methods:
¡ Specify the interface to which the IPv4/IPv6 address belongs as the source interface on the peer.
¡ Specify the IPv4/IPv6 address of the interface directly connected to the local router as the source address on the peer.
· A BGP peer at an IPv6 link-local address must be directly connected to the local router. On the local router, you must use the peer connect-interface command to specify the interface directly connected to the BGP peer as the source interface of TCP connections.
· On a BGP router that has multiple links to a peer, the source interface for TCP connection changes because the primary source interface fails. To avoid this problem, specify a loopback interface as the source interface or specify the IP address of a loopback interface as the source address.
· You want to establish multiple BGP sessions to a router. In this case, BGP might fail to determine the source address for each TCP connection based on the optimal route to the peer. To prevent this problem, use one of the following methods:
¡ If the BGP sessions use IP addresses of different interfaces, specify a source interface or source address for each session.
¡ If the BGP sessions use different IP addresses of the same interface, specify a source address for each session.
The source addresses on the local router and the peer must be reachable to each other.
To specify the address of an indirectly connected interface as the source address, use the peer ebgp-max-hop command. The command allows the establishment of an EBGP session to the indirectly connected peer.
You can specify both a source IPv4 address and a source IPv6 address for a peer group. BGP uses the source IPv4 address to establish TCP connections to IPv4 peers in the group. It also uses the source IPv6 address to establish TCP connections to IPv6 peers in the group.
# In BGP instance view, specify source IPv4 address 1.1.1.1 for peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test source-address 1.1.1.1
peer connect-interface
peer ebgp-max-hop
peer substitute-as
Use peer substitute-as to replace the AS number of a peer or peer group in the AS_PATH attribute with the local AS number.
Use undo peer substitute-as to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } substitute-as
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } substitute-as
The AS number of a peer or peer group in the AS_PATH attribute is not replaced.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command replaces the AS number of all dynamic peers in the subnet in the AS_PATH attribute with the local AS number.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command replaces the AS number of all dynamic peers in the subnet in the AS_PATH attribute with the local AS number.
In MPLS L3VPN, if EBGP is used between PE and CE, sites in different geographical areas must have different AS numbers assigned to ensure correct route advertisement.
If different CEs use the same AS number, you must configure the relevant PE to replace the AS number of the attached CE with its own AS number. Before advertising a route whose AS_PATH attribute contains the AS number of the CE, the PE replaces the CE's AS number with its own AS number. This ensures correct advertisement of private network routes.
# In BGP instance view, substitute the local AS number for the AS number of peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 substitute-as
peer soo
peer tcp-mss
Use peer tcp-mss to set the TCP maximum segment size (MSS) for TCP connections with a peer or peer group.
Use undo peer tcp-mss to restore the default.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } tcp-mss mss-value
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } tcp-mss
Default
The TCP MSS is not set.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. If you use the ipv4-address and mask-length arguments together to specify a subnet, this command applies to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. If you use the ipv6-address and prefix-length arguments together to specify a subnet, this command applies to all dynamic peers in the subnet.
mss-value: Specifies the TCP MSS in bytes. The value range for this argument is 176 to 4096.
Usage guidelines
BGP typically establishes a multihop TCP connection with a peer. Multiple intermediate devices might fragment BGP packets due to their MTU settings, resulting in frequent packet encapsulations and decapsulations that reduce forwarding efficiency.
To resolve this issue, you can execute this command to set the TCP MSS for TCP connections with a peer or peer group. TCP segments sent by the source will not be re-fragmented along the path to the destination.
This command might cause BGP session re-establishment. Make sure you understand the potential impact before executing this command.
During TCP connection establishment with the peer or peer group specified in the peer tcp-mss command, the minimum of the following MSSs takes effect:
· The MSS calculated according to the IPv4 MTU set by the ip mtu command on the peer-facing interface.
· The MSS set by the tcp mss command for the peer-facing interface.
· The MSS calculated according to the path MTU detected by TCP path MTU discovery (enabled with the tcp path-mtu-discovery command).
· The MSS calculated according to the path MTU detected by path MTU discovery (enabled with the path-mtu-discovery enable command or the peer path-mtu-discovery enable command).
· The MSS set by the peer tcp-mss command.
The MSS is calculated by using the following formula:
MSS = path MTU (or interface MTU) – IP header length – TCP header length
For more information about MTU and MSS, see IP performance optimization configuration in Layer 3—IP Services Configuration Guide.
Examples
# Set the TCP MSS to 500 for TCP connections with peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test tcp-mss 500
Warning:This operation might reset the peer session. Continue? [Y/N]:
Related commands
tcp path-mtu-discovery (Layer 3—IP Services Command Reference)
path-mtu-discovery enable
peer path-mtu-discovery enable
peer timer
Use peer timer to set a keepalive interval and hold time for a peer or peer group.
Use undo peer timer to remove the configuration.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer keepalive keepalive hold holdtime
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer
The keepalive interval is 60 seconds and the hold time is 180 seconds.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures a keepalive interval and hold time for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures a keepalive interval and hold time for all dynamic peers in the subnet.
keepalive keepalive: Sets a keepalive interval in the range of 0 to 21845 seconds.
hold holdtime: Sets a hold time in the range of 3 to 65535 seconds. The hold time must be at least three times the keepalive interval.
After establishing a BGP session, two routers send KEEPALIVE messages at the specified keepalive interval to each other to keep the session.
If a router receives no KEEPALIVE or UPDATE message from the peer within the hold time, it tears down the session.
The timers configured with this command are preferred to the timers configured with the timer command.
If the hold time settings on the local and peer routers are different, the smaller one is used.
If the hold time is set to 0, no KEEPALIVE message will be sent to the peer, and the peer session will never time out. If neither the hold time nor the keepalive interval is set to 0, the actual keepalive interval is the smaller one between one third of the hold time and the keepalive interval.
The timers configured with this command do not take effect until a session is re-established (for example, a session is reset).
# In BGP instance view, set the keepalive interval and hold time for peer group test to 60 seconds and 180 seconds, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test timer keepalive 60 hold 180
display bgp peer
timer
peer timer connect-retry
Use peer timer connect-retry to set the session retry timer for a peer or peer group.
Use undo peer timer connect-retry to remove the configuration.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer connect-retry retry-time
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer connect-retry
Default
The session retry timer is 32 seconds a peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command sets a connection retry timer for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command sets a connection retry timer for all dynamic peers in the subnet.
retry-time: Specifies a session retry timer in the range of 1 to 65535 seconds.
Usage guidelines
To speed up session establishment to a peer or peer group and route convergence, set a small session retry timer. If the BGP session flaps, you can set a large session retry timer to reduce the impact.
The timer set by the peer timer connect-retry command takes precedence over the timer set by the timer connect-retry command.
Examples
# In BGP instance view, set the session retry timer to 30 seconds for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 timer connect-retry 30
Related commands
timer connect-retry
peer tracking
Use peer tracking to enable peer unreachability detection.
Use undo peer tracking to disable peer unreachability detection.
Syntax
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } tracking [ delay delay-time ]
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } tracking
Default
Peer unreachability detection is disabled.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command takes effect on all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command takes effect on all dynamic peers in the subnet.
delay delay-time: Sets the delay time of peer disconnection in seconds. The value range for the delay-time argument is 0 to 65535. If you specify this option, BGP disconnects from the specified peer or peer group immediately if that peer or peer group is detected unreachable.
Usage guidelines
Peer unreachability detection enables BGP to discover link failures quickly. With this feature enabled, BGP will disconnect from the specified peer or peer group if that peer or peer group is detected unreachable.
BGP considers a peer unreachable if one of the following conditions exists:
· BGP cannot find a route to that peer in the current routing table.
· BGP finds the route to that peer in the current routing table is a blackhole route.
When you set the delay time of peer disconnection, follow these guidelines to improve network stability:
· To avoid BGP session flappings caused by unstable traffic, make sure the delay time of peer disconnection is longer than the convergence time of IGP routes.
· With peer unreachability detection enabled, the GR helper can detect whether the GR restarter is reachable. To ensure successful GR, make sure the delay time of peer disconnection is longer than the GR timer plus the extra timer to wait.
For more information about the GR timer and the extra timer to wait, see commands "graceful-restart timer restart" and "peer graceful-restart timer restart extra".
This command does not take effect if you enter a link-local address for the ipv6-address argument.
Examples
# Enable peer unreachability detection for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 as-number 200
[Sysname-bgp-default] peer 1.1.1.1 tracking
peer ttl-security
Use peer ttl-security to configure Generalized TTL Security Mechanism (GTSM) for a BGP peer or peer group.
Use undo peer ttl-security to disable BGP GTSM for a peer or peer group.
peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ttl-security hops hop-count
undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ttl-security hops
GTSM is disabled for BGP.
BGP-VPN instance view
network-admin
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures GTSM for all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures GTSM for all dynamic peers in the subnet.
hops hop-count: Specifies the maximum number of hops to the specified peer, in the range of 1 to 254.
GTSM protects a BGP session by comparing the TTL value of an incoming IP packet against the valid TTL range. If the TTL value is within the valid TTL range, the packet is accepted. If not, the packet is discarded.
The valid TTL range is from 255 – the configured hop count + 1 to 255.
When GTSM is configured, the BGP packets sent by the device have a TTL of 255.
When GTSM is configured, the local device can establish an EBGP session to the peer after they pass GTSM check, regardless of whether the maximum number of hops is reached.
To use GTSM, you must configure GTSM on both the local and peer devices. You can specify different hop-count values for them.
Editing the TTL setting clears the statistics about the packets dropped by GTSM.
# In BGP instance view, enable GTSM for BGP peer group test and set the maximum number of hops to the specified peer in the peer group to 1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test ttl-security hops 1
peer ebgp-max-hop
pic
Use pic to enable BGP FRR for a BGP address family.
Use undo pic to disable BGP FRR for a BGP address family.
pic
undo pic
BGP FRR is disabled.
BGP IPv4 unicast address family view
BGP IPv4 multicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP IPv6 multicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
network-admin
FRR is used in a dual-homing network to protect a primary route with a backup route. It uses ARP (for IPv4), ND (for IPv6), or BFD echo packet mode (for IPv4) to detect the connectivity of the primary route. When the primary route fails, BGP directs packets to the backup route.
After you enable FRR, BGP calculates a backup route for each BGP route in the address family if there are two or more unequal-cost routes to reach the destination.
You can also configure BGP FRR by using the fast-reroute route-policy command, which takes precedence over the pic command. For more information about routing policies, see Layer 3—IP Routing Configuration Guide.
Use the pic command with caution because it might cause routing loops in specific scenarios.
# Enable BGP FRR in BGP IPv4 unicast address family view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] pic
port
Use port to specify the port number of the RPKI server.
Use undo port to restore the default.
Syntax
port port-number
undo port
Default
The port number of the RPKI server is not specified.
Views
BGP RPKI server view
Predefined user roles
network-admin
Parameters
port-number: Specifies the port number of the RPKI server, in the range of 1 to 65535.
Usage guidelines
After you specify the IP address and port number of the RPKI server, the device automatically establishes a TCP connection to the server.
Make sure the specified port number is the same as the port number used by the RPKI server.
Changing the port number will cause temporary connection interruption.
Examples
# In BGP RPKI server view, specify 1234 as the port number of the RPKI server.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] port 1234
Related commands
server tcp
preference
Use preference to configure preferences for BGP routes.
Use undo preference to restore the default.
preference { external-preference internal-preference local-preference | route-policy route-policy-name }
undo preference
The preferences of external, internal, and local BGP routes are 255, 255, and 130, respectively.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
network-admin
external-preference: Specifies a preference for EBGP routes, in the range of 1 to 255.
internal-preference: Specifies a preference for IBGP routes, in the range of 1 to 255.
local-preference: Specifies a preference for local routes, in the range of 1 to 255.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set the route preference for matching routes. Routes not matching the routing policy use the default preference.
Different routing protocols might find different routes to the same destination. However, not all of those routes are optimal. For route selection, routing protocols, direct routes, and static routes are assigned different preferences. The route with the highest preference is preferred.
Configuring the preferences for BGP routes changes the possibility for the routes to become the optimal route.
To use a routing policy to set the preference, you must configure the preference with the apply preference command in the routing policy in advance. Otherwise, all matching routes use the default preference.
# In BGP IPv4 unicast address family view, set preferences for EBGP, IBGP, and local routes to 20, 20, and 200, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] preference 20 20 200
primary-path-detect bfd
Use primary-path-detect bfd to configure BGP FRR to use BFD to detect next hop connectivity for the primary route.
Use undo primary-path-detect bfd to restore the default.
primary-path-detect bfd { ctrl | echo }
undo primary-path-detect bfd
BGP FRR uses ARP to detect the connectivity to the next hop of the primary route.
network-admin
ctrl: Uses BFD control packet mode to detect the connectivity to the next hop of the primary route.
echo: Uses BFD echo packet mode to detect the connectivity to the next hop of the primary route.
This command enables BGP to create an IP FRR BFD session that detects next hop connectivity for the primary route. This can speed up primary and backup route switchover when the next hop of the primary route fails.
This command takes effect and creates an IP FRR BFD session only when the primary route has a backup next hop.
BGP does not support backup next hop calculation for the routes used for load balancing. This command cannot take effect when the primary route is an ECMP route. To use BFD sessions to detect nexthop reachability for BGP ECMP routes, configure the primary-path-detect bfd protocol-ecmp bgp or primary-path-detect bfd protocol-ecmp bgp4+ command. For more information about the two commands, see IP routing basics commands in Layer 3—IP Routing Command Reference.
BGP can establish a control-mode BFD session with a peer only after negotiation. To use control-mode BFD to detect the next hop of the primary route, perform one of the following tasks:
· Configure the primary-path-detect bfd command on the peer device of the primary route.
This task is applicable when both ends of the primary route are configured with FRR.
· Manually configure a static BFD session that uses the following settings on the peer device of the primary route:
¡ Source IP address: Destination IP address of the BFD session automatically created on the local device of the primary route.
¡ Destination IP address: Source IP address of the BFD session automatically created on the local device of the primary route.
¡ Remote ID: Local ID of the BFD session automatically created on the local device of the primary route.
When another routing protocol (such as OSPF or IS-IS) uses BFD to detect next hop connectivity for the primary route, it also creates a BFD session. If the detected link is the same as the link attached to the next hop of the BGP primary route, BGP reuses the BFD session created by the protocol. In this situation, BGP will not create an additional BFD session.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# In BGP instance view, configure BGP FRR to use BFD control packet mode to detect next hop connectivity for the primary route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] primary-path-detect bfd ctrl
fast-reroute route-policy
pic
primary-path-detect bfd (Layer 3—IP Routing Command Reference)
pu-monitor-mode enable
Use pu-monitor-mode enable to configure the BMP client to send peer up notifications with mode flags to the BMP server.
Use undo pu-monitor-mode enable to restore the default.
Syntax
pu-monitor-mode enable
undo pu-monitor-mode enable
Default
The BMP client sends peer up notifications without mode flags to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Usage guidelines
Execute this command to configure the BMP client to send peer up notifications with the following flags to the BMP server:
· Adj-RIB-In—The BMP client sends routes received from monitored peers to the BMP server.
· Adj-RIB-Out—The BMP client sends routes advertised to monitored peers to the BMP server.
· pre-policy—The BMP client sends routes to the BMP server without filtering.
· post-policy—The BMP client sends routes to the BMP server after filtering.
By default, the BMP client sends peer up notifications with the Adj-RIB-In and pre-policy flags to the BMP server after you execute this command.
After you add a route sending mode by executing the route-mode adj-rib-in, route-mode adj-rib-out, or peer route-mode command, the BMP client will send peer up notifications with the new mode flag to the BMP server.
Examples
# Configure the BMP client to send peer up notifications with mode flags to the BMP server.
<Sysname> system-view
[Sysname] bmp server 1
[Sysname-bmpserver-1] pu-monitor-mode enable
Related commands
peer route-mode
route-mode adj-rib-in
route-mode adj-rib-out
purge-time
Use purge-time to set the aging time for the ROA information.
Use undo purge-time to restore the default.
Syntax
purge-time purge-time
undo purge-time
Default
The aging time for the ROA information is 60 seconds.
Views
BGP RPKI server view
Predefined user roles
network-admin
Parameters
purge-time: Specifies the aging time for the ROA information, in the range of 30 to 360 seconds.
Usage guidelines
When the connection between a router and an RPKI server goes down (except when the shutdown command is executed), the router takes the following actions:
· Attempts to reconnect to the server.
· Places the ROA information obtained from the server in aging state, and starts the aging timer for the ROA information.
If the router reconnects to the server before the aging timer expires, it releases the ROA information from the aging state. If the router fails to reconnect to the server when the aging timer expires, it deletes the ROA information obtained from the server.
Examples
# Set the aging time for the ROA information to 150 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] purge-time 150
reflect between-clients
Use reflect between-clients to enable route reflection between clients.
Use undo reflect between-clients to disable route reflection between clients.
reflect between-clients
undo reflect between-clients
Route reflection between clients is enabled.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP LS address family view
BGP-VPN LS address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 MDT address family view
BGP IPv4 RT filter address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
network-admin
When a route reflector is configured, and the clients of a route reflector are fully meshed, route reflection is unnecessary because it consumes more bandwidth resources. You can use the undo reflect between-clients command to disable route reflection instead of modifying network configuration or changing network topology.
After route reflection is disabled between clients, routes can still be reflected between a client and a non-client.
# In BGP IPv4 unicast address family view, disable route reflection between clients.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] undo reflect between-clients
peer reflect-client
reflect change-path-attribute
reflect change-path-attribute
Use reflect change-path-attribute to enable the route reflector to change the attributes of routes to be reflected.
Use undo reflect change-path-attribute to restore the default.
Syntax
reflect change-path-attribute
undo reflect change-path-attribute
Default
A route reflector cannot change the attributes of routes to be reflected.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
Predefined user roles
network-admin
Usage guidelines
By default, the route reflector does not change the attributes of routes before route reflection to avoid routing loops. When you replan network traffic, you can use this command to allow the route reflector to change the attributes of the routes to be reflected.
After using the reflect change-path-attribute command, you can use the peer route-policy export command to apply a routing policy that can change the attributes of the routes to be reflected. The following apply commands can define how the routing policy modifies the route attribute:
· Use apply origin to change the ORIGIN attribute of routes.
· Use apply ip-address next-hop or apply ipv6 next-hop to change the NEXT_HOP attribute of routes.
· Use apply cost to change the MED attribute of routes.
· Use apply local-preference to change the local preference for routes.
· Use apply community to configure the COMMUNITY attribute of routes. For BGP to advertise the COMMUNITY attribute to a peer or peer group, use the peer advertise-community command.
· Use apply comm-list delete to delete COMMUNITY attribute values from routes.
· Use apply extcommunity to configure the link bandwidth or RT extended community attribute of routes. For BGP to advertise the extended COMMUNITY attribute to a peer or peer group, use the peer advertise-ext-community command.
· Use apply extcommunity color to configure the color extended community attribute of routes.
· Use apply extcommunity soo to configure the SoO extended community attribute of routes.
· Use apply large-community to configure the large community attribute for BGP routes. For BGP to advertise the large community attribute to a peer or peer group, use the peer advertise-large-community command.
· Use apply large-comm-list delete to delete large community attribute values from routes.
· Use apply aigp to configure the AIGP attribute for BGP routes. For BGP to advertise the AIGP attribute to a peer or peer group, use the peer aigp command.
For more information about the apply commands, see routing policy commands in Layer 3—IP Routing Command Reference.
Examples
# In BGP IPv4 unicast address family view, enable the route reflector to change the attributes of routes to be reflected.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] reflect change-path-attribute
Related commands
peer reflect-client
reflect between-clients
reflector cluster-id
Use reflector cluster-id to configure the cluster ID for a route reflector.
Use undo reflector cluster-id to restore the default.
reflector cluster-id { cluster-id | ipv4-address }
undo reflector cluster-id
A route reflector uses its router ID as the cluster ID.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP LS address family view
BGP-VPN LS address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP IPv4 MDT address family view
BGP IPv4 RT filter address family view
BGP IPv4 SR policy address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP IPv4 flowspec address family view
BGP VPNv4 flowspec address family view
network-admin
cluster-id: Specifies the cluster ID in the format of an integer, in the range of 1 to 4294967295.
ipv4-address: Specifies the cluster ID in the format of an IPv4 address in dotted decimal notation.
The route reflector and clients form a cluster. Typically a cluster has one route reflector. The ID of the route reflector is the cluster ID.
You can configure more than one route reflector in a cluster to improve network reliability and prevent a single point of failure. Use this command to configure the same cluster ID for all route reflectors in the cluster to avoid routing loops.
If you do not configure the peer cluster-id command for a peer or peer group, the peer or peer group uses the cluster ID configured by the reflector cluster-id command.
For a peer or peer group, the cluster ID configured by the peer cluster-id command takes precedence over the cluster ID configured by the reflector cluster-id command.
Do not configure the router ID of a client as the cluster ID.
# In BGP IPv4 unicast address family view, set the cluster ID on the local router (a reflector in the cluster) to 80.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] reflector cluster-id 80
peer cluster-id
peer reflect-client
reflect between-clients
refresh bgp
Use refresh bgp to manually soft-reset BGP sessions.
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | external | group group-name | internal } { export | import } ipv4 [ multicast | mvpn | rtfilter | sr-policy | [ flowspec | labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ]
refresh bgp [ instance instance-name ] ipv6-address [ mask-length ] { export | import } ipv4 [ multicast | mvpn | sr-policy | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ]
refresh bgp [ instance instance-name ] { ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } ipv6 [ multicast | mvpn | [ flowspec | unicast ] [ vpn-instance vpn-instance-name ] | sr-policy ]
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | group group-name | external | internal } { export | import } ipv6 [ multicast | mvpn | sr-policy | [ flowspec | unicast ] [ vpn-instance vpn-instance-name ] ]
refresh bgp [ instance instance-name ] ipv4-address [ mask-length ] { export | import } ipv6 [ unicast | flowspec ] [ vpn-instance vpn-instance-name ]
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } link-state [ vpn ]
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | external | group group-name | internal } { export | import } vpnv4 vpn-instance vpn-instance-name
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } { vpnv4 | vpnv6 }
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | external | group group-name | internal } { export | import } { vpnv6 | vpnv4 } flowspec
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | external | group group-name | internal } { export | import } l2vpn
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } l2vpn evpn
Views
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command soft-resets BGP sessions for the default BGP instance.
ipv4-address: Soft-resets the BGP session to a peer specified by its IP address.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command soft-resets BGP sessions to all dynamic peers in the subnet.
ipv6-address: Soft-resets the BGP session to a peer specified by its IPv6 address.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command soft-resets BGP sessions to all dynamic peers in the subnet.
all: Soft-resets all BGP sessions.
external: Soft-resets all EBGP sessions.
group group-name: Soft-resets the BGP sessions to the peers of the specified peer group. The group-name argument refers to the name of a peer group, a case-sensitive string of 1 to 47 characters.
internal: Soft-resets all IBGP sessions.
export: Performs outbound soft-reset (filters routes advertised to the specified peer or peer group by using the new configuration).
import: Performs inbound soft-reset (filters routes received from the specified peer or peer group by using the new configuration).
ipv4: Soft-resets BGP sessions for IPv4 address family.
ipv6: Soft-resets BGP sessions for IPv6 address family.
link-state: Soft-resets BGP sessions for BGP LS address family.
link-state vpn: Soft-resets BGP sessions for BGP-VPN LS address family.
multicast: Soft-resets BGP sessions for multicast address family.
mvpn: Soft-resets BGP sessions for MVPN address family.
rtfilter: Soft-resets BGP sessions for IPv4 RT filter address family.
sr-policy: Soft-resets BGP sessions for SR policy address family.
unicast: Soft-resets BGP sessions for unicast address family.
vpnv4: Soft-resets BGP sessions for VPNv4 address family.
vpnv6: Soft-resets BGP sessions for VPNv6 address family.
l2vpn: Soft-resets BGP sessions for L2VPN address family.
evpn: Soft-resets BGP sessions for EVPN address family.
flowspec: Soft-resets BGP sessions for flowspec address family.
labeled-unicast: Soft-resets BGP sessions for labeled unicast address family.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command soft-resets BGP sessions for the specified address family on the public network.
A soft-reset operation enables the router to apply a new route selection policy without tearing down BGP connections.
To apply a new policy to outbound BGP sessions, execute this command with the export keyword. The router uses the new policy to filter routing information and sends the routing information that passes the filtering to the BGP peers.
To apply a new policy to inbound sessions, execute this command with the import keyword. The router advertises a ROUTE-REFRESH message to the peer and the peer resends its routing information to the router. After receiving the routing information, the router uses the new policy to filter the routing information.
This command requires that both the local router and the peer support route refresh.
If the peer keep-all-routes command is configured, the refresh bgp import command does not take effect.
By default, the unicast keyword is used if none of the multicast, flowspec, labeled-unicast, sr-policy, and unicast keywords are specified.
# Soft-reset all inbound BGP sessions for the IPv4 unicast address family.
<Sysname> refresh bgp all import ipv4
peer capability-advertise route-refresh
peer keep-all-routes
refresh delay
Use refresh delay to set the refresh route advertisement delay timer.
undo refresh delay to restore the default.
Syntax
refresh delay delay-value
undo refresh delay
Default
The refresh route advertisement delay timer is five seconds.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
delay-value: Specifies the refresh route advertisement delay timer in the range of 0 to 300 seconds.
Usage guidelines
BGP advertises all routes to a peer in the following scenarios:
· BGP establishes a session to the peer for the first time.
· The update group of the peer changes.
· BGP receives route-refresh messages from the peer.
Routes advertised in the above scenarios are called refresh routes.
Configure this command to set the refresh route advertisement delay timer that starts when BGP advertises refresh routes for the first time. BGP delays refresh route advertisement to all peers until the timer expires. After the timer expires, BGP advertises refresh routes to the corresponding peers by update group, which improves route advertisement efficiency and saves system resources.
If you execute this command multiple times, the most recent configuration takes effect.
If you repeat this command to modify the refresh route advertisement delay timer, the new timer takes effect after the original timer expires.
Examples
# Set the refresh route advertisement delay timer to 10 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] refresh delay 10
refresh-time
Use refresh-time to set the RPKI connection check interval.
Use undo refresh-time to restore the default.
Syntax
refresh-time refresh-time
undo refresh-time
Default
The RPKI connection check interval is 600 seconds.
Views
BGP RPKI server view
Predefined user roles
network-admin
Parameters
refresh-time: Specifies the RPKI connection check interval in the range of 15 to 3600 seconds.
Usage guidelines
After a router establishes a TCP connection with an RPKI server, the router checks the connection at the specified interval. If the router does not receive a response from the RPKI server within the specified time period, it tears down the connection to the RPKI server.
Examples
# Set the RPKI connection check interval to 15 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] refresh-time 15
Related commands
response-time
reset bgp
Use reset bgp to reset BGP sessions for the specified address family.
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | all | external | group group-name | internal } ipv4 [ mdt | multicast | mvpn | rtfilter | sr-policy | [ flowspec | labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ]
reset bgp [ instance instance-name ] ipv6-address [ prefix-length ] ipv4 [ multicast | mvpn | sr-policy | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ]
reset bgp [ instance instance-name ] { as-number | ipv6-address [ prefix-length ] | all | external | group group-name | internal } ipv6 [ multicast | mvpn | [ flowspec | unicast ] [ vpn-instance vpn-instance-name ] | sr-policy ]
reset bgp [ instance instance-name ] ipv4-address [ mask-length ] ipv6 [ multicast | mvpn | sr-policy | [ unicast | flowspec ] [ vpn-instance vpn-instance-name ] ]
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | all | external | group group-name | internal } ipv6 mvpn
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } link-state [ vpn ]
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | all | external | group group-name | internal } vpnv4 vpn-instance vpn-instance-name
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } { vpnv4 | vpnv6 } [ flowspec ]
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | all | external | group group-name | internal } l2vpn
reset bgp [ instance instance-name ] { as-number | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } l2vpn evpn
Views
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command resets BGP sessions for the default BGP instance.
as-number: Resets BGP sessions to peers in the AS specified by its number. The AS number is an integer in the range of 1 to 4294967295 or a dotted-decimal string in the range of 0.1 to 65535.65535.
ipv4-address: Resets the BGP session to a peer specified by its IPv4 address.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command resets BGP sessions to all dynamic peers in the subnet.
ipv6-address: Resets the BGP session to a peer specified by its IPv6 address.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command resets BGP sessions to all dynamic peers in the subnet.
all: Resets all BGP sessions.
external: Resets all EBGP sessions.
group group-name: Resets the BGP sessions to the peers in the peer group specified by its name, a case-sensitive string of 1 to 47 characters.
internal: Resets all IBGP sessions.
ipv4: Resets BGP sessions for IPv4 address family.
ipv6: Resets BGP sessions for IPv6 address family.
link-state: Resets BGP sessions for BGP LS address family.
link-state vpn: Resets BGP sessions for BGP-VPN LS address family.
mdt: Resets BGP sessions for MDT address family.
multicast: Resets BGP sessions for multicast address family.
mvpn: Resets BGP sessions for MVPN address family.
rtfilter: Resets BGP sessions for IPv4 RT filter address family.
sr-policy: Resets BGP sessions for SR policy address family.
unicast: Resets BGP sessions for unicast address family.
vpnv4: Resets BGP sessions for VPNv4 address family.
vpnv6: Resets BGP sessions for VPNv6 address family.
l2vpn: Resets BGP sessions for L2VPN address family.
evpn: Resets BGP sessions for EVPN address family.
flowspec: Resets BGP sessions for flowspec address family.
labeled-unicast: Resets BGP sessions for labeled unicast address family.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command resets BGP sessions for the specified address family on the public network.
CAUTION: A reset operation tears down BGP sessions for a short period of time. |
A reset operation enables the router to apply a new route selection policy by re-establishing BGP sessions.
By default, the unicast keyword is used if none of the unicast, mdt, mvpn, flowspec, labeled-unicast, sr-policy, and multicast keywords are specified.
# Reset all BGP sessions for the IPv4 unicast address family.
reset bgp all
Use reset bgp all to reset all BGP sessions for all address families.
reset bgp [ instance instance-name ] all
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command resets all BGP sessions for all address families of the default BGP instance.
CAUTION: A reset operation tears down BGP sessions for a short period of time. |
A reset operation enables the router to apply a new route selection policy by re-establishing BGP sessions.
# Reset all BGP sessions.
reset bgp bmp server
Use reset bgp bmp server to reset the connection to a BMP server and clear statistics information.
Syntax
reset bgp [ instance instance-name ] bmp server { server-number | all }
Views
User view
Predefined user roles
network-admin
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command resets the connection to a BMP server and clears statistics information for the default BGP instance.
server-number: Specifies a BMP server by its number in the range of 1 to 8. The BMP server must have been created.
all: Resets the connections to all BMP servers and clears statistics information for the specified BGP instance.
Usage guidelines
When the BMP configuration changes, you can execute this command to reset the connection to the BMP server so that the configuration can take effect immediately.
This command will disconnect the connection to the BMP server and clear statistics information. Use it with caution.
Examples
# Reset the connection to BMP server 1 in the default BGP instance.
<Sysname> reset bgp bmp server 1
Related commands
display bgp bmp server
reset bgp bmp server statistics
reset bgp bmp server statistics
Use reset bgp bmp server statistics to clear BMP server statistics.
Syntax
reset bgp [ instance instance-name ] bmp server server-number statistics
Views
User view
Predefined user roles
network-admin
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command clears the BMP server statistics of the default BGP instance.
server-number: Specifies a BMP server by its number in the range of 1 to 8.
Examples
# Clear the statistics of BMP server 1.
<Sysname> reset bgp bmp server 1 statistics
Related commands
display bgp bmp server
reset bgp dampening
Use reset bgp dampening to clear BGP route dampening information and release suppressed BGP routes.
reset bgp [ instance instance-name ] dampening ipv4 [ multicast | [ labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address [ mask-length | mask ] ]
reset bgp [ instance instance-name ] dampening ipv6 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address prefix-length ]
reset bgp [ instance instance-name ] dampening vpnv4 [ ipv4-address [ mask | mask-length ] ]
reset bgp [ instance instance-name ] dampening vpnv6 [ ipv6-address prefix-length ]
reset bgp [ instance instance-name ] dampening l2vpn evpn
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command clears BGP route dampening information and releases suppressed BGP routes for the default BGP instance.
ipv4: Clears BGP IPv4 route dampening information and release suppressed BGP IPv4 routes.
ipv6: Clears BGP IPv6 route dampening information and release suppressed BGP IPv6 routes.
vpnv4: Clears BGP VPNv4 route dampening information and release suppressed BGP VPNv4 routes.
vpnv6: Clears BGP VPNv6 route dampening information and release suppressed BGP VPNv6 routes.
l2vpn evpn: Clears BGP EVPN route dampening information and release suppressed BGP EVPN routes.
multicast: Clears BGP multicast route dampening information and release suppressed BGP multicast routes.
labeled-unicast: Clears BGP labeled unicast route dampening information and release suppressed BGP labeled unicast routes.
unicast: Clears BGP unicast route dampening information and release suppressed BGP unicast routes.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command clears BGP route dampening information for the public network, and releases suppressed BGP routes.
ipv4-address: Specifies an IPv4 destination network address. If you do not specify a network address, this command clears all BGP route dampening information, and releases all suppressed BGP routes.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
ipv6-address: Specifies an IPv6 destination network address. If you do not specify a network address, this command clears all BGP route dampening information, and releases all suppressed BGP routes.
prefix-length: Specifies a prefix length in the range of 0 to 128.
When you execute the reset bgp dampening ipv4 command:
· If you specify only the ipv4-address argument, the system ANDs the network address with the mask of a route. If the result matches the network address of the route, the command clears dampening information for the route, and releases the suppressed route.
· If you specify the ipv4-address mask or ipv4-address mask-length argument, this command does the following:
¡ Clears dampening information for the route that matches both the specified destination network address and the mask (or mask length).
¡ Releases the suppressed route.
By default, the unicast keyword is used if none of the unicast, labeled-unicast, and multicast keywords are specified.
# Clear dampening information for the BGP IPv4 unicast route to network 20.1.0.0/16 and release the suppressed route.
<Sysname> reset bgp dampening ipv4 20.1.0.0 255.255.0.0
dampening
dampening ibgp (MPLS Command Reference)
display bgp routing-table dampened
reset bgp dampening-log
Use reset bgp dampening-log to clear BGP route dampening log information.
Syntax
reset bgp [ instance instance-name ] dampening-log
Views
User view
Predefined user roles
network-admin
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command clears BGP route dampening log information for the default BGP instance.
Examples
# Clear BGP route dampening log information.
<Sysname> reset bgp dampening-log
Related commands
display bgp dampening-log
reset bgp flap-info
Use reset bgp flap-info to clear flap statistics for BGP routes.
reset bgp [ instance instance-name ] flap-info ipv4 [ multicast | [ labeled-unicast | unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv4-address [ mask-length | mask ] | as-path-acl { as-path-acl-number | as-path-acl-name } | peer ipv4-address [ mask-length ] ]
reset bgp [ instance instance-name ] flap-info ipv4 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] peer ipv6-address [ prefix-length ]
reset bgp [ instance instance-name ] flap-info ipv6 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] [ ipv6-address prefix-length | as-path-acl { as-path-acl-number | as-path-acl-name } | peer ipv6-address [ prefix-length ] ]
reset bgp [ instance instance-name ] flap-info ipv6 [ multicast | [ unicast ] [ vpn-instance vpn-instance-name ] ] peer ipv4-address [ mask-length ]
reset bgp [ instance instance-name ] flap-info vpnv4 [ ipv4-address [ mask | mask-length ] | as-path-acl { as-path-acl-number | as-path-acl-name } | peer [ ipv4-address [ mask-length ] | peer ipv6-address [ prefix-length ] ] ]
reset bgp [ instance instance-name ] flap-info vpnv6 [ ipv6-address prefix-length | as-path-acl { as-path-acl-number | as-path-acl-name } | peer [ ipv4-address [ mask-length ] | peer ipv6-address [ prefix-length ] ] ]
reset bgp [ instance instance-name ] flap-info l2vpn evpn [ as-path-acl { as-path-acl-number | as-path-acl-name } | peer [ ipv4-address [ mask-length ] | peer ipv6-address [ prefix-length ] ] ]
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command clears flap statistics for the default BGP instance.
ipv4: Clears flap statistics for BGP IPv4 routes.
ipv6: Clears flap statistics for BGP IPv6 routes.
vpnv4: Clears flap statistics for BGP VPNv4 routes.
vpnv6: Clears flap statistics for BGP VPNv6 routes.
l2vpn evpn: Clears flap statistics for BGP EVPN routes.
multicast: Clears flap statistics for BGP multicast routes.
labeled-unicast: Clears flap statistics for BGP labeled unicast routes.
unicast: Clears flap statistics for BGP unicast routes.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command clears flap statistics for public BGP routes.
ipv4-address: Specifies an IPv4 destination network address.
mask-length: Specifies a mask length in the range of 0 to 32.
mask: Specifies a network mask in dotted decimal notation.
ipv6-address: Specifies an IPv6 destination network address.
prefix-length: Specifies a prefix length in the range of 0 to 128.
as-path-acl as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256, to filter BGP route flap statistics.
as-path-acl as-path-acl-name: Specifies an AS path list by its name, a case-sensitive string of 1 to 51 characters, to filter BGP route flap statistics. The AS path list name cannot contain only digits.
peer ipv4-address [ mask-length ]: Clears flap statistics for BGP routes learned from the specified IPv4 BGP peer. The mask-length argument specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command clears flap statistics for BGP routes learned from all dynamic peers in the subnet.
peer ipv6-address [ prefix-length ]: Clears flap statistics for BGP routes learned from the specified IPv6 BGP peer. The prefix-length argument specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command clears flap statistics for BGP routes learned from all dynamic peers in the subnet.
When you execute the reset bgp flap-info ipv4 command:
· If you specify only the ipv4-address argument, the system ANDs the IPv4 network address with the mask of a route. If the result matches the IPv4 network address of the route, this command clears the flap statistics of the route.
· If you specify the ipv4-address mask or ipv4-address mask-length argument, this command clears the flap statistics of the route that matches both the specified IPv4 destination network address and the mask (or mask length).
By default, the unicast keyword is used if neither the unicast keyword nor the multicast keyword is specified.
# Clear flap statistics for the BGP IPv4 unicast route to network 20.1.0.0/16.
<Sysname> reset bgp flap-info ipv4 20.1.0.0 16
dampening
dampening ibgp (MPLS Command Reference)
display bgp routing-table flap-info
reset bgp rpki server
Use reset bgp rpki server to reset BGP RPKI sessions.
Syntax
reset bgp [ instance instance-name ] rpki server [ vpn-instance vpn-instance-name ] tcp { ipv4 address | ipv6 address }
Views
User view
Predefined user roles
network-admin
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command resets BGP RPKI sessions for the default BGP instance.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command resets BGP RPKI sessions for the public network.
ipv4-address: Specifies an RPKI server by its IPv4 address.
ipv6-address: Specifies an RPKI server by its IPv6 address.
Usage guidelines
After you execute this command, the device will delete and re-establish the specified BGP RPKI session and cause temporary session interruption.
Examples
# Reset the BGP RPKI session to RPKI server 2.2.2.1.
<Sysname> reset bgp rpki server tcp 2.2.2.1
reset bgp-policy statistics
Use reset bgp-policy statistics to clear BGP policy accounting information.
Syntax
reset bgp-policy { ip | ipv6 } statistics [ input | output ] [ interface interface-type interface-number ]
Views
User view
Predefined user roles
network-admin
Parameters
ip: Clears BGP policy accounting information for IPv4 traffic.
ipv6: Clears BGP policy accounting information for IPv6 traffic.
input: Clears BGP policy accounting information for inbound traffic.
output: Clears BGP policy accounting information for outbound traffic.
interface interface-type interface-number: Clears BGP policy accounting information on an interface specified by the interface type and number. If you do not specify an interface, this command clears global BGP policy accounting information.
Examples
# Clear global BGP policy accounting information for inbound IPv6 traffic.
<Sysname> reset bgp-policy ipv6 statistics input
Related commands
bgp-policy accounting
display bgp-policy statistics
reset ttl-security statistics
Use reset ttl-security statistics to clear statistics information about packets discarded by GTSM.
Syntax
In standalone mode:
reset ttl-security statistics [ slot slot-number [ cpu cpu-number ] ]
In IRF mode:
reset ttl-security statistics [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
Views
User view
Predefined user roles
network-admin
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command clears information for all cards. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command clears information for all cards on all IRF member devices. (In IRF mode.)
cpu cpu-number : Specifies a CPU by its number. This option is available only if multiple CPUs are available on the specified slot. If you do not specify this option, this command clears information for all CPUs on the specified slot.
Examples
# Clear statistics information about packets discarded by GTSM.
<Sysname> reset ttl-security statistics
Related commands
display ttl-security statistics
ospf ttl-security
peer ttl-security
ttl-security
response-time
Use response-time to set the time to wait for the response from the RPKI server.
undo response-time to restore the default.
Syntax
response-time response-time
undo response-time
Default
The time to wait for the response from the RPKI server is 30 seconds.
Views
BGP RPKI server view
Predefined user roles
network-admin
Parameters
response-time: Specifies the time to wait for the response from the RPKI server, in the range of 15 to 3600 seconds.
Usage guidelines
A router checks the connection to an RPKI server at the check interval. If the router does not receive a response from the RPKI server within the specified time period, it tears down the connection to the RPKI server.
Examples
# Set the time to wait for the response from RPKI server 1.1.1.1 to 15 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] response-time 15
Related commands
refresh-time
retain local-label
Use retain local-label to set an update delay for local MPLS labels.
Use undo retain local-label to restore the default.
retain local-label retain-time
undo retain local-label
The update delay for local MPLS labels is 60 seconds.
network-admin
retain-time: Specifies the update delay in the range of 1 to 21845 seconds.
BGP includes local MPLS labels in advertised VPNv4 routes, VPNv6 routes, labeled IPv4 unicast routes, and labeled IPv6 unicast routes.
When a local label is changed, BGP removes the old label and advertises the new label. Traffic interruption occurs if BGP peers use the old label to forward packets before they learn the new label. To resolve this issue, configure an update delay for local MPLS labels. BGP does not remove the old label before the update delay timer expires.
# Set the update delay for local MPLS labels to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] retain local-label 100
route-mode adj-rib-in
Use route-mode adj-rib-in to enable BGP to send routes received from all the monitored peers and peer groups to the BMP server.
Use undo route-mode adj-rib-in to restore the default.
Syntax
route-mode adj-rib-in [ pre-policy | post-policy | both ]
undo route-mode adj-rib-in
Default
BGP sends routes received from all the monitored peers and peer groups to the BMP server without route filtering.
Views
BMP server view
Predefined user roles
network-admin
Parameters
pre-policy: Sends routes to the BMP server without route filtering.
post-policy: Sends routes to the BMP server after route filtering.
both: Sends both filtered and unfiltered routes to the BMP server.
Usage guidelines
To enable BGP to send routes received from all monitored peers and peer groups to the BMP server, make sure BGP has established a TCP connection to the BMP server.
If you do not specify any parameters, the command sends routes received from all the monitored peers and peer groups to the BMP server without route filtering.
The configuration of the route-mode adj-rib-in command takes effect on all peers and peer groups. The configuration of the peer route-mode command in BGP instance view or BGP-VPN instance view takes effect only on the specified peer or peer group. The configuration of the peer route-mode command takes precedence over the configuration of the route-mode adj-rib-in command.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Enable BGP to send routes received from all the monitored peers and peer groups to the BMP server after route filtering.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] route-mode adj-rib-in post-policy
route-mode adj-rib-out
Use route-mode adj-rib-out to enable BGP to send routes advertised to all the monitored peers and peer groups to the BMP server.
Use undo route-mode adj-rib-out to restore the default.
Syntax
route-mode adj-rib-out [ pre-policy | post-policy | both ]
undo route-mode adj-rib-out
Default
BGP does not send routes advertised to a monitored peer or peer group to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Parameters
pre-policy: Sends routes to the BMP server without route filtering.
post-policy: Sends routes to the BMP server after route filtering.
both: Sends both filtered and unfiltered routes to the BMP server.
Usage guidelines
To enable BGP to send routes advertised to all monitored peers and peer groups to the BMP server, make sure BGP has established a TCP connection to the BMP server.
If you do not specify any parameters, the command sends routes advertised to all the monitored peers and peer groups to the BMP server after route filtering.
The configuration of the route-mode adj-rib-out command takes effect on all peers and peer groups. The configuration of the peer route-mode command in BGP instance view or BGP-VPN instance view takes effect only on the specified peer or peer group. The configuration of the peer route-mode command takes precedence over the configuration of the route-mode adj-rib-out command.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Enable BGP to send routes advertised to all the monitored peers and peer groups to the BMP server without route filtering.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] route-mode adj-rib-out pre-policy
route-mode loc-rib
Use route-mode loc-rib to configure BGP to send the optimal routes in the routing table to the BMP server.
Use undo route-mode loc-rib to restore the default.
Syntax
route-mode loc-rib
undo route-mode loc-rib
Default
BGP does not send the optimal routes in the routing table to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Usage guidelines
Before executing this command, make sure BGP has established a TCP connection to the BMP server.
With this command configured, BGP sends all routes to the BMP server first. If routes update later, BGP sends only the optimal routes to the server.
This command takes effect only on BGP IPv4 unicast and BGP-VPN IPv4 unicast routes.
Examples
# Configure BGP to send the optimal routes in the routing table to the BMP server.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] route-mode loc-rib
router id
Use router id to configure a global router ID.
Use undo router id to restore the default.
router id router-id
undo router id
No global router ID is configured.
network-admin
router-id: Specifies a global router ID in IPv4 address format. The value range for this argument is 0.0.0.1 to 255.255.255.254.
Some routing protocols use a router ID to identify a device. You can configure a global router ID, which is used by routing protocols that have no router ID configured.
If no global router ID is configured, the highest loopback address, if any, is used as the router ID. If no loopback address is available, the highest physical interface IP address is used, regardless of the interface status. If no IP address is configured for any interface, the router ID is 0.0.0.0.
During an active/standby switchover, the standby main processing unit (MPU) checks the validity of the previous router ID backed up before switchover. If it is not valid, it selects a new router ID.
If the interface IP address that is selected as the router ID is removed or modified, a new router ID is selected. The following events will not trigger a router ID re-selection:
· The interface goes down.
· After a physical interface address is selected as the router ID, an IP address is configured for a loopback interface.
· A higher interface IP address is configured.
After you modify the global router ID and reset BGP sessions, the modification does not take effect for a BGP instance that uses the global router ID. To modify the router ID for the BGP instance, use the router-id command in BGP instance view.
# Configure a global router ID as 1.1.1.1.
<Sysname> system-view
[Sysname] router id 1.1.1.1
router-id (BGP instance view)
router-id (BGP-VPN instance view)
route-select delay
Use route-select delay to configure optimal route selection delay.
Use undo route-select delay to restore the default.
Syntax
route-select delay delay-value
undo route-select delay
Default
The optimal route selection delay timer is 0 seconds, which means optimal route selection is not delayed.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
BGP VPNv4 address family view
BGP VPNv6 address family view
BGP L2VPN address family view
BGP EVPN address family view
BGP IPv4 MDT address family view
BGP IPv4 MVPN address family view
BGP IPv6 MVPN address family view
BGP LS address family view
BGP-VPN LS address family view
BGP IPv4 RT filter address family view
BGP IPv4 SR policy address family view
BGP IPv6 SR policy address family view
Predefined user roles
network-admin
Parameters
delay-value: Specifies the optimal route selection delay timer in the range of 0 to 600 seconds. A value of 0 means optimal route selection is not delayed.
Usage guidelines
To avoid packet loss caused by path switchover, configure this command to delay optimal route selection upon a route change.
Follow these restrictions and guidelines when you configure the command:
· The optimal route selection delay setting applies only when multiple effective routes with the same prefix exist after a route change occurs.
· For routes being delayed for optimal route selection, modifying the optimal route selection delay timer has the following effects:
¡ If you modify the delay timer to a non-zero value, the routes are not affected, and they still use the original delay timer.
¡ If you execute the undo form of the command or modify the delay timer to 0, the device performs optimal route selection immediately.
· If you execute the command multiple times for an address family, the most recent configuration takes effect.
· The optimal route selection delay configuration does not apply to the following conditions:
¡ A route change is caused by execution of a command or by route withdrawal.
¡ After a route change occurs, only one route exists for a specific destination network.
¡ An active/standby process switchover occurs.
¡ A route change occurs among equal-cost routes.
¡ Only the optimal and suboptimal routes exist when FRR is configured. In this scenario, optimal route selection will be performed immediately except when the recursion mode of the optimal route changes from SRv6 TE to SRv6 BE.
¡ Optimal route selection is triggered by a redistributed route.
¡ The next hop of the optimal route changes and a route with the same prefix is waiting for the delay timer to expire.
Examples
# In BGP IPv4 unicast address family view, set the optimal route selection delay timer to 100 seconds.
<Sysname> system-view
[Sysname] bgp 65009
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] route-select delay 100
route-rate-limit
Use route-rate-limit to set the BGP route sending rate.
Use undo route-rate-limit to restore the default.
Syntax
route-rate-limit rate
undo route-rate-limit
Default
The BGP route sending rate is not limited.
Views
BGP instance view
Predefined user roles
network-admin
Parameters
rate: Specifies the maximum number of new routes that BGP can send per second, in the range of 0 to 4294967595. A value of 0 means that BGP does not send newly added routes.
Usage guidelines
If a device sends many new routes within a short time period, it might be unable to add the routes to the FIB before the peer device adds them. This might result in traffic forwarding failure. To avoid this problem, you can configure this command to set an appropriate route sending rate for the device.
For a device with high performance, you can set a high BGP route sending rate as needed. For a device without high performance, set a relatively low BGP route sending rate as a best practice.
As a best practice to avoid route withdrawal failures, do not set the BGP route sending rate to 0 or a small value when network flapping occurs.
This command applies only to IPv4 unicast routes and IPv6 unicast routes.
Examples
# In BGP instance view, set the BGP route sending rate to 1000.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] route-rate-limit 1000
router-id (BGP instance view)
Use router-id to configure a router ID for a BGP instance.
Use undo router-id to restore the default.
router-id router-id
undo router-id
No router ID is configured for a BGP instance, and the BGP instance uses the global router ID configured by the router id command in system view.
network-admin
router-id: Specifies a router ID for BGP, in IPv4 address format. The value range for this argument is 0.0.0.1 to 255.255.255.254.
To run BGP, a BGP instance must have a router ID, which is an unsigned 32-bit integer that uniquely identifies the router in the AS.
To modify a non-zero router ID for BGP, execute the router-id command in BGP instance view.
To improve availability, specify the IP address of a loopback interface as the router ID for BGP.
If you execute this command in the same BGP instance view multiple times, the most recent configuration takes effect.
You can configure the same router ID for different BGP instances.
# In BGP instance view, set the router ID for BGP to 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] router-id 1.1.1.1
router id
router-id (BGP-VPN instance view)
router-id (BGP-VPN instance view)
Use router-id to configure a router ID for a BGP VPN instance.
Use undo router-id to restore the default.
router-id { router-id | auto-select }
undo router-id
No router ID is configured for a BGP VPN instance, and the BGP VPN instance uses the router ID configured in BGP instance view. If no router ID is configured in BGP instance view, the BGP VPN instance uses the global router ID configured in system view.
network-admin
router-id: Specifies a router ID in IPv4 address format. The value range for this argument is 0.0.0.1 to 255.255.255.254.
auto-select: Automatically selects a router ID for the BGP VPN instance.
To run BGP, a VPN instance of a BGP instance must have a router ID, which is an unsigned 32-bit integer that uniquely identifies the BGP VPN router in the AS.
If the auto-select keyword is specified, the system selects a router ID for the BGP VPN instance in the following order:
1. The highest loopback address in the BGP VPN instance as the router ID.
2. The highest physical interface address in the BGP VPN instance as the router ID, regardless of the interface status.
3. 0.0.0.0 as the router ID.
If a non-zero router ID is selected for the BGP VPN instance, the router ID will not change when a more preferable router ID is available in the BGP VPN instance.
To improve availability, specify the IP address of a loopback interface as the router ID.
You can specify a different router ID for each VPN instance on a device.
If you execute this command in the same BGP-VPN instance view multiple times, the most recent configuration takes effect.
# In BGP-VPN instance view, set the router ID to 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] router-id 1.1.1.1
router id
router-id (BGP instance view)
routing-table bgp-rib-only
Use routing-table bgp-rib-only to enable BGP to not flush routes matching the specified routing policy to the routing table.
Use undo routing-table bgp-rib-only to restore the default.
Syntax
routing-table bgp-rib-only [ route-policy route-policy-name ]
undo routing-table bgp-rib-only
Default
BGP flushes the optimal routes to the routing table.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 flowspec address family view
BGP IPv6 flowspec address family view
BGP-VPN IPv4 flowspec address family view
BGP-VPN IPv6 flowspec address family view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. If you do not specify a routing policy or the specified routing policy does not exist, BGP does not flush any routes to the routing table. The apply clauses in the specified routing policy do not take effect.
Usage guidelines
This command applies to the following scenarios:
· In an MPLS L3VPN network, all the optimal private BGP routes will be flushed to the routing table of a PE by default. You can execute this command to prevent unnecessary routes from being flushed to the IP routing table and improve the forwarding performance of the PE.
· In a route reflection network, execute this command to not flush specific BGP routes to the routing table of the RR. Then, the RR only advertises and receives routes but does not forward service traffic, which saves the system resources of the RR.
· In a flowspec network, flowspec routes matching the routing policy specified in this command will not be processed by QoS.
This command is mutually exclusive with the advertise-rib-active command.
Examples
# In BGP IPv4 unicast address family view, enable BGP to not flush BGP IPv4 unicast routes matching routing policy policy1 to the routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] routing-table bgp-rib-only route-policy policy1
rpki
Use rpki to enable BGP RPKI and enter BGP RPKI view.
Use undo rpki to remove all configurations in BGP RPKI view.
Syntax
rpki
undo rpki
Views
BGP instance view
Predefined user roles
network-admin
Examples
# Enter BGP RPKI view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki]
rpki-limit
Use rpki-limit to specify the maximum number of ROAs that can be received from the specified RPKI server.
Use undo rpki-limit to restore the default.
Syntax
rpki-limit limit [ alert-only | discard | reconnect reconnect-time ]
undo rpki-limit
Default
No limit is set for the number of ROAs that can be received from an RPKI server.
Views
RPKI server view
Predefined user roles
network-admin
Parameters
limit: Specifies the maximum number of ROAs that can be received from the specified RPKI server, in the range of 1 to 4294967295. The device will tear down the TCP connection to the RPKI server if the following conditions exist:
· The alert-only, discard, and reconnect keywords are not specified.
· The number of ROAs received from the RPKI server reaches the value for the limit argument.
The device will not attempt to re-establish the connection to the RPKI server. You can execute the reset bgp rpki server command to re-establish the connection.
alert-only: When the number of ROAs received from the RPKI server reaches the value for the limit argument, the device generates a log message but does not tear down the TCP connection to the RPKI server. The device can continue to receive ROAs from the RPKI server.
discard: When the number of ROAs received from the RPKI server reaches the value for the limit argument, the device retains the TCP connection to the RPKI server, discards excess ROAs, and generates a log message. When the number of ROAs received from the RPKI server falls below the value for the limit argument, the device can continue to receive ROAs from the RPKI server. If you execute this command with other keywords or the number of ROAs received from the RPKI server falls below the value for the limit argument, the device sends a reset query to the RPKI server. Then, the RPKI server sends the ROAs to the device again to restore the discarded ROAs.
reconnect reconnect-time: Specifies a reconnection timer. When the number of ROAs received from the RPKI server reaches the value for the limit argument, the device tears down the TCP connection to the RPKI server and starts the reconnection timer. After the reconnection timer expires, the device re-establishes the TCP connection to the RPKI server. The reconnect-time argument specifies the reconnection timer in the range of 1 to 86400 seconds.
Usage guidelines
Execute this command to save system resources of the device.
This command takes effect only on the TCP connection between the device and the RPKI server specified in the current view. You can execute this command in the views of multiple RPKI servers.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# In BGP RPKI server view, set the maximum number of ROAs that can be received from RPKI server 1.1.1.1 to 1000.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server] rpki-limit 1000
server
Use server to configure an IP address and port number for a BMP server.
Use undo server to remove the configuration.
Syntax
server address { ipv4-address | ipv6-address } port port-number
undo server
Default
No IP address and port number are configured for the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies an IPv4 address for the BMP server.
ipv6-address: Specifies an IPv6 address for the BMP server.
port-number: Specifies a port number for the BMP server, in the range of 1 to 65535.
Usage guidelines
After you configure an IP address and port number for a BMP server, the BMP client establishes a TCP connection to the BMP server and sends BMP messages to the BMP server.
Examples
# Configure IP address 100.1.1.1 and port number 8888 for BMP server 5.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] server address 100.1.1.1 port 8888
server connect-interface
Use server connect-interface to specify the source interface of TCP connections to the BMP server.
Use undo server connect-interface to restore the default.
Syntax
server connect-interface interface-type interface-number
undo server connect-interface
Default
BGP uses the primary IPv4 or IPv6 address of the output interface in the optimal route to the BMP server as the source address of TCP connections to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
After you configure this command, BGP uses the address of the specified interface to establish TCP connections to the BMP server.
For a BMP server, this command does not take effect if the VPN instance of the specified interface is different from that specified by the server vpn-instance command.
Do not specify a virtual template (VT) interface for this command.
Examples
# Configure Loopback 0 as the source interface of TCP connections to BMP server 5.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] server address 100.1.1.1 port 8888
[Sysname-bmpserver-5] server connect-interface loopback0
Related commands
display bgp bmp server
ip vpn-instance (system view) (MPLS Command Reference)
server password
Use server password to specify the authentication mode and key for BGP to establish TCP connections to the BMP server.
Use undo server password to restore the default.
Syntax
server password { keychain keychain-name | md5 { cipher | simple } string }
undo server password
Default
BGP establishes TCP connections to the BMP server without authentication.
Views
BMP server view
Predefined user roles
network-admin
Parameters
keychain: Specifies keychain authentication.
keychain-name: Specifies a keychain by its name, a case-sensitive string of 1 to 63 characters. The keychain must have been created.
md5: Specifies MD5 authentication.
cipher: Specifies a password in encrypted form.
simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.
password: Specifies the password. Its encrypted form is a case-sensitive string of 33 to 137 characters. Its plaintext form is a case-sensitive string of 1 to 80 characters.
Usage guidelines
Configure this command to secure the TCP connections and packets exchanged with the BMP server.
You cannot repeat the server password command to edit the authentication mode and key. To edit the authentication mode and key, first execute the undo server password command and then the server password command to configure a new authentication mode and key.
Examples
# In BMP server view, use keychain abc to authenticate the TCP connections to the BMP server.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] server password keychain abc
server source-address
Use server source-address to specify the source address of TCP connections to the BMP server.
Use undo server source-address to restore the default.
Syntax
server source-address { ipv4-address | ipv6-address }
undo server source-address
Default
BGP uses the primary IPv4 or IPv6 address of the output interface in the optimal route to the BMP server as the source address of TCP connections to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies the source IPv4 address of TCP connections to the BMP server.
ipv6-address: Specifies the source IPv6 address of TCP connections to the BMP server.
Usage guidelines
For a BMP server, the following rules apply:
· The configuration of the server source-address command does not take effect if the server source-address and server commands specify different types of IP addresses.
· If you execute both the server source-address and server connect-interface commands, the server source-address command takes effect.
Examples
# Configure 1.1.1.1 as the source address of TCP connections to BMP server 5.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] server address 100.1.1.1 port 8888
[Sysname-bmpserver-5] server source-address 1.1.1.1
Related commands
display bgp bmp server
server connect-interface
server tcp
Use server tcp to specify an RPKI server and enter BGP RPKI server view.
Use undo server tcp to cancel the configuration.
Syntax
server [ vpn-instance vpn-instance-name ] tcp { ipv4-address | ipv6-address }
undo server [ vpn-instance vpn-instance-name ] tcp { ipv4-address | ipv6-address }
Default
No RPKI server is specified.
Views
BGP RPKI view
Predefined user roles
network-admin
Parameters
vpn-instance vpn-instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command specifies an RPKI server in the public network.
ipv4-address: Specifies an RPKI server by its IPv4 address.
ipv6-address: Specifies an RPKI server by its IPv6 address.
Usage guidelines
You can execute this command multiple times to configure a router to establish TCP connections to multiple RPKI servers.
After you execute the undo server command, all configurations in BGP RPKI server view are deleted.
Examples
# Specify an RPKI server with the IP address 1.1.1.1 and enter BGP RPKI server view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] rpki
[Sysname-bgp-default-rpki] server tcp 1.1.1.1
[Sysname-bgp-default-rpki-server]
server vpn-instance
Use server vpn-instance to specify a VPN instance for a BMP server.
Use undo server vpn-instance to restore the default.
Syntax
server vpn-instance vpn-instance-name
undo server vpn-instance
Default
No VPN instance is specified for a BMP server. A BMP server belongs to the public network.
Views
BMP server view
Predefined user roles
network-admin
Parameters
vpn-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters. The specified VPN instance must have been created.
Usage guidelines
If you delete the VPN instance of a BMP server, BGP disconnects from the BMP server. After you create the VPN instance again, BGP reconnects to the BMP server.
If you execute this command multiple times for a BMP server, the most recent configuration takes effect.
Examples
# Configure IP address 100.1.1.1 and port number 8888 for BMP server 5, and specify VPN instance vpna for BMP server 5.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] server address 100.1.1.1 port 8888
[Sysname-bmpserver-5] server vpn-instance vpna
Related commands
server connect-interface
shutdown process
Use shutdown process to shut down BGP sessions to all peers and peer groups.
Use undo shutdown process to restore the default.
Syntax
shutdown process
undo shutdown process
Default
BGP does not shut down sessions to any peers or peer groups.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
For maintenance purposes, you can execute this command to temporarily disconnect BGP sessions from all peers and peer groups on the device. After maintenance, you can restore the sessions by simply executing the undo form of the command without reconfiguring peer or peer group settings.
This command enables the device to tear down all sessions and clear all routing information.
When you configure the shutdown process command together with the peer ignore or ignore all-peers command, follow these restrictions and guidelines:
· Once BGP shutdown is enabled by the shutdown process command, the device cannot establish BGP sessions with all peers and peer groups.
· To disable BGP session establishment with a peer or peer group if you have disabled BGP shutdown, perform one of the following tasks:
¡ Disable BGP session establishment with that peer or peer group by using the peer ignore command.
¡ Disable BGP session establishment with all peers and peer groups by using the ignore all-peers command.
Examples
# Shut down BGP sessions to all peers and peer groups for BGP instance 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] shutdown process
snmp context-name
Use snmp context-name to configure an SNMP context for a BGP instance.
Use undo snmp context-name to restore the default.
snmp context-name context-name
undo snmp context-name
No SNMP context is configured for a BGP instance.
network-admin
context-name: Specifies an SNMP context by its name, a case-sensitive string of 1 to 32 characters.
BGP does not know the BGP instance to which a managed MIB node belongs. To resolve this issue, configure different SNMP contexts for different BGP instances.
The device selects a MIB for an SNMP packet according to the context (for SNMPv3) or community name (for SNMPv1/v2c) in the following ways:
· For an SNMPv3 packet:
¡ The device selects the MIB of the BGP instance default if the packet does not carry a context and no SNMP context was configured for the BGP instance default.
¡ The device selects the MIB of a BGP instance if the packet meets the following conditions:
- Carries a context that was configured with the snmp-agent context command in system view.
- Matches the context of the BGP instance.
¡ The device does not process any MIBs in other situations.
· For an SNMPv1/v2c packet:
¡ The device selects the MIB of the BGP instance default if the following conditions are met:
- No SNMP community to SNMP context mapping was configured with the snmp-agent community-map command in system view.
- No SNMP context was configured for the BGP instance default.
¡ The device selects the MIB of a BGP instance if the SNMP community is mapped to an SNMP context and the context matches the context of the BGP instance.
¡ The device does not process any MIBs in other situations.
For more information about SNMP contexts and community names, see Network Management and Monitoring Configuration Guide.
Do not configure the same SNMP context for different BGP instances.
If you execute this command multiple times, the most recent configuration takes effect.
# Configure SNMP context bgp-abc for BGP instance abc.
<Sysname> system-view
[Sysname] bgp 100 instance abc
[Sysname-bgp-abc] snmp context-name bgp-abc
snmp-agent community-map (Network Management and Monitoring Command Reference)
snmp-agent context (Network Management and Monitoring Command Reference)
snmp-agent trap enable bgp
Use snmp-agent trap enable bgp to enable SNMP notifications for BGP.
Use undo snmp-agent trap enable bgp to disable SNMP notifications for BGP.
snmp-agent trap enable bgp [ instance instance-name ] [ peer-addrfamily-routeexceed | peer-addrfamily-routeexceed-clear | peer-addrfamily-routethreshold-clear | peer-addrfamily-routethreshold-exceed | peer-backward-transition | peer-established | peer-routeexceed | peer-routeexceed-clear | peer-routethreshold-clear | peer-routethreshold-exceed | peer-rpkisession-roaexceed | peer-rpkisession-roaexceed-clear | vrfroutenum-threshold-exceed | vrfroutenum-threshold-clear ] *
undo snmp-agent trap enable bgp [ instance instance-name ] [ peer-addrfamily-routeexceed | peer-addrfamily-routeexceed-clear | peer-addrfamily-routethreshold-clear | peer-addrfamily-routethreshold-exceed | peer-backward-transition | peer-established | peer-routeexceed | peer-routeexceed-clear | peer-routethreshold-clear | peer-routethreshold-exceed | peer-rpkisession-roaexceed | peer-rpkisession-roaexceed-clear | vrfroutenum-threshold-exceed | vrfroutenum-threshold-clear ] *
SNMP notifications for BGP are enabled.
network-admin
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command enables SNMP notifications for the default BGP instance.
peer-addrfamily-routeexceed: Enables BGP to generate notifications when the number of routes received for an address family reaches the upper limit.
peer-addrfamily-routeexceed-clear: Enables BGP to generate notifications when the number of routes received for an address family falls below the upper limit.
peer-addrfamily-routethreshold-clear: Enables BGP to generate notifications when the number of routes received for an address family falls below the alarm threshold.
peer-addrfamily-routethreshold-exceed: Enables BGP to generate notifications when the number of routes received for an address family reaches the alarm threshold.
peer-backward-transition: Enables BGP to generate notifications when the state of a BGP session changes from Established to another state.
peer-established: Enables BGP to generate notifications when a BGP session enters the Established state.
peer-routeexceed: Enables BGP to generate notifications when the number of routes received for all address families reaches the upper limit.
peer-routeexceed-clear: Enables BGP to generate notifications when the number of routes received for all address families falls below the upper limit.
peer-routethreshold-clear: Enables BGP to generate notifications when the number of routes received for all address families falls below the alarm threshold.
peer-routethreshold-exceed: Enables BGP to generate notifications when the number of routes received for all address families reaches the alarm threshold.
peer-rpkisession-roaexceed: Enables BGP to generate notifications when the number of ROAs received from the RPKI server reaches the upper limit.
peer-rpkisession-roaexceed-clear: Enables BGP to generate notifications when the number of ROAs received from the RPKI server falls below the upper limit.
vrfroutenum-threshold-exceed: Enables BGP to generate notifications when the number of private network routes in the BGP routing table reaches the upper limit.
vrfroutenum-threshold-clear: Enables BGP to generate notifications when the number of private network routes in the BGP routing table falls below the upper limit.
After you enable SNMP notifications for BGP, the device generates a notification when a BGP session state change occurs. The notification includes the neighbor address, the error code and subcode of the most recent error, and the current neighbor state.
For BGP notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.
Whether the device can generate the notifications specified by the following keywords depends on the configuration of the peer route-limit command:
· peer-addrfamily-routeexceed
· peer-addrfamily-routeexceed-clear
· peer-addrfamily-routethreshold-exceed
· peer-addrfamily-routethreshold-clear
· peer-routeexceed
· peer-routeexceed-clear
· peer-routethreshold-clear
· peer-routethreshold-exceed
The peer route-limit command determines the number of routes that the router can receive and the log generation threshold. If you do not configure the peer route-limit command for the address family, the maximum number of routes that triggers notifications is 4294967295 and the route quantity alarm threshold is 70%.
Whether the device can generate the notifications specified by the peer-rpkisession-roaexceed and peer-rpkisession-roaexceed-clear keywords depends on the ROA quantity limit specified by the rpki-limit command. If you do not configure the rpki-limit command for the RPKI server, the maximum number of ROAs that triggers notifications is 4294967295.
If you do not specify any keywords when executing this command, BGP will generate all types of notifications. If you execute this command with specific keywords, BGP will also generate the specified types of notifications.
# Enable SNMP notifications for BGP.
<Sysname> system-view
[Sysname] snmp-agent trap enable bgp
statistics-interval
Use statistics-interval to set the interval at which BGP sends statistics information to the BMP server.
Use undo statistics-interval to restore the default.
Syntax
statistics-interval value
undo statistics-interval
Default
BGP does not send statistics information to the BMP server.
Views
BMP server view
Predefined user roles
network-admin
Parameters
value: Specifies the interval at which BGP sends statistics information to the BMP server, in the range of 1 to 3600 seconds.
Usage guidelines
After establishing a TCP connection to the BMP server, BGP sends statistics information to the BMP server at the specified interval.
Examples
# Set the interval to 5 seconds at which BGP sends statistics information to the BMP server.
<Sysname> system-view
[Sysname] bmp server 5
[Sysname-bmpserver-5] statistics-interval 5
summary automatic
Use summary automatic to configure automatic route summarization for redistributed IGP subnet routes.
Use undo summary automatic to restore the default.
summary automatic
undo summary automatic
Automatic route summarization is not performed for redistributed IGP subnet routes.
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv4 multicast address family view
network-admin
After the summary automatic command is configured, BGP summarizes IGP subnets redistributed by the import-route command.
Automatic summary routes can be manually summarized, but cannot be added to the IP routing table.
# In BGP IPv4 unicast address family view, configure automatic route summarization for redistributed IGP subnet routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] summary automatic
aggregate
import-route
timer
Use timer to configure a BGP keepalive interval and hold time.
Use undo timer to restore the default.
timer keepalive keepalive hold holdtime
undo timer
The BGP keepalive interval and the hold time are 60 seconds and 180 seconds, respectively.
BGP-VPN instance view
network-admin
keepalive keepalive: Configures a keepalive interval in the range of 0 to 21845 seconds.
hold holdtime: Configures a hold time in seconds, whose value is 0 or in the range of 3 to 65535. The hold time must be at least three times the keepalive interval.
After establishing a BGP session, two routers send KEEPALIVE messages at the specified keepalive interval to each other to keep the session.
If a router receives no KEEPALIVE or UPDATE message from the peer within the hold time, it tears down the session.
Use the timer command to configure the keepalive interval and hold time for all BGP peers. Use the peer timer command to configure the keepalive interval and hold time for a peer or peer group. If both commands are configured, the intervals configured by the peer timer command have higher priority.
If the hold time settings on the local and peer routers are different, the smaller one is used.
If the hold time is set to 0, no KEEPALIVE message will be sent to the peer, and the peer session will never time out. If neither the hold time nor the keepalive interval is set to 0, the actual keepalive interval is the smaller one between one third of the hold time and the keepalive interval.
The timer command affects only new BGP sessions.
After the timer command is executed, no peer session is closed at once. The configured hold time is used for negotiation in session re-establishment (for example, when you reset the BGP session).
# In BGP instance view, set the keepalive interval and hold time to 60 seconds and 180 seconds, respectively.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] timer keepalive 60 hold 180
display bgp peer
peer timer
timer connect-retry
Use timer connect-retry to set the session retry timer for all peers and peer groups.
Use undo timer connect-retry to restore the default.
Syntax
timer connect-retry retry-time
undo timer connect-retry
Default
The session retry timer is 32 seconds for all peers and peer groups.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
retry-time: Specifies a session retry timer in the range of 1 to 65535 seconds.
Usage guidelines
To speed up session establishment to a peer or peer group and route convergence, set a small session retry timer. If the BGP session flaps, you can set a large session retry timer to reduce the impact.
The timer set by the peer timer connect-retry command takes precedence over the timer set by the timer connect-retry command.
Examples
# In BGP instance view, set the session retry timer to 30 seconds for all peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] timer connect-retry 30
Related commands
peer timer connect-retry
unicast-route recursive-lookup tunnel
Use unicast-route recursive-lookup tunnel to iterate unlabeled public BGP routes to LSPs.
Use undo unicast-route recursive-lookup tunnel to restore the default.
Syntax
In BGP IPv4 unicast address family view:
unicast-route recursive-lookup tunnel [ prefix-list ipv4-prefix-list-name ] [ tunnel-policy tunnel-policy-name ]
undo unicast-route recursive-lookup tunnel
In BGP IPv6 unicast address family view:
unicast-route recursive-lookup tunnel [ prefix-list ipv6-prefix-list-name ] [ tunnel-policy tunnel-policy-name ]
undo unicast-route recursive-lookup tunnel
Default
Unlabeled public BGP routes cannot be iterated to LSPs.
Views
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
Predefined user roles
network-admin
Parameters
prefix-list ipv4-prefix-list-name: Iterates only unlabeled public BGP routes that match an IPv4 prefix list to LSPs. The ipv4-prefix-list-name argument specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, all unlabeled public BGP routes can be iterated to LSPs.
prefix-list ipv6-prefix-list-name: Iterates only unlabeled public BGP routes that match an IPv6 prefix list to LSPs. The ipv6-prefix-list-name argument specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters. If you do not specify this option, all unlabeled public BGP routes can be iterated to LSPs.
tunnel-policy tunnel-policy-name: Iterates unlabeled public BGP routes to only LSPs that match a tunnel policy. The tunnel-policy-name argument specifies a tunnel policy by its name, a case-sensitive string of 1 to 126 characters. If you do not specify this option, an unlabeled public BGP route can be iterated to any LSPs.
Usage guidelines
After you configure this command, unlabeled public BGP routes will be preferentially iterated to LSPs. If a route fails to be iterated to an LSP, the route will be iterated to the IP next hop.
If you execute this command multiple times for an address family, the most recent configuration takes effect.
Examples
# In BGP IPv4 unicast address family view, iterate unlabeled public BGP routes to LSPs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] unicast-route recursive-lookup tunnel
update-first route-policy
Use update-first route-policy to configure BGP to send withdrawal messages of routes matching the specified routing policy prior to other routes.
Use undo update-first route-policy to restore the default.
Syntax
update-first route-policy route-policy-name
undo update-first route-policy
Default
BGP does not send withdrawal messages of any routes prior to other routes.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP VPNv4 address family view
BGP IPv4 labeled unicast address family view
BGP-VPN IPv4 labeled unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP VPNv6 address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
Usage guidelines
This command enables BGP to send the withdrawal messages of specific routes prior to other routes. This can achieve fast route switchover and reduce the traffic interruption time.
Examples
# In BGP IPv4 unicast address family view, configure BGP to send withdrawal messages of routes matching routing policy test-policy prior to other routes.
<Sysname> system-view
[Sysname] bgp 1
[Sysname-bgp-default] address-family ipv4
[Sysname-bgp-default-ipv4] update-first route-policy test-policy
Related commands
default-route update-first
route-policy