S1720, S2700, S5700, and S6720 V200R011C10 Command Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.

BGP Configuration Commands

BGP Configuration Commands

Command Support

The following describes command support of S sereis switches. For details about support for some specific commands or parameters, see the commands.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI

Supported

S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

The S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720S-SI and S5720SI support only BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view.

active-route-advertise

Function

The active-route-advertise command enables BGP to advertise only the preferred routes in the IP routing table.

The undo active-route-advertise command restores the default setting.

By default, BGP advertises all preferred routes in the BGP routing table to neighbors.

Format

active-route-advertise

undo active-route-advertise

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, BGP advertises all preferred routes in the BGP routing table to neighbors. After the active-route-advertise is configured, only the routes preferred by BGP and also active at the routing management layer are advertised to neighbors.

Precautions

The active-route-advertise command and the routing-table rib-only command are mutually exclusive.

Example

# Enable BGP to advertise only the preferred routes in the IP routing table to neighbors.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] active-route-advertise

aggregate (BGP)

Function

The aggregate command creates an aggregated route in the BGP routing table.

The undo aggregate command deletes an aggregated route in the BGP routing table.

By default, no aggregated route is created in the BGP routing table.

Format

aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

undo aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

undo aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of an aggregated route. The address is in dotted decimal notation.
mask Specifies the network mask of an aggregated route. The mask is in dotted decimal notation.
mask-length Specifies the network mask length of an aggregated route. The value is an integer that ranges from 0 to 32.
ipv6-address Specifies the IPv6 address of an aggregated route. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the length of the prefix of an aggregated IPv6 route. The value is an integer that ranges from 0 to 128.
as-set Generates a route with the AS-SET. -
attribute-policy route-policy-name1 Specifies the name of an attribute policy for aggregated routes. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
detail-suppressed Advertises only the aggregated route. -
origin-policy route-policy-name2 Specifies the name of a policy that allows route aggregation. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
suppress-policy route-policy-name3 Specifies the name of a policy for suppressing the advertisement of specified routes. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP route summarization is classified into manual summarization and automatic summarization. The aggregate command can be used to configure manual summarization. This command can summarize routes in the local BGP routing table. Manually summarized routes take precedence over automatically summarized routes. The outbound interface of the summarized route on the local switch is NULL0. When receiving the summarized route, other switches automatically add the outbound interface.

If the specific member routes of a summarized route have different Origin attributes, the Origin attribute of the summarized route uses the value in the order of igp, egp, and incomplete. The summarized route will carry the community attribute of every specific route.

The aggregate command adds a summarized route to the BGP routing table.

  • The parameter as-set is used to create a summarized route whose AS_Path attribute contains AS_Path information of specific routes. Exercise caution when using this parameter if many AS_Path attributes need to be summarized because frequent changes in routes may cause route flapping.

  • The parameter detail-suppressed is used to suppress the advertisement of specific routes. After detail-suppressed is configured, only summarized routes are advertised. Summarized routes carry the atomic-aggregate attribute, not the community attributes of specific routes.

  • The parameter suppress-policy is used to suppress the advertisement of specified routes. The if-match clause of route-policy can be used to filter the routes to be suppressed. This means that only the routes matching the policy will be suppressed, and the other routes will still be advertised. The peer route-policy command can also be used to filter out the routes not to be advertised to peers.

  • After the parameter origin-policy is used, only the routes matching route-policy are summarized.

  • The parameter attribute-policy is used to set attributes for a summarized route. If the AS_Path attribute is set in the policy using the apply as-path command and as-set is set in the aggregate command, the AS_Path attribute in the policy does not take effect. The peer route-policy command can also be used to set attributes for a summarized route.

Prerequisites

Before the aggregate command is run, BGP must be enabled.

Configuration Impact

Summarized routes are generated after you run the aggregate command. If detail-suppressed is configured in the command, the advertisement of specific routes will be suppressed. If suppress-policy is configured in the command, the advertisement of specific routes that match the policy will be suppressed.

Precautions

If the undo aggregate command is run, the system will match routes based on the configured parameter attribute-policy, origin-policy, suppress-policy, as-set, or detail-suppressed. If none of the parameters is configured, the system will fail to execute the undo aggregate command.

Example

# Create an aggregated route. The path that is used to advertise this route is an AS-SET consisting of all aggregated paths.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] aggregate 172.16.0.0 255.255.0.0 as-set

as-notation plain

Function

The as-notation plain command configures a BGP 4-byte AS number to be displayed as an integer.

The undo as-notation plain command configures a BGP 4-byte AS number to be displayed in dotted notation.

By default, a BGP 4-byte AS number is displayed in dotted notation (that is, in the format of x.y).

Format

as-notation plain

undo as-notation plain

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, display commands such as the display bgp peer command display 4-byte AS numbers in dotted notation.

To display a 4-byte AS number as an integer, run the as-notation plain command. After the as-notation plain command is run, display commands display all 4-byte AS numbers as integers. These 4-byte AS numbers include:
  • Independent 4-byte AS number
  • 4-byte AS number in an extended community attribute
  • 4-byte AS number in a route distinguisher (RD)
  • 4-byte AS number in a VPN target (also called a route target)
  • 4-byte AS number in the Site-of-Origin attribute

Assume that a 4-byte AS number in dotted notation is x.y. Following is the conversion relationship between an integral 4-byte AS number and a 4-byte AS number in dotted notation:

Integral 4-byte AS number = x x 65536 + y

For example, if a 4-byte AS number in dotted notation is 2.3, the corresponding integral 4-byte AS number is 131075 (2 x 65536 + 3).

Precautions

After the as-notation plain command is run, the formats of 4-byte AS numbers in configuration information generated by the system do not change.
  • If integral 4-byte AS numbers are configured, 4-byte AS numbers in configuration information generated by the system are also displayed as integers.
  • If 4-byte AS numbers in dotted notation are configured, 4-byte AS numbers in configuration information generated by the system are also displayed in dotted notation.
Changing the format of 4-byte AS numbers will affect matching results of AS_Path regular expressions and extended community attribute filters. Therefore, if the system is using an AS_Path regular expression or an extended community attribute filter as an import or export policy, you must reconfigure an AS_Path regular expression using the ip as-path-filter command or an extended community attribute filter using the ip extcommunity-filter command after changing the format of 4-byte AS numbers. This reconfiguration ensures that routes match the import or export policy.
  • If integral 4-byte AS numbers are configured, you must change 4-byte AS numbers in AS_Path regular expressions and extended community attribute filters to integral 4-byte AS numbers.
  • If 4-byte AS numbers in dotted notation are configured, you must change 4-byte AS numbers in AS_Path regular expressions and extended community attribute filters to 4-byte AS numbers in dotted notation.

Example

# Configure a BGP 4-byte AS number to be displayed as an integer.

<HUAWEI> system-view
[HUAWEI] as-notation plain
Warning: If the configuration takes effect, the regular expression of the filter for 4-byte AS path should be changed to the asplain format, otherwise match will fail. Continue? [Y/N]y

# Configure a BGP 4-byte AS number to be displayed in dotted notation.

<HUAWEI> system-view
[HUAWEI] undo as-notation plain
Warning: If the configuration takes effect, the regular expression of the filter for 4-byte AS path should be changed to the asdot format, otherwise match will fail. Continue? [Y/N]y

as-path-limit

Function

The as-path-limit command sets the maximum number of AS numbers in the AS_Path attribute.

The undo as-path-limit command restores the default setting.

By default, the maximum number of AS numbers in the AS_Path attribute is 255.

Format

as-path-limit [ as-path-limit-num ]

undo as-path-limit

Parameters

Parameter Description Value
as-path-limit-num Specifies the maximum number of AS numbers in the AS-Path attribute.
NOTE:

The maximum value of as-path-limit-num for the 2-byte and 4-byte AS numbers is the same.

The value is an integer that ranges from 1 to 2000. By default, the value is 255.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This command is used to restrict the maximum number of AS numbers in the AS_Path attribute only when the AS_Path attribute is reconstructed or the aggregated routes are generated.

Precautions

After the as-path-limit command is configured, a switch checks whether the number of AS numbers in the AS-Path attribute of each received or advertised route exceeds the maximum value. If the number of AS numbers exceeds the maximum value, the local switch discards the route. Therefore, if the maximum number of AS numbers in the AS-Path attribute is set too small, routes are lost.

Example

# Set the maximum number of AS numbers in the AS-Path attribute to 200.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] as-path-limit 200

auto-frr

Function

The auto-frr command enables BGP Auto FRR.

The undo auto-frr command disables BGP Auto FRR.

By default, BGP Auto FRR is disabled.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

auto-frr

undo auto-frr

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This function is applicable to networks that require a low packet loss rate and a short delay.

Using BGP Auto FRR together with BFD is recommended. They can rapidly detect a link fault and switch traffic to a standby link if a fault occurs.

Precautions

If both the ip frr command and the auto-frr command are configured, the auto-frr command takes precedence over the ip frr command.

On the S5720HI, the auto-frr command can implement fast active/standby link switchovers of the forwarding plane and fast route convergence of the control plane. On other switch models, this command can only implement fast route convergence of the control plane.

Example

# Enable BGP Auto FRR for unicast routes.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] auto-frr

bestroute as-path-ignore

Function

The bestroute as-path-ignore command configures BGP to ignore the AS_Path attribute when it selects the optimal route.

The undo bestroute as-path-ignore command restores the default configuration.

By default, BGP uses the AS_Path attribute as one of route selection rules.

Format

bestroute as-path-ignore

undo bestroute as-path-ignore

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the bestroute as-path-ignore command is used, BGP does not compare the AS path lengths of routes. By default, the route with the shortest AS path is preferred.

Precautions

After the bestroute as-path-ignore command is run, the AS_Path attribute is not used as one of the BGP route selection rules.

Example

# Configure BGP to ignore the AS_Path attribute when selecting the optimal route.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] bestroute as-path-ignore

bestroute igp-metric-ignore

Function

The bestroute igp-metric-ignore command configures BGP to ignore the metric value of the next-hop IGP route when selecting the optimal route.

The undo bestroute igp-metric-ignore command restores the default setting.

By default, BGP selects a route with the smallest metric value of the next-hop IGP route as the optimal route.

Format

bestroute igp-metric-ignore

undo bestroute igp-metric-ignore

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a BGP network, the BGP device always receives multiple routes with the same prefix but to different paths from neighbors. BGP must select the optimal route to the prefix to guide packet forwarding. By default, BGP compares the next-hop IGP route metric values of these routes and selects the route with the smallest metric value as the optimal route.

To customize route selection policies, you can run the bestroute igp-metric-ignore command to configure BGP to ignore the metric value of the next-hop IGP route when selecting the optimal route.

Example

# Configure BGP to ignore the IGP metric when selecting the optimal route.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] bestroute igp-metric-ignore

bestroute med-confederation (BGP)

Function

The bestroute med-confederation command enables BGP to compare the Multi Exit Discriminator (MED) values of routes in a confederation when BGP selects the optimal route.

The undo bestroute med-confederation command restores the default settings.

By default, BGP compares the MED values of the routes that are from the same AS only.

Format

bestroute med-confederation

undo bestroute med-confederation

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, BGP compares only MED values of routes from the same AS, not including sub-ASs in a confederation. To enable BGP to compare MED values of routes in a confederation when selecting the optimal route, run the bestroute med-confederation command.

After the bestroute med-confederation command is configured, BGP compares MED values only when AS_Path does not contain the external AS (AS that is not in the confederation) number. Otherwise, BGP does not compare MED values.

For example, ASs 65000, 65001, 65002, and 65004 belong the same confederation. Routes to the same destination are listed as follows:

  • path1: AS_Path=65000 65004, med=2

  • path2: AS_Path=65001 65004, med=3

  • path3: AS_Path=65002 65004, med=4

  • path4: AS_Path=65003 65004, med=1

After the bestroute med-confederation command is run, the AS_Path attributes of paths 1, 2, and 3 does not contain the numbers of ASs that belong to other confederations. Therefore, when selecting routes based on MED values, BGP compares the MED values of paths 1, 2, and 3 only. This is because the AS_Path attribute of path 4 contains the number of an AS that does not belong to this confederation.

Example

# Configure BGP to compare the MED values of routes only in the confederation when selecting the optimal route.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] bestroute med-confederation

bestroute med-none-as-maximum

Function

The bestroute med-none-as-maximum command configures BGP to assign the maximum Multi Exit Discriminator (MED), 4294967295, to a route without an MED in route selection.

The undo bestroute med-none-as-maximum command restores the default configuration.

By default, BGP assigns 0 to a route without an MED in route selection.

Format

bestroute med-none-as-maximum

undo bestroute med-none-as-maximum

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The bestroute med-none-as-maximum command takes effect in BGP route selection and is used only when the MED is null in the route attributes.If the MED is null and the bestroute med-none-as-maximum command is not run, the system probably cannot select an optimal route.

Configuration Impact

During BGP route selection, if the bestroute med-none-as-maximum command is run, a route without any MED is assigned the maximum MED of 4294967295.

Example

# Configure BGP to assign the maximum MED of 4294967295 to a route without an MED in route selection.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] bestroute med-none-as-maximum

bestroute nexthop-resolved

Function

The bestroute nexthop-resolved command configures the condition of the route selection of labeled BGP IPv4 routes , VPNv4 routes or VPNv6 routes for next hop iteration.

The undo bestroute nexthop-resolved command restores the default configuration.

By default, labeled BGP IPv4 routes , VPNv4 routes or VPNv6 routes participate in route selection only when their next hops are iterated to IP addresses.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

bestroute nexthop-resolved { ip | tunnel }

undo bestroute nexthop-resolved

Parameters

Parameter Description Value
ip Allows labeled routes that are iterated to IP addresses to participate in route selection. -
tunnel Allows labeled routes that are iterated to MPLS tunnels to participate in route selection. -

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In Route Reflector (RR) networking where the next hop of a labeled BGP IPv4 route is changed or non-RR networking, BGP needs to check whether there is an LSP destined for the next hop. If the LSP is not found, BGP needs to establish an LSP in advance. If the default setting is adopted, a labeled BGP IPv4 unicast route may be selected prior to LSP establishment. As a result, services are incorrectly switched before LSP establishment and service stability is affected. The bestroute nexthop-resolved tunnel command can be run to allow route selection only after the labeled BGP IPv4 route is iterated to an LSP. This ensures service stability.

By default, a VPNv4 route or VPNv6 routes can participate in route selection if its next hop is iterated to an IP address. The system adds the optimal VPNv4 route or VPNv6 route to the forwarding table for traffic forwarding. However, traffic cannot be forwarded over the route if the route is not iterated to an LSP. In this situation, run the bestroute nexthop-resolved tunnel command to enable VPNv4 routes or VPNv6 routes to be available in route selection only when their next hops are iterated to LSPs to ensure uninterrupted traffic forwarding.

Precautions

The bestroute nexthop-resolved ip and bestroute nexthop-resolved tunnel commands are mutually exclusive.

Example

# In the BGP VPNv4 view, configure BGP VPNv4 routes that are iterated to LSP tunnels to participate in route selection.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family vpnv4
[HUAWEI-bgp-af-vpnv4] bestroute nexthop-resolved tunnel

# In the BGP VPNv6 view, configure BGP VPNv6 routes that are iterated to LSP tunnels to participate in route selection.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv6-family vpnv6
[HUAWEI-bgp-af-vpnv6] bestroute nexthop-resolved tunnel

bestroute routerid-prior-clusterlist

Function

The bestroute routerid-prior-clusterlist command enables Originator_ID to take precedence over Cluster_List during BGP route selection.

The undo bestroute routerid-prior-clusterlist command restores the default configurations.

By default, Cluster_List takes precedence over Originator_ID during BGP route selection.

Format

bestroute routerid-prior-clusterlist

undo bestroute routerid-prior-clusterlist

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 multicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-L2VPN address family view

Default Level

2: Configuration level

Usage Guidelines

On a BGP network, after a router receives multiple routes with the same prefix but different paths from different peers, the router needs to select an optimal route from these routes to forward packets. By default, Cluster_List takes precedence over Originator_ID during BGP route selection. To enable Originator_ID to take precedence over Cluster_List during BGP route selection, run the bestroute routerid-prior-clusterlist command.

Example

# Enable Router ID to take precedence over Cluster_List during BGP route selection.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] bestroute routerid-prior-clusterlist

bgp

Function

The bgp command enables BGP and displays the BGP view.

The undo bgp command disables BGP.

By default, BGP is disabled.

Format

bgp { as-number-plain | as-number-dot }

undo bgp [ as-number-plain | as-number-dot ]

Parameters

Parameter Description Value
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation. The value is in the x.y format. Here, "x" and "y" are integers that range from 1 to 65535 and 0 to 65535 respectively.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP is an inter-AS dynamic routing protocol. BGP running within an AS is called Internal BGP (IBGP), and BGP running between ASs is called External BGP (EBGP).

Whether to apply BGP to routing information transmission between ASs depends on the following conditions:

  • If at least one of the following conditions is met, BGP can be used:

    • An AS allows data packets to pass through on their way to another AS.

    • Multiple connections to external ISPs and the Internet exist in ASs.

    • Data flows entering or leaving ASs must be controlled.

  • If one of the following conditions is met, BGP does not need to be used:

    • Users are connected to only one ISP network.

    • The ISP does not need to provide Internet access services for users.

    • ASs adopt default routes between each other.

Precautions

After the bgp command is run, BGP is enabled.

Each device runs in only one AS; therefore, each device can be specified with only one local AS number.

After the undo bgp [ as-number-plain | as-number-dot ] command is run, BGP services may be interrupted, and all BGP configurations on the device are cleared. Therefore, exercise caution when you run this command.

Example

# Enable BGP and enter the BGP view.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp]

bgp fast-refresh enable

Function

The bgp fast-refresh enable command enables the BGP Prefix Independent Convergence (PIC) function.

The undo bgp fast-refresh enable command disables the BGP PIC function.

By default, the BGP PIC function is enabled on the switch.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

bgp fast-refresh enable

undo bgp fast-refresh enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When there are primary and backup paths for a BGP route, and a fault occurs on the primary path, the route must be updated and traffic must be switched to the backup path as soon as possible. This process is called BGP route convergence. As the network expands in scale and route prefixes, the BGP route convergence speed is affected by the number of route prefixes. More route prefixes indicate slower route convergence speed. If a network fault occurs, many packets are lost due to the slow route convergence speed. This can have a large impact on some services that are sensitive to packet loss. BGP PIC is also called BGP fast refresh. It indicates that the BGP route convergence speed is independent of the number of route prefixes. After this function is enabled, the BGP route convergence speed becomes faster without being affected by the number of route prefixes. This function reduces data loss during route convergence. When this function becomes unavailable, you can run the undo bgp fast-refresh enable command to disable it. BGP routes are then converged as usual; however, the route convergence speed is slow.

Precautions

  • Only IBGP routes support the BGP PIC function, and VPN routes do not support this function.

  • If the BGP load balancing (ECMP) or BGP Auto FRR function has been configured on the device or the next hop of a BGP route is iterated to a tunnel interface, the BGP PIC function does not take effect.

  • Disabling the BGP PIC function requires the device to be restarted after the configuration is saved or requires all BGP ASs to be reset. Otherwise, disabling the BGP PIC function takes effect only for the subsequently generated routing tables.

    Enabling the BGP PIC function requires the device to be restarted.

Example

# Disable the BGP PIC function on the switch.

<HUAWEI> system-view
[HUAWEI] undo bgp fast-refresh enable
Warning: The operation will take effect only on routing tables generated later. 
Please save configuration and reboot this device or reset all BGP ASs after this
 operation.  

check-first-as

Function

The check-first-as command enables the function to check the first AS number in the AS_Path list that is carried in the Update message sent by the EBGP peer.

The undo check-first-as command disables the function.

By default, the function is enabled.

Format

check-first-as

undo check-first-as

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, BGP checks the first AS number in the AS_Path list that is carried in the Update message sent by the EBGP peer. If only the first AS number indicates the AS where the EBGP peer locates, the Update message is accepted. Otherwise, the Update message is denied, and the EBGP connection goes Down.

Precautions

The check-first-as command is not listed in the configuration file.

After the undo check-first-as command is configured, loops have a greater chance to occur. Therefore, use the command with caution.

Follow-up Procedure

After the configuration is complete, run the refresh bgp command if you want to check the received routes again.

Example

# Check the first AS number in the AS_Path list that is carried in the Update message sent by the EBGP peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] check-first-as
Related Topics

compare-different-as-med

Function

The compare-different-as-med command enables BGP to compare the MEDs in the routes of peers in different ASs.

The undo compare-different-as-med command restores the default configuration.

By default, BGP does not compare the MEDs in the routes of peers in different ASs.

Format

compare-different-as-med

undo compare-different-as-med

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The command is used to control the MEDs to change the policy of BGP route selection. If the compare-different-as-med command is run, BGP will compare the MEDs of the routes from different ASs. If there are multiple reachable paths to the same destination, BGP prefers the route with the smallest MED.

Precautions

Do not use this command unless different ASs use the same IGP and route selection mode.

Example

# Enable BGP to compare the MEDs in the routes of peers in different ASs.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] compare-different-as-med

confederation id

Function

The confederation id command configures a BGP confederation and specifies a confederation ID for the BGP confederation.

The undo confederation id command removes the specified BGP confederation.

By default, no BGP confederation is configured.

Format

confederation id { as-number-plain | as-number-dot }

undo confederation id

Parameters

Parameter Description Value
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A large AS may contain a huge number of fully meshed IBGP peer relationships. In this situation, configure a confederation.

Divide the AS into multiple small sub-ASs and group them into a confederation. Then establish EBGP connections between sub-ASs and establish fully meshed IBGP connections within the same sub-AS. Some key attributes of routes, such as the next hop, MED, and local preference are not discarded when these routes pass through sub-ASs. This can reduce the number of fully meshed IBGP peer relationships in an AS and keep the integrity of the original AS.

Precautions

The confederation ID is equal to the AS number. An external AS must specify the confederation ID when specifying the AS number of the peer. All the sub-ASs in the same confederation must be configured with the same confederation ID that must be different from the number of any sub-AS.

Example

# Configure a confederation ID. An AS is divided into sub-ASs 65001, 65002, 65003, and 65004, and their confederation ID is 9. Peer 10.2.3.4 is a member of the AS confederation. Peer 10.4.5.6 is a member outside the AS confederation. For the external members, confederation 9 is a complete AS.

<HUAWEI> system-view
[HUAWEI] bgp 65001
[HUAWEI-bgp] confederation id 9
[HUAWEI-bgp] confederation peer-as 65002 65003 65004 
[HUAWEI-bgp] peer 10.2.3.4 as-number 65002
[HUAWEI-bgp] peer 10.4.5.6 as-number 65005
Related Topics

confederation nonstandard

Function

The confederation nonstandard command configures standard devices (in RFC 3065) in a confederation to communicate with nonstandard devices.

The undo confederation nonstandard command configures standard devices in a confederation to communicate only with standard devices.

By default, only standard devices in a confederation can communicate with each other.

Format

confederation nonstandard

undo confederation nonstandard

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To communicate with nonstandard devices, configure this command on all switches in a confederation.

Precautions

After the confederation ID is configured, running the confederation nonstandard command will disconnect the sessions between a router and its IBGP peers as well as its confederation EBGP peers. Then, new connections are reestablished.

Example

# Enable the switch to communicate with nonstandard routers. The AS 100 contains two sub-ASs, 64000 and 65000.

<HUAWEI> system-view
[HUAWEI] bgp 64000
[HUAWEI-bgp] confederation id 100
[HUAWEI-bgp] confederation peer-as 65000
[HUAWEI-bgp] confederation nonstandard

confederation peer-as

Function

The confederation peer-as command configures the number of each sub-AS of the same confederation.

The undo confederation peer-as command removes the specified sub-AS from the confederation.

By default, no sub-AS number of the confederation is configured.

Format

confederation peer-as { as-number-plain | as-number-dot } &<1-32>

undo confederation peer-as { as-number-plain | as-number-dot } &<1-32>

Parameters

Parameter Description Value
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A large AS may contain a huge number of fully meshed IBGP peer relationships. In this situation, configure a confederation.

Prerequisites

The confederation id command specifies the confederation ID of each sub-AS. If the confederation ID is not configured, this configuration is invalid.

Precautions

The sub-ASs configured in this command belong to the same confederation, and each sub-AS uses fully meshed network.

Example

# Configure sub-ASs for the confederation.

<HUAWEI> system-view
[HUAWEI] bgp 1090
[HUAWEI-bgp] confederation id 100
[HUAWEI-bgp] confederation peer-as 1091 1092 1093
Related Topics

confederation route unicast-to-label disable

Function

The confederation route unicast-to-label disable command prevents non-RRs from advertising the IPv6 non-labeled routes learned from peers in the local confederation as labeled routes carrying a label of all Fs to the BGP peers in another confederation.

The undo confederation route unicast-to-label disable command restores the default configuration.

By default, non-RRs can advertise the IPv6 non-labeled routes learned from peers in the local confederation as labeled routes carrying a label of all Fs to the BGP peers in another confederation.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

confederation route unicast-to-label disable

undo confederation route unicast-to-label disable

Parameters

None

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

If two PEs that are not RRs reside in two confederations, the PEs can advertise labeled routes carrying a label of all Fs to each other by default. However, non-Huawei devices may consider the label of all Fs invalid, and if these non-Huawei devices receive such labeled routes, BGP peer relationships may be disconnected. To prevent this problem, run the confederation route unicast-to-label disable command to prevent the PEs from advertising labeled routes carrying a label of all Fs.

Example

# Prevent non-RRs from advertising the IPv6 non-labeled routes learned from peers in the local confederation as labeled routes carrying a label of all Fs to the BGP peers in another confederation.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] confederation id 100
[HUAWEI-bgp] confederation peer-as 38 39
[HUAWEI-bgp] peer 192.168.1.1 as-number 38
[HUAWEI-bgp] peer 191::1 as-number 39
[HUAWEI-bgp] ipv6-family unicast
[HUAWEI-bgp-af-ipv6] peer 192.168.1.1 enable
[HUAWEI-bgp-af-ipv6] peer 192.168.1.1 label-route-capability
[HUAWEI-bgp-af-ipv6] peer 191::1 enable
[HUAWEI-bgp-af-ipv6] confederation route unicast-to-label disable

dampening

Function

The dampening command enables BGP route flap suppression and modifies BGP route flap suppression parameters.

The undo dampening command restores the default configuration.

By default, BGP route flap suppression is disabled.

Format

dampening [ ibgp ] [ half-life-reach reuse suppress ceiling | route-policy route-policy-name ] *

undo dampening [ ibgp ]

Parameters

Parameter Description Value
half-life-reach Specifies the half life of a reachable route. The value is an integer that ranges from 1 to 45, in minutes. The default value is 15.
reuse Specifies the threshold for the route to be unsuppressed. If the penalty of the route falls below the threshold, the route is reused. The value is an integer that ranges from 1 to 20000. The default value is 750.
suppress Specifies the threshold for the route to be suppressed. If the penalty value of the route exceeds the threshold, the route is not used. The value is an integer that ranges from 1 to 20000, which must be greater than the value of reuse. The default value is 2000.
ceiling Specifies the penalty ceiling. The value is an integer that ranges from 1001 to 20000. The configured value must be greater than that of suppress. The default value is 16000.
route-policy route-policy-name Specifies the name of a route-policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ibgp Specifies the route type as IBGP route. If this parameter is not specified, the route type is EBGP route.
NOTE:

This parameter takes effect only in the BGP-VPNv4 address family view.

-

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 multicast address family view, BGP-VPNv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP route flap dampening measures the stability of a route by using a penalty value. The greater the penalty value, the less stable the route. Each time route flapping occurs, that is, when the switch receives a Withdraw packet or an Update packet for a route, BGP adds a certain penalty value (1000) for the route.

When the penalty value of the route exceeds the suppression threshold, the route is suppressed. The switch does not add the route to the IP routing table or advertise any Update packet to other BGP peers. If the route is marked with the d flag, the last packet received by the switch is an Update packet; if the route is marked with the h flag, the last packet received by the switch is a Withdraw packet. After the penalty value reaches a certain limit, it does not increase any more. The limit is called the penalty ceiling.

After the route is suppressed for a certain period, the penalty value is reduced by half. If the penalty value of a route marked with the d flag decreases to the reuse threshold, the d flag is removed, and the route becomes available and is selected preferentially. After that, the route can be added to the IP routing table and used to send Update packets to other BGP peers. If the penalty value of a route marked with the h flag decreases to 0, the route is deleted from the BGP routing table.

You can run the display bgp routing-table label command to check the d flag and h flag indicating the routes that have been dampened and were dampened respectively.

Precautions

If the dampening command is run multiple times, the latest configuration overrides the previous one.

After the dampening command is run, the system suppresses unstable routes. This means that the system does not add unstable routes to the BGP routing table or advertise them to other BGP peers.

Note the following items when configuring BGP route flap dampening:

  • The value of suppress must be greater than that of reuse and smaller than that of ceiling.

  • If MaxSuppressTime obtained by using the formula of MaxSuppressTime = half-life-reach x 60 x (ln(ceiling/reuse)/ln(2)) is smaller than 1, suppression cannot be performed. You need to ensure that the value of MaxSuppressTime is equal to or greater than 1. This means that the value of ceiling/reuse must be great enough.

The dampening command is valid only for EBGP routes.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, the configured dampening parameters apply to all routes; if no dampening parameters are configured, the default dampening parameters apply to the routes.

Example

# Enable EBGP route dampening and modify EBGP route damping parameters.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] dampening 10 1000 2000 5000

default ipv4-unicast

Function

The default ipv4-unicast command enables the IPv4 unicast address family for BGP peers by default.

The undo default ipv4-unicast command disables the IPv4 unicast address family for BGP peers by default.

By default, the IPv4 unicast address family is enabled for BGP peers.

Format

default ipv4-unicast

undo default ipv4-unicast

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the IPv4 unicast address family needs to be enabled by default for created BGP peers, the default ipv4-unicast command can be used to configure the default address family of BGP to the IPv4 unicast address family.

If the IPv4 unicast address family does not need to be enabled by default for created BGP peers, the undo default ipv4-unicast command can be used to disable the IPv4 unicast address family for all peers.

Precautions

After the undo default ipv4-unicast command is run, the peer enable command needs to be run if the created BGP peer needs to be enabled with the IPv4 unicast address family.

Example

# Enable the IPv4 unicast address family for all peers.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] default ipv4-unicast

default local-preference

Function

The default local-preference command sets the default local preference for BGP routes.

The undo default local-preference command restores the default configuration.

By default, the local preference for BGP routes is 100.

Format

default local-preference local-preference

undo default local-preference

Parameters

Parameter Description Value
local-preference Specifies the local preference for BGP routes. The greater the value, the higher the preference. The value is an integer that ranges from 0 to 4294967295.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The Local_Pref attribute is used to determine an optimal route for traffic before traffic leaves an AS. When the switch that runs BGP has multiple routes to the same destination, the switch selects the route with the highest local preference as the optimal route.

Precautions

If the switch is already configured with a default local preference for BGP routes, the configuration of a new default local preference will override the previous configuration.

The local preference is exchanged only between IBGP peers and is not advertised to other ASs.

Example

# Set the default local preference for BGP routes to 200.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast 
[HUAWEI-bgp-af-ipv4] default local-preference 200

default med

Function

The default med command sets the default multi-exit-discriminator (MED) for BGP routes.

The undo default med command restores the default configuration.

By default, the MED is 0.

Format

default med med

undo default med

Parameters

Parameter Description Value
med Specifies the MED for BGP routes. The value is an integer that ranges from 0 to 4294967295.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The default med command is valid only for the routes imported by using the import-route (BGP) command and the routes summarized by BGP on the local device.

The default med command sets the default MED and controls route selection for the traffic entering an AS. If the other attributes of routes to the same destination are the same, BGP will select the route with the smallest MED as the optimal route.

Precautions

If a default MED is configured on a device, configuring a new default MED will override the previous configuration.

The MED is transmitted between two neighboring ASs only. Devices in an AS do not advertise the received MED to peers in other ASs.

Example

# Set the default MED of a BGP route to 10.

<HUAWEI> system-view
[HUAWEI] bgp 1
[HUAWEI-bgp] ipv4-family unicast 
[HUAWEI-bgp-af-ipv4] default med 10

default-route imported

Function

The default-route imported command enables the import of the default routes in the local IP routing table to the BGP routing table.

The undo default-route imported command disables the import of the default routes in the local IP routing table to the BGP routing table.

By default, BGP does not add the default route to the BGP routing table.

Format

default-route imported

undo default-route imported

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This configuration reduces the number of routes on the network and minimizes the routing table size. If the default-route imported command is run and a default route exists in the local IP routing table, the system imports the default route to the BGP routing table. After default routes are imported, the packets can be transmitted over the default route when no matched routing entry is found in the routing table, preventing packet loss.

Precautions

To import default routes, you need to run both the default-route imported command and the import-route (BGP) command. If only the import-route (BGP) command is used, default routes cannot be imported. In addition, the default-route imported command is used to import only the default routes that exist in the local routing table.

When a device needs to advertise default routes to a peer (group) and no default route exists in the local routing table, the peer default-route-advertise command needs to be used.

Example

# Import default routes to the BGP routing table.

<HUAWEI> system-view
[HUAWEI] bgp 1
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] default-route imported
[HUAWEI-bgp-af-ipv4] import-route ospf 1

deterministic-med (BGP)

Function

The deterministic-med command enables the BGP deterministic-MED function so that routes with the same leftmost AS number are first compared during route selection.

The undo deterministic-med command disables the BGP deterministic-MED function so that routes are compared against each other according to the sequence in which they are received.

By default, the BGP deterministic-MED function is disabled.

Format

deterministic-med

undo deterministic-med

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

After the BGP deterministic-MED function is enabled, when an optimal route is to be selected from routes that are received from different ASs and carry the same prefix, routes are first grouped based on the leftmost AS number in the AS_Path attribute. Routes with the same leftmost AS number are grouped together, and after comparison, an optimal route is selected for the group. The group optimal route is then compared with optimal routes from other groups to determine the final optimal route. This mode of route selection ensures that the sequence in which routes are received is irrelevant to the route selection result.

If the BGP deterministic-MED function is disabled, routes are compared against each other according to the sequence in which they are received. In this manner, the sequence in which routes are received is relevant to the result of route selection.

For example: Assume that the following BGP routes are available on the switch.
  • Route A1: AS(PATH) 12, med 100, igp metric 13, internal, rid 4.4.4.4

  • Route A2: AS(PATH) 12, med 150, igp metric 11, internal, rid 5.5.5.5

  • Route B: AS(PATH) 3, med 0, igp metric 12, internal, rid 6.6.6.6

If Route A1, Route A2, and Route B are received in turn, Route A1 and Route A2 are first compared. The leftmost AS number of Route A1 is the same as the leftmost AS number of Route A2, and therefore Route A1 is selected because its MED is smaller. After that, Route A1 and Route B are compared. Because the leftmost AS numbers of the two routes are different, the optimal route cannot be selected by comparing the MEDs of the two routes unless the compare-different-as-med command is configured. As a result, Route B is selected because its IGP metric is smaller.

If Route A2, Route B, and Route A1 are received in turn, Route A2 and Route B are first compared. Because leftmost AS number of Route A2 is different from the leftmost AS number of Route B, the optimal route cannot be selected by comparing the MEDs of the two routes unless the compare-different-as-med command is configured. As a result, Route A2 is selected because its IGP metric is smaller. After that, Route A2 and Route A1 are compared. The leftmost AS number of Route A1 is the same as the leftmost AS number of Route A2, and therefore Route A1 is selected because its MED is smaller.

Judging from the preceding route selection procedure, when the BGP deterministic-MED function is disabled, the sequence in which routes are received is relevant to the result of route selection. After the BGP deterministic-MED function is enabled, the sequence in which routes are received is no longer relevant to the result of route selection. Route A1 and Route A2 have the same leftmost AS number, Route A1 and Route A2 are compared first regardless of the sequence in which routes are received.

Example

# Enable the deterministic-MED function in the BGP view.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] deterministic-med

display bgp bfd session

Function

The display bgp bfd session command displays information about BFD sessions between BGP peers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp bfd session { [ vpnv4 vpn-instance vpn-instance-name ] peer ipv4-address | all }

Parameters

Parameter Description Value
vpnv4 vpn-instance vpn-instance-name Displays information about the BFD session between BGP peers with the specified IPv4 VPN instance name. The value must be an existing VPN instance name.
peer ipv4-address Displays information about the BFD session of the BGP peer with the specified IPv4 address. The value is in dotted decimal notation.
all Displays all BFD sessions between BGP peers. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The BFD session set up by BGP helps BGP quickly discover faults between BGP peers and informs BGP to recalculate routes for packet forwarding.

Run the display bgp bfd session command to display information about the BFD session set up by BGP in the following situations:
  • Check whether the BFD session is successfully set up or view detailed information about the BFD session that is successfully configured.
  • Check whether the BFD session set up by BGP is successfully deleted after running the undo peer bfd enable command.
  • Verify the configuration after running the undo peer bfd block command to prevent a peer from inheriting the BFD function of the peer group.
  • Verify the configuration after running the peer bfd command to set BFD parameters.

The information about the BFD session of a specified BGP peer can be displayed by specifying different parameters.

  • Run the display bgp bfd session vpnv4 vpn-instance vpn-instance-name peer ipv4-address command to display information about the BFD session of a specified BGP peer in a specified VRF.

  • Run the display bgp bfd session peer ipv4-address command to display information about the BFD session of a specified BGP peer on the public network.
  • Run the display bgp bfd session all command to display information about the BFD sessions of all BGP peers.

Prerequisites

The BFD session has been set up using the peer bfd enable command. If the BFD session has not been set up by BGP, no information is displayed after running the display bgp bfd session command.

Example

# Display all BFD sessions between BGP peers.

<HUAWEI> display bgp bfd session all
  Local_Address      Peer_Address       LD/RD       Interface
  10.1.1.2           10.1.1.1           8192/8193   Unknown
  Tx-interval(ms)    Rx-interval(ms)    Multiplier  Session-State
  1000               1000               3           Up
  Wtr-interval(m)
0
Table 7-122  Description of the display bgp bfd session command output

Item

Description

Local_Address

Local address

Peer_Address

Peer address

LD/RD

Local/remote discriminator

Interface

Interface on which the BFD session is set up

NOTE:

Information about the interface on which the BFD session is set up only when the directly connected interface is used to set up the EBGP neighbor relationship. In other cases, information about the interface is displayed as Unknown.

Tx-interval (ms)

Interval for sending BFD packets, in milliseconds

Rx-interval (ms)

Interval for receiving BFD packets, in milliseconds

Multiplier

Local detection multiple

Session-State

BFD status
  • Admin down: The BFD session is closed on the local end.

  • BFD global disable: BFD is disabled globally.

  • BFD session number exceed: The number of BFD sessions exceeds the maximum limit.

  • Detect down: BFD detects a link status fault and interrupts the connection.

  • Init: The BFD session is in the initialized state.

  • Neighbor down: The peer end detects that the BFD session goes Down and informs the local end of the change, and the local end then sets the neighbor status to Down.

  • Receive admin down: The BFD session is closed on the peer end (for example, the BFD session is disabled on the peer end).

  • Up: The BFD session is set up.

Wtr-interval(m)

Interval for flap dampening, in minutes

display bgp error

Function

The display bgp error command displays BGP errors.

Format

display bgp error

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

When a BGP fault occurs, run the display bgp error command to display BGP error information. BGP error information includes peer error information, route error information, and resource threshold-crossing error information.

Precautions

If no BGP fault occurs, no information is displayed after running the display bgp error command.

Example

# Display BGP errors.

<HUAWEI> display bgp error
 Error Type    : Peer Error
 Date/Time     : 2010/03/22 11:40:39 UTC-08:00
 Peer Address  : 10.1.1.2
 VRF Name      : Public
 Error Info    : Router-ID conflict   

 Error Type    : Peer Error
 Date/Time     : 2010/03/22 11:40:39 UTC-08:00
 Peer Address  : 10.1.1.2
 VRF Name      : Public
 Error Info    : Incorrect remote AS

 Error Type    : Route Error
 AddressFamily : IPv4-UNC
 InstanceID    : 0
 Discard count : 20

 Error Type    : Resource exceed limit
 Date/Time     : 2010/03/22 11:40:39 UTC-08:00
 Limit info    : Route number limit

 Error Type    : Resource exceed limit
 Date/Time     : 2010/03/22 11:40:39 UTC-08:00
 Limit info    : Label number limit
Table 7-123  Description of the display bgp error command output

Item

Description

Error Type

Error type:

  • Peer Error: indicates neighbor errors.
  • Route Error: indicates route errors.
  • Resource exceed limit: indicates that resources exceed the limit.

Date/Time

Date and Time when an error occurs

Peer Address

Address of a peer

VRF Name

VPN Instance name

Error Info

Error information:

  • Router-ID conflict: indicates that router IDs conflict.
  • Incorrect remote AS: indicates an incorrect remote AS number.

AddressFamily

Address family

Discard count

Number of discarded routes

Limit info

Information indicating that resources exceed the limit:

  • Memory shortage: indicates that memory exceeds the limit.
  • Route number limit: indicates that the number of routes exceeds the limit.
  • Label number limit: indicates that the number of labels exceeds the limit.

display bgp error discard

Function

The display bgp error discard command displays the information about the discarded error BGP packets.

Format

display bgp error discard [ peer { ipv4-address | ipv6-address } ]

Parameters

Parameter Description Value
peer Displays errors on a specified peer. -
ipv4-address Displays errors on a peer with the specified IPv4 address. It is in dotted decimal notation.
ipv6-address Displays errors on a peer with the specified IPv6 address. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

When a BGP fault occurs, the display bgp error discard command can be run to check the information about discarded error packets. The errors include cluster ID conflicts and the threshold overflow of AS-Path attributes.

By specifying the peer parameter, you can check the information about the error packets discarded by a specified BGP peer.

Precautions

The display bgp error discard command can be used to check only the error routing. To check the error routing among BGP peers, run the display bgp error command.

Example

# Display information about discarded BGP error packets.

<HUAWEI> display bgp error discard
BGP Discard Info Counts:
Routes received with cluster ID loop           : 0
Routes received with as path count over limit  : 0
Routes advertised with as path count over limit: 0

 No discard record.
Table 7-124  Description of the display bgp error discard command output

Item

Description

BGP Discard Info Counts

Number of discarded BGP routes

Routes received with cluster ID loop

Number of discarded BGP routes with a duplicate cluster ID

Routes received with as path count over limit

Number of received BGP routes discarded due to the number of AS-Paths exceeding the upper threshold

Routes advertised with as path count over limit

Number of sent BGP routes discarded due to the number of AS-Paths exceeding the upper threshold

No discard record

No record about packet discarding

display bgp group

Function

The display bgp group command displays information about BGP peer groups.

Format

display bgp group [ group-name ]

display bgp vpnv4 { all | vpn-instance vpn-instance-name } group [ group-name ]

display bgp vpls group [ group-name ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp ipv6 group [ group-name ]

display bgp vpnv6 all group [ group-name ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 vpn-instance vpn-instance-name group [ group-name ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn-ad group [ group-name ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
vpnv4 Displays information about BGP VPNv4 peer groups. -
all Displays information about all BGP VPNv4 or VPNv6 peer groups. -
vpn-instance vpn-instance-name Displays information about BGP peer groups in a specified VPN instance. The value must be an existing VPN instance name.
vpls Displays information about BGP peer groups of VPLS. -
ipv6 Displays information about IPv6 peer groups. -
vpnv6 Displays information about BGP VPNv6 peer groups. -
l2vpn-ad Displays information about BGP peer groups of L2VPN-AD. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

Configuring BGP peer groups simplifies BGP network configuration and improves the route advertisement efficiency.

The display bgp group command displays information about the peer group, including peers in the peer group and configuration information about the peer group. The display bgp group command is used in the following scenarios:
  • Verify the configuration after running the group command to configure the peer group.
  • Verify the configuration after running the peer group command to add a peer to the peer group.
  • Verify the configuration after running the undo peer group command to delete a peer from the peer group.
  • Verify the configuration after modifying the configuration of the peer group.

Precautions

BGP has multiple address families, each of which is configured independently. Information about peer groups in address families can be displayed by specifying different parameters.

If no parameter is specified, the display bgp group command displays default information about peer groups in the IPv4 unicast address family.

Example

# Display information about a peer group named my-peer.

<HUAWEI> display bgp group my-peer

 BGP peer-group: my-peer
 Remote AS: 200
 Authentication type configured: None
 Group's BFD has been enabled
 Type : internal
 Configured hold timer value: 180
 Keepalive timer value: 60
 Minimum route advertisement interval is 15 seconds
 listen-only has been configured
 PeerSession Members:
   10.2.2.2

 Maximum allowed route limit: 8000
 Threshold: 75%, Parameter:  always connect-retry(default)
 Peer Preferred Value: 0
 No routing policy is configured
 Peer Members:
  Peer             V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
  10.2.2.2         4   200        0        0     0 00:00:47      Active       0
Table 7-125  Description of the display bgp group command output

Item

Description

BGP peer-group

Indicates the name of a BGP peer group

Remote AS

Indicates the number of the AS where a peer group resides.

Authentication type configured

Indicates the configured BGP authentication type:
  • MD5

  • None: indicates that no BGP authentication is configured.

Group's BFD has been enabled

Indicates that BFD has been enabled for a peer group.

Type

Indicates the type of a peer group:
  • internal: indicates that the peer group is an IBGP peer group.

  • external: indicates that the peer group is an EBGP peer group.

Configured hold timer value

Indicates the value of the Hold timer.

Keepalive timer value

Indicates the value of the Keepalive timer.

Minimum route advertisement interval

Indicates the minimum interval between route advertisements.

listen-only has been configured

Indicates that the peer or peer group only detects connection requests, and does not initiate any connection.

PeerSession Members

Indicates peers that set up sessions.

Maximum allowed route limit

Indicates the maximum number of allowed BGP routes.

Threshold

Indicates the threshold for the quantity of received BGP routes (in percentage) out of the maximum number of routes that can be received.

Parameter

If peer route-limit command is configured, this parameter will be displayed:
  • always connect-retry(default): By default, BGP Always connect-retry when the maximum is exceeded and the BGP session is terminated.
  • alert-only: Allows the switch to generate log message without terminating BGP session when the maximum is exceeded.
  • idle-forever: Don't auto-connect-retry until reset bgp when the maximum is exceeded and then terminating BGP session.
  • idle-timeout: Auto-connect-retry after timeout when the maximum is exceeded and then terminating BGP session.

Peer Preferred Value

Indicates the preferred value of a peer.

Peer Members

Indicates that the following information is about peers.

Peer

Indicates the IP address of a peer.

V

Indicates the BGP version.

AS

Indicates the number of the AS where a member of a peer group resides.

MsgRcvd

Indicates the number of received messages.

MsgSent

Indicates the number of sent messages.

OutQ

Indicates the number of messages to be sent to peers.

Up/Down

Indicates the period of time during which a BGP session keeps the current state.

State

Indicates the BGP state mechanism:
  • Idle: indicates that BGP denies any request of entering. This is the initiatory status of BGP.

    Upon receiving a Start event, BGP initiates a TCP connection to the remote BGP peer, starts the ConnectRetry Timer with the initial value, detects a TCP connection initiated by the remote BGP peer, and changes its state to Connect.

  • Idle(Admin): indicates that the peer relationship is shut down initiatively and no attempt is made to establish the neighbor relationship.

    If the peer ignore command is configured or the peer is set to the Down state through the MIB, the neighbor is in the Idle (Admin) state.

  • Idle(Ovlmt): indicates that the peer relationship is interrupted because the number of routes exceeds the upper threshold.

    After a BGP peer relationship is interrupted due to the running of the peer route-limit command, the status of the BGP peer relationship is displayed as Idle(Ovlmt). If the reset bgp command is not run, the BGP peer relationship will not be reestablished.

  • Connect: indicates that BGP waits for the TCP connection to be set up before it determines whether to perform other operations.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value, initiates a TCP connection to the remote BGP peer, and stays in the Connect state.

  • Active: indicates that BGP tries to set up a TCP connection. This is the intermediate status of BGP.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value and changes its state to Connect.

    • If BGP initiates a TCP connection with an unknown IP address, the TCP connection fails. When this occurs, BGP restarts the ConnectRetry Timer with the initial value and stays in the Active state.

  • OpenSent: indicates that BGP has sent one Open message to its peer and waits for an Open message from the peer.
    • If there are no errors in the Open message received, BGP changes its state to OpenConfirm.

    • If there are errors in the Open message received, BGP sends a Notification message to the remote peer and changes its state to Idle.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

  • OpenConfirm: indicates that BGP waits for a Notification message or a Keepalive message.
    • If BGP receives a Notification message, or the TCP connection fails, BGP changes its state to Idle.

    • If BGP receives a Keepalive message, BGP changes its state to Established.

  • Established: indicates that BGP peers can exchange Update, Notification and Keepalive packets.
    • If BGP receives an Update or a Keepalive message, its state stays in Established.

    • If BGP receives a Notification message, BGP changes its state to Idle.

PrefRcv

Indicates the number of route prefixes received by the local peer from the remote peer.

# Display information about all BGP VPNv4 peer groups.

<HUAWEI> display bgp vpnv4 all group
Group in VPNV4:
 
 BGP peer-group: aa
 Remote AS number isn't specified
 Type : external
 PeerSession Members:
   3.3.3.3
 
 Peer Members:
   3.3.3.3
 ***********************

 BGP peer-group: bb
 Remote AS 100
 Type : internal
 PeerSession Members:
  NONE

 Peer Members:
   4.4.4.4
 
Group in VPN-Instance:
 
 BGP peer-group: cc
 Remote AS number isn't specified
 VPN-Instance(IPv4-family): vpn1
 
 Type : external
 PeerSession Members:
   2.2.2.1

 Peer Members:
   2.2.2.1
Table 7-126  Description of the display bgp vpnv4 all group command output

Item

Description

Group in VPNV4

Displays information about all BGP peer groups in the VPNv4 address family view.

Remote AS number isn't specified

Indicates that this item is displayed when the peer group is a mixed EBGP peer group.

Group in VPN-Instance

Displays information about peer groups in a VPN instance.

VPN-Instance

Indicates the name of a VPN instance.

# Display information about a BGP VPNv4 peer group named rr1.

<HUAWEI> display bgp vpnv4 all group rr1
Group in VPNV4:
 No such a peer-group 

Group in VPN-Instance:

 BGP peer-group: rr1
 Remote AS number isn't specified
 VPN-Instance: 1

 Type : external 
 Configured hold timer value: 180
 Keepalive timer value: 60
 Minimum route advertisement interval is 30 seconds
 PeerSession Members:
  NONE 

 Peer Preferred Value: 0
 No routing policy is configured
 Peer Members:
  No Peer Exists

# Display information about all BGP IPv6 peer groups.

<HUAWEI> display bgp vpnv6 all group
Group in VPNV6:
 
 BGP peer-group: 123
 Remote AS number isn't specified
 Type : external
 PeerSession Members:
   FC00:0:0:1::1
 
 Peer Members:
  No Peer Exists
 ***********************
 
 BGP peer-group: 222
 Remote AS 200
 Type : internal
 PeerSession Members:
   FC00:0:0:2::2
 
 Peer Members:
  No Peer Exists
 ***********************
 
 BGP peer-group: 333
 Remote AS 400
 Type : external
 PeerSession Members:
   FC00:0:0:3::3
 
 Peer Members:
  No Peer Exists
 
 
Group in VPN-Instance:
 
 BGP peer-group: 55
 Remote AS number isn't specified
 VPN-Instance(IPv6-family): vpn1
 
 Type : external
 PeerSession Members:
   FC00:0:0:4::4
 
 Peer Members:
   FC00:0:0:4::4
Table 7-127  Description of the display bgp vpnv6 all group command output

Item

Description

Group in VPNV6

Displays information about all BGP peer groups in a VPNv6 address family.

Group in VPN-Instance

Displays information about peer groups in a IPv6 VPN instance.

VPN-Instance

Indicates the name of a IPv6 VPN instance.

# Display information about all BGP IPv6 peer groups.

<HUAWEI> display bgp ipv6 group
BGP peer-group is in
 Remote AS 100
 Type : internal
 PeerSession Members:
   FC00:0:0:2::1
 
 Peer Members:
   FC00:0:0:1::1               FC00:0:0:2::1
 ***********************
 
 BGP peer-group is ex
 Remote AS number not specified
 Type : external
 PeerSession Members:
   FC00:0:0:20::1
 Peer Members:
   FC00:0:0:10::1              FC00:0:0:20::1

# Display information about a BGP VPNv6 peer group named rr1.

<HUAWEI> display bgp vpnv6 all group rr1
Group in VPNV6:
 No such a peer-group 
 
Group in VPN-Instance:
 BGP peer-group: rr1
 Remote AS number isn't specified
 VPN-Instance: 1
 Type : external
 Configured hold timer value: 180
 Keepalive timer value: 60
 Minimum route advertisement interval is 30 seconds
 PeerSession Members:
  NONE
 Peer Preferred Value: 0
 No routing policy is configured
 Peer Members:
  No Peer Exists

# Display information about all peer groups in a IPv6 VPN instance named vpn6 on the local device.

<HUAWEI> display bgp vpnv6 vpn-instance vpn6 group
BGP peer-group: g1
 Remote AS 65410
 Type : external
 PeerSession Members:
   FC00:0:0:2000::2
 
 Peer Members:
   FC00:0:0:2000::2

# Display information about a peer group named g1 in a IPv6 VPN instance named vpn6 on the local device.

<HUAWEI> display bgp vpnv6 vpn-instance vpn6 group g1
BGP peer-group: g1
 Remote AS 65410
 Type : external
 Configured hold timer value: 180
 Keepalive timer value: 60
 Minimum time between advertisement runs is 30 seconds
 PeerSession Members:
   2000::2
 
 Peer Preferred Value: 0
 No routing policy is configured
 Peer Members:
  Peer             V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
 
  FC00:0:0:2000::2 4 65410      103       90     0 01:20:55 Established       0
Related Topics

display bgp ipv6 bfd session

Function

The display bgp ipv6 bfd session command displays information about the BFD session set up by BGP.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp ipv6 bfd session { [ vpnv6 vpn-instance vpn-instance-name ] peer ipv6-address | all }

Parameters

Parameter Description Value
vpnv6 Displays the BFD session of VPNv6. -
vpn-instance vpn-instance-name Specifies the name of the VPN instance. The value must be an existing VPN instance name.
peer ipv6-address Specifies the IPv6 address of the peer. -
all Displays all BFD sessions set up by BGP. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The BFD session set up by BGP4+ helps BGP4+ quickly discover faults between BGP4+ peers and inform BGP4+ to recalculate routes for packet forwarding.

Run the display bgp ipv6 bfd session command to display information about the BFD session set up by BGP4+ in the following situations:
  • Check whether the BFD session is successfully set up or view detailed information about the BFD session that is successfully configured.
  • Check whether the BFD session set up by BGP4+ is successfully deleted after running the undo peer bfd enable command.
  • Verify the configuration after running the undo peer bfd block command to restores a peer inheriting the BFD function of the peer group.
  • Verify the configuration after running the peer bfd command to set BFD parameters.

The information about the BFD session of a specified peer can be displayed by specifying different parameters.

  • Run the display bgp ipv6 bfd session vpnv6 vpn-instance vpn-instance-name peer ipv6-address command to display information about the BFD session of a specified peer in a VPN instance.

  • Run the display bgp ipv6 bfd session peer ipv6-address command to display information about the BFD session of a specified peer on the public network.
  • Run the display bgp ipv6 bfd session all command to display information about the BFD sessions of all BGP4+ peers.

Prerequisites

The BFD session has been set up using the peer bfd enable command. If the BFD session has not been set up by BGP4+, no information is displayed after running the display bgp ipv6 bfd session command.

Example

# Display all BFD sessions set up by BGP.

<HUAWEI> display bgp ipv6 bfd session all
  Local_Address  : FC00:3::1                              
  Peer_Address   : FC00:3::2                              
  Tx-interval(ms): 100         Rx-interval(ms): 100       
  Multiplier     : 4           Interface      : GigabitEthernet0/0/1    
  LD/RD          : 8193/8207   Session-State  : Up                  
  Wtr-interval(m): 0  
Table 7-128  Description of the display bgp ipv6 bfd session command output

Item

Description

Local_Address

Local address

Peer_Address

Peer address

Tx-interval (ms)

Interval for sending BFD packets, in milliseconds

Rx-interval (ms)

Interval for receiving BFD packets, in milliseconds

Multiplier

Local detection multiple

Interface

Interface on which the BFD session is set up
NOTE:

Information about the interface on which the BFD session is set up only when the directly connected interface is used to set up the EBGP neighbor relationship. In other cases, information about the interface is displayed as Unknown.

LD/RD

Local/remote discriminator

Session-State

BFD status
  • Admin down: The BFD session is closed on the local end.

  • BFD global disable: BFD is disabled globally.

  • BFD session number exceed: The number of BFD sessions exceeds the maximum limit.

  • Detect down: BFD detects a link status fault and interrupts the connection.

  • Init: The BFD session is in the initialized state.

  • Neighbor down: The peer end detects that the BFD session goes Down and informs the local end of the change, and the local end then sets the neighbor status to Down.

  • Receive admin down: The BFD session is closed on the peer end (for example, the BFD session is disabled on the peer end).

  • Up: The BFD session is set up.

Wtr-interval(m)

Interval for flap dampening, in minutes

display bgp ipv6 routing-table

Function

The display bgp ipv6 routing-table command displays BGP IPv6 routes.

Format

display bgp ipv6 routing-table

display bgp ipv6 routing-table ipv6-address [ prefix-length ]

display bgp ipv6 routing-table as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp ipv6 routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp ipv6 routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp ipv6 routing-table different-origin-as

display bgp ipv6 routing-table regular-expression as-regular-expression

display bgp ipv6 routing-table peer ipv6-address { accepted-routes | advertised-routes [ dest-ipv6-address [ prefix-length ] ] | received-routes [ active ] }

display bgp ipv6 routing-table peer ipv6-address received-routes dest-ipv6-address [ prefix-length [ original-attributes ] ]

display bgp ipv6 routing-table peer ipv4-address received-routes dest-ipv6-address [ prefix-length [ original-attributes ] ]

display bgp ipv6 routing-table time-range start-time end-time

Parameters

Parameter Description Value
ipv6-address Specifies the IPv6 address of the peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the length of the prefix. The value is an integer that ranges from 0 to 128.
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. It is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS-Path filter. The name is a string of 1 to 51 characters without any space. It is case-sensitive.
community Displays the routing information of the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies the community attribute number. Both aa and nn are integers ranging from 0 to 65535.
internet Displays the BGP routes with Internet community attribute. -
no-advertise Displays the BGP routes with No-Advertise community attribute. -
no-export Displays the BGP routes with the No-Export community attribute. -
no-export-subconfed Displays the BGP routes with the No-Export-Subconfed community attribute. -
whole-match Indicates the exact matching. -
community-filter Displays the routes that match the specified BGP community filter. -
community-filter-name Specifies the name of a community filter. The name is a string of 1 to 51 characters. The string cannot be all numbers.
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
different-origin-as Displays routes that have the same destination address but different source ASs. -
peer Displays the routing information for the specified BGP peer. -
ipv4-address Specifies the IPv4 address of the peer.
NOTE:

The parameter is not supported on S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720S-SI and S5720SI.

The value is in dotted decimal notation.
advertised-routes Displays the routes advertised to the specified peer. -
dest-ipv6-address Specifies the destination IPv6 address. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
received-routes Displays the routes received from the specified peer. -
active Displays the active routes received from the specified peer. -
original-attributes Displays the original attributes of a public route from a specified BGP peer before the route is filtered by the local import policy. To display such attributes, the peer keep-all-routes command must have been run. -
regular-expression as-regular-expression Specifies the matched AS regular expression. The value is a string of 1 to 80 characters.
accepted-routes Displays the routes that are received from the peer and filtered through a routing policy. -
time-range start-time end-time Displays IPv6 BGP routes that flap within the specified time period. For example, the value 0d0h5m0s of start-time indicates 5 minutes before the current time. The value 0d0h10m0s of end-time indicates 10 minutes before the current time. All IPv6 BGP routes with the Keepalive time in the range of 5 to 10 minutes are displayed. The value ranges of start-time and end-time both are 0d0h0m0s-10000d23h59m59s.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can specify different parameters to view the specific routing information.

You can run the display bgp ipv6 routing-table time-range start-time end-time command to view BGP4+ routes that flap within the specified time period. For example, if service traffic is abnormal or CPU usage of the device remains high within a certain time period, you can run this command to check whether route flapping occurs within the specified time period. The faulty route can be viewed in the command output, facilitating fault location.

Example

# Display BGP IPv6 routes.

<HUAWEI> display bgp ipv6 routing-table

 BGP Local router ID is 10.1.1.1
 Status codes: * - valid, > - best, d - damped, x - best external,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 1
 *>  Network  : FC00:0:0:2000::                          PrefixLen : 64
     NextHop  : FC00:0:0:2000::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
     Path/Ogn : i         

# Displays BGP IPv6 routes that flap within the specified time period.

<HUAWEI> display bgp ipv6 routing-table time-range 0d5h0m0s 1d5h0m0s
BGP Local router ID is 10.1.1.2
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 *>i Network  : FC00:0:0:100::100                        PrefixLen : 128
     NextHop  : FC00:0:0:12::1                           Duration  : 05h46m16s
     Peer     : FC00:0:0:12::1
     Path/Ogn : ?
 * i
     NextHop  : FC00:0:0:112::1                          Duration  : 05h46m16s
     Peer     : FC00:0:0:112::1
     Path/Ogn : ?
 *>i Network  : FC00:0:0:111::111                        PrefixLen : 128
     NextHop  : FC00:0:0:12::1                           Duration  : 05h46m16s
     Peer     : FC00:0:0:12::1
     Path/Ogn : ?
 * i
     NextHop  : FC00:0:0:112::1                          Duration  : 05h46m16s
     Peer     : FC00:0:0:112::1
     Path/Ogn : ?
Table 7-129  Description of the display bgp ipv6 routing-table command output

Item

Description

BGP Local router ID

Indicates the router ID of the local BGP device.

Network

Indicates the network address in the BGP routing table.

PrefixLen

Indicates the prefix length.

NextHop

Indicates the next-hop address of the packet.

LocPrf

Indicates the local preference.

MED

Indicates the MED of the route.

PrefVal

Indicates the preferred value.

Label

Indicates the label value.

Duration

Route duration

Peer

Peer IP address

Path/Ogn

Indicates the AS_Path number and the Origin attribute.

# Display detailed information about the specified invalid BGP4+ routes.
<HUAWEI> display bgp ipv6 routing-table FC00::1
 BGP local router ID : 10.1.1.1
 Local AS number : 100
 Paths:   1 available, 0 best, 0 select
 BGP routing table entry information of FC00::1/128
 From: 10::2 (10.1.1.2)
 Route Duration: 00h17m46s  
 Relay IP Nexthop: ::
 Relay IP Out-Interface: 
 Original nexthop: FC00::2
 AS-path 200, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for IP unreachable
 Not advertised to any peer yet
Table 7-130  Description of the display bgp ipv6 routing-table command output

Item

Description

BGP local router ID

ID of the local BGP device. The format is the same as the IPv4 address.

Local AS number

Local AS number.

Paths

Information about paths of BGP routes

BGP routing table entry information of FC00::1/128

The following information is about FC00::1/128 routing entries.

From

IP address of the router that sends the route. 10.1.1.2 is the source interface IP address of the peer with which the BGP connection is established, and 10::2 is the router ID of the peer.

Route Duration

Duration of routes.

Relay IP Nexthop

IP iterated next hop.

Relay IP Out-Interface

IP iterated outbound interface.

Original nexthop

Original next hop.

AS-path 200

AS_Path attribute.

origin incomplete

Well-known mandatory property. This property defines the origin of a path and records how a route turns to a BGP route. The property has the following three values:
  • IGP: The priority of this value is the highest. The origin property of the routes that are added to the BGP routing table by using the network (BGP) command is IGP.

  • EGP: The priority of this value is second to that of IGP. The origin property of the routes imported from EGP is EGP.

  • Incomplete: The priority of this value is the lowest. The value indicates the origin of a route is unknown. The origin property of the routes that are added to the BGP routing table by using the import-route (BGP) command is Incomplete.

MED

Multi-Exit discriminator of route.

localpref

Local priority.

pref-val

Value preferred by the protocol.

internal

The BGP route is an internal route.

pre 255

The priority of the BGP route is 255.

invalid for IP unreachable

Reason why a route is invalid:

  • invalid for route-policy not pass: The route does not match the route-policy.

  • invalid for supernet route: The route is a supernet route.

  • invalid for IP unreachable: The route fails to be iterated to another route.

  • invalid for supernet route not advertise: No supernet routes are advertised.

  • invalid for supernet label route not advertise: No supernet labeled routes are advertised.

  • invalid for next-hop unreachable: The next-hop IP address is unreachable.

  • invalid for tunnel unreachable: The route fails to be iterated to a tunnel.

Not advertised to any peer yet

The BGP route has not been advertised to any peer yet.

display bgp ipv6 routing-table statistics

Function

The display bgp ipv6 routing-table statistics command displays statistics about BGP IPv6 routes.

Format

display bgp ipv6 routing-table statistics

display bgp ipv6 routing-table statistics as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp ipv6 routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp ipv6 routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp ipv6 routing-table peer ipv6-address { advertised-routes | received-routes [ active ] } statistics

display bgp ipv6 routing-table statistics regular-expression as-regular-expression

display bgp ipv6 routing-table statistics different-origin-as

Parameters

Parameter Description Value
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS_Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS_Path filter. The name is a string of 1 to 51 characters without any space. It is case-sensitive.
community Displays the routing information of the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies the community attribute number. Both aa and nn are integers ranging from 0 to 65535.
internet Displays the BGP routes with Internet community attribute. -
no-advertise Displays the BGP routes with the No-Advertise community attribute. -
no-export Displays the BGP routes with the No-Export community attribute. -
no-export-subconfed Displays the BGP routes with the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
community-filter Displays the routing information that matches the specified BGP community filter. -
community-filter-name Specifies the name of a community filter. The name is a string of 1 to 51 characters. The string cannot be all numbers.
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
peer Displays the routing information for the specified BGP peer. -
ipv6-address Specifies the IPv6 address of the peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
advertised-routes Displays the routes advertised to the specified peer. -
received-routes Displays the routes received from the specified peer. -
active Displays the active routes received from the specified peer. -
regular-expression as-regular-expression Specifies the matched AS regular expression. The value is a string of 1 to 80 characters.
different-origin-as Displays routes that have the same destination address but different source ASs. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp ipv6 routing-table statistics command to check statistics about BGP IPv6 routes.

Example

# Display statistics of BGP IPv6 routes.

<HUAWEI> display bgp ipv6 routing-table statistics

 Total Number of Routes: 4
Table 7-131  Description of the display bgp ipv6 routing-table statistics command output

Item

Description

Total Number of Routes

Total number of routes in the routing table.

display bgp multicast group

Function

The display bgp multicast group command displays the information about an MBGP peer group.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast group [ group-name ]

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If the peer group is specified, the detailed information on the specified peer group is displayed.

If the peer group is not specified, the information on all MBGP peer groups is displayed.

Example

# Display the information about peer group my-peer.

<HUAWEI> display bgp multicast group my-peer
BGP peer-group: my-peer
 Remote AS: 1
 Authentication type configured: None
 Type : external
 Configured hold timer value: 180
 Keepalive timer value: 60
 Connect-retry timer value: 32
 Minimum route advertisement interval is 30 seconds
 PeerSession Members:
   172.16.14.1
 It's route-reflector-client
 Peer Preferred Value: 0
 No routing policy is configured
 Peer Members:
  Peer         V  AS  MsgRcvd  MsgSent  OutQ   Up/Down    State   PrefRcv
  172.16.14.1  4   1      43      29     0    00:03:03   Established   21
Table 7-132  Description of the display bgp multicast group command output

Item

Description

BGP peer-group: my-peer

Peer group: name of the group

Remote AS

The number of the AS where the peer resides

Authentication type configured

Indicates the configured BGP authentication type:
  • MD5

  • Keychain (kk), in which kk indicates the name of the configured keychain authentication

  • None, which indicates no BGP authentication is configured

Type

Indicates the types of peers:
  • internal: The type of the peer group is IBGP

  • external: The type of the peer group is EBGP

Configured hold timer value

Value of the holdtime timer

Keepalive timer value

Value of the Keepalive timer

Connect-retry timer value

Value of the Connect-retry timer

Minimum route advertisement interval

Shortest interval for advertising routes

PeerSession Members

Indicates peers that set up session connections

It's route-reflector-client

The local device is a route reflector client

Peer Preferred Value

Preferred value of peers

Peer

IP address of the peer

V

MBGP version

AS

The number of the AS where the peer reside

MsgRcvd

Number of messages received

MsgSent

Number of messages sent

OutQ

Number of messages to be sent to the peer

Up/Down

Time during which the MBGP session is in the current state

State

Indicates the MBGP state mechanism:
  • Idle: indicates that MBGP denies the connection request. This is the initiate status of MBGP.

  • Active: indicates that MBGP tries to set up TCP connection. This is the intermediate status of MBGP.

  • Established: In the status, MBGP peers can exchange Update, Notification and Keepalive packets.

  • Connect: indicates that MBGP performs other actions after the TCP connection is set up.

  • OpenSent: indicates that MBGP waits for an Open message from the peer.

  • OpenConfirm: indicates that MBGP wait for a Notification message or a Keepalive message.

PrefRcv

The number of prefixes received by the local peer from the remote peer

display bgp multicast network

Function

The display bgp multicast network command displays the routes to be advertised by MBGP through the network command.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast network

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

This command is used to display all the configurations of the network (BGP) command in the IPv4 multicast address family view. Routes can be imported and then advertised by MBGP only when the route prefix satisfies the following conditions:
  • It is specified in the network command.

  • It already exists in the IP routing table.

  • It is active.

Example

# Display the routing information of a network segment advertised by MBGP.

<HUAWEI> display bgp multicast network
  BGP Local Router ID is 10.2.2.9                                                
  Local AS Number is 100(Multicast)                                             
  Network          Mask            Route-policy                                 
                                                                                
  10.1.1.1         255.255.255.0                                              
  10.2.2.2         255.255.255.0                                              
Table 7-133  Description of the display bgp multicast network command output

Item

Description

BGP Local Router ID

ID of the local MBGP router.

Local AS Number

Number of the local AS.

Network

Network address locally advertised.

Mask

Mask of the network address.

Route-policy

Used routing policy.

Related Topics

display bgp multicast paths

Function

The display bgp multicast paths command displays AS_Path information of MBGP.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast paths [ as-regular-expression ]

Parameters

Parameter Description Value
as-regular-expression Displays the AS_Path regular expression. The value is a string of 1 to 80 characters.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast paths command to check AS_Path information of MBGP.

Example

# Display information about MBGP paths.

<HUAWEI> display bgp multicast paths 1

Total Number of Routes: 17
Total Number of Paths: 1


    Address         Refcount   MED        Path/Origin
    0x54169A4       17         0          1?
Table 7-134  Description of the display bgp multicast paths command output

Item

Description

Total Number of Routes

Total number of routes

Total Number of Paths

Total number of AS paths

Address

Address of the path attribute node in the local database in the hexadecimal format

Refcount

Number of times that the route is referenced

MED

Multi-Exit discriminator

Path

AS_Path list of the route

Origin

Origin of the route

display bgp multicast peer

Function

The display bgp multicast peer command displays information about a specified MBGP peer. If peer-address is not specified, information about all MBGP peers is displayed.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast peer [ [ peer-address ] verbose ]

Parameters

Parameter Description Value
peer-address Specifies the address of an MBGP peer. The value is in dotted decimal notation.
verbose Specifies detailed information about an MBGP peer. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast peer command to check information about a specified MBGP peer. If peer-address is not specified, information about all MBGP peers is displayed.

Example

# Display information about all MBGP peers.

<HUAWEI> display bgp multicast peer
 
 BGP local router ID : 10.13.13.9
 Local AS number : 1
 Total number of peers : 1                 Peers in established state : 1
 
  Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
 
  10.2.1.2        4     2       36       37     0 00:15:35 Established      24
Table 7-135  Description of the display bgp multicast peer command output

Item

Description

BGP local router ID

ID of the local MBGP router

Local AS number

Local AS number

Total number of peers

Total number of peers

Peers in established state

Number of peers in established state

Peer

IP address of peers

V

MBGP version of peers

AS

AS number

MsgRcvd

Number of messages received

MsgSent

Number of messages sent

OutQ

Messages to be sent to the specified peers

Up/Down

Period during which the MBGP session is in the current state

State

Status of the peers

PrefRcv

Number of prefixes received by the local peer from the remote peer

Related Topics

display bgp multicast routing-table

Function

The display bgp multicast routing-table command displays the MBGP routing information of a specified network in the MBGP routing table.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table [ ip-address [ mask-length [ longer-prefixes ] | mask [ longer-prefixes ] ] ]

Parameters

Parameter Description Value
ip-address Specifies an IPv4 address. The address is in dotted decimal notation.
mask-length Specifies the mask length of the IPv4 address. The value is an integer that ranges from 0 to 32.
mask Specifies the mask of the IPv4 address. The value is in dotted decimal notation.
longer-prefixes Matches routes whose masks are shorter than the specified mask length. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If ip-address is not specified, this command will display all the information in the MBGP routing table.

Example

# Display MBGP routing information.

<HUAWEI> display bgp multicast routing-table
 
 BGP local router ID is 10.13.13.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 14
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
 
 *>   10.1.2.0/24        10.2.1.2                              0      2?
 *>   10.1.13.0/24       0.0.0.0         0                     0      ?
 *>   10.1.13.2/32       0.0.0.0         0                     0      ?
 *>   10.2.1.0/24        0.0.0.0         0                     0      ?
 *>   10.2.1.0/24        10.2.1.2        0                     0      2?
 *>   10.2.1.1/32        0.0.0.0         0                     0      ?
 *>   10.2.13.0/24       0.0.0.0         0                     0      ?
 *>   10.2.13.1/32       0.0.0.0         0                     0      ?
 *>   10.2.13.2/32       0.0.0.0         0                     0      ?
Table 7-136  Description of the display bgp multicast routing-table command output

Item

Description

BGP local router ID

BGP local router ID.

Status codes

Status of a routing entry.

Total Number of Routes

Total number of routes in the routing table.

Network

Indicates the network address in the MBGP routing table.

NextHop

Indicates the next-hop address for the packet.

MED

Indicates the MED of the route.

LocPrf

Indicates the local preference.

PrefVal

Indicates the preferred value.

Path/Ogn

Indicates the AS_Path number and the Origin attribute.

# Display detailed information about the specified invalid MBGP routes.
<HUAWEI> display bgp multicast routing-table 192.168.1.1
 BGP local router ID : 10.1.1.1
 Local AS number : 100
 Paths:   2 available, 0 best, 0 select
 BGP routing table entry information of 192.168.1.1/32:
 From: 10.2.2.2 (10.1.1.2)
 Route Duration: 00h01m15s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: 
 Original nexthop: 172.16.1.2
 Qos information : 0x0
 AS-path 200, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for IP unreachable
 Not advertised to any peer yet

 BGP routing table entry information of 192.168.1.1/32:
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 00h01m15s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: 
 Original nexthop: 172.16.1.2
 Qos information : 0x0
 AS-path 200, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for IP unreachable
 Not advertised to any peer yet
Not advertised to any peers yet
Table 7-137  Description of the display bgp multicast routing-table command output

Item

Description

BGP local router ID

ID of the local BGP device. The format is the same as the IPv4 address.

Local AS number

Local AS number.

Paths

Information about paths of BGP routes

BGP routing table entry information of 192.168.1.1/32

The following information is about 192.168.1.1/32 routing entries.

From

IP address of the router that sends the route. 10.1.1.2 is the IP address of the source interface of the peer with which the BGP connection is established, and 10.2.2.2 is the Router ID of the peer.

Route Duration

Duration of routes.

Relay IP Nexthop

IP iterated next hop.

Relay IP Out-Interface

IP iterated outbound interface.

Original nexthop

Original next hop.

Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.

AS-path 200

AS_Path attribute.

origin incomplete

Well-known mandatory property. This property defines the origin of a path and records how a route turns to a BGP route. The property has the following three values:
  • IGP: The priority of this value is the highest. The origin property of the routes that are added to the BGP routing table by using the network (BGP) command is IGP.

  • EGP: The priority of this value is second to that of IGP. The origin property of the routes imported from EGP is EGP.

  • Incomplete: The priority of this value is the lowest. The value indicates the origin of a route is unknown. The origin property of the routes that are added to the BGP routing table by using the import-route (BGP) command is Incomplete.

MED

Multi-Exit discriminator of route.

localpref

Local priority.

pref-val

Value preferred by the protocol.

internal

The BGP route is an internal route.

pre 255

The BGP route preference is 255.

invalid for IP unreachable

Reason why a route is invalid:

  • invalid for route-policy not pass: The route does not match the route-policy.

  • invalid for supernet route: The route is a supernet route.

  • invalid for IP unreachable: The route fails to be iterated to another route.

  • invalid for supernet route not advertise: No supernet routes are advertised.

  • invalid for supernet label route not advertise: No supernet labeled routes are advertised.

  • invalid for next-hop unreachable: The next-hop IP address is unreachable.

  • invalid for tunnel unreachable: The route fails to be iterated to a tunnel.

Not advertised to any peer yet

The BGP route has not been advertised to any peer yet.

display bgp multicast routing-table as-path-filter

Function

The display bgp multicast routing-table as-path-filter command displays information about the routes that match the AS_Path filter.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table as-path-filter { as-path-filter-number | as-path-filter-name }

Parameters

Parameter Description Value
as-path-filter-number Specifies the number of the matching AS_Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS_Path filter. The value is a string of 1 to 51 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table as-path-filter command to check information about the routes that match the AS_Path filter.

Example

# Display information about the routes that match the AS_Path filter 1.

<HUAWEI> display bgp multicast routing-table as-path-filter 1
BGP local router ID is 10.14.14.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 15
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
 *>i  10.1.13.0/24       10.2.1.1        0          100        0      1?
 *>i  10.2.1.0/24        10.2.1.1        0          100        0      1?
 *>i  10.2.13.0/24       10.2.1.1        0          100        0      1?
 *>i  10.2.13.1/32       10.2.1.1        0          100        0      1?
Table 7-138  Description of the display bgp multicast routing-table as-path-filter command output

Item

Description

BGP local router ID

BGP local router ID

Network

Network address in the MBGP routing table

NextHop

Next-hop address for forwarding packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

AS path and Origin attribute

display bgp multicast routing-table cidr

Function

The display bgp multicast routing-table cidr command displays routing information of classless inter-domain routing (CIDR).

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table cidr

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table cidr command to check routing information of CIDR.

Example

# Display routing information about CIDR.

<HUAWEI> display bgp multicast routing-table cidr
 BGP Local router ID is 10.13.13.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 9
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
 *>   10.1.2.0/24        10.2.1.2                              0      2?
 *>   10.2.1.0/24        10.2.1.2        0                     0      2?
 *>   10.7.1.0/24        10.2.1.2                              0      2?
 *>   10.7.1.1/32        10.2.1.2                              0      2?
 *>   10.7.1.2/32        10.2.1.2        0                     0      2?
 *>   10.11.12.0/24      10.2.1.2        0                     0      2?
 *>   10.11.12.1/32      10.2.1.2        0                     0      2?
      
Table 7-139  Description of the display bgp multicast routing-table cidr command output

Item

Description

BGP local router ID

BGP local router ID

Status codes

Status of a routing entry

Total Number of Routes

Total number of routes in the routing table

Network

Network address in the MBGP routing table

NextHop

Next-hop address for forwarding packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

AS path and Origin attribute

display bgp multicast routing-table community

Function

The display bgp multicast routing-table community command displays routing information of a specified MBGP community.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table community [ aa:nn | community-number ] & <1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

Parameters

Parameter Description Value
aa:nn Specifies the MBGP community number. You can specify a maximum of 29 MBGP communities. Both aa and nn are integers ranging from 0 to 65535.
community-number Specifies the MBGP community number. You can specify a maximum of 29 community numbers. The value is an integer that ranges from 0 to 4294967295.
internet Displays the MBGP routes with the Internet community attribute. The Internet community attribute indicates the matching routes sent to all remote peers. -
no-advertise Displays MBGP routes with the no-advertise community attribute. The no-advertise community attribute indicates that the matching routes are not sent to any peer. -
no-export Indicates MBGP routes with the no-export community attribute. The no-expert community attribute indicates that the matching routes are not advertised to other ASs but to other sub-ASs in the confederation. -
no-export-subconfed Displays MBGP routes with the no-export-subconfed community attribute. The no-export-subconfed community attribute indicates that the matching routes are not advertised outside the local AS. -
whole-match Indicates precise matching. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table community command to check routing information of a specified MBGP community.

Example

# Display MBGP routing information of Community 100:100.

<HUAWEI> display bgp multicast routing-table community 100:100
 BGP local router ID is 10.12.12.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 1
      Network          NextHop      MED    LocPrf    PrefVal    Community
 *>   10.1.1.0/24     10.2.1.1     0                 0         <100:100>        

# Display MBGP routing information with the internet community attribute or that of Community 100:100.

<HUAWEI> display bgp multicast routing-table community 100:100 internet
 BGP local router ID is 10.12.12.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 5
      Network         NextHop      MED      LocPrf    PrefVal   Community

 *>   10.1.1.1/32     10.1.1.2     0                   0        <100:100>,internet
 *>   10.3.3.3/32     10.2.1.1     0                   0        <100:100>,internet
 *>   10.1.1.0/24     10.2.1.1     0                   0        <100:100>,internet
 *>   10.2.13.0/24    10.2.1.1     0                   0        <100:100>,internet
Table 7-140  Description of the display bgp multicast routing-table community command output

Item

Description

BGP local router ID

BGP local router ID

Status codes

Status of a routing entry.

Total Number of Routes

Total number of routes in the routing table.

Network

Network address in the MBGP routing table

NextHop

Next-hop address for forwarding packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Community

Community attribute

display bgp multicast routing-table community-filter

Function

The display bgp multicast routing-table community-filter command displays the multicast routing information that matches a specified MBGP community list.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

Parameters

Parameter Description Value
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
community-filter-name Specifies the name of a community filter. The value is a string of 1 to 51 case-sensitive characters without spaces.
whole-match Indicates exact matching. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table community-filter command to check the multicast routing information that matches a specified MBGP community list.

Example

# Display the multicast routing information that matches a specified MBGP community list.

<HUAWEI> display bgp multicast routing-table community-filter 1
BGP local router ID is 10.12.12.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 1
      Network            NextHop        MED        LocPrf    PrefVal    Community
 *>   10.10.10.0/24      10.2.1.1        0                     0        <100:100>
Table 7-141  Description of the display bgp multicast routing-table community-filter command output

Item

Description

BGP local router ID

BGP local router ID

Network

Network address in the MBGP routing table

NextHop

Next-hop address of packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value

Community

Community attribute

display bgp multicast routing-table dampened

Function

The display bgp multicast routing-table dampened command displays dampened MBGP routes.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table [ statistics ] dampened

Parameters

Parameter Description Value
statistics Displays statistics of dampened routes. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table dampened command to check dampened MBGP routes.

Example

# Display dampened MBGP routes.

<HUAWEI> display bgp multicast routing-table dampened
 BGP local router ID is 10.12.12.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 1
     Network            From              Reuse     Path/Ogn
 d   10.1.0.0/16        10.2.1.1          00:45:05  1?
Table 7-142  Description of the display bgp multicast routing-table dampened command output

Item

Description

BGP local router ID

BGP local router ID

Network

Network address in the MBGP routing table

From

IP address of MBGP peer from which the route is received

Reuse

Reuse value

Path/Ogn

AS_Path number and Origin attribute

Related Topics

display bgp multicast routing-table dampening parameter

Function

The display bgp multicast routing-table dampening parameter command displays information about MBGP dampening parameters.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table dampening parameter

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table dampening parameter command to check information about MBGP dampening parameters.

Example

# Display MBGP dampening parameters.

<HUAWEI> display bgp multicast routing-table dampening parameter
 Maximum Suppress Time(in second) : 3973
 Ceiling Value                    : 16000
 Reuse Value                      : 750
 HalfLife Time(in second)         : 900
 Suppress-Limit                   : 2000
Table 7-143  Description of the display bgp multicast routing-table dampening parameter command output

Item

Description

Maximum Suppress Time (in second)

Maximum suppression time (in seconds)

Ceiling Value

Ceiling value of the penalty

Reuse Value

Threshold for routes leaving the suppression state

HalfLife Time (in second)

Half life time of the reachable route

Suppress-Limit

Threshold for routes entering the suppression state

Related Topics

display bgp multicast routing-table different-origin-as

Function

The display bgp multicast routing-table different-origin-as command displays the routes with the same destination but different source AS numbers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table different-origin-as

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table different-origin-as command to check the routes with the same destination but different source AS numbers.

Example

# Display the routes with the same destination but different source AS numbers.

<HUAWEI> display bgp multicast routing-table different-origin-as
BGP local router ID is 10.13.13.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 8
      Network            NextHop        MED     LocPrf    PrefVal Path/Ogn
 *>   10.2.1.0/24        10.2.1.2        0                   0        2?
 *>                      0.0.0.0         0                   0        ?
 *>   10.2.0.0/16        10.2.1.2                            0        2?
 *>                      0.0.0.0         0                   0        ?
 *>   192.168.14.0       10.2.1.2                            0        2?
 *>                      0.0.0.0         0                   0        ?
 *>   192.168.14.1/32    10.2.1.2                            0        2?
 *>                      0.0.0.0         0                   0        ?
Table 7-144  Description of the display bgp multicast routing-table different-origin-as command output

Item

Description

BGP local router ID

BGP local router ID

Network

Network address in the MBGP routing table

NextHop

Next-hop address for forwarding packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

AS path and Origin attribute

display bgp multicast routing-table flap-info

Function

The display bgp multicast routing-table flap-info command displays information about MBGP route flapping.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table flap-info [ ip-address [ mask [ longer-match ] | mask-length [ longer-match ] ] | as-path-filter { as-path-filter-number | as-path-filter-name } ]

display bgp multicast routing-table flap-info regular-expression as-regular-expression

Parameters

Parameter Description Value
ip-address Specifies an IPv4 network address. The address is in dotted decimal notation.
mask Specifies the mask of an IPv4 network address. The address is in dotted decimal notation.
mask-length Specifies the mask length of the IPv4 network address. The value is an integer that ranges from 0 to 32.
longer-match Indicates the longest prefix matching rules. -
regular-expression as-regular-expression Displays the statistics of route flapping that matches the AS_Path regular expression. as-path-filter-number specifies the AS path regular expression. The value is a string of 1 to 80 characters.
as-path-filter as-path-filter-number Displays the statistics of the route flapping for the specified AS path list. as-path-filter-number indicates the matched AS path list number. The value is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Displays the statistics of the route flapping for the specified AS path list. as-path-filter-number indicates the matched AS path list name. The value is a string of 1 to 51 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table flap-info command to check information about MBGP route flapping.

Example

# Display information about MBGP route flapping.

<HUAWEI> display bgp multicast routing-table flap-info
BGP Local router ID is 10.12.12.9
 Status codes: * - valid, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
       Network            From            Flaps  Duration     Reuse  Path/Ogn
 *>   10.1.1.0/24         10.2.1.1        1      00:00:29            1?
Table 7-145  Description of the display bgp multicast routing-table flap-info command output

Item

Description

BGP Local router ID

BGP local router ID

Network

Network address in the MBGP routing table

From

IP address of MBGP peer from which the route is received

Flaps

Count of route flapping

Duration

Duration of route flapping

Reuse

Reuse value

Path/Ogn

AS_Path number and Origin attribute

display bgp multicast routing-table peer

Function

The display bgp multicast routing-table peer command displays the routes received from or sent to a specified MBGP peer.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table peer peer-address { advertised-routes [ network [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] | accepted-routes }

display bgp multicast routing-table peer peer-address received-routes network [ { mask | mask-length } [ longer-prefixes | original-attributes ] ]

Parameters

Parameter Description Value
peer-address Specifies the address of an MBGP peer. The value is in dotted decimal notation.
advertised-routes Indicates the routes sent to a specified peer. -
network Specifies the IPv4 network address. The value is in dotted decimal notation.
mask Specifies the address mask. The value is in dotted decimal notation.
mask-length Specifies the mask length. The value is an integer that ranges from 0 to 32.
longer-prefixes Uses the longest match rule to select routes. -
received-routes Indicates the routes received from a specified peer. -
active Displays the active routes received from the specified peer. -
accepted-routes Displays routing information that is received from neighbors and matches the filter policy. -
original-attributes Displays the original attributes of a public route from a specified BGP peer before the route is filtered by the local import policy. To display such attributes, the peer keep-all-routes command must have been run. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table peer command to check routes received of a specified MBGP peer.

Example

# Display the routes sent to multicast peer 10.10.1.11.

<HUAWEI> display bgp multicast routing-table peer 10.10.1.11 advertised-routes
 BGP local router ID is 10.12.12.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 9
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
 *>i  10.1.2.0/24        10.7.1.2        0          100        0      ?
 *>   10.2.1.0/24        0.0.0.0         0                     0      ?
 *>   10.7.1.0/24        0.0.0.0         0                     0      ?
 *>i  10.7.1.0/24        10.7.1.2        0          100        0      ?
 *>i  10.7.1.1/32        10.7.1.2        0          100        0      ?
 *>   10.7.1.2/32        0.0.0.0         0                     0      ?
 *>   10.10.1.0/24       0.0.0.0         0                     0      ?
Table 7-146  Description of the display bgp multicast routing-table peer command output

Item

Description

BGP local router ID

BGP local router ID

Total Number of Routes

Total number of routes

Network

Network address in the MBGP routing table

NextHop

Next-hop address for forwarding packets

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

AS path and Origin attribute

display bgp multicast routing-table regular-expression

Function

The display bgp multicast routing-table regular-expression command displays the routes that match the specified AS_Path regular expression.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table regular-expression as-regular-expression

Parameters

Parameter Description Value
as-regular-expression Specifies the AS_Path regular expression. The value is a string of 1 to 80 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table regular-expression command to check the routes that match the specified AS_Path regular expression.

Example

# Display the routes that match the AS_Path regular expression 2.

<HUAWEI> display bgp multicast routing-table regular-expression 2
BGP local router ID is 10.13.13.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 13
      Network            NextHop        MED     LocPrf    PrefVal Path/Ogn
 *>   10.1.2.0/24        10.2.1.2                              0      2?
 *>   10.2.1.0/24        10.2.1.2        0                     0      2?
 *>   10.7.1.0/24        10.2.1.2                              0      2?
 *>   10.7.1.1/32        10.2.1.2                              0      2?
 *>   10.7.1.2/32        10.2.1.2        0                     0      2?
 *>   10.11.12.0/24      10.2.1.2        0                     0      2?
 *>   10.11.12.1/32      10.2.1.2        0                     0      2?
Table 7-147  Description of the display bgp multicast routing-table regular-expression command output

Item

Description

BGP local router ID

BGP local router ID.

Network

Network address in the MBGP routing table.

NextHop

Next-hop address for packets.

MED

MED of the route.

LocPrf

Local preference.

PrefVal

Preferred value.

Path/Ogn

AS_Path number and Origin attribute.

display bgp multicast routing-table statistics

Function

The display bgp multicast routing-table statistics command displays statistics about routes in the MBGP routing table.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast routing-table statistics

display bgp multicast routing-table peer ipv4-address { advertised-routes | received-routes [ active ] } statistics

Parameters

Parameter Description Value
peer ipv4-address Displays the number of routes with a specified peer address. The value is in dotted decimal notation.
advertised-routes Displays the number of routes advertised to a specified peer. -
received-routes Displays the number of routes received from a specified peer. -
active Displays the number of active routes. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp multicast routing-table statistics command to check statistics about routes in the MBGP routing table.

Example

# Display statistics about routes in the MBGP routing table.

<HUAWEI> display bgp multicast routing-table statistics
Total Number of Routes: 50
Table 7-148  Description of the display bgp multicast routing-table statistics command output

Item

Description

Total Number of Routes

Total number of routes in the MBGP routing table

display bgp multicast update-peer-group

Function

The display bgp multicast update-peer-group command displays information about MBGP update-groups.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp multicast update-peer-group [ index update-group-index ]

Parameters

Parameter Description Value
index update-group-index Specifies the index of an update-group. The value is an integer that ranges from 0 to 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If the index of an update-group is specified, the command will display detailed information about the specified update-group.

Example

# Display information about MBGP update-groups.

<HUAWEI> display bgp multicast update-peer-group
 The Multicast instance's update peer group number : 1
 Keep buffer update peer group number : 0
 BGP Version : 4

 Group ID : 0
 Group Type : external
 Addr Family : IPv4-MLC
 AdvMinTimeVal : 30
 Total Peers : 1
 Leader Peer : 192.168.1.2
 Peers List : 192.168.1.2
Table 7-149  Description of the display bgp multicast update-peer-group command output

Item

Description

The Multicast instance's update peer group number

Indicates the number of update-groups in the instance.

Keep buffer update peer group number

Number of packets in update-groups saved in the batch buffer.

BGP Version

Indicates the BGP version.

Group ID

Indicates the ID of the update-group.

Group Type

Indicates the type of the update-group, which can be one of the following:

  • external: indicates an EBGP update-group.

  • internal: indicates an IBGP update-group.

  • external-confed: indicates an EBGP update-group in the confederation.

  • internal-confed: indicates an IBGP update-group in the confederation.

  • unknown: indicates an update-group of an unknown type.

Addr Family

Indicates the address family.

AdvMinTimeVal

Indicates the minimum interval for sending Update packets with the same route prefix.

Total Peers

Indicates the total number of peers in an update-group.

Leader Peer

Indicates the representative of an update-group.

Peers List

Indicates a list of peers.

display bgp network

Function

The display bgp network command displays the routes imported into the BGP routing table by using the network command.

Format

display bgp network

display bgp vpnv4 { all | vpn-instance vpn-instance-name } network

display bgp ipv6 network

display bgp vpnv6 { all | vpn-instance vpn-instance-name } network (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpnv4 Displays the VPNv4 routes that are advertised by using the network command. -
vpnv6 Displays the VPNv6 routes that are advertised by using the network command. -
all Displays all the VPNv4 routes that are advertised by using the network command. -
vpn-instance vpn-instance-name Displays the routes of a specified VPN instance that are advertised by using the network command. The value must be an existing VPN instance name.
ipv6 Displays the IPv6 routes advertised by BGP. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

BGP cannot discover routes by itself. Run the network (BGP) command and the import-route (BGP) command to import routes from other protocols, such as IGP routes or static routes, to the BGP routing table.

The display bgp network command displays the routing information advertised by BGP through the network (BGP) command.

Precautions

BGP has multiple address families and the routing information about each address family is isolated from each other. The routing information about address families advertised by BGP through the network (BGP) command can be displayed by specifying different parameters.

If no parameter is specified, the display bgp network command displays the routing information about the IPv4 unicast address family advertised by BGP through the network (BGP) command.

Example

# Display information about routes that are imported using the network command.

<HUAWEI> display bgp network 
  BGP Local Router ID is 10.1.1.9
  Local AS Number is 10(Public)
  Network          Mask            Route-policy
 
  10.2.0.0         255.255.0.0
  10.0.0.0         255.0.0.0       Policy1
  10.4.4.0         255.255.255.0
Table 7-150  Description of the display bgp network command output

Item

Description

Local AS Number

Indicates the local AS number.

Network

Indicates the locally-advertised network address.

Mask

Indicates the mask of the network address.

Route-policy

Indicates the used routing policy.

# Display information about BGP VPNv4 routes that are imported using the network command.
<HUAWEI> display bgp vpnv4 all network
  BGP Local Router ID is 10.2.2.9
  Local AS Number is 100
 VPN-Instance vrf1, Router ID 10.2.2.9:
  Network          Mask            Route-policy

  10.4.4.4         255.255.255.255
 VPN-Instance vrf2, Router ID 2.2.2.9:
  Network          Mask            Route-policy

  10.5.5.5         255.255.255.255
Table 7-151  Description of the display bgp vpnv4 all network command output

Item

Description

VPN-Instance

Name of the VPN instance

Router ID

Router ID of the local BGP router.

# Display IPv6 routes advertised by BGP.
<HUAWEI> display bgp ipv6 network 
  BGP Local Router ID is 10.5.5.5
  Local AS Number is 100(PublicV6)
  Network          Prefix            Route-policy

  FC00:0:0:100::   64
  FC00:0:0:200::   64
# Display VPNv6 routes locally advertised by BGP (by using the network command) for a specified VPN instance.
<HUAWEI> display bgp vpnv6 vpn-instance vpn1 network

  BGP Local Router ID is 10.1.1.1
  Local AS Number is 100
  Route Distinguisher: 100:1
  (vpn1)
  Network          Prefix            Route-policy

  FC00:0:0:2000::  100               policy1
Table 7-152  Description of the display bgp vpnv6 network command output

Item

Description

BGP Local Router ID

Indicates the ID of the local BGP device. The ID is in the same format as an IPv4 address.

Local AS Number

Indicates the local AS number.

Route Distinguisher

Indicates the route distinguisher for the VPN instance.

Prefix

Indicates the network address mask advertised by the local BGP device.

# Display the VPNv6 routes locally advertised by BGP (by using the network command).
<HUAWEI> display bgp vpnv6 all network
  BGP Local Router ID is 10.2.2.9
  Local AS Number is 100
  Route Distinguisher: 100:4
  (vpn1)
  Network          Prefix            Route-policy
  FC00:0:0:1::1    128
  FC00:0:0:2::2    128
  Route Distinguisher: 100:5
  (vrf1)
  Network          Prefix            Route-policy
  FC00:0:0:3::3    128
  Route Distinguisher: 100:9
  (vrf2)
  Network          Prefix            Route-policy
  FC00:0:0:8::9    128

display bgp paths

Function

The display bgp paths command displays the AS_Path information of BGP routes.

Format

display bgp paths [ as-regular-expression ]

display bgp vpnv4 { all | vpn-instance vpn-instance-name } paths [ as-regular-expression ]

display bgp ipv6 paths [ as-regular-expression ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } paths [ as-regular-expression ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
as-regular-expression Specifies the regular expression used to match the AS_Path information. The name is a string of 1 to 80 characters.
vpnv4 Displays the AS_Path information of the routes of a VPNv4 instance. -
vpnv6 Displays the AS_Path information of the routes of a VPNv6 instance. -
all Displays the AS_Path information of all VPNv4 routes. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
ipv6 Displays the path attributes of IPv6-BGP routes in the local BGP database. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display bgp paths command displays the path attributes of BGP stored in the system.

BGP usually has a large number of path attributes. The display bgp paths command displays a lot of BGP path information for viewing. After configuring as-regular-expression, the display bgp paths command displays only the path attributes of BGP that match as-regular-expression. For details on a regular expression, see Filtering Output Information Based on the Regular Expression in "CLI Overview" in the S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Basic Configuration.

Precautions

BGP has a number of address families and the path attributes of BGP in each address family is stored independently. By default, the display bgp paths command displays only the path attributes of BGP in the IPv4 unicast address family. The path attributes of BGP in other address families can be displayed by specifying address family parameters.

Example

# Display the AS_Path information.

<HUAWEI> display bgp paths
                                                                                
 Total number of routes of IPv4-family for vpn-instance _public_: 6             
 Total Number of Paths: 1                                                       
                                                                                
 Address            Refcount         MED  Path/Origin                           
 1282430404                6           0  N?                                    
Table 7-153  Description of the display bgp paths command output

Item

Description

Address

Indicates the address of the route in the local database, in hexadecimal notation.

Refcount

Indicates the number of times that the route is referenced.

MED

Indicates the MED of the route.

Path

Indicates the list of ASs through which the packet has to pass through.

Origin

Indicates the origin of the route.

display bgp peer

Function

The display bgp peer command displays information about BGP peers.

Format

display bgp [ vpnv4 vpn-instance vpn-instance-name ] peer [ { group-name | ipv4-address } log-info | [ ipv4-address ] verbose ]

display bgp vpnv4 all peer [ [ ipv4-address ] verbose ]

display bgp vpls peer [ [ ipv4-address ] verbose ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp ipv6 peer [ verbose ]

display bgp ipv6 peer ipv6-address { log-info | verbose }

display bgp ipv6 peer ipv4-address verbose

display bgp vpnv6 all peer [ [ ipv4-address ] verbose ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 vpn-instance vpn-instance-name peer [ { group-name | ipv6-address } log-info | [ ipv6-address ] verbose ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn-ad peer [ [ ipv4-address ] verbose ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn peer [ [ ipv4-address ] verbose ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
ipv4-address Specifies the IPv4 address of a peer to be displayed. It is in dotted decimal notation.
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
log-info Indicates to display log information of the specified peer. -
verbose Indicates to display detailed peer information. -
vpnv4 Indicates to display information about peers in a VPNv4 instance. -
all Indicates to display information about peers in all VPNv4 or VPNv6 instances. -
vpls Displays information about peers in the BGP-VPLS view. -
ipv6-address Specifies the IPv6 address of a peer to be displayed. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
vpnv6 Indicates to display BGP VPNv6 peer information. -
l2vpn-ad Displays information about peers in the BGP L2VPN-AD view. -
l2vpn Displays information about peers in the BGP L2VPN view. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display bgp peer command displays information about a BGP peer. You can implement the following operations based on the command output:
  • To check the status of BGP connections
  • To check information about a BGP peer
  • To check whether a BGP peer is successfully configured using the peer as-number command
  • To check whether a BGP peer is successfully deleted using the undo peer as-number command

Precautions

BGP has multiple address families. By default, the display bgp peer command displays information about BGP peers in IPv4 unicast address family only. If you want to view information about BGP peers in another address family, you need to specify its address family parameter.

To view detailed information about a BGP peer, such as information about BGP timers, the number of sent and received routes, capacities supported, the number of sent and received BGP messages, and enabled functions, specify verbose in the command.

If log-info is specified in the command, log information about a BGP peer is displayed, including information about BGP peer flapping.

Example

# Display peer information.

<HUAWEI> display bgp peer
 BGP Local router ID : 10.2.3.4
 local AS number : 10
 Total number of peers : 2                 
 Peers in established state : 1

  Peer        V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  10.1.1.1    4   100        0        0     0 00:00:07        Idle       0
  10.2.5.6    4   200       32       35     0 00:17:49 Established       0
Table 7-154  Description of the display bgp peer command output

Item

Description

BGP Local router ID

Indicates the ID of the BGP local router.
NOTE:

If two ends have the same BGP local router ID, no BGP peer relationship can be established between them. In this situation, run the router id command in the BGP view on either end to change the BGP local router ID. Changing it to the IP address of a loopback interface is recommended.

local AS number

Indicates the local AS number.

Total number of peers

Indicates the number of peers.

Peers in established state

Indicates the number of peers in established state.

Peer

Indicates the IP address of the peer.

V

Indicates the BGP version used on the peer.

AS

Indicates the AS number.

MsgRcvd

Indicates the number of received messages.

MsgSent

Indicates the number of sent messages.

OutQ

Indicates the message to be sent to the specified peer.

Up/Down

Indicates the period of time during which a BGP session keeps the current state.

State

Status of the peer:
  • Idle: indicates that BGP denies any request of entering. This is the initiatory status of BGP.

    Upon receiving a Start event, BGP initiates a TCP connection to the remote BGP peer, starts the ConnectRetry Timer with the initial value, detects a TCP connection initiated by the remote BGP peer, and changes its state to Connect.

  • Idle(Admin): indicates that the peer relationship is shut down initiatively and no attempt is made to establish the peer relationship.

    If the peer ignore command is configured or the peer is set to the Down state through the MIB, the neighbor is in the Idle (Admin) state.

  • No neg: The capabilities of the BGP peer's address family have not been negotiated.

  • Idle(Ovlmt): indicates that the peer relationship is interrupted because the number of routes exceeds the upper threshold.

    After a BGP peer relationship is interrupted due to the running of the peer route-limit command, the status of the BGP peer relationship is displayed as Idle(Ovlmt). If the reset bgp command is not run, the BGP peer relationship will not be reestablished.

  • Connect: indicates that BGP waits for the TCP connection to be set up before it determines whether to perform other operations.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value, initiates a TCP connection to the remote BGP peer, and stays in the Connect state.

  • Active: indicates that BGP tries to set up a TCP connection. This is the intermediate status of BGP.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value and changes its state to Connect.

    • If BGP initiates a TCP connection with an unknown IP address, the TCP connection fails. When this occurs, BGP restarts the ConnectRetry Timer with the initial value and stays in the Active state.

  • OpenSent: indicates that BGP has sent one Open message to its peer and waits for an Open message from the peer.
    • If there are no errors in the Open message received, BGP changes its state to OpenConfirm.

    • If there are errors in the Open message received, BGP sends a Notification message to the remote peer and changes its state to Idle.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

  • OpenConfirm: indicates that BGP waits for a Notification message or a Keepalive message.
    • If BGP receives a Notification message, or the TCP connection fails, BGP changes its state to Idle.

    • If BGP receives a Keepalive message, BGP changes its state to Established.

  • Established: indicates that BGP peers can exchange Update, Notification and Keepalive packets.
    • If BGP receives an Update or a Keepalive message, its state stays in Established.

    • If BGP receives a Notification message, BGP changes its state to Idle.

PrefRcv

Indicates the number of route prefixes sent from the peer.

# Display detailed information about the peer 10.2.2.9.

<HUAWEI> display bgp peer 10.2.2.9 verbose

         BGP Peer is 10.2.2.9,  remote AS 100
         Type: IBGP link
         BGP version 4, Remote router ID 10.1.1.1
         Update-group ID: 1 
         BGP current state: Established, Up for 00h57m53s
         BGP current event: RecvKeepalive
         BGP last state: Established
         BGP Peer Up count: 1
         Received total routes: 0
         Received active routes total: 0
         Advertised total routes: 2
         Port: Local - 42796        Remote - 179
         Configured: Connect-retry Time: 32 sec
         Configured: Min Hold Time: 0 sec
         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 4-byte-as capability
         Address family IPv4 Unicast: advertised and received
 Received: 
                  Total messages                 60
                  Update messages                1
                  Open messages                  1
                  KeepAlive messages             58
                  Notification messages          0
                  Refresh messages               0
 Sent: 
                  Total messages                 61
                  Update messages                2
                  Open messages                  1
                  KeepAlive messages             58
                  Notification messages          0
                  Refresh messages               0
 Authentication type configured: None
 Last keepalive received: 2012/03/06 19:17:37
 Last keepalive sent    : 2012/03/06 19:17:37
 Last update    received: 2012/03/06 19:17:43
 Last update    sent    : 2012/03/06 19:17:37

 Minimum route advertisement interval is 15 seconds
 Optional capabilities:
 Route refresh capability has been enabled
 4-byte-as capability has been enabled 
 Listen-only has been configured
 Peer's BFD has been enabled
 Peer Preferred Value: 0 
 Routing policy configured:
 No routing policy is configured  
Table 7-155  Description of the display bgp peer verbose command output

Item

Description

Type

Indicates the BGP link type, which can be IBGP or EBGP.

BGP version

Indicates the BGP version.

remote router ID

Indicates the router ID of the peer.

Update-group ID

Indicates the ID of the update-group to which the peer belongs.

BGP current state

Current state of BGP:
  • Idle: indicates that BGP denies any request of entering. This is the initiatory status of BGP.

    Upon receiving a Start event, BGP initiates a TCP connection to the remote BGP peer, starts the ConnectRetry Timer with the initial value, detects a TCP connection initiated by the remote BGP peer, and changes its state to Connect.

  • Idle(Admin): indicates that the peer relationship is shut down initiatively and no attempt is made to establish the peer relationship.

    If the peer ignore command is configured or the peer is set to the Down state through the MIB, the neighbor is in the Idle (Admin) state.

  • No neg: The capabilities of the BGP peer's address family have not been negotiated.

  • Idle(Ovlmt): indicates that the peer relationship is interrupted because the number of routes exceeds the upper threshold.

    After a BGP peer relationship is interrupted due to the running of the peer route-limit command, the status of the BGP peer relationship is displayed as Idle(Ovlmt). If the reset bgp command is not run, the BGP peer relationship will not be reestablished.

  • Connect: indicates that BGP waits for the TCP connection to be set up before it determines whether to perform other operations.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value, initiates a TCP connection to the remote BGP peer, and stays in the Connect state.

  • Active: indicates that BGP tries to set up a TCP connection. This is the intermediate status of BGP.
    • If the TCP connection succeeds, BGP stops the ConnectRetry Timer, sends an Open message to the remote peer, and changes its state to OpenSent.

    • If the ConnectRetry Timer has expired before a TCP connection is established, BGP restarts the timer with the initial value and changes its state to Connect.

    • If BGP initiates a TCP connection with an unknown IP address, the TCP connection fails. When this occurs, BGP restarts the ConnectRetry Timer with the initial value and stays in the Active state.

  • OpenSent: indicates that BGP has sent one Open message to its peer and waits for an Open message from the peer.
    • If there are no errors in the Open message received, BGP changes its state to OpenConfirm.

    • If there are errors in the Open message received, BGP sends a Notification message to the remote peer and changes its state to Idle.

    • If the TCP connection fails, BGP restarts the ConnectRetry Timer with the initial value, continues to detect a TCP connection initiated by the remote peer, and changes its state to Active.

  • OpenConfirm: indicates that BGP waits for a Notification message or a Keepalive message.
    • If BGP receives a Notification message, or the TCP connection fails, BGP changes its state to Idle.

    • If BGP receives a Keepalive message, BGP changes its state to Established.

  • Established: indicates that BGP peers can exchange Update, Notification and Keepalive packets.
    • If BGP receives an Update or a Keepalive message, its state stays in Established.

    • If BGP receives a Notification message, BGP changes its state to Idle.

BGP current event

Indicates the current BGP event.

BGP last state

Indicates the last BGP status, which may be Idle, Connect, Active, OpenSent, OpenConfirm, or Established.

BGP Peer Up count

Indicates the flapping count of a BGP peer in a specified period of time.

Received total routes

Indicates the number of received route prefixes.

Received active routes total

Indicates the number of received active route prefixes.

Advertised total routes

Indicates the number of sent route prefixes.

Port

Indicates the port number.
  • Local: indicates the local port number, which is always 179. BGP uses TCP at the transport layer.

  • Remote: indicates the port number used on the peer.

Configured

Indicates locally configured timers.
  • Connect-retry Time: indicates the ConnectRetry interval for a BGP peer or peer group, in seconds. When BGP initiates a TCP connection, the ConnectRetry timer is stopped if the TCP connection is established successfully. If the first attempt to establish a TCP connection fails, BGP tries again to establish the TCP connection after the ConnectRetry timer expires.

  • Min Hold Time: indicates the minimum Holdtime configured on the local device, in seconds.

  • Active Hold Time: indicates the hold time. If BGP does not receive any Keepalive message from the peer in the hold time, BGP considers that the peer is Down and then instructs other peers to remove the routes that are sent from the peer.

  • Keep Alive Time: indicates the interval for sending Keepalive messages to the peer. BGP peers send Keepalive messages to each other periodically to maintain their relationships.

Received : Active Hold Time

Indicates the hold time on the peer.

Negotiated : Active Hold Time

Indicates the hold time agreed between the BGP peers after capability negotiation.

Address family IPv4 Unicast

Indicates the IPv4 unicast address family.

Received

Indicates the number of packets received from a peer.
  • Total: indicates the total number of messages received from a peer.

  • Update messages: indicates the number of Update messages received from a peer.

  • Open messages: indicates the number of Open messages received from a peer.

  • KeepAlive messages: indicates the number of Keepalive messages received from a peer.

  • Notification messages: indicates the number of Notification messages received from a peer.

  • Refresh messages: indicates the number of route-refresh messages received from a peer.

Sent

Indicates the number of messages sent to a peer.
  • Total: indicates the total number of messages sent to a peer.

  • Update messages: indicates the number of Update messages sent to a peer.

  • Open messages: indicates the number of Open messages sent to a peer.

  • KeepAlive messages: indicates the number of Keepalive messages sent to a peer.

  • Notification messages: indicates the number of Notification messages sent to a peer.

  • Refresh messages: indicates the number of route-refresh messages sent to a peer.

Authentication type configured

Indicates the authentication type configured.

Last keepalive received

Indicates the time when the Keepalive packet is received last time. It can be in the following formats:
  • YYYY/MM/DD HH:MM:SS

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM DST

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM

  • YYYY/MM/DD HH:MM:SS DST

UTC±HH:MM indicates that a time zone is set through the clock timezone command; DST indicates that the daylight saving time is set through the clock daylight-saving-time command.

Last keepalive sent

Indicates the time when the Keepalive packet is sent last time. It can be in the following formats:
  • YYYY/MM/DD HH:MM:SS

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM DST

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM

  • YYYY/MM/DD HH:MM:SS DST

UTC±HH:MM indicates that a time zone is set through the clock timezone command; DST indicates that the daylight saving time is set through the clock daylight-saving-time command.

Last update received

Indicates the time when the Update packet is received last time. It can be in the following formats:
  • YYYY/MM/DD HH:MM:SS

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM DST

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM

  • YYYY/MM/DD HH:MM:SS DST

UTC±HH:MM indicates that a time zone is set through the clock timezone command; DST indicates that the daylight saving time is set through the clock daylight-saving-time command.

Last update sent

Indicates the time when the Update packet is sent last time. It can be in the following formats:
  • YYYY/MM/DD HH:MM:SS

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM DST

  • YYYY/MM/DD HH:MM:SS UTC±HH:MM

  • YYYY/MM/DD HH:MM:SS DST

UTC±HH:MM indicates that a time zone is set through the clock timezone command; DST indicates that the daylight saving time is set through the clock daylight-saving-time command.

Minimum route advertisement interval is 15 seconds

Indicates the minimum interval between route advertisements.
  • The minimum interval for advertising EBGP routes is 30 seconds.

  • The minimum interval for advertising IBGP routes is 15 seconds.

Optional capabilities

(Optional) Indicates the peer-supported capabilities.

Route refresh capability has been enabled

Indicates that route refreshing has been enabled.

4-byte-as capability has been enabled

Indicates that the 4-byte AS number capability is enabled.

Listen-only has been configured

Indicates that only connection requests are snooped and no connections will be initiated proactively.

Peer Preferred Value

Indicates the preferred value of the peer.

Routing policy configured

Indicates the configured routing policy.

Peer's BFD has been enabled

Indicates that BFP has been enabled on the peer.

# Display log information on BGP peer 10.1.1.2.
<HUAWEI> display bgp peer 10.1.1.2 log-info
Peer : 10.1.1.2 
 Date/Time     : 2011/13/06 11:53:21
 State         : Up
 Date/Time     : 2011/13/06 11:53:09
 State         : Down
 Error Code    : 6(CEASE)
 Error Subcode : 4(Administrative Reset)
 Notification  : Receive Notification
 Date/Time     : 2011/13/06 10:34:05
 State         : Up
Table 7-156  Description of the display bgp peer 1.1.1.2 log-info command output

Item

Description

Error Code

Error code.

Error Subcode

Error subcode.

Notification

Notification packet sent or received by a peer.

# Display information about the BGP peer of the VPN instance vrf1.

<HUAWEI> display bgp vpnv4 vpn-instance vrf1 peer

 BGP local router ID : 10.1.1.9
 Local AS number : 100
 VPN-Instance vrf1, router ID 10.1.1.1: 
 Total number of peers : 1                 Peers in established state : 1

  Peer        V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  10.1.1.1    4 65410      207      192     0 02:59:49 Established       1 

# Display detailed information about the BGP peer of the VPN instance vpna.

<HUAWEI> display bgp vpnv4 vpn-instance vpna peer verbose

         BGP Peer is 10.1.1.1,  remote AS 200
         Type: EBGP link
         BGP version 4, remote router ID 10.1.1.1

         Update-group ID: 1
         BGP current state: Established, Up for   03h01m22s
         BGP current event: RecvKeepalive
         BGP last state: OpenConfirm
         BGP Peer Up count: 1
                  Received total routes: 0
                  Received active routes total: 0
                  Advertised total routes: 3
         Port:  Local - 3722     Remote - 179
         Configured: Connect-retry Time: 32 sec
         Configured: Min Hold Time: 0 sec
         Configured: Active Hold Time: 180 sec   Keepalive Time:60 sec
         Received  : Active Hold Time: 180 sec
         Negotiated: Active Hold Time: 180 sec
         Peer optional capabilities:
         Peer supports bgp multi-protocol extension                              
         Peer supports bgp route refresh capability                              
         Peer supports bgp 4-byte-as capability 
         Address family IPv4 Unicast: advertised and received

 Received: Total 76 messages
                  Update messages                0
                  Open messages                  5
                  KeepAlive messages             71
                  Notification messages          0
                  Refresh messages               0

 Sent: Total 91 messages
                  Update messages                0
                  Open messages                  10
                  KeepAlive messages             77
                  Notification messages          4
                  Refresh messages               0
 Authentication type configured: None
 Last keepalive received: 2012/03/06 19:17:37
 Last keepalive sent    : 2012/03/06 19:17:37
 Last update    received: 2012/03/06 19:17:43
 Last update    sent    : 2012/03/06 19:17:37
 Maximum allowed prefix number: 150000
 Threshold: 75%
 Minimum route advertisement interval is 30 seconds
 Optional capabilities:
 Route refresh capability has been enabled
 4-byte-as capability has been enabled
 Peer Preferred Value: 0
 Routing policy configured:
 No routing policy is configured   

# Display information about IPv6 peers.

<HUAWEI> display bgp ipv6 peer

 BGP Local router ID : 10.0.0.1
 local AS number : 100
  Total number of peers : 1                 Peers in established state : 1

  Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  FC00:0:0:20::21 4   200       17       19     0 00:09:59 Established       3

# Display information about IPv6 peers.

<HUAWEI> display bgp ipv6 peer fc00:0:0:2001::1 verbose
         BGP Peer is FC00:0:0:2001::1,  remote AS 1
         Type: EBGP link
         BGP version 4, remote router ID 10.1.1.1

         Update-group ID: 1
         BGP current state: Established, Up for 00h00m59s
         BGP current event: RecvKeepalive
         BGP last state: OpenConfirm
         BGP Peer Up count: 2
         Received total routes: 0
         Received active routes total: 0
         Advertised total routes: 0
         Port:  Local - 179      Remote - 49153
         Configured: Connect-retry Time: 32 sec
         Configured: Min Hold Time: 0 sec
         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 4-byte-as capability
         Address family IPv6 Unicast: advertised and received

 Received: Total 76 messages
                  Update messages                0
                  Open messages                  5
                  KeepAlive messages             71
                  Notification messages          0
                  Refresh messages               0

 Sent: Total 91 messages
                  Update messages                0
                  Open messages                  10
                  KeepAlive messages             77
                  Notification messages          4
                  Refresh messages               0
 Authentication type configured: None
 Last keepalive received: 2012/03/06 19:17:37
 Last keepalive sent    : 2012/03/06 19:17:37
 Last update    received: 2012/03/06 19:17:43
 Last update    sent    : 2012/03/06 19:17:37
 Minimum route advertisement interval is 30 seconds
 Optional capabilities:
 Route refresh capability has been enabled
 4-byte-as capability has been enabled
 listen-only has been configured
 Peer Preferred Value: 0
 Routing policy configured:
 No routing policy is configured

# Display brief information about a VPNv6 peer.

<HUAWEI> display bgp vpnv6 all peer

 BGP local router ID : 10.1.1.1
 Local AS number : 100
 Total number of peers : 2                 Peers in established state : 2

  Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  10.2.2.2        4   100      210      220     0   02:42:55    Established    1

  Peer of IPv6-family for vpn instance :

  VPN-Instance vpn1, Router ID 10.4.4.4 :
  FC00:0:0:200::2 4 65410      205      178     0 02:42:53     Established    0

# Display detailed information about the VPNv6 peer whose IPv4 address is 10.2.2.2.

<HUAWEI> display bgp vpnv6 all peer 10.2.2.2 verbose
         BGP Peer is 10.2.2.2,  remote AS 200,
         Type: IBGP link
         BGP version 4, remote router ID 10.2.2.2

Group ID : 0 
Peer Local Interface Name: Vlanif10
Local Ifnet Tunnel: 0xb0010000
         BGP current state: Established, Up for 02h43m52s
         BGP current event: RecvKeepalive
         BGP last state: OpenConfirm
         BGP Peer Up count: 2
         Received total routes: 0
         Received active routes total: 0
         Advertised total routes: 0
         Port:  Local - 53308    Remote - 179
         Configured: Connect-retry Time: 32 sec 
         Configured: Min Hold Time: 0 sec
         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 4-byte-as capability
         Address family IPv4 Unicast: advertised and received
         Address family VPNv6: advertised and received

 Received: Total 76 messages
                  Update messages                0
                  Open messages                  5
                  KeepAlive messages             71
                  Notification messages          0
                  Refresh messages               0

 Sent: Total 91 messages
                  Update messages                0
                  Open messages                  10
                  KeepAlive messages             77
                  Notification messages          4
                  Refresh messages               0
 Last keepalive received: 2009-09-30 09:52:41
 Minimum route advertisement interval is 15 seconds
 Optional capabilities:
 Route refresh capability has been enabled
 4-byte-as capability has been enabled
 Connect-interface has been configured
 Peer Preferred Value: 0
 Routing policy configured:
 No routing policy is configured

# Display detailed information about the BGP peer of an IPv6 address family-enabled VPN instance whose IPv6 address is FC00:0:0:2000::2.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 peer fc00:0:0:2000::2 verbose

         BGP Peer is FC00:0:0:2000::2,  remote AS 65410,
         Type: EBGP link
         BGP version 4, remote router ID 10.1.1.1

Group ID : 0
Peer Local Interface Name: Vlanif10
Local Ifnet Tunnel: 0xb0010000
         BGP current state: Established, Up for 02h39m36s
         BGP current event: KATimerExpired
         BGP last state: OpenConfirm
         BGP Peer Up count: 2
         Received total routes: 0
         Received active routes total: 0
         Advertised total routes: 0
         Port:  Local - 49177    Remote - 179
         Configured: Connect-retry Time: 32 sec 
         Configured: Min Hold Time: 0 sec
         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 4-byte-as capability
         Address family IPv6 Unicast: advertised and received

 Received: Total 76 messages
                  Update messages                0
                  Open messages                  5
                  KeepAlive messages             71
                  Notification messages          0
                  Refresh messages               0

 Sent: Total 91 messages
                  Update messages                0
                  Open messages                  10
                  KeepAlive messages             77
                  Notification messages          4
                  Refresh messages               0
 Last keepalive received: 2009-09-30 09:51:52
 Minimum route advertisement interval is 30 seconds
 Optional capabilities:
 Route refresh capability has been enabled
 4-byte-as capability has been enabled
 Peer Preferred Value: 0
 Routing policy configured:
 No routing policy is configured
Related Topics

display bgp resource

Function

The display bgp resource command displays statistics about BGP specification information.

Format

display bgp resource

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check statistics about BGP specification information, run the display bgp resource command. This command displays only the total number of supported BGP peer sessions, including the numbers of various configured sessions.

Example

# Display statistics about BGP specification information.

<HUAWEI> display bgp resource
  BGP Peer session support total number : 64

   Capacity Statistics     Used Number

   BGP Peer Session          3
   IBGP Peer Session         3
   EBGP Peer Session         0
Table 7-157  Description of the display bgp resource command output

Item

Description

BGP Peer session support total number

Maximum number of BGP peer sessions that are supported.

Capacity Statistics

BGP peer session type.

Used Number

Number of currently configured peer sessions.

BGP Peer Session

Total number of currently configured BGP peer sessions.

IBGP Peer Session

Number of IBGP peer sessions, including confederation IBGP and common IBGP peer sessions.

EBGP Peer Session

Number of EBGP peer sessions, including confederation EBGP and common EBGP peer sessions.

display bgp routing-table

Function

The display bgp routing-table command displays information about BGP routes. Information about specified routes can be displayed by specifying different parameters.

Format

display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-prefixes ] ] ]

display bgp routing-table [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ]

display bgp routing-table regular-expression as-regular-expression

display bgp routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp routing-table peer ipv4-address received-routes ipv4-address [ { mask | mask-length } [ longer-prefixes | original-attributes ] ]

display bgp routing-table peer ipv4-address { advertised-routes [ ipv4-address [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] }

display bgp routing-table peer ipv4-address accepted-routes

display bgp routing-table time-range start-time end-time

Parameters

Parameter Description Value
ipv4-address Specifies an IPv4 network address. The value is in dotted decimal notation.
mask | mask-length Specifies a mask in dotted decimal notation or the mask length. -
longer-prefixes Matches any route whose prefix mask is longer than the specified length. -
as-path-filter Displays the routes that match a specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. It is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS-Path filter. The name is a string of 1 to 51 characters without any space. It is case-sensitive.
cidr Displays Classless InterDomain Routing (CIDR) information. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
different-origin-as Displays routes that have the same destination address but different source AS numbers. -
community-filter Displays the routes that match a specified BGP community filter. -
community-filter-name Specifies the name of a community filter. The name is a string of 1 to 51 characters. The string cannot be all numbers.
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
community Displays the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. -
aa:nn: Specifies the community number. -
internet Displays the matching routes that can be sent to any peer. -
no-advertise Displays the BGP routes carrying the No-Advertise community attribute. -
no-export Displays the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays the BGP routes carrying the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
peer ipv4-address Displays routes of a specified peer. -
advertised-routes Displays the routes advertised to a specified peer. -
received-routes Displays the routes received from a specified peer. -
active Displays the active routes received from a specified peer. -
original-attributes Displays the original attributes of a public route from a specified BGP peer before the route is filtered by the local import policy. To display such attributes, the peer keep-all-routes command must have been run. -
accepted-routes Displays the routes that are received from the peer and filtered through a routing policy. -
time-range start-time end-time Displays BGP routes that flap within the specified time period. For example, the value 0d0h5m0s of start-time indicates five minutes before the current time. The value 0d0h10m0s of end-time indicates 10 minutes before the current time. All BGP routes with the Keepalive time in the range of 5 to 10 minutes are displayed. The value ranges of start-time and end-time both are 0d0h0m0s-10000d23h59m59s.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

Information about specified routes can be displayed by specifying different parameters.

The display bgp routing-table command is used to display active and inactive BGP routes on the public network.

Example

# Display all BGP routing information.

<HUAWEI> display bgp routing-table
 BGP Local router ID is 10.1.1.2
 Status codes: * - valid, > - best, d - damped, h - history,
               i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 4
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
 *    10.1.1.0/24        10.1.1.1        0                     0      100?
 *    10.1.1.2/32        10.1.1.1        0                     0      100?
 *>   10.1.1.0/24        10.1.1.1        0                     0      100?
 *>   10.1.1.0/24        10.1.1.1        0                     0      100?

# Display routes with the community attribute.

<HUAWEI> display bgp routing-table community
 BGP Local router ID is 10.1.1.2
 Status codes: * - valid, > - best, d - damped, h - history,
               i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 Total Number of Routes: 4
      Network            NextHop        MED        LocPrf    PrefVal Community
 *    10.1.1.0/24        10.1.1.1        0                     0      no-export
 *    10.1.1.2/32        10.1.1.1        0                     0      no-export
 *>   10.1.1.0/24        10.1.1.1        0                     0      no-export
 *>   10.1.1.0/24        10.1.1.1        0                     0      no-export
Table 7-158  Description of the display bgp routing-table command output

Item

Description

BGP Local router ID

Indicates the router ID of the local BGP device.

Network

Indicates the network address in the BGP routing table.

NextHop

Indicates the next-hop address for the packet.

MED

Indicates the MED of the route.

LocPrf

Indicates the local preference.

PrefVal

Indicates the preferred value.

Path/Ogn

Indicates the AS_Path number and the origin attribute.

Community

Indicates the community attribute information.

# Display the detailed information of the specified routes.

<HUAWEI> display bgp routing-table 10.1.1.1
 BGP local router ID : 10.2.3.107
 Local AS number : 100
 Paths:   1 available, 1 best, 1 select
 BGP routing table entry information of 10.1.1.1/32:
 Imported route. 
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 0d00h01m33s
 Direct Out-interface: Vlanif10
 Original nexthop: 10.1.1.2
 Qos information : 0x0
 AS-path 200, origin incomplete, MED 0, pref-val 0, valid, external, best, select, pre 255
 Advertised to such 1 peers:
    10.1.1.2
Table 7-159  Description of the display bgp routing-table command output

Item

Description

Local AS number

Local AS number

Paths

Indicates the route selection result

BGP routing table entry information of

Routing entry information

Imported route

Routes imported to BGP using the import-route command.

From

IP address of an advertising device

Route Duration

Route duration

Direct Out-interface

Indicates the directly-connected interface

Original nexthop

Original next hop

NOTE:

If no routes to the BGP original next hop are available in the IP routing table, BGP routes cannot be advertised. In this case, find out why there is no route to the original next hop (this fault is generally associated with IGP or static routes).

Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.

AS-path

AS_Path attribute

Nil indicates that the attribute value is null.

origin

Origin attribute of a BGP route:
  • IGP: indicates that the origin attribute of a route added to the BGP routing table by using the network command is IGP.
  • EGP: indicates that the origin attribute of a route obtained by using EGP is EGP.
  • Incomplete: indicates that the origin attribute of a route whose source is unknown is Incomplete. For example, the origin attribute of the routes imported by using the import-route command is Incomplete.

valid

Valid route

external

External route

best

Optimal route

select

Preferred route

pre

BGP route preference

# Display detailed information about the specified invalid BGP routes.
<HUAWEI> display bgp routing-table 192.168.1.1
 BGP local router ID : 10.1.1.1
 Local AS number : 100
 Paths:   2 available, 0 best, 0 select
 BGP routing table entry information of 192.168.1.1/32:
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 00h01m31s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: 
 Original nexthop: 172.16.1.2
 Qos information : 0x0
 AS-path 200, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for IP unreachable
 Not advertised to any peer yet
Table 7-160  Description of the display bgp routing-table command output

Item

Description

BGP local router ID

ID of the local BGP device. The format is the same as the IPv4 address.

Local AS number

Local AS number.

Paths

Information about paths of BGP routes

BGP routing table entry information of 192.168.1.1/32

The following information is about 192.168.1.1/32 routing entries.

From

IP address of the router that sends the route.

Route Duration

Duration of routes.

Relay IP Nexthop

IP iterated next hop.

Relay IP Out-Interface

IP iterated outbound interface.

Original nexthop

Original next hop.

Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.

AS-path 200

AS_Path attribute.

origin incomplete

Well-known mandatory property. This property defines the origin of a path and records how a route turns to a BGP route. The property has the following three values:
  • IGP: The priority of this value is the highest. The origin property of the routes that are added to the BGP routing table by using the network (BGP) command is IGP.

  • EGP: The priority of this value is second to that of IGP. The origin property of the routes imported from EGP is EGP.

  • Incomplete: The priority of this value is the lowest. The value indicates the origin of a route is unknown. The origin property of the routes that are added to the BGP routing table by using the import-route (BGP) command is Incomplete.

MED

Multi-Exit discriminator of route.

localpref

Local priority.

pref-val

Value preferred by the protocol.

internal

The BGP route is an internal route.

pre 255

The BGP route preference is 255.

invalid for IP unreachable

Reason why a route is invalid:

  • invalid for route-policy not pass: The route does not match the route-policy.

  • invalid for supernet route: The route is a supernet route.

  • invalid for IP unreachable: The route fails to be iterated to another route.

  • invalid for supernet route not advertise: No supernet routes are advertised.

  • invalid for supernet label route not advertise: No supernet labeled routes are advertised.

  • invalid for next-hop unreachable: The next-hop IP address is unreachable.

  • invalid for tunnel unreachable: The route fails to be iterated to a tunnel.

Not advertised to any peer yet

The BGP route has not been advertised to any peer yet.

display bgp routing-table dampened

Function

The display bgp routing-table dampened command displays BGP dampened routes.

Format

display bgp [ vpnv4 vpn-instance vpn-instance-name ] routing-table [ statistics ] dampened

display bgp ipv6 routing-table [ statistics ] dampened

display bgp vpnv6 vpn-instance vpn-instance-name routing-table [ statistics ] dampened (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table [ statistics ] dampened (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpnv4 Displays the BGP routes of a VPNv4 instance. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
statistics Displays the statistics of dampened routes. -
ipv6 Displays all dampened IPv6 routes. -
vpnv6 Displays the BGP routes of a VPNv6 instance. -
route-distinguisher route-distinguisher Displays the Route Distinguisher dampened BGP routes.

The RD formats are divided into the following types:

  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If the length of the destination address mask of an IPv4 route is the same as that of its natural mask, the mask length is not displayed after the command is run.

Example

# Display BGP dampened routes.

<HUAWEI> display bgp routing-table dampened


 BGP Local router ID is 10.1.41.102
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 8
     Network            From              Reuse     Path/Origin
  d  10.6.244.0/23      10.10.41.247      01:06:25  65534 4837 174 11096 6356i
  d  10.17.79.0/24      10.10.41.247      01:06:25  65534 837 3356 23504 29777i
  d  10.17.110.0/24     10.10.41.247      01:06:25  65534 837 3356 23504 29777i
  d  10.57.144.0/20     10.10.41.247      01:06:25  65534 4837 10026 9924 18429,18429i
  d  10.76.216.0/24     10.10.41.247      01:06:25  65534 4837 701 26959i
  d  10.78.142.0/24     10.10.41.247      01:06:25  65534 4837 701 26959i
  d  10.115.136.0/23    10.10.41.247      01:06:25  65534 4837 701 26956i
  d  10.243.170.0/24    10.10.41.247      01:06:25  65534 4837 701 26959i
Table 7-161  Description of the display bgp routing-table dampened command output

Item

Description

Network

Indicates the network address in the BGP routing table.

From

Indicates the IP address of the peer that receives the routes.

Reuse

Indicates the reuse value (in seconds).

Path/Origin

Indicates the AS_Path number and the Origin attribute.

# Display IPv6 dampened routes in the BGP routing table.

<HUAWEI> display bgp ipv6 routing-table dampened

 

 BGP Local router ID is 10.0.0.2
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale,
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 4
  d  Network : FC00:0:0:1:1::                            PrefixLen : 48
     From    : FC00:0:0:1::2:2                           Reuse     : 01:06:26
     Path/Ogn: 65001?

  d  Network : FC00:0:0:1:2::                            PrefixLen : 48
     From    : FC00:0:0:1::2:2                           Reuse     : 01:06:26
     Path/Ogn: 65001?

  d  Network : FC00:0:0:1:3::                            PrefixLen : 48
     From    : FC00:0:0:1::2:2                           Reuse     : 01:06:26
     Path/Ogn: 65001?

  d  Network : FC00:0:0:1:4::                            PrefixLen : 48
     From    : FC00:0:0:1::2:2                           Reuse     : 01:06:26
     Path/Ogn: 65001?
Table 7-162  Description of the display bgp ipv6 routing-table dampened command output

Item

Description

PrefixLen

Prefix length

Related Topics

display bgp routing-table dampening parameter

Function

The display bgp routing-table dampening parameter command displays configured BGP route dampening parameters.

Format

display bgp [ vpnv4 vpn-instance vpn-instance-name ] routing-table dampening parameter

display bgp ipv6 routing-table dampening parameter

display bgp vpnv6 vpn-instance vpn-instance-name routing-table dampening parameter (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 all routing-table dampening parameter (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpnv4 Displays the BGP route dampening parameters of a VPNv4 instance. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
ipv6 Displays configured BGP4+ route dampening parameters. -
vpnv6 Displays the BGP route dampening parameters of a VPNv6 instance. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp routing-table dampening parameter command to check configured BGP route dampening parameters.

Example

# Display BGP route dampening parameters.

<HUAWEI> display bgp routing-table dampening parameter
 Maximum Suppress Time(in second) : 3973
 Ceiling Value                    : 16000
 Reuse Value                      : 750
 HalfLife Time(in  second)        : 900
 Suppress-Limit                   : 2000
Table 7-163  Description of the display bgp routing-table dampening parameter command output

Item

Description

Maximum Suppress Time (in second)

Maximum time taken for route suppression, in seconds.

Ceiling Value

Penalty ceiling.

Reuse Value

Threshold for a route to be unsuppressed.

HalfLife Time(in second)

Half life of a reachable route, in seconds.

Suppress-Limit

Threshold for a route to be suppressed.

# Display BGP4+ route dampening parameters.

<HUAWEI> display bgp ipv6 routing-table dampening parameter
 Maximum Suppress Time(in second) : 3069
 Ceiling Value                    : 16000
 Reuse Value                      : 750
 HalfLife Time(in  second)        : 900
 Suppress-Limit                   : 2000
Related Topics

display bgp routing-table flap-info

Function

The display bgp routing-table flap-info command displays statistics about BGP route flapping.

Format

display bgp [ vpnv4 vpn-instance vpn-instance-name ] routing-table flap-info [ regular-expression as-regular-expression ]

display bgp [ vpnv4 vpn-instance vpn-instance-name ] routing-table flap-info { as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ { mask | mask-length } [ longer-match ] ] }

display bgp ipv6 routing-table flap-info [ regular-expression as-regular-expression ]

display bgp ipv6 routing-table flap-info { as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ prefix-length [ longer-match ] ] }

display bgp vpnv6 vpn-instance vpn-instance-name routing-table flap-info [ regular-expression as-regular-expression ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 vpn-instance vpn-instance-name routing-table flap-info { as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ prefix-length [ longer-match ] ] } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table flap-info [ as-path-filter { as-path-filter-number | as-path-filter-name } | ipv4-address [ { mask | mask-length } [ longer-match ] ] ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table flap-info [ regular-expression as-regular-expression ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpnv4 Displays statistics about route flapping of a VPNv4 instance. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
regular-expression as-regular-expression Displays statistics about the flapping routes that match the AS_Path regular expression. The value is a string of 1 to 80 characters.
as-path-filter as-path-filter-number Specifies the number of an AS_Path filter. It is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Specifies the name of an AS_Path filter. The name is a string of 1 to 51 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.
network-address Specifies the network address related to dampened routes. -
mask Specifies the network mask. It is in dotted decimal notation.
mask-length Specifies the mask length. The value is an integer that ranges from 0 to 32.
longer-match Matches a route with a longer prefix. -
prefix-length Specifies the prefix length. The value is an integer that ranges from 0 to 128.
vpnv6 Displays statistics about route flapping of a VPNv6 instance. -
ipv4-address Displays statistics about the flapping routes that match the IPv4 prefix. -
route-distinguisher route-distinguisher Displays the Route Distinguisher dampened BGP routes.

The RD formats are divided into the following types:

  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp routing-table flap-info command to check statistics about BGP route flapping.

Example

# Display statistics about BGP route flapping.

<HUAWEI> display bgp routing-table flap-info

 
 BGP Local router ID is 10.20.200.201
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed,
               Origin codes: i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 7
     Network         From            Flaps  Duration     Reuse  Path/Ogn

 d  10.1.1.0        10.20.200.200   5      00:00:36  00:40:47  600i
 *>  10.1.1.0        10.20.200.202   1      00:04:07            100?
 d  10.1.2.0        10.20.200.200   5      00:00:36  00:40:47  600i
 *>  10.1.2.0        10.20.200.202   1      00:04:07            100?
 d  10.1.3.0        10.20.200.200   5      00:00:36  00:40:47  600i
 d  10.1.4.0        10.20.200.200   5      00:00:36  00:40:47  600i
 d  10.1.5.0        10.20.200.200   5      00:00:36  00:40:47  600i
Table 7-164  Description of the display bgp routing-table flap command output

Item

Description

Network

Network address in the BGP routing table.

From

IP address of the peer that receives the routes.

Flaps

Total number of times of route flapping.

Duration

Total time length of flapping.

Reuse

Reuse value.

Path/Ogn

AS_Path number and Origin attribute.

# Display statistics about BGP4+ route flapping.

<HUAWEI> display bgp ipv6 routing-table flap-info

 
 BGP Local router ID is 10.53.53.53
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 3
  d  Network : FC00:0:0:1::                              PrefixLen : 96
     From    : FC00:0:0:1::1                             Flaps     : 8
     Duration: 00:02:11                                  Reuse     : 00:49:21
     Path/Ogn: 100?

  d  Network : FC00:0:0:2::2                             PrefixLen : 128
     From    : FC00:0:0:1::1                             Flaps     : 5
     Duration: 00:00:18                                  Reuse     : 00:41:06
     Path/Ogn: 100?

  d  Network : FC00:0:0:2::3                             PrefixLen : 128
     From    : FC00:0:0:1::1                             Flaps     : 5
     Duration: 00:00:18                                  Reuse     : 00:41:06
     Path/Ogn: 100?

display bgp routing-table label

Function

The display bgp routing-table label command displays labeled routes in the BGP routing table.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table label include-mask

display bgp routing-table label [ statistics | include-mask ]

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table [ statistics ] label

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table [ statistics ] label

display bgp ipv6 routing-table [ statistics ] label

Parameters

Parameter Description Value
include-mask Displays labeled routes carrying masks. -
statistics Indicates statistics about labeled routes. -
vpnv4 Displays VPNv4 labeled routes. -
all Displays the labeled routes of all VPN instances. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
ipv6 Displays BGP4+ labeled routes. -
vpnv6 Displays VPNv6 labeled routes. -
route-distinguisher route-distinguisher Displays BGP routes with the specified RD.
The RD formats are divided into the following types:
  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp routing-table label command to check labeled routes in the BGP routing table.

Example

# Display BGP labeled routes of all VPN instances.

<HUAWEI> display bgp vpnv4 all routing-table label
 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total number of routes from all PE: 3
 Route Distinguisher: 100:1

        Network           NextHop           In/Out Label
 *>i    10.22.22.22       10.3.3.9          NULL/1036

 Route Distinguisher: 100:4

        Network           NextHop           In/Out Label
 *>     10.1.2.0          10.1.2.1          1037/NULL
 *>     10.11.11.11       127.0.0.1         1038/NULL

 VPN-Instance vpn1, router ID 1.1.1.9:
 Total Number of Routes: 1

        Network           NextHop           In/Out Label
 *>i    10.22.22.22       10.3.3.9          NULL/1036

 VPN-Instance vpn2, router ID 10.1.1.9:
 Total Number of Routes: 0
Table 7-165  Description of the display bgp vpnv4 all routing-table label command output

Item

Description

Network

Network address in the BGP routing table.

NextHop

IP address of the reachable next hop.

In/Out Label

Incoming label and outgoing label.

# Display BGP4+ labeled routes.
<HUAWEI> display bgp ipv6 routing-table label
Total Number of Routes: 3

  Network        Prefix     NextHop           Label
  FC00:0:0:1::4  128        FC00:0:0:2::2      1024
  FC00:0:0:1::5  128        FC00:0:0:2::2      1025
  FC00:0:0:1::6  128        FC00:0:0:2::2      1026
Table 7-166  Description of the display bgp ipv6 routing-table label command output

Item

Description

Prefix

IP prefix.

display bgp routing-table peer no-advertise

Function

The display bgp routing-table peer no-advertise command displays the routes that a device is prevented from advertising to a specified peer in different address families.

Format

display bgp routing-table peer ipv4-address no-advertise network [ mask | mask-length ]

display bgp ipv6 routing-table peer ipv6-address no-advertise ipv6–network [ prefix-length ]

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer ipv4-address no-advertise network [ mask | mask-length ]

display bgp vpnv4 all routing-table peer ipv4-address no-advertise network [ mask | mask-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp ipv6 routing-table peer ipv4-address no-advertise ipv6–network [ prefix-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp multicast routing-table peer ipv4-address no-advertise network [ mask | mask-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 all routing-table peer ipv4-address no-advertise ipv6–network [ prefix-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 vpn-instance vpn-instance-name routing-table peer ipv6-address no-advertise ipv6–network [ prefix-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn-ad routing-table peer ipv4-address no-advertise network (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
peer ipv4-address

Displays the routes that a device is prevented from advertising to the specified IPv4 peer.

The value is in dotted decimal notation.

network

Displays the routes with the specified destination IPv4 address that are prevented from being advertised.

The value is in dotted decimal notation.

mask

Specifies the subnet mask of the specified IPv4 address.

The value is in dotted decimal notation.

mask-length

Specifies the subnet mask length of the specified IPv4 address.

The value is an integer that ranges from 0 to 32.

vpnv4

Displays the routes that a device is prevented from advertising to a specified peer in the VPNv4 address family.

-

all

Displays the routes that a device is prevented from advertising to a specified peer in all VPN instances of the current address family.

-

vpn-instance vpn-instance-name

Displays the routes that a device is prevented from advertising to a specified peer in the specified VPN instance of the current address family.

The value must be an existing VPN instance name.
multicast

Displays the routes that a device is prevented from advertising to a specified peer in the IPv4 multicast address family.

-

ipv6

Displays the routes that a device is prevented from advertising to a specified peer in the IPv6 unicast address family.

-

peer ipv6-address

Displays the routes that a device is prevented from advertising to the specified IPv6 peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

ipv6–network

Displays the routes with the specified destination IPv6 address that are prevented from being advertised.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

prefix-length

Specifies the prefix length of an IPv6 address.

The value is an integer that ranges from 0 to 128.

vpnv6

Displays the routes that a device is prevented from advertising to a specified peer in the VPNv6 address family.

-

l2vpn-ad

Displays the routes that a device is prevented from advertising to a specified peer in the L2VPN-AD address family.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check the routes that a device is prevented from advertising to a specified peer in different address families, run the display bgp routing-table peer no-advertise command. The command output also includes the reasons why the routes are not advertised.

You can specify an address family to check the routes that a device is prevented from advertising to a specified peer in the address family. If you do not specify any address family, the command output shows the routes that a device is prevented from advertising to a specified peer in the IPv4 unicast address family.

Example

# Display the route 10.3.3.4/32 that a device is prevented from advertising to peer with IP address 192.168.1.1 in the IPv4 unicast address family.

<HUAWEI> display bgp routing-table peer 192.168.1.1 no-advertise 10.3.3.4 32
 BGP routing table entry information of 10.3.3.4/32:
 From: 192.168.1.1 (10.1.1.1)
 Route Duration: 22h36m17s  
 Relay IP Nexthop: 10.1.1.1
 Relay IP Out-Interface: Vlanif100
 Original nexthop: 192.168.1.1
 Qos information : 0x0
 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 1
 No advertise without config reflect-client
Table 7-167  Description of the display bgp routing-table peer no-advertise command output

Item

Description

From

Peer from which the route was received.

Route Duration

Duration of the route.

Relay IP Nexthop

Next-hop IP address to which the route is iterated.

Relay IP Out-Interface

Outbound interface to which the route is iterated.

Original nexthop

Original next-hop IP address of the route.

Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.

AS-path

AS_Path attribute. Nil indicates that the attribute value is null.

origin

Origin attribute:
  • IGP: indicates that the route is added to the BGP routing table using the network (BGP) command.
  • EGP: indicates that the route is learned through the EGP protocol.
  • Incomplete: indicates that the origin of the route cannot be identified. For example, if a route is imported using the import-route (BGP) command, its origin is Incomplete.

MED

MED of the route.

localpref

Local_Pref of the BGP route.

pref-val

PrefVal of the route.

valid

Valid route.

internal

Internal route.

best

Optimal route.

select

Selected route.

active

Active route.

pre 255

Priority of the route (255 in this example).

IGP cost 1

IGP cost of the route (1 in this example).

No advertise without config reflect-client

Reason why the route is not advertised:

  • No advertise with no-adv flag: The route carries the No-Advertise flag.

  • No advertise with peer default-route-advertise in vt family: The local device is configured to advertise only default routes to the peer in the VT address family.

  • No advertise with no-adv flag in community attr: The route carries the No-Advertise community attribute.

  • No advertise with no-export flag in community attr: The route carries the No-Export community attribute.

  • No advertise with no-export-subconfed flag in community attr: The route carries the No_Export_Subconfed community attribute.

  • No advertise by detail route with config aggregate: Specific routes for summarization are not advertised.

  • No advertise with config active-route-advertise: Only the active routes in the IP routing table are advertised.

  • No advertise with config peer upe and no export policy: The specified peer is a UPE, and the route fails to match the export policy.

  • No advertise without config reflect-client: No RR is configured.

  • No advertise with config reflect-client but without config reflect between-clients: Route reflection among RR clients is disabled.

  • No advertise for other reason: Other reasons prevent the route from being advertised.

display bgp routing-table peer statistics

Function

The display bgp routing-table peer statistics command displays statistics about received and advertised BGP routes.

Format

display bgp [ multicast | ipv6 ] routing-table peer statistics

display bgp [ l2vpn | vpls | l2vpn-ad ] routing-table peer statistics (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp { vpnv4 | vpnv6 } { all | vpn-instance vpn-instance-name } routing-table peer statistics ( This vpnv6 parameter is supported by the S5720EI, S5720HI, S6720S-EI and S6720EI.)

display bgp l2vpn-ad routing-table [ all | vpls-ad | vpws | vpls ] peer statistics (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
multicast Displays statistics about routes in the IP multicast routing table. -
l2vpn Displays statistics about routes in the BGP-L2VPN address family. -
vpls Displays statistics about routes in the BGP VPLS address family. -
ipv6 Displays statistics about routes in the BGP IPv6 unicast address family. -
l2vpn-ad Displays statistics about routes in the BGP L2VPN-AD address family. -
vpnv4 Displays statistics about routes in the BGP-VPNv4 address family. -
vpnv6 Displays statistics about routes in the BGP-VPNv6 address family. -
all Displays statistics about all types of routes. -
vpn-instance vpn-instance-name Specifies a VPN instance name. The value must be an existing VPN instance name.
vpls-ad Displays statistics about VPLS-AD routes. -
vpws Displays statistics about virtual private wire service (VPWS) routes. -
vpls Displays statistics about virtual private LAN service (VPLS) routes. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check statistics of received and advertised BGP routes, run the display bgp routing-table peer statistics command. You can specify parameters as needed. If no parameter is specified in the command, statistics about BGP IPv4 unicast routes are displayed.

Example

# Display statistics about received and advertised BGP IPv4 unicast routes.

<HUAWEI> display bgp routing-table peer statistics
 BGP local router ID : 10.1.1.1
 Local AS number : 100
 Total number of peers : 3                Number of Peers in established state : 3

  Peer                    Received routes            Advertised routes

  10.2.2.2                  1                          1
  10.2.2.3                  1                          1
  10.3.3.3                  2                          0
Table 7-168  Description of the display bgp routing-table peer statistics command output

Item

Description

BGP local router ID Local router ID
Local AS number AS number
Total number of peers Total number of peers
Number of Peers in established state Number of peers in the established state
Peer IP address of a peer
Received routes Total number of routes received from the peer
Advertised routes Total number of routes advertised to the peer

display bgp routing-table statistics

Function

The display bgp routing-table statistics command displays statistics about BGP routes.

Format

display bgp routing-table statistics

display bgp routing-table statistics as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp routing-table statistics cidr

display bgp routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp routing-table statistics dampened

display bgp routing-table statistics different-origin-as

display bgp routing-table statistics regular-expression as-regular-expression

display bgp routing-table peer ipv4-address { advertised-routes | received-routes [ active ] } statistics

Parameters

Parameter Description Value
as-path-filter as-path-filter-number Displays the routes that match the specified the number of the matching AS-Path filter. It is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Displays the routes that match the specified the name of the matching AS-Path filter. The name is a string of 1 to 51 characters without any space. It is case-sensitive.
cidr Displays CIDR information. -
community Displays the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies the community attribute number. Both aa and nn are integers ranging from 0 to 65535.
internet Displays the matching routes that can be sent to any peer. -
no-advertise Displays the BGP routes carrying the No-Advertise community attribute. -
no-export Displays the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays the BGP routes carrying the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
community-filter Displays the routes that match a specified BGP community filter. -
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
community-filter-name Specifies the name of a community filter. The name is a string of 1 to 51 characters. The string cannot be all numbers.
dampened Displays the statistics of BGP dampened roues. -
different-origin-as Displays routes that have the same destination address but different source AS numbers. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
peer ipv4-address Displays the routing information for the specified BGP peer. It is in dotted decimal notation.
advertised-routes Displays the routes advertised to the specified peer. -
received-routes Displays the routes received from the specified peer. -
active Specifies the number of active routes. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display bgp routing-table statistics command is used to display statistics about BGP routes on the public network.

The display bgp routing-table statistics as-path-filter command is used to display statistics about the BGP routes that match the specified AS_Path filter on the public network.

The display bgp routing-table statistics cidr command is used to display statistics about the BGP CIDR information of the public network.

The display bgp routing-table statistics community command is used to display statistics about the BGP routes carrying the specified community attribute on the public network.

The display bgp routing-table statistics community-filter command is used to display statistics about the BGP routes that match the specified community filter on the public network.

The display bgp routing-table statistics dampened command is used to display statistics about BGP dampened routes on the public network.

The display bgp routing-table statistics different-origin-as command is used to display statistics about the BGP routes with the same destination address but different source AS numbers on the public network.

The display bgp routing-table statistics regular-expression command is used to display statistics about the BGP routes whose AS_Path information matches the AS_Path regular expression on the public network.

Example

# Display route statistics.

<HUAWEI> display bgp routing-table statistics
 Total Number of Routes: 4
Table 7-169  Description of the display bgp routing-table statistics command output

Item

Description

Total Number of Routes

Total number of routes in the routing table

display bgp update-peer-group

Function

The display bgp update-group command displays information about update-groups. By setting index in the command displays detailed information about a specified update-group. If no address family is specified, information about the update-group of the IPv4 unicast address family is displayed by default.

Format

display bgp update-peer-group [ index update-group-index ]

display bgp ipv6 update-peer-group [ index update-group-index ]

display bgp vpnv4 all update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name update-peer-group [ index update-group-index ]

display bgp vpnv6 all update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv6 vpn-instance vpn-instance-name update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn all update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpls all update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp l2vpn-ad update-peer-group [ index update-group-index ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
index update-group-index Specifies the index of an update-group. The value is an integer that ranges from 0 to 65535.
ipv6 Displays information about the BGP update-groups of IPv6 routes. -
vpnv4 Displays information about the BGP update-groups of a VPNv4 instance. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.
vpnv6 Displays information about the BGP update-groups of a VPNv6 instance. -
all Displays information about all the update-groups in a VPNv6 address family. -
l2vpn Displays information about L2VPN BGP update-groups. -
vpls Displays information about VPLS BGP update-groups. -
l2vpn-ad Displays information about L2VPN-AD BGP update-groups. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can specify the index of an update-group to view detailed information about the specified update-group. If no address family is specified, information about the update peer-groups in the IPv4 unicast address family is displayed by default.

Example

# Display information about the update peer-groups in the IPv4 unicast address family.

<HUAWEI> display bgp update-peer-group
 The Public instance's update peer group number : 1
 Keep buffer update peer group number : 0
 BGP Version : 4
 Group ID : 0 
 Group Type : external 
 Addr Family : IPv4-UNC 
 AdvMinTimeVal : 30 
 Total Peers : 1 
 Leader Peer : 192.168.1.2 
 Peers List : 192.168.1.2 
 
Table 7-170  Description of the display bgp update-peer-group command output

Item

Description

The Public instance's update peer group number

Number of update-groups in the instance

Keep buffer update peer group number

Number of packets in update-groups saved in the batch buffer

BGP Version

Indicates the BGP version.

Group ID

Indicates the ID of the update-group.

Group Type

Indicates the type of the update-group, which can be one of the following:
  • external: indicates that this is an EBGP peer group.
  • internal: indicates that this is an IBGP peer group.
  • unknown: indicates that the type is unknown.

Addr Family

Indicates the address family.

AdvMinTimeVal

Indicates the minimum interval for sending Update packets with the same route prefix.

Total Peers

Indicates the total number of peers in an update-group.

Leader Peer

Indicates the representative of an update-group.

Peers List

Indicates a list of peers.

# Display information about the update-group with a specified index.

<HUAWEI> display bgp update-peer-group index 0
 Group ID : 0
 BGP Version : 4
 Group Type : external
 Addr Family : IPv4-UNC
 AdvMinTimeVal : 30
 Total Peers : 1
  Leader Peer : 192.168.1.2

 Total format packet number : 3
 Total send packet number : 3
 Total replicate packet number : 0
 The replication percentages(%) : 0

 Peers List : 192.168.1.2
Table 7-171  Description of the display bgp update-peer-group index command output
Item Description
Total format packet number Indicates the total number of formatted packets.
Total send packet number Indicates the total number of sent packets.
Total replicate packet number Indicates the total number of replicate packets, which equals the total number of sent packets minus the total number of formatted packets.
The replication percentages(%) Indicates the replication percentage, which is obtained with the formula: (Total number of sent packet - Total number of formatted packets) x 100/Total number of formatted packets.

display bgp vpnv4 brief

Function

The display bgp vpnv4 brief command displays brief information about VPNv4 and VPN instances (IPv4 address family).

Format

display bgp vpnv4 { all | vpn-instance vpn-instance-name } brief

Parameters

Parameter Description Value
all Displays information about all VPNv4 and VPN instances (IPv4 address family). -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value must be an existing VPN instance name.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After the display bgp vpnv4 brief command is used to display information about VPNv4 and VPN instances (IPv4 address family), the VPN instances are displayed and arranged alphabetically by name.

Example

# Display brief information about VPNv4 instances and all VPN instances (IPv4 address family).

<HUAWEI> display bgp vpnv4 all brief

VPNV4 :
  Rd Num              Peer Num            Route Num
  0                   1                   0

VPN-Instance(IPv4-family):
  VPN-Instance Name   Peer Num            Route Num
  vrf0                   0                   0
  vrf1                   0                   0
  vrf11                  0                   0
  vrf12                  0                   0
  vrf13                  0                   0
  vrf14                  0                   0
  vrf2                   0                   20
  vrf3                   0                   20
  vrf4                   0                   24
  vrf5                   0                   24
  vrf6                   0                   0
  vrf7                   0                   0
  vrf8                   0                   20
Table 7-172  Description of the display bgp vpnv4 brief command output

Item

Description

Rd Num

Indicates the number of RDs.

Peer Num

Indicates the number of peers.

Route Num

Indicates the number of routes.

VPN-Instance Name

Indicates the name of a VPN instance.

display bgp vpnv4 routing-table

Function

The display bgp vpnv4 routing-table command displays BGP routes of VPNv4 address family and the private networks.

Format

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ]

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table regular-expression as-regular-expression (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table regular-expression as-regular-expression

display bgp vpnv4 route-distinguisher route-distinguisher routing-table ipv4-address [ mask | mask-length ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table ipv4-address [ mask [ longer-prefixes ] | mask-length [ longer-prefixes ] ]

display bgp vpnv4 all routing-table peer ipv4-address { advertised-routes [ network [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer ipv4-address { advertised-routes [ network [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] }

display bgp vpnv4 all routing-table peer ipv4-address received-routes network [ { mask | mask-length } [ longer-prefixes ] ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer ipv4-address received-routes network [ { mask | mask-length } [ longer-prefixes | original-attributes ] ]

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer ipv4-address accepted-routes

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table time-range start-time end-time (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv4 vpn-instance vpn-instance-name routing-table time-range start-time end-time

Parameters

Parameter Description Value
all Displays all BGP VPNv4 routes. -
route-distinguisher route-distinguisher Displays the BGP routes with the specified RD.
The RD formats are divided into the following types:
  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

vpn-instance vpn-instance-name Displays the BGP routes of a specified VPN instance. The value must be an existing VPN instance name.
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS-Path filter. The name is a string of 1 to 51 case-sensitive characters without spaces. The string cannot be all numerals. When double quotation marks are used around the string, spaces are allowed in the string.
cidr Displays CIDR information. -
different-origin-as Displays the routes that have the same destination address but different source AS numbers. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
ipv4-address Specifies the destination address. -
mask Specifies a mask in dotted decimal notation. The value is in dotted decimal notation.
mask-length Specifies the mask length. The value is an integer that ranges from 0 to 32.
peer ipv4-address Displays routes of a specified peer. -
advertised-routes Displays the routes advertised to a specified peer. -
network Specifies the IPv4 network address. It is in dotted decimal notation.
longer-prefixes Matches any route whose prefix mask is longer than the specified length. -
received-routes Displays the routes received from a specified peer. -
active Displays the active routes received from a specified peer. -
original-attributes Displays the original attributes of a BGP route from a specified BGP peer before the route is filtered by the local import policy. To display such attributes, the peer keep-all-routes command must have been run. -
community-filter Displays the routes that match a specified BGP community filter. -
community-filter-name Specifies the name of a community filter. The value is a string of 1 to 51 case-sensitive characters. The string cannot be all digits.
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
whole-match Indicates exact matching. -
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
community Displays the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the number of a community. -
aa:nn Specifies the community number. A maximum of 29 community numbers can be set. Both aa and nn are integers ranging from 0 to 65535.
internet Displays the matching routes that can be sent to any peer. -
no-advertise Displays the BGP routes carrying the No-Advertise community attribute. -
no-export Displays the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays the BGP routes carrying the No-Export-Subconfed community attribute. -
accepted-routes Displays the routes that are received from a neighbor and accepted by a routing policy. -
time-range start-time end-time Displays information about BGP VPNv4 routes that have undergone status flapping during the specified period. For example, when start-time is set to 0d0h5m0s and end-time is set to 0d0h10m0s, information about all BGP VPNv4 routes whose lifetime ranges from 5 to 10 minutes is displayed. In the values of start-time and end-time, d ranges from 0 to 10000, h ranges from 0 to 23, m ranges from 0 to 59, and s ranges from 0 to 59.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can specify different parameters to view the specific routing information.

When BGP routing table is displayed, if the length of the destination address mask of an IPv4 route is the same as that of its natural mask, the mask length is not displayed.

You can run the display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table time-range start-time end-time command to view BGP VPNv4 routes that flap within the specified time period. For example, if service traffic is abnormal or CPU usage of the device remains high within a certain time period, you can run this command to check whether route flapping occurs within the specified time period. The faulty route can be viewed in the command output, facilitating fault location.

Example

# Display all the BGP routing information of the VPN instance named vpn1.

<HUAWEI> display bgp vpnv4 vpn-instance vpn1 routing-table

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 VPN-Instance vpn1, Router ID 10.1.1.9:

 Total Number of Routes: 4
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.1.2.0/24        0.0.0.0         0                     0      ?
 *>   10.1.2.1/32        0.0.0.0         0                     0      ?
 *>   10.11.11.11/32     0.0.0.0         0                     0      ?
 *>i  10.22.22.22/32     10.3.3.9        0          100        0      ?

# Display all the BGP VPNv4 routing information.

<HUAWEI> display bgp vpnv4 all routing-table


 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete



 Total number of routes from all PE: 4
 Route Distinguisher: 100:1


      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  10.22.22.22/32     10.3.3.9        0          100        0      ?

 Route Distinguisher: 100:4


      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.1.2.0/24        0.0.0.0         0                     0      ?
 *>   10.1.2.1/32        0.0.0.0         0                     0      ?
 *>   10.11.11.11/32     0.0.0.0         0                     0      ?

 VPN-Instance vpn1, Router ID 10.1.1.9:

 Total Number of Routes: 4
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.1.2.0/24        0.0.0.0         0                     0      ?
 *>   10.1.2.1/32        0.0.0.0         0                     0      ?
 *>   10.11.11.11/32     0.0.0.0         0                     0      ?
 *>i  10.22.22.22/32     10.3.3.9        0          100        0      ?
# Display the VPNv4 routing information of the specified RD.
<HUAWEI> display bgp vpnv4 route-distinguisher 100:1 routing-table

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Route Distinguisher: 100:1


 Total Number of Routes: 3
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.1.1.0/24        0.0.0.0         0                     0      ?
 *                       10.1.1.1        0                     0      65410?
 *>   10.1.1.2/32        0.0.0.0         0                     0      ?

 VPN-Instance vpna, Router ID 10.1.1.9:

 Total Number of Routes: 7
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.1.1.0/24        0.0.0.0         0                     0      ?
                         10.1.1.1        0                     0      65410?
 *>   10.1.1.2/32        0.0.0.0         0                     0      ?
 *>   10.2.1.0/24        10.2.1.2        0                     0      ?
 * i                     10.3.3.9        0          100        0      ?
 *>   10.2.1.2/32        127.0.0.1       0                     0      ?
 *>i  10.4.1.0/24        10.4.4.9        0          100        0      ?

# Display all BGP VPNv4 routes of community 1000:100.

<HUAWEI> display bgp vpnv4 all routing-table community 1000:100

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total number of routes from all PE: 1

 Route Distinguisher: 100:1


      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.22.22.22/32     10.3.3.9        0          100        0      <1000:100>

 VPN-Instance vpn1, Router ID 10.1.1.9:

 Total Number of Routes: 1
      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.22.22.22/32     10.3.3.9        0          100        0      <1000:100>

 VPN-Instance vpn2, Router ID 10.1.1.9:

 Total Number of Routes: 0

# Displays BGP VPNv4 routes that flap within the specified time period.

<HUAWEI> display bgp vpnv4 all routing-table time-range 0d5h0m0s 1d5h0m0s

 BGP Local router ID is 192.168.1.250
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Route Distinguisher: 2:2

      Network            NextHop         Peer            Duration        Path/Ogn

 *>i  0.0.0.0            10.2.2.2        10.2.2.2        05h30m11s        i
 *>   10.2.3.4/32        0.0.0.0         0.0.0.0         05h30m42s        ?

 VPN-Instance 1, Router ID 192.168.1.250:
      Network            NextHop         Peer            Duration        Path/Ogn

 *>   10.2.3.4/32        0.0.0.0         0.0.0.0         05h30m42s        ?

 VPN-Instance 2, Router ID 192.168.1.250:
      Network            NextHop         Peer            Duration        Path/Ogn

 *>i  0.0.0.0            10.2.2.2        10.2.2.2        05h30m11s        i
 *>   10.2.3.4/32        0.0.0.0         0.0.0.0         05h30m42s        ?

Table 7-173  Description of the display bgp vpnv4 routing-table command output

Item

Description

BGP Local router ID

ID of the local BGP device.

Network

Network address in the BGP routing table.

NextHop

Next-hop address through which the packet has to be sent

MED

MED of the route.

LocPrf

Local preference.

PrefVal

Preferred value.

Peer

Peer IP address

Duration

Route duration

Path/Ogn

AS_Path number and the origin attribute.

Community

Community attribute information.

# Display information about a specified VPNv4 route.

<HUAWEI> display bgp vpnv4 all routing-table 192.168.2.0
                                                                                
                                                                                
 BGP local router ID : 10.2.2.9                                                  
 Local AS number : 100                                                          
                                                                                
 Total routes of Route Distinguisher(100:10): 2                                 
 BGP routing table entry information of 192.168.2.0/24:                         
 Imported route.                                                                
 Label information (Received/Applied): NULL/1025                                
 From: 0.0.0.0 (0.0.0.0)                                                        
 Route Duration: 00h50m09s                                                      
 Direct Out-interface: Vlanif30   
 Original nexthop: 192.168.2.1                                                  
 Qos information : 0x0                                                          
 Ext-Community:RT <1 : 1>                                                       
 AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, 
pre 255                                                                         
 Advertised to such 1 peers:                                                    
    10.3.3.3                                                                     
 BGP routing table entry information of 192.168.2.0/24:                         
 From: 192.168.2.2 (1.1.1.1)                                                    
 Route Duration: 00h48m50s                                                      
 Direct Out-interface: Vlanif30   
 Original nexthop: 192.168.2.2                                                  
 Qos information : 0x0                                                          
 Ext-Community:RT <1 : 1>                                                       
 AS-path 10, origin incomplete, MED 0, pref-val 0, valid, external, pre 255, not
 preferred for route type                                                       
 Not advertised to any peer yet                                                 
                                                                                
                                                                                
 VPN-Instance vpna, Router ID 10.2.2.9:                                          
                                                                                
 Total Number of Routes: 2                                                      
 BGP routing table entry information of 192.168.2.0/24:                         
 Imported route.                                                                
 From: 0.0.0.0 (0.0.0.0)                                                        
 Route Duration: 00h50m09s                                                      
 Direct Out-interface: Vlanif30   
 Original nexthop: 192.168.2.1                                                  
 Qos information : 0x0                                                          
 AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, 
pre 0                                                                           
 Advertised to such 1 peers:                                                    
    192.168.2.2                                                                 
 BGP routing table entry information of 192.168.2.0/24:                         
 From: 192.168.2.2 (1.1.1.1)                                                    
 Route Duration: 00h48m51s                                                      
 Direct Out-interface: Vlanif30    
 Original nexthop: 192.168.2.2                                                  
 Qos information : 0x0                                                          
 AS-path 10, origin incomplete, MED 0, pref-val 0, external, pre 255            
 Not advertised to any peer yet                                                 
Table 7-174  Description of the display bgp vpnv4 routing-table command output
Item Description
Local AS number Local AS number.
Total routes of Route Distinguisher Total number of VPNv4 routes with a specified RD.
BGP routing table entry information of x.x.x.x/x The following information is about a specified BGP routing entry.

Imported route

Routes imported to BGP using the import-route command.

Label information (Received/Applied) Information about labels, including received and sent labels.
From IP address of the route originator.
Route Duration Route duration.
Direct Out-interface Direct outbound interface.
Original nexthop Original next hop.
Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.
Ext-Community Extended community attribute of BGP.
AS-path AS_Path attribute.
origin Origin attribute of the BGP route.

The value can be IGP (for example, the routes imported into the BGP routing table by using the network (BGP) command), EGP (the routes obtained by EGP), or Incomplete (the routes whose origin cannot be identified, for example, the routes imported into the BGP routing table by using the import-route (BGP) command).

pref-val Preferred value.
valid Valid BGP route.
external The BGP route is learned from the EBGP peer.
best The BGP route is the optimal route.
select The BGP route is a preferred route.
pre 255 The preference of the BGP route is 255.
Advertised to such 1 peers The BGP route has been advertised to one peer.
Not advertised to any peer yet The BGP route has not been advertised to any peer.
VPN-Instance vpna, Router ID 10.2.2.9 The VPN instance is vpna, the Route ID is 10.2.2.9

Total Number of Routes

Number of routes in VPN instance vpna.
# Display detailed information about the specified invalid BGP VPNv4 routes.
<HUAWEI> display bgp vpnv4 all routing-table 192.168.4.4
 BGP local router ID : 10.1.1.1
 Local AS number : 100

 Total routes of Route Distinguisher(10:10): 1
 BGP routing table entry information of 192.168.4.4/32:
 Label information (Received/Applied): 1025/NULL
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 00h12m26s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: GigabitEthernet0/0/0
 Relay Tunnel Out-Interface: 
 Relay token: 0x0
 Original nexthop: 10.1.1.2
 Qos information : 0x0
 Ext-Community:RT <10 : 10>, RT <20 : 20>
 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
 Not advertised to any peer yet

 VPN-Instance vrf1, Router ID 10.1.1.1:

 Total Number of Routes: 1
 BGP routing table entry information of 192.168.4.4/32:
 Label information (Received/Applied): 1025/NULL
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 00h12m26s  
 Relay Tunnel Out-Interface: 
 Relay token: 0x0
 Original nexthop: 10.1.1.2
 Qos information : 0x0
 Ext-Community:RT <10 : 10>, RT <20 : 20>
 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for tunnel unreachable
 Not advertised to any peer yet
Table 7-175  Description of the display bgp vpnv4 routing-table command output

Item

Description

BGP local router ID

ID of the local BGP device. The format is the same as the IPv4 address.

Local AS number

Local AS number.

Total routes of Route Distinguisher(10:10)

Total number of BGP VPNv4 routes of the specified RD.

BGP routing table entry information of 192.168.4.4/32

The following information is about 192.168.4.4/32 routing entries.

Label information (Received/Applied)

Label information (received or sent).

From

IP address of the device that sends the route. 10.1.1.2 is the IP address of the source interface of the peer with which the BGP connection is established, and 10.1.1.2 is the Router ID of the peer.

Route Duration

Duration of routes.

Relay IP Nexthop

IP iterated next hop.

Relay IP Out-Interface

IP iterated outbound interface.

Relay Tunnel Out-Interface

Tunnel iterated outbound interface.

Relay token

Iterated token value used for MPLS forwarding that is a part of tunnel ID and is assigned by the system.

Original nexthop

Original next hop.

Qos information

QoS information.

  • 0x20000000: indicates that the apply behavior command has been run.
  • 0x40000001–0x40000FFF: indicates that the apply qos-local-id qos-local-id command has been run and the qos-local-id varies from 1 to 4095.
  • 0x80000001–0x80000007: indicates that the apply ip-precedence precedence command has been run and the precedence varies from 1 to 7.
  • 0x0: indicates that the preceding QoS configurations are not performed.

Ext-Community

Extended community attribute.

AS-path Nil

AS_Path attribute, with Nil indicating that the attribute value is null.

origin incomplete

Well-known mandatory property. This property defines the origin of a path and records how a route turns to a BGP route. The property has the following three values:
  • IGP: The priority of this value is the highest. The origin property of the routes that are added to the BGP routing table by using the network (BGP) command is IGP.

  • EGP: The priority of this value is second to that of IGP. The origin property of the routes imported from EGP is EGP.

  • Incomplete: The priority of this value is the lowest. The value indicates the origin of a route is unknown. The origin property of the routes that are added to the BGP routing table by using the import-route (BGP) command is Incomplete.

MED

Multi-Exit discriminator of route.

localpref

Local priority.

pref-val

Value preferred by the protocol.

valid

The BGP route is a valid route.

internal

The BGP route is an internal route.

best

The BGP route is an optimal route.

select

The BGP route is a preferred route.

pre 255

The priority of the BGP route is 255.

invalid for tunnel unreachable

Reason why a route is invalid:

  • invalid for route-policy not pass: The route does not match the route-policy.

  • invalid for supernet route: The route is a supernet route.

  • invalid for IP unreachable: The route fails to be iterated to another route.

  • invalid for supernet route not advertise: No supernet routes are advertised.

  • invalid for supernet label route not advertise: No supernet labeled routes are advertised.

  • invalid for next-hop unreachable: The next-hop IP address is unreachable.

  • invalid for tunnel unreachable: The route fails to be iterated to a tunnel.

Not advertised to any peer yet

The BGP route has not been advertised to any peer yet.

VPN-Instance vrf1, Router ID 10.1.1.1

The local VPN instance is vrf1, and its router ID is 10.1.1.1.

Total Number of Routes

Total number of BGP VPNv4 routes that match 192.168.4.4/32 in VPN instance vrf1.

display bgp vpnv4 routing-table statistics

Function

The display bgp vpnv4 routing-table statistics command displays statistics about BGP VPNv4 routes.

Format

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table statistics [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table statistics

display bgp vpnv4 vpn-instance vpn-instance-name routing-table statistics [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ]

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table statistics regular-expression as-regular-expression (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table statistics regular-expression as-regular-expression

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv4 vpn-instance vpn-instance-name routing-table statistics dampened

display bgp vpnv4 all routing-table peer ipv4-address { advertised-routes | received-routes [ active ] } statistics (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer ipv4-address { advertised-routes | received-routes [ active ] } statistics

Parameters

Parameter Description Value
all Displays all the statistics of BGP VPNv4 routes. -
route-distinguisher route-distinguisher Displays statistics about the BGP routes with a specified RD.
The RD formats are divided into the following types:
  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

vpn-instance vpn-instance-name Displays statistics about the BGP routes of a specified VPN instance. The value must be an existing VPN instance name.
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS-Path filter. The name is a string of 1 to 51 case-sensitive characters without spaces. The string cannot be all numerals. When double quotation marks are used around the string, spaces are allowed in the string.
cidr Displays CIDR statistics. -
different-origin-as Displays statistics about the routes that have the same destination address but different source AS numbers. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
community Displays statistics about the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies a community attribute value. Both aa and nn are integers ranging from 0 to 65535.
internet Displays statistics about the matching routes that can be sent to any peer. -
no-advertise Displays statistics about the BGP routes carrying the No-Advertise community attribute. -
no-export Displays statistics about the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays statistics about the BGP routes carrying the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
community-filter Displays statistics about the routes that match a specified BGP community filter. -
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
community-filter-name Specifies the name of a community filter. The value is a string of 1 to 51 case-sensitive characters. The string cannot be all digits.
dampened Displays the statistics of BGP dampened routes. -
active Displays statistics about the routes that have the same destination address but different source AS numbers. -
peer ipv4-address Displays statistics about routes of a specified peer. It is in dotted decimal notation.
advertised-routes Displays statistics about the routes advertised to a specified peer. -
received-routes Displays statistics about the routes received from a specified peer. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp vpnv4 routing-table statistics command to check statistics about BGP VPNv4 routes.

Example

# Display statistics about BGP VPNv4 routes.
<HUAWEI> display bgp vpnv4 all routing-table statistics
                                                                                
 Total number of routes from all PE: 2                                          
                                                                                
 VPN-Instance vpn1, Router ID 10.1.1.9:                                          
                                                                                
 Total Number of Routes: 2                                                      
Table 7-176  Description of the display bgp vpnv4 routing-table statistics command output

Item

Description

Total number of routes from all PE

Total number of VPNv4 routes

VPN-Instance vpn1

Indicating the name of VPN instance is vpn1.

Router ID 10.1.1.9

Indicating the router ID is 10.1.1.9.

Total Number of Routes

Total number of routes of the VPN instance.

Route Distinguisher

RD of the VPN instance IPv4 address family.

display bgp vpnv6 brief

Function

The display bgp vpnv6 brief command displays brief information about VPNv6 and VPN instances (IPv6 address family).

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

display bgp vpnv6 { all | vpn-instance vpn-instance-name } brief

Parameters

Parameter Description Value
all Displays information about all VPNv6 and VPN instances (IPv6 address family). -
vpn-instance vpn-instance-name Specifies the name of a VPNv6 instance. The value must be an existing VPN instance name.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After the display bgp vpnv6 brief command is used to display information about VPNv6 and VPN instances (IPv6 address family), the VPN instances are displayed and arranged alphabetically by name.

Example

# Display brief information about VPNv6 and VPN instances (IPv6 address family).

<HUAWEI> display bgp vpnv6 all brief

VPNV6:
  Rd Num               Peer Num            Route Num
    2                    1                   2

VPN-Instance(IPv6-family):
  VPN-Instance Name   Peer Num            Route Num
    vrf0                 1                   2
    vrf1                 0                   0
    vrf11                0                   0
    vrf12                0                   0
    vrf13                0                   0
    vrf14                0                   0
    vrf2                 0                   20
    vrf3                 0                   20
    vrf4                 0                   24
    vrf5                 0                   24
    vrf6                 0                   0
Table 7-177  Description of the display bgp vpnv6 all brief command output

Item

Description

Rd Num

Number of RDs.

Peer Num

Number of peers.

Route Num

Number of routes.

VPN-Instance Name

Name of a VPN instance.

display bgp vpnv6 routing-table

Function

The display bgp vpnv6 routing-table command displays BGP VPNv6 routes.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

display bgp vpnv6 route-distinguisher route-distinguisher routing-table [ ipv6-address [ prefix-length ] ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table [ ipv6-address [ prefix-length ] ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name | route-distinguisher route-distinguisher } routing-table as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp vpnv6 route-distinguisher route-distinguisher routing-table as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp vpnv6 route-distinguisher route-distinguisher routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv6 route-distinguisher route-distinguisher routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv6 route-distinguisher route-distinguisher routing-table different-origin-as

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table different-origin-as

display bgp vpnv6 route-distinguisher route-distinguisher routing-table regular-expression as-regular-expression

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table regular-expression as-regular-expression

display bgp vpnv6 vpn-instance vpn-instance-name routing-table peer ipv6-address { advertised-routes [ dest-ipv6-address [ prefix-length ] ] | received-routes [ active ] }

display bgp vpnv6 vpn-instance vpn-instance-name routing-table peer ipv6-address received-routes dest-ipv6-address [ prefix-length [ original-attributes ] ]

display bgp vpnv6 all routing-table peer ipv4-address received-routes dest-ipv6-address [ prefix-length ]

display bgp vpnv6 vpn-instance vpn-instance-name routing-table peer ipv6-address accepted-routes

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table time-range start-time end-time

display bgp vpnv6 all routing-table peer ipv4-address { advertised-routes [ dest-ipv6-address [ prefix-length ] ] | received-routes [ active ] }

Parameters

Parameter Description Value
all Displays statistics about all BGP VPNv6 routes. -
vpn-instance vpn-instance-name Displays the BGP routes of a specified an IPv6 address family-enabled VPN instance on the local end. The value must be an existing VPN instance name.
route-distinguisher route-distinguisher Displays the BGP routes with the specified RD.

The RD formats are divided into the following types:

  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

ipv6-address Specifies the IPv6 address of a peer to be displayed. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the prefix length of an IPv6 address. -
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS-Path filter. The name is a string of 1 to 51 case-sensitive characters without spaces. The string cannot be all numerals. When double quotation marks are used around the string, spaces are allowed in the string.
community Displays the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies the community number. A maximum of 29 community numbers can be set. -
internet Displays the BGP routes carrying the Internet community attribute. -
no-advertise Displays the BGP routes carrying the No-Advertise community attribute. -
no-export Displays the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays the BGP routes carrying the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
community-filter Displays the routes that match a specified BGP community filter. -
community-filter-name Specifies the name of a community filter. -
basic-community-filter-number Specifies the number of a basic community filter. -
advanced-community-filter-number Specifies the number of an advanced community filter. -
different-origin-as Displays the routes that have the same destination address but different source AS numbers. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
peer ipv6-address Displays the BGP routes of a specified peer. -
ipv4-address Specifies the IPv4 address of the peer. The value is in dotted decimal notation.
advertised-routes Displays the routes advertised to a specified peer. -
dest-ipv6–address Specifies the destination IPv6 address. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
received-routes Displays the routes received from a specified peer. -
active Displays the active routes received from a specified peer. -
original-attributes Displays the original attributes of a BGP route from a specified BGP peer before the route is filtered by the local import policy. To display such attributes, the peer keep-all-routes command must have been run. -
accepted-routes Displays the routes that are received from a neighbor and accepted by a routing policy. -
time-range start-time end-time Displays information about BGP VPNv6 routes that have undergone status flapping during the specified period. For example, when start-time is set to 0d0h5m0s and end-time is set to 0d0h10m0s, information about all BGP VPNv6 routes whose lifetime ranges from 5 to 10 minutes is displayed. In the values of start-time and end-time, d ranges from 0 to 10000, h ranges from 0 to 23, m ranges from 0 to 59, and s ranges from 0 to 59.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Information about specified routes can be displayed by specifying different parameters.

To view information about BGP VPNv6 route flapping during a specified period, you can run the display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table time-range start-time end-time command. When service traffic is abnormal during a period of time, you can run this command to check whether route flapping occurs. When the CPU usage is high during a period of time, you can run this command to check whether a large number of routes have undergone status flapping. This command allows you to find the flapping routes, which facilitates fault location.

Example

# Display all BGP VPNv6 routes.

<HUAWEI> display bgp vpnv6 all routing-table
                                                                                
                                                                                
 BGP Local router ID is 10.1.1.1                                                 
 Status codes: * - valid, > - best, d - damped,                                 
               h - history,  i - internal, s - suppressed, S - Stale            
               Origin : i - IGP, e - EGP, ? - incomplete                        
                                                                                
                                                                                
 Total number of routes from all PE: 3                                          
 Route Distinguisher: 100:1                                                     
                                                                                
                                                                                
 *>i Network  : FC00:0:0:2001::                          PrefixLen : 64         
     NextHop  : FC00:0:0:2001::1                         LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
 *>  Network  : FC00:0:0:2001::2                         PrefixLen : 128        
     NextHop  : ::                                       LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
 *>  Network  : FE80::                                   PrefixLen : 10         
     NextHop  : ::                                       LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
                                                                                
 VPN-Instance whm1, Router ID 10.4.4.4 :                                                            
                                                                                
 Total Number of Routes: 3                                                      
 *>  Network  : FC00:0:0:2001::                          PrefixLen : 64         
     NextHop  : ::                                       LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
 *>  Network  : FC00:0:0:2001::2                         PrefixLen : 128        
     NextHop  : ::                                       LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
 *>  Network  : FE80::                                   PrefixLen : 10         
     NextHop  : ::                                       LocPrf    :            
     MED      : 0                                        PrefVal   : 0          
     Label    : NULL                                                            
     Path/Ogn :  ?                                                              
# Display information about BGP VPNv6 route flapping of a specified VPN instance during the specified period.
<HUAWEI> display bgp vpnv6 vpn-instance 1 routing-table time-range 0d5h0m0s 1d5h0m0s
BGP Local router ID is 10.1.1.1 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Route Distinguisher: 300:1 

 *>  Network  : FC00:0:0:1991::                          PrefixLen : 64     
     NextHop  : ::                                       Duration  : 16h32m17s        
     Peer     : ::                                       
     Path/Ogn : ?
 *>  Network  : FC00:0:0:2004::                          PrefixLen : 64     
     NextHop  : ::                                       Duration  : 16h34m02s        
     Peer     : ::                                       
     Path/Ogn : ?

 Route Distinguisher: 10011:1 

 *>i Network  : FC00:0:0:1998::                          PrefixLen : 32     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h38m16s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : 65410  ?
 *>i Network  : FC00:0:0:1998::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h37m01s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : ?
 *>i Network  : FC00:0:0:2001::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h47m31s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : ?
 *>i Network  : FC00:0:0:3001::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h45m40s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : 65410  ?

 VPN-Instance vpna, Router ID 10.4.4.4 :
 *>  Network  : FC00:0:0:1991::                          PrefixLen : 64     
     NextHop  : ::                                       Duration  : 16h32m17s        
     Peer     : ::                                       
     Path/Ogn : ?
 *>i Network  : FC00:0:0:1998::                          PrefixLen : 32     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h38m16s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : 65410  ?
 *>i Network  : FC00:0:0:1998::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h37m01s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : ?
 *>i Network  : FC00:0:0:2001::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h47m31s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : ?
 *>  Network  : FC00:0:0:2004::                          PrefixLen : 64     
     NextHop  : ::                                       Duration  : 16h34m02s        
     Peer     : ::                                       
     Path/Ogn : ?
 *>i Network  : FC00:0:0:3001::                          PrefixLen : 64     
     NextHop  : FC00:0:0:1::9                            Duration  : 16h45m40s        
     Peer     : 10.1.1.9                                  
     Path/Ogn : 65410  ?
Table 7-178  Description of the display bgp vpnv6 all routing-table command output

Item

Description

BGP Local router ID

ID of the local BGP router. The ID is in the same format as an IPv4 address.

Total number of routes from all PE

Total number of BGP VPNv6 routes received by the switch from its peer PEs.

Network

Destination network or host address of the route.

PrefixLen

Prefix length of the destination network or host address of the route.

NextHop

IPv6 address of the next hop.

LocPrf

Local preference of the BGP route. The default value is 100.

MED

MED of the route. The default value is 0.

PrefVal

Preferred value of the route.

Label

Label carried by the data packet destined for the destination network or host address of the route.

Duration

Route duration.

Peer

IP addresses of the peer.

Path/Ogn

AS_Path number and Origin attribute of the route.

# Display the routes of an IPv6 address family-enabled VPN instance named vpn1 on the local device.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 2
 *>i Network  : FC00:0:0:1::                             PrefixLen : 64
     NextHop  : FC00:0:0:3::1                            LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
     Path/Ogn : 65410  ?
 *>i Network  : FC00:0:0:1::                             PrefixLen : 64
     NextHop  : FC00:0:0:2::1                            LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037/NULL
     Path/Ogn : ?

# Display the BGP routes with a specified destination address of an IPv6 address family-enabled VPN instance.

<HUAWEI> display bgp vpnv6 vpn-instance vrf1 routing-table fc00:0:0:1::
                                                                                
 BGP local router ID : 10.1.1.1                                                  
 Local AS number : 100                                                          
 Paths:   2 available, 1 best, 1 select                                         
 BGP routing table entry information of FC00:0:0:1::/64:                              
 Imported route.                                                                
 From: :: (0.0.0.0)                                                             
 Route Duration: 1d03h46m24s                                                    
 Direct Out-interface: Vlanif100                                                
 Original nexthop: ::                                                           
 AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, 
pre 0                                                                           
 Advertised to such 1 peers:                                                    
    FC00:0:0:2::2                                                                     
 BGP routing table entry information of 2001::/64:                              
 From: FC00:0:0:1::1 (10.10.10.10)                                                    
 Route Duration: 02h39m43s                                                      
 Direct Out-interface: Vlanif100                                                
 Original nexthop: FC00:0:0:1::1                                                      
 AS-path 65410, origin incomplete, MED 0, pref-val 0, external, pre 255         
 Not advertised to any peer yet                                                 

# Display all BGP VPNv6 routes whose AS_Path attribute contains 65420.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table as-path-filter 1

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 VPN-Instance vpn1, Router ID 10.4.4.4 :

 Total Number of Routes: 1
     Network  : FC00:0:0:1::2001::                       PrefixLen : 64
     NextHop  : FC00:0:0:1::2001::1                      LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
     Path/Ogn : 65420  ?

# Display BGP VPNv6 routes that the local switch advertises to the peer at 10.3.3.3.

<HUAWEI> display bgp vpnv6 all routing-table peer 10.3.3.3 advertised-routes

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 1

 Route Distinguisher: 100:1


 *>  Network  : FC00:0:0:1::                             PrefixLen : 64
     NextHop  : FC00:0:0:2::2                            LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    : NULL
     Path/Ogn : 65410 ?

# Display BGP VPNv6 routes that the local switch receives from the peer at 10.3.3.3.

<HUAWEI> display bgp vpnv6 all routing-table peer 10.3.3.3 received-routes


 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 1

 Route Distinguisher: 100:2


 *>i Network  : FC00:0:0:1::2002::                       PrefixLen : 64
     NextHop  : FC00:0:0:1::2001::1                      LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037
     Path/Ogn : ?

# Display all BGP VPNv6 routes that match the BGP community filter 1.

<HUAWEI> display bgp vpnv6 all routing-table community-filter 1 whole-match

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total number of routes from all PE: 2

 Route Distinguisher: 100:1


 *>  Network  : FC00:0:0:2001::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    : NULL

 Route Distinguisher: 100:2


 *>i Network  : FC00:0:0:2002::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037

 VPN-Instance vpn1, Router ID 10.4.4.4, Router ID 10.4.4.4 :

 Total Number of Routes: 2
     Network  : FC00:0:0:2001::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
 *>i Network  : FC00:0:0:2002::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037/NULL

# Display BGP4+ routes of the VPN instance named vpn1 and matching the BGP community filter 1.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table community-filter 1 whole-match

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 VPN-Instance vpn1 :

 Total Number of Routes: 2
     Network  : FC00:0:0:2001::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
 *>i Network  : FC00:0:0:2002::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037/NULL 

# Display all BGP4+ routes of the VPN instance named vpn1 and matching the AS regular expression.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table regular-expression ^65420


 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 VPN-Instance vpn1, Router ID 10.4.4.4, Router ID 10.4.4.4 :
     Network  : FC00:0:0:2001::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
     Path/Ogn : 65420  ?

# Display all BGP4+ routes of the VPN instance named vpn1 that are received from the peer at FC00:0:0:2001::1.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table peer fc00:0:0:2001::1 received-routes

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 1
     Network  : FC00:0:0:2001::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    :
     MED      : 0                                        PrefVal   : 0
     Label    :
     Path/Ogn : 65410  ?

# Display BGP4+ routes sent to the peer at FC00:0:0:2001::1.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table peer fc00:0:0:2001::1 advertised-routes

 BGP Local router ID is 10.1.1.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 1
 *>i Network  : FC00:0:0:2002::                          PrefixLen : 64
     NextHop  : FC00:0:0:2001::1                         LocPrf    : 100
     MED      : 0                                        PrefVal   : 0
     Label    : 1037/NULL
     Path/Ogn : ?
# Display detailed information about the specified invalid BGP VPNv6 routes.
<HUAWEI> display bgp vpnv6 vpn-instance vrf1 routing-table fc00:0:0:2001::5
 BGP local router ID : 10.1.1.1
 Local AS number : 100

 VPN-Instance vrf1, Router ID 10.1.1.1:
 Paths:   1 available, 0 best, 0 select
 BGP routing table entry information of fc00:0:0:2001::5/128:
 Label information (Received/Applied): 1027/NULL
 From: 10.1.1.2 (10.1.1.2)
 Route Duration: 00h01m22s  
 Relay Tunnel Out-Interface: 
 Relay token: 0x0
 Original nexthop: ::FFFF:10.1.1.2
 Ext-Community:RT <100 : 100>
 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for tunnel unreachable
 Not advertised to any peer yet
Table 7-179  Description of the display bgp vpnv6 routing-table command output

Item

Description

BGP local router ID

Router ID of the local BGP device. The format is the same as the IPv4 address.

Local AS number

Local AS number.

VPN-Instance vrf1, Router ID 10.1.1.1

The local VPN instance is vrf1, and its router ID is 10.1.1.1.

Paths

Information about paths of BGP routes

BGP routing table entry information of fc00:0:0:2001::5/128

The following information is about fc00:0:0:2001::5/128 routing entries.

Label information (Received/Applied)

Label information (received or sent).

From

IP address of the router that sends the route. 10.1.1.2 is the source interface IP address of the peer with which the BGP connection is established, and 10.1.1.2 is the router ID of the peer.

Route Duration

Duration of routes.

Relay Tunnel Out-Interface

Tunnel iterated outbound interface.

Relay token

Iterated token value used for MPLS forwarding that is a part of tunnel ID and is assigned by the system.

Original nexthop

Original next hop.

Ext-Community

Extended community attribute.

AS-path Nil

AS_Path attribute, with Nil indicating that the attribute value is null.

origin

Well-known mandatory property. This property defines the origin of a path and records how a route turns to a BGP route. The property has the following three values:
  • IGP: The priority of this value is the highest. The origin property of the routes that are added to the BGP routing table by using the network (BGP) command is IGP.

  • EGP: The priority of this value is second to that of IGP. The origin property of the routes imported from EGP is EGP.

  • Incomplete: The priority of this value is the lowest. The value indicates the origin of a route is unknown. The origin property of the routes that are added to the BGP routing table by using the import-route (BGP) command is Incomplete.

MED

Multi-Exit discriminator of route.

localpref

Local priority.

pref-val

Preferred value of the protocol.

internal

The BGP route is an internal route.

pre 255

The priority of the BGP route is 255.

invalid for tunnel unreachable

Reason why a route is invalid:

  • invalid for route-policy not pass: The route does not match the route-policy.

  • invalid for supernet route: The route is a supernet route.

  • invalid for IP unreachable: The route fails to be iterated to another route.

  • invalid for supernet route not advertise: No supernet routes are advertised.

  • invalid for supernet label route not advertise: No supernet labeled routes are advertised.

  • invalid for next-hop unreachable: The next-hop IP address is unreachable.

  • invalid for tunnel unreachable: The route fails to be iterated to a tunnel.

Not advertised to any peer yet

The BGP route has not been advertised to any peer yet.

display bgp vpnv6 routing-table statistics

Function

The display bgp vpnv6 routing-table statistics command displays statistics about BGP VPNv6 routes.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

display bgp vpnv6 route-distinguisher route-distinguisher routing-table statistics [ as-path-filter { as-path-filter-number | as-path-filter-name } | different-origin-as ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table statistics [ as-path-filter { as-path-filter-number | as-path-filter-name } | different-origin-as ]

display bgp vpnv6 route-distinguisher route-distinguisher routing-table statistics regular-expression as-regular-expression

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table statistics regular-expression as-regular-expression

display bgp vpnv6 route-distinguisher route-distinguisher routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name} routing-table statistics community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp vpnv6 route-distinguisher route-distinguisher routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table statistics community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp vpnv6 all routing-table peer ipv4-address { advertised-routes | received-routes [ active ] } statistics

display bgp vpnv6 vpn-instance vpn-instance-name routing-table peer ipv6-address { advertised-routes | received-routes [ active ] } statistics

Parameters

Parameter Description Value
all Displays statistics about all BGP VPNv6 routes. -
route-distinguisher route-distinguisher Displays BGP routes with the specified RD.
The RD formats are divided into the following types:
  • 2-byte AS number:4-byte user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and the user-defined number cannot be 0s at the same time. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

vpn-instance vpn-instance-name Displays statistics about the BGP routes of a specified VPN instance. The value must be an existing VPN instance name.
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS_Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of the matching AS_Path filter. The name is a string of 1 to 51 case-sensitive characters without spaces. The string cannot be all numerals. When double quotation marks are used around the string, spaces are allowed in the string.
different-origin-as Displays statistics about the routes that have the same destination address but different source AS numbers. -
regular-expression as-regular-expression Specifies the regular expression used to match the AS_Path information. The value is a string of 1 to 80 characters.
community Displays statistics about the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. The value is an integer that ranges from 0 to 4294967295.
aa:nn Specifies the community number. Both aa and nn are integers ranging from 0 to 65535.
internet Displays statistics about the BGP routes carrying the Internet community attribute. -
no-advertise Displays statistics about the BGP routes carrying the No-Advertise community attribute. -
no-export Displays statistics about the BGP routes carrying the No-Export community attribute. -
no-export-subconfed Displays statistics about the BGP routes carrying the No-Export-Subconfed community attribute. -
whole-match Indicates exact matching. -
community-filter Displays statistics about the routes that match a specified BGP community filter. -
community-filter-name Specifies the name of a community filter. The name is a string of 1 to 51 case-sensitive characters without spaces.
basic-community-filter-number Specifies the number of a basic community filter. The value is an integer that ranges from 1 to 99.
advanced-community-filter-number Specifies the number of an advanced community filter. The value is an integer that ranges from 100 to 199.
peer ipv6-address Displays statistics about the BGP routes of a specified peer. -
advertised-routes Displays statistics about the routes advertised to a specified peer. -
received-routes Displays statistics about the routes received from a specified peer. -
active Specifies the number of active routes. -
peer ipv4-address Displays the routing information for the specified BGP peer. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display bgp vpnv6 routing-table statistics command to check statistics about BGP VPNv6 routes.

Example

# Display statistics about BGP VPNv6 routes on the local device.
<HUAWEI> display bgp vpnv6 all routing-table statistics

 Total number of routes from all PE: 2

 VPN-Instance vpn1, Router ID 10.4.4.4 :

 Total Number of Routes: 2 

# Display statistics about the routes of an IPv6 address family-enabled VPN instance named vpn1 on the local device.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table statistics

 Total Number of Routes: 5

# Display statistics about the BGP VPNv6 routes received from peer 10.1.1.1.

<HUAWEI> display bgp vpnv6 all routing-table peer 10.1.1.1 received-routes statistics
  Received routes total: 1

# Display statistics about the VPNv6 routes that have the Internet community attribute and specified RD on the local device.

<HUAWEI> display bgp vpnv6 route-distinguisher 100:1 routing-table statistics community internet

 Total number of routes from all PE: 1

 VPN-Instance vpn1, Router ID 10.4.4.4 :

 Total Number of Routes: 2

# Display statistics about the BGP VPNv6 routes that match a specified community filter on the local device.

<HUAWEI> display bgp vpnv6 all routing-table statistics community-filter 1

 Total number of routes from all PE: 1

 VPN-Instance vpn1, Router ID 10.4.4.4 :

 Total Number of Routes: 2

# Display statistics about the BGP VPNv6 routes that match a specified AS_Path regular expression.

<HUAWEI> display bgp vpnv6 all routing-table statistics regular-expression 65420*

 Total number of routes from all PE: 1

 VPN-Instance vpn1, Router ID 10.4.4.4 :

 Total Number of Routes: 1

# Display statistics of BGP routes sent by the local device to peer 2000::1 of the IPv6 VPN instance named vpn1.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table peer 2000::1 received-routes statistics
  Received routes total: 2

# Display statistics about the IPv6 routes sent by the local device to peer 2000::1 in a VPN instance named vpn1.

<HUAWEI> display bgp vpnv6 vpn-instance vpn1 routing-table peer 2000::1 advertised-routes statistics
  Advertised routes total: 2

  Default originated : 0

display default-parameter bgp

Function

The display default-parameter bgp command displays default configurations in BGP initialization.

Format

display default-parameter bgp

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display default-parameter bgp command to check default configurations in BGP initialization.

Example

# Display default configurations in BGP initialization.

<HUAWEI> display default-parameter bgp
BGP version                 : 4
EBGP preference             : 255
IBGP preference             : 255
Local preference            : 255
BGP connect-retry           : 32s
BGP holdtime                : 180s
BGP keepAlive               : 60s
EBGP route-update-interval  : 30s
IBGP route-update-interval  : 15s
Default local-preference    : 100
Default MED                 : 0
Default TRACKING TIMER      : 9
IPv4-family unicast         : enable
EBGP-interface-sensitive    : enable
Reflect between-clients     : enable
Check-first-as              : enable
Synchronization             : disable
Nexthop-resolved rules    :                                                    
     IPv4-family           : unicast(ip)                                        
                             multicast(ip)                                      
                             vpn-instance(tunnel)                               
     IPv6-family           : unicast(ip)                                        
                             vpn-instance(tunnel)                               
                             vpnv6(ip)

 Routing-table limit max-alarm upper limit : 100                                                                                    
 Routing-table limit max-alarm lower limit : 95                                                                                     
 Routing-table limit threshold-alarm upper limit : 80                                                                               
 Routing-table limit threshold-alarm lower limit : 70
Table 7-180  Description of the display default-parameter bgp command output

Item

Description

BGP version

BGP version number.

EBGP preference

EBGP route preference.

IBGP preference

IBGP route preference.

Local preference

Local route preference.

BGP connect-retry

BGP ConnectRetry interval.

BGP holdtime

BGP holdtime interval.

BGP keepAlive

BGP keepalive interval.

EBGP route-update-interval

Minimum interval for sending EBGP Update messages.

IBGP route-update-interval

Minimum interval for sending IBGP Update messages.

Default local-preference

Local preference of a BGP route.

Default MED

MED of a BGP route.

Default TRACKING TIMER

The interval between peer unreachability discovery and connection interruption.

IPv4-family unicast

BGP-IPv4 unicast address family view.

EBGP-interface-sensitive

The BGP session between the directly connected peer and an interface is deleted immediately when the interface becomes Down.

Reflect between-clients

Route reflection between clients.

Check-first-as

The first AS number in the AS_Path list that is carried in the Update message sent by the EBGP peer is checked.

Synchronization

Synchronization between IBGP and IGP.

Nexthop-resolved rules

Default iteration mode of preferred routes.

Routing-table limit max-alarm upper limit

Upper alarm threshold for the number of BGP routes.

Routing-table limit max-alarm lower limit

Lower alarm threshold for the number of BGP routes.

Routing-table limit threshold-alarm upper limit

Default upper alarm threshold for the number of BGP routes.

Routing-table limit threshold-alarm lower limit

Default lower alarm threshold for the number of BGP routes.

display mbgp routing-table

Function

The display mbgp routing-table command displays MBGP routes.

Format

display mbgp routing-table [ ipv4-address [ mask | mask-length ] ] [ verbose ]

Parameters

Parameter Description Value
ipv4-address Specifies the destination IP address in dotted decimal notation. -
mask | mask-length Specifies mask in dotted decimal notation or mask-length. -
verbose Displays detailed information about active and inactive routes. If the parameter verbose is not specified, detailed information about active routes is displayed. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can specify different parameters to view the specific routing information.

Example

# Display information about all MBGP routes.

<HUAWEI> display mbgp routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: MBGP
         Destinations : 1        Routes : 1
 
Destination/Mask  Proto  Pre  Cost  Flags  NextHop  Interface
 
  10.5.5.1/32     MBGP   255     0     R   10.1.1.1  Vlanif10
Table 7-181  Description of the display mbgp routing-table command output

Item

Description

Route Flags

Indicates the route flag:

  • R: indicates an iterated route.

  • D: indicates that the route is downloaded to the FIB table.

Routing Tables: MBGP

Indicates an MBGP routing table.

Destinations

Indicates the total number of destination networks or hosts.

Routes

Indicates the total number of routes.

Destination/Mask

Indicates the address and mask length of the destination network or host.

Proto

Indicates the protocol through which routes are learned.

Pre

Indicates the preference.

Cost

Indicates the route cost.

Flags

Indicates the route flag, that is, Route Flags in the header of the routing table.

NextHop

Indicates the next hop.

Interface

Indicates the outbound interface through which the next hop is reachable.

# Display the detailed information of the specified routes.

<HUAWEI> display mbgp routing-table 5.5.5.1 verbose
Routing Table : MBGP
Summary Count : 1

  Destination: 10.5.5.1/32
     Protocol: MBGP              Process ID: 0
   Preference: 255                     Cost: 0
      NextHop: 10.1.1.1           Neighbour: 0.0.0.0
        State: Active Adv GotQ          Age: 00h43m25s
          Tag: 0                   Priority: 0
        Label: NULL                 QoSInfo: 0x0
 RelayNextHop: 0.0.0.0            Interface: Vlanif 10
     TunnelID: 0x0                    Flags: R
Table 7-182  Description of the display mbgp routing-table verbose command output

Item

Description

Destination

Indicates the address and mask length of the destination network or host.

Protocol

Indicates the routing protocol.

Process ID

Indicates the process ID of the routing protocol.

Preference

Indicates the preference of the route.

Cost

Indicates the route cost.

NextHop

Indicates the next hop.

Neighbour

Indicates the neighbor.

State

Indicates the status of routes:

  • Active: indicates active routes.

  • Invalid: indicates invalid routes.

  • Inactive: indicates inactive routes.

  • NoAdv: indicates the routes that cannot be advertised.

  • Adv: indicates the routes that can be advertised.

  • Del: indicates the routes to be deleted.

  • GotQ: indicates the route that finds the next hop and outbound interface or the route that finds the tunnel.

  • WaitQ: indicates the route that does not find the next hop or outbound interface or the route that does not find the tunnel.

  • Stale: indicates the routes with the stale flag. The routes are used in GR.

Age

Indicates the lifetime of the route.

Tag

Indicates the administrative tag for routes.

Priority

Indicates the priority.

Label

Indicates the allocated MPLS label.

QoSInfo

Indicates QoS information.

RelayNextHop

Indicates the relay next hop.

Interface

Indicates the outbound interface through which the next hop is reachable.

Tunnel ID

Indicates the tunnel ID.

Flags

Indicates the route flag, that is, Route Flags in the header of the routing table.

display mbgp routing-table statistics

Function

The display mbgp routing-table statistics command displays the statistics of the MBGP routes.

Format

display mbgp routing-table statistics

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Route statistics include:
  • Total number of routes that are added or deleted by the protocol
  • Number of active routes or inactive routes that are labeled for deletion but are not actually deleted

Example

# Display statistics of the MBGP routing table.

<HUAWEI> display mbgp routing-table statistics
Proto     total      active      added        deleted      freed
          routes     routes      routes       routes       routes
MBGP      6          4           10           0            0
Table 7-183  Description of the display mbgp routing-table statistics command output

Item

Description

Proto

Routing protocol

total routes

Total number of routes in the routing table

active routes

Number of active routes in the routing table

added routes

Number of active and inactive routes added in the routing table

deleted routes

Number of routes to be deleted from the routing table

freed routes

Number of routes that are permanently deleted from the routing table

display snmp-agent trap feature-name bgp all

Function

The display snmp-agent trap feature-name bgp all command displays all the traps related to the BGP module.

Format

display snmp-agent trap feature-name bgp all

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display snmp-agent trap feature-name bgp all command is used to display the status of all the traps related to the BGP module.

To change the status of the traps related to the BGP module, run the snmp-agent trap enable feature-name bgp command.

Example

# Display all the traps related to the BGP module.

<HUAWEI>display snmp-agent trap feature-name bgp all
------------------------------------------------------------------------------
Feature name: bgp
Trap number : 11
------------------------------------------------------------------------------
Trap name                       Default switch status   Current switch status
ESTABLISHED                     off                     on
BACKWARD                        off                     on
ROUTETHRESHOLDEXCEED            off                     on
ROUTETHRESHOLDCLEAR             off                     on
GRSTATUSCHANGE                  off                     on
HWESTABLISHED                   off                     on
HWBACKWARD                      off                     on
HWBGPROUTEMAXEXCEED             off                     off
HWBGPROUTEMAXCLEAR              off                     off
HWBGPROUTETHRESHOLDEXCEED       off                     off
HWBGPROUTETHRESHOLDCLEAR        off                     off
Table 7-184  Description of the display snmp-agent trap feature-name bgp all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the BGP module:

  • ESTABLISHED: indicates that the BGP neighbor has entered the Established state.
  • BACKWARD: indicates the disconnection of BGP neighbors.
  • ROUTETHRESHOLDEXCEED: indicates that the number of routes of BGP neighbors exceeds the alarm threshold.
  • ROUTETHRESHOLDCLEAR: indicates that the number of routes of BGP neighbors falls below the alarm threshold.
  • GRSTATUSCHANGE: indicates that the GR status of BGP neighbors changes.
  • HWESTABLISHED: indicates that the BGP neighbor has entered the Established state.
  • HWBACKWARD: indicates the disconnection of BGP neighbors.
  • HWBGPROUTEMAXEXCEED: indicates that the number of BGP routes exceeds the alarm threshold.
  • HWBGPROUTEMAXCLEAR: indicates that the number of BGP routes falls below the alarm threshold.
  • HWBGPROUTETHRESHOLDEXCEED: indicates that the number of BGP routes exceeds the alarm threshold.
  • HWBGPROUTETHRESHOLDCLEAR: indicates that the number of BGP routes falls below the alarm threshold.

Default switch status

Default status of the trap function:

  • on: The trap function is enabled by default.
  • off: The trap function is disabled by default.

Current switch status

Current status of the trap function:

  • on: The trap function is enabled.
  • off: The trap function is disabled.

ebgp-interface-sensitive

Function

The ebgp-interface-sensitive command immediately resets a BGP session on an interface that is directly connected to an external peer when the interface goes Down.

The undo ebgp-interface-sensitive command disables the function.

By default, this function is enabled.

Format

ebgp-interface-sensitive

undo ebgp-interface-sensitive

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the ebgp-interface-sensitive command is not configured, the system does not immediately select the sub-optimal route for packet transmission when an interface goes Down. Instead, the system waits for a period of time (defaulting to 180 seconds) before checking whether another interface can be used to send packets to the same destination address. This will interrupt services for a period of time. If the ebgp-interface-sensitive command is run, BGP can quickly detect EBGP link faults and use another interface to establish a BGP peer relationship with the remote peer.

When the interface used for a BGP connection alternates between Up and Down states, running the undo ebgp-interface-sensitive command can prevent the repeated reestablishment and deletion of the BGP session in the event of route flapping. This reduces the use of network bandwidth.

Precautions

If the interface used for a BGP connection alternates between Up and Down states, it would be better not to run the ebgp-interface-sensitive command to prevent route flapping.

Example

# Enable the function that automatically resets a BGP session.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ebgp-interface-sensitive

ext-community-change enable

Function

The ext-community-change enable command enables a device to change extended community attributes based on a Route-Policy.

The undo ext-community-change enable command disables a device from changing extended community attributes based on a Route-Policy.

By default, extended community attributes cannot be changed based on a Route-Policy.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

ext-community-change enable

undo ext-community-change enable

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, BGP prevents a device from changing extended community attributes from a peer or peer group based on an import policy or changing extended community attributes to be advertised to a peer or peer group based on an export policy. To enable a device to change extended community attributes from a peer or peer group based on an import policy and change extended community attributes to be advertised to a peer or peer group based on an export policy before advertising them, run the ext-community-change enable command.

Precautions

  • The ext-community-change enable and peer route-policy import commands must both be run so that the device can change extended community attributes from a peer or peer group based on an import policy.

  • The ext-community-change enable command must be run with either of the following commands so that the extended community attributes changed based on an export policy can be advertised to a peer or peer group.

Example

# Enable the device to change extended community attributes of the BGP routes received from peer 10.1.1.1 based on a Route-Policy named policy1.

<HUAWEI> system-view
[HUAWEI] route-policy policy1 permit node 10
[HUAWEI-route-policy] if-match as-path-filter 2
[HUAWEI-route-policy] apply extcommunity rt 10.1.1.1:1 additive
[HUAWEI-route-policy] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] ext-community-change enable
[HUAWEI-bgp-af-ipv4] peer 10.1.1.1 route-policy policy1 import

filter-policy export (BGP)

Function

The filter-policy export command configures a device to filter the routes to be advertised. BGP advertises only the routes that pass filtering.

The undo filter-policy export command restores the default configuration.

By default, the routes to be advertised are not filtered.

Format

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]

undo filter-policy export [ protocol [ process-id ] ]

undo filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

undo filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer that ranges from 2000 to 2999.
acl-name acl-name Specifies the name of a named ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
ip-prefix ip-prefix-name Specifies the name of an IPv4 prefix list. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
protocol Specifies the name of a routing protocol. The BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view support direct, isis, ospf, rip, static, and unr. The BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view support direct, isis, ospfv3, ripng, static, and unr.
process-id Specifies the number of a process that needs to perform matching. If protocol is direct, static, or unr, no process ID is required. The value is an integer that ranges from 1 to 65535.
acl6-number Specifies the number of a basic ACL6. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
acl6-name acl6-name Specifies the name of a named ACL6. The value is a string of 1 to 64 case-sensitive characters without spaces. The name should start with a letter and can contain numbers, hyphens (-), or underlines (_).
ipv6-prefix ipv6-prefix-name Specifies the name of an IPv6 prefix list. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • protocol [ process-id ] is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, and BGP-VPN instance IPv6 address family view.

  • acl-name acl-name, acl-number, and ip-prefix ip-prefix-name are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, and BGP-VPNv4 address family view.

  • acl6-name acl6-name, acl6-number, and ipv6-prefix ipv6-prefix-name are valid only in the BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, and BGP-VPNv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

For an ACL, when the rule command is used to configure a filtering rule, the filtering rule is effective only with the source address range that is specified by the source parameter and with the time period that is specified by the time-range parameter.

The filter-policy export command affects the routes advertised by BGP. After the command is run, BGP filters the routes that are imported by using the import-route command. Only the routes that pass the filtering can be added to the local BGP routing table and advertised by BGP.

If protocol is specified, only the routes imported from the specified protocol will be filtered. If protocol is not specified, the routes imported from all protocols will be filtered.

Precautions

Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes are advertised to the specified peer.

Example

# Use ACL 2000 to filter all the routes to be advertised by BGP.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] filter-policy 2000 export

filter-policy import (BGP)

Function

The filter-policy import command configures a device to filter received routes.

The undo filter-policy import command restores the default configuration.

By default, received routes are not filtered.

Format

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import

filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } import

undo filter-policy import

undo filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import

undo filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name } import

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer that ranges from 2000 to 2999.
acl-name acl-name Specifies the name of a named ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
ip-prefix ip-prefix-name Specifies the name of an IPv4 prefix list. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
acl6-number Specifies the number of a basic ACL6. -
acl6-name acl6-name Specifies the name of a named ACL6. The value is a string of 1 to 64 case-sensitive characters without spaces. The name should start with a letter and can contain numbers, hyphens (-), or underlines (_).
ipv6-prefix ipv6-prefix-name Specifies the name of an IPv6 prefix list. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • acl-name acl-name, acl-number, and ip-prefix ip-prefix-name are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, and BGP-VPNv4 address family view.

  • acl6-name acl6-name, acl6-number, and ipv6-prefix ipv6-prefix-name are valid only in the BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, and BGP-VPNv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The filter-policy import command is used to filter the routes received by BGP to determine whether to add them to the BGP routing table.

When the rule command is run to configure rules for an ACL, only the source address range specified by source and the time period specified by time-range are valid as the rules.

When the rule (basic ACL6 view) or rule (advanced ACL6 view) command is run to configure rules for an ACL6, only the source address range specified by source and the time period specified by time-range are valid as the rules.

Precautions

Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes advertised by the specified peer are accepted.

Example

# Use ACL 2000 to filter the routes received by BGP.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] filter-policy 2000 import

graceful-restart (BGP)

Function

The graceful-restart command enables GR for the BGP speaker.

The undo graceful-restart command restores the default configuration.

By default, GR is disabled.

Format

graceful-restart

undo graceful-restart

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the graceful-restart command is configured to enable GR for the switch, to prevent traffic interruption, another GR-capable device can assist the switch to perform GR when BGP on the switch restarts, and the switch can assist other GR-capable devices to perform GR when BGP on other devices restarts.

Follow-up Procedure

After running the graceful-restart command, run the graceful-restart timer wait-for-rib command to set the time for waiting for the End-Of-RIB flag.

Precautions

Enabling or disabling GR may delete and reestablish all BGP sessions and instances.

If the graceful-restart timer wait-for-rib command has been configured, using the undo graceful-restart command will delete the graceful-restart timer wait-for-rib command configuration.

Example

# Enable GR for the speaker in BGP process 100.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] graceful-restart

graceful-restart peer-reset

Function

The graceful-restart peer-reset command enables a device to reset a BGP connection in GR mode.

The undo graceful-restart peer-reset command restores the default configuration.

By default, a device is not enabled to reset a BGP connection in GR mode.

Format

graceful-restart peer-reset

undo graceful-restart peer-reset

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Currently, BGP does not support dynamic capability negotiation. Therefore, each time a new BGP capability is enabled on a BGP speaker, the BGP speaker tears down existing sessions with its peer and renegotiates BGP capabilities. To prevent the service interruptions, run the graceful-restart peer-reset command to enable the BGP speaker to reset a BGP session in GR mode.

With the GR reset function configured, when you enable a new BGP capability on the BGP speaker, the BGP speaker enters the GR state, resets the BGP session, and renegotiates BGP capabilities with the peer. In the whole process, the BGP speaker re-establishes the existing sessions but does not delete the routing entries for the existing sessions, so that the existing services are not interrupted.

Prerequisites

GR has been enabled by running the graceful-restart command. If this prerequisite is not met, the system does not allow you to configure the graceful-restart peer-reset command.

Precautions

After you run the undo graceful-restart command to disable GR, the graceful-restart peer-reset command configuration will be deleted automatically.

Example

# Enable the switch to reset a BGP connection in GR mode.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] graceful-restart
[HUAWEI-bgp] graceful-restart peer-reset

graceful-restart timer restart

Function

The graceful-restart timer restart command sets the maximum period from the time when the peer finds that the local peer restarts to the time when the BGP session is reestablished.

The undo graceful-restart timer restart command deletes the setting.

By default, the maximum period from the time when the peer finds that the local peer restarts to the time when the BGP session is reestablished is 150 seconds.

Format

graceful-restart timer restart time

undo graceful-restart timer restart

Parameters

Parameter Description Value
time Specifies the maximum period from the time when the peer finds that the local peer restarts to the time when the BGP session is reestablished. The value ranges from 3 to 4095, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Modifying the maximum period for reestablishing the BGP session leads to the reestablishment of the BGP peer relationship.

The graceful-restart timer restart command can be run only after the graceful-restart command is run.

Example

# Set the maximum period for reestablishing the BGP session to 250 seconds.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] graceful-restart
[HUAWEI-bgp] graceful-restart timer restart 250

graceful-restart timer wait-for-rib

Function

The graceful-restart timer wait-for-rib command sets the length of time that the BGP restarter waits for the End-Of-RIB flag.

The undo graceful-restart timer wait-for-rib command deletes the configured length of time that the BGP restarter waits for the End-Of-RIB flag.

By default, the time that the BGP restarter waits for the End-Of-RIB flag is 600 seconds.

Format

graceful-restart timer wait-for-rib time

undo graceful-restart timer wait-for-rib

Parameters

Parameter Description Value
time Specifies the length of time that the BGP restarter waits for the End-Of-RIB flag. The value is an integer that ranges from 3 to 3000, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the BGP session is set up or reestablished, the BGP restarter must receive the End-Of-RIB flag in the period set by using this command. If the BGP restarter does not receive the End-Of-RIB flag, ensure that the switch can exit from the GR process.

Prerequisites

The graceful-restart timer wait-for-rib command can be run only after the graceful-restart command is run.

Configuration Impact

The latest configuration overrides the previous one.

Precautions

If there are a large number of routes, set a larger value for the time parameter to ensure that all routes will be updated.

Example

# Set the time that the BGP restarter waits for the End-Of-RIB flag to 100 seconds.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] graceful-restart timer wait-for-rib 100

group

Function

The group command creates a peer group.

The undo group command deletes a peer group.

By default, no peer group is created.

Format

group group-name [ external | internal ]

undo group group-name

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
external Creates an EBGP peer group. -
internal Creates an IBGP peer group. -

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A peer group is a group of peers with the same configurations. After a peer is added to a peer group, it inherits the configurations of this peer group. Peers in a peer group inherit the configurations of the peer group. When the configurations of the peer group are changed, the configurations of these peers are changed accordingly.

On a large-scale BGP network, there are a large number of peers and many of them have the same configurations. To configure these peers, you have to repeatedly use some commands. In such a case, configuring peer groups can simplify configurations. If the configurations for several peers are the same, these peers can be added to a created and configured peer group. The peers in the peer group then inherit the configurations of the peer group.

Precautions

If the group command is run multiple times, the latest configuration does not override the previous one.

If the type (IBGP or EBGP) of a peer group is not specified, an IBGP peer group is created by default.

The configuration of a peer takes precedence over that of the peer group to which the peer belongs.

If an attribute configuration of a BGP peer in a peer group differs from that of the peer group, you can disable the attribute configuration of the peer by using an undo command; then the peer inherits the attribute configuration of the peer group.

Deleting a peer group closes the connections on the peers that have no AS numbers in the peer group. Before deleting a peer group, you are recommended to delete these peers or configure AS numbers for these peers.

Example

# Create an IBGP peer group named in.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group in internal

# Create an EBGP peer group named ex, and set its AS number to 500.1.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group ex external
[HUAWEI-bgp] peer ex as-number 500.1

import-route (BGP)

Function

The import-route command configures BGP to import routes of other routing protocols and types.

The undo import-route command restores the default setting.

By default, BGP does not import routes.

Format

import-route protocol [ process-id ] [ med med | route-policy route-policy-name ] *

undo import-route protocol [ process-id ]

Parameters

Parameter Description Value
protocol Specifies the routing protocol type and route type. The BGP view, BGP-IPv4 unicast address family view,BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view support direct, isis, ospf, rip, static, and unr. The BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view support direct, isis, ospfv3, ripng, static, and unr.
process-id Specifies a process ID if BGP is configured to import routes. If protocol is direct, static, or unr, no process ID is required. The value is an integer that ranges from 1 to 65535.
med med Specifies the MED. The value is an integer that ranges from 0 to 4294967295.
route-policy route-policy-name Indicates that routes are filtered and route attributes are modified by using the Route-Policy specified by the parameter when these routes are imported from other protocols. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP can import routes by using the import-route command or network command:
  • In import mode, BGP imports IGP routes, including RIP, OSPF, and IS-IS routes, into BGP routing tables based on protocol type. To ensure the validity of imported IGP routes, BGP can also import static routes and direct routes in import mode.

  • In network mode, BGP imports the routes into the IP routing table one by one to BGP routing tables. The network mode is more accurate than the import mode.

Precautions

If the default-route imported command has not been used, BGP cannot import default routes when you run the import-route command to import routes from other protocols.

After the import-route direct command is executed, routes to the network segment where the IP address of the management interface belongs are also imported in the BGP routing table. Therefore, use this command with caution.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, all routes of the specified protocol are imported to the BGP routing table.

Example

# Import routes from RIP process 1.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] import-route rip 1

ipv4-family

Function

The ipv4-family command enables the IPv4 address family of BGP, and then displays the address family view.

The undo ipv4-family command deletes the configurations in the IPv4 address family.

By default, the BGP-IPv4 unicast address family view is displayed.

Format

ipv4-family unicast

ipv4-family multicast

ipv4-family vpnv4 [ unicast ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

ipv4-family vpn-instance vpn-instance-name

undo ipv4-family vpnv4 [ unicast ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

undo ipv4-family { multicast | vpn-instance vpn-instance-name }

The multicast parameter is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.

Parameters

Parameter Description Value
unicast Displays the unicast address family view. -
multicast Displays the multicast address family view. -
vpnv4 Displays the BGP-VPNv4 address family view. -
vpn-instance vpn-instance-name Associates a specified VPN instance with the IPv4 address family. You can enter the BGP-VPN instance IPv4 address family view by using the parameter. The value must be an existing VPN instance name.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before performing BGP configurations in an IPv4 address family, you need to run the ipv4-family command in the BGP view to enable the IPv4 address family, and then enter the address family view. By default, BGP uses the IPv4 unicast address family.

Precautions

To disable the IPv4 unicast address family from being the default BGP route, run the undo default ipv4-unicast command.

Example

# Enter the BGP-IPv4 unicast address family view.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4]

ipv6-family

Function

The ipv6-family command enters the IPv6 address family view of BGP.

The undo ipv6-family command quits the IPv6 address family view and deletes the configurations in the view.

Format

ipv6-family [ vpnv6 ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

ipv6-family [ unicast | vpn-instance vpn-instance-name ]

undo ipv6-family [ vpnv6 ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

undo ipv6-family [ unicast | vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value
unicast Displays the unicast address family view. -
vpnv6 Displays the BGP-VPNv6 address family view. -
vpn-instance vpn-instance-name Associates a specified VPN instance with the IPv6 address family. You can enter the BGP-VPN instance IPv6 address family view by using the parameter.
NOTE:

The parameter is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.

The value must be an existing VPN instance name.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If no parameter is specified, the IPv6 address family view is displayed by default. The undo ipv6-family command without any parameter is used to delete configurations in the BGP-IPv6 unicast address family view.

Precautions

The undo ipv6-family command without any parameters deletes all IPv6 unicast address family configurations.

Example

# Enter the BGP-IPv6 unicast address family view.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv6-family
[HUAWEI-bgp-af-ipv6]

load-balancing as-path-ignore

Function

The load-balancing as-path-ignore command configures a router not to compare the AS_Path attributes of routes that are to be used for load balancing.

The undo load-balancing as-path-ignore command configures a router to compare the AS_Path attributes of routes that are to be used for load balancing.

By default, a router compares the AS-Path attributes of routes that are to be used for load balancing.

Format

load-balancing as-path-ignore

undo load-balancing as-path-ignore

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the load-balancing as-path-ignore command is run, a router does not compare the AS_Path attributes of the routes (including the AS_Path length and content) that are to be used for load balancing. This command applies to the scenarios where EBGP and IBGP routes carry out load balancing. Exercise caution when using the command because the execution of this command will change the conditions of load balancing.

Precautions

The load-balancing as-path-ignore command and the bestroute as-path-ignore command are mutually exclusive. This means that if the bestroute as-path-ignore command is configured, the load-balancing as-path-ignore command cannot be configured.

Example

# Configure a router not to compare the AS-Path attributes of the routes that are to be used for load balancing.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] load-balancing as-path-ignore

maximum load-balancing (BGP)

Function

The maximum load-balancing command configures the maximum number of equal-cost routes for load balancing.

The undo maximum load-balancing command restores the default value.

By default, the maximum number of equal-cost routes is 1, indicating that load balancing is not implemented.

Format

maximum load-balancing [ ebgp | ibgp ] number [ ecmp-nexthop-changed ]

undo maximum load-balancing [ ebgp | ibgp ]

Parameters

Parameter Description Value
ebgp Indicates that only EBGP routes implement load balancing. -
ibgp Indicates that only IBGP routes implement load balancing. -
number Specifies the maximum number of equal-cost routes in the BGP routing table. The value is an integer that ranges from 1 to 8 on the S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720S-SI or S5720SI. The value ranges from 1 to 16 on the S5720EI, S5720HI, S6720S-EI, or S6720EI.
ecmp-nexthop-changed Configures a BGP device to change the next-hop addresses of only the routes that participate in load balancing to its address. -
ecmp-nexthop-changed is valid only in the BGP view, BGP IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After BGP load balancing is configured, BGP routes that meet the following conditions and have the same AS_Path attribute will become equal-cost routes and implement load balancing:

  • PrefVal values are the same.

  • Local_Pref attributes are the same.

  • All BGP routes are aggregated or non-aggregated routes.

  • Accumulated Interior Gateway Protocol metric (AIGP) values are the same.
  • Lengths of the AS_path attributes are the same.

  • Origin types (IGP, EGP, or Incomplete) are the same.

  • Multi_Exit Discriminator (MED) values are the same.

  • All BGP routes are EBGP or IBGP routes.

  • The IGP metric values within an AS are the same.

Configuring BGP load balancing better utilizes network resources.

After the maximum load-balancing ebgp number command is run, only EBGP routes take part in load balancing. After the maximum load-balancing ibgp number command is run, only IBGP routes take part in load balancing. If [ ebgp | ibgp ] is not set, both EBGP routes and IBGP routes take part in load balancing, and the number of EBGP routes involved in load balancing is the same as that of IBGP routes involved in load balancing.

If you run the maximum load-balancing number command, the device changes the next-hop addresses of the routes to be advertised to a local address no matter whether the routes are used for load balancing. However, in RR or BGP confederation scenarios, the device does not change the next-hop addresses of non-local routes to be advertised to a local address.

If you run the maximum load-balancing { ebgp | ibgp } number command, the device does not change the next-hop addresses of the routes to be advertised to a local address no matter whether the routes are used for load balancing.

If you run the maximum load-balancing [ ebgp | ibgp ] number ecmp-nexthop-changed command, the device changes the next-hop addresses of the routes to be advertised to a local address only when the routes are used for load balancing.

Configuration Impact

If the maximum load-balancing command is run for multiple times, the latest configuration overrides the previous one.

Precautions

The maximum load-balancing number command cannot be configured together with the maximum load-balancing ebgp number or maximum load-balancing ibgp number command.

Example

# Set two equal-cost routes to a specified destination.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] maximum load-balancing 2

maximum load-balancing eibgp

Function

The maximum load-balancing eibgp command configures the maximum number of EBGP and IBGP routes for load balancing.

The undo maximum load-balancing eibgp command deletes the configured maximum number of EBGP and IBGP routes for load balancing.

By default, the maximum number of EBGP and IBGP routes for load balancing is not configured.

Format

maximum load-balancing eibgp number [ ecmp-nexthop-changed ]

undo maximum load-balancing eibgp

Parameters

Parameter Description Value
number Specifies the maximum number of equal-cost EBGP and IBGP routes. The value is an integer that ranges from 1 to 8 on the S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720S-SI or S5720SI. The value ranges from 1 to 16 on the S5720EI, S5720HI, S6720S-EI, or S6720EI.
ecmp-nexthop-changed Configures a BGP device to change the next-hop addresses of only the routes that participate in load balancing to its address. -

Views

BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The maximum load-balancing eibgp command is used in a VPN where a CE is dual-homed to two PEs. When the CE and one PE belong to an AS and the CE and the other PE belong to a different AS, you can set the number of EBGP and IBGP routes to be used for load balancing. This allows VPN traffic to be balanced among EBGP and IBGP routes.

After BGP load balancing is configured, BGP routes that meet the following conditions and have the same AS_Path attribute will become equal-cost routes and implement load balancing:

  • PrefVal values are the same.

  • Local_Pref attributes are the same.

  • All BGP routes are summarized or non-summarized routes.

  • Accumulated Interior Gateway Protocol metric (AIGP) values are the same.
  • Lengths of the AS_path attributes are the same.

  • Origin types (IGP, EGP, or Incomplete) are the same.

  • Multi_Exit Discriminator (MED) values are the same.

  • Protocol priorities are the same. By default, EBGP and IBGP routes have the same protocol priority (255). If the EBGP or IBGP route protocol priority is changed using a route-policy, load balancing cannot be implemented.

  • Load balancing cannot be implemented between black-hole routes and non-black-hole routes.

  • Load balancing cannot be implemented between labeled routes and non-labeled routes.

  • Load balancing cannot be implemented between local routes and non-local routes.

Configuring BGP load balancing better utilizes network resources.

If you run the maximum load-balancing eibgp number command, the device changes the next-hop addresses of the routes to be advertised to a local address no matter whether the routes are used for load balancing. However, in RR or BGP confederation scenarios, the device does not change the next-hop addresses of non-local routes to be advertised to a local address.

If you run the maximum load-balancing eibgp number ecmp-nexthop-changed command, the device changes the next-hop addresses of the routes to be advertised to a local address only when the routes are used for load balancing.

Configuration Impact

If the maximum load-balancing eibgp command is run for multiple times, the latest configuration overrides the previous one.

Load balancing cannot be implemented between crossed and non-crossed routes.

Example

# Set the maximum number of EBGP and IBGP routes for load balancing to 3.

<HUAWEI> system-view
[HUAWEI] ip vpn-instance vpna
[HUAWEI-vpn-instance-vpna] route-distinguisher 100:1
[HUAWEI-vpn-instance-vpna-af-ipv4] quit
[HUAWEI-vpn-instance-vpna] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family vpn-instance vpna
[HUAWEI-bgp-vpna] maximum load-balancing eibgp 3

network (BGP)

Function

The network command configures BGP to statically add routes in the IP routing table to the BGP routing table and advertise these routes to peers.

The undo network command deletes the routes statically added to the BGP routing table.

By default, BGP does not statically add routes in the IP routing table to the BGP routing table.

Format

network { ipv4-address [ mask | mask-length ] | ipv6-address prefix-length } [ route-policy route-policy-name ]

undo network { ipv4-address [ mask | mask-length ] | ipv6-address prefix-length }

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of the route to be imported by BGP. It is in dotted decimal notation.
mask Specifies the IP address mask. If no mask is specified, the IP address is considered as a classful address. It is in dotted decimal notation.
mask-length Specifies the mask length of the IP address. If no mask length is specified, the IP address is considered as a classful address. The value is an integer that ranges from 0 to 32.
ipv6-address Specifies the IPv6 address of the route to be imported by BGP. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the prefix length of the IPv6 network address advertised by BGP. The value is an integer that ranges from 0 to 128.
route-policy route-policy-name Specifies the name of the route-policy that is used for route import. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP itself cannot discover routes. Instead, it imports routes discovered by other protocols such as IGP or static routes into the BGP routing table. These imported routes then are transmitted within an AS or between ASs. Before adding routes to the BGP routing table, BGP filters these routes by the routing protocol. If routes in the local IP routing table need to be statically added to the BGP routing table and then advertised, you can use the network command.

The Origin attribute of the routes imported into the BGP routing table by using the network command is IGP.

If a route with a specific prefix or mask is added to the BGP routing table by using the network command, this route is the optimal route selected from all types of protocol routes. Unlike the network command, the import-route (BGP) command is used to add all routes of a particular protocol such as RIP, OSPF, IS-IS, static route, or direct route to the BGP routing table.

Precautions

The network command is used to import exactly-matching routes. This means that only the routes in the local IP routing table that exactly match the specified destination address and prefix length can be added to the BGP routing table. If mask is not specified, routes are exactly matched against the natural network mask.

When using the undo network command to delete the existing configuration, specify a correct mask.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, routes in the local routing table are added to the BGP routing table.

Example

# Configure BGP to import the local route 10.0.0.0/16.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] network 10.0.0.0 255.255.0.0

nexthop recursive-lookup (BGP)

Function

The nexthop recursive-lookup command configures next hop iteration based on the routing policy.

The undo nexthop recursive-lookup command restores the default setting.

By default, BGP does not perform next hop iteration based on the routing policy.

Format

nexthop recursive-lookup route-policy route-policy-name

undo nexthop recursive-lookup route-policy

Parameters

Parameter Description Value
route-policy route-policy-name Indicates the name of a routing policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP needs to iterate indirect next hops. If an indirect next hop is not iterated based on a routing policy, the BGP route may be iterated to an incorrect forwarding path, causing traffic loss. Therefore, next hops should be iterated according to certain conditions to control the iterated routes.

The nexthop recursive-lookup route-policy route-policy-name command can be run to control the iterated next hop based on a routing policy. If an iterated route is filtered out by the routing policy, the route is considered unreachable. In this manner, the BGP route will not be iterated to an incorrect forwarding path.

Prerequisites

The next hop to which a BGP route is iterated has been determined and a routing policy has been configured.

Before configuring a routing policy, ensure that all desirably iterated routes cannot be filtered out by the routing policy. If some desirably iterated routes are filtered out by the routing policy, the BGP route may be considered unreachable by mistake and traffic cannot be forwarded over the route.

Precautions

The command does not apply to the routes received from directly connected EBGP peers or LinkLocal peers.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, route iteration is not restricted.

Example

# Configure next hop iteration based on the routing policy rp_nexthop.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] nexthop recursive-lookup route-policy rp_nexthop

nexthop recursive-lookup delay

Function

The nexthop recursive-lookup delay command configures the delay in responding to changes of the next hop.

The undo nexthop recursive-lookup delay command restores the default setting.

By default, the delay in responding to changes of the next hop is not configured.

Format

nexthop recursive-lookup delay [ delay-time ]

undo nexthop recursive-lookup delay

Parameters

Parameter Description Value
delay-time Specifies the delay in responding to changes of the next hop. The value is an integer that ranges from 1 to 100, in seconds. The default value is 5 seconds.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-IPv4 multicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the route path on the upstream of a PE connected to an RR changes, if the PE detects that the iterated next hop becomes unreachable before the RR instructs the PE to switch the route, the PE withdraws the original optimal route advertised to its connected CE. After the RR re-advertises the switched route to the PE, the PE re-advertises an optimal route to the CE after route selection. During the route switchover, a huge volume of traffic will be dropped. If the nexthop recursive-lookup delay command is run on the PE to delay responding to the next hop unreachable event and to respond to this event only after the RR advertises the switched route, the volume of lost traffic will be reduced during route switchover.

Example

# Set the delay in responding to changes of the next hop to 10s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] nexthop recursive-lookup delay 10

nexthop recursive-lookup non-critical-event delay

Function

The nexthop recursive-lookup non-critical-event delay command enables a device to respond to non-urgent BGP next-hop iteration changes after a specified delay time.

The undo nexthop recursive-lookup non-critical-event delay command enables a device to immediately respond to non-urgent BGP next-hop iteration changes.

By default, a device immediately responds to non-urgent BGP next-hop iteration changes.

Format

nexthop recursive-lookup non-critical-event delay [ delay-time ]

undo nexthop recursive-lookup non-critical-event delay

Parameters

Parameter Description Value
delay-time Specifies the delay time. The value is an integer that ranges from 1 to 100, in seconds. The default value is 5.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If repeated iteration causes the BGP next hop to frequently change on a device, the device frequently selects and advertises routes. To prevent unwanted re-routing and route advertisement, run the nexthop recursive-lookup delay command to enable the device to respond to BGP next-hop iteration changes after a specified delay time. The iteration results are as follows:
  • Urgent iteration result change: The iterated next hop is changed, and BGP route reachability is also changed. For example, if a fault occurs on a network, a device finds no next-hop route or tunnel to which a BGP route is iterated. As a result, traffic is interrupted.

  • Non-urgent iteration result change: The iterated next hop is changed, and BGP route reachability is not affected. For example, after the interface or type of a tunnel to which the next hop of a BGP route is iterated is changed, traffic keeps traveling over the BGP route.

To delay a response to the non-urgent iteration change, run the nexthop recursive-lookup non-critical-event delay command, not the nexthop recursive-lookup delay command.

Configuration Impact

After the nexthop recursive-lookup delay command is run, the device delays responses to all next-hop iteration changes. After the nexthop recursive-lookup non-critical-event delay command is run, the device delays responses only to non-urgent BGP next-hop iteration changes. If both commands are run, the nexthop recursive-lookup non-critical-event delay command takes precedence over the nexthop recursive-lookup non-critical-event delay command. Table 7-185 provides examples of the two commands.

Table 7-185  Functions and their descriptions

Example

Description

[HUAWEI-bgp] nexthop recursive-lookup delay

The device responds to all BGP next-hop iteration changes after a 5-second delay.

[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay

The device immediately responds to urgent BGP next-hop iteration changes and responds to non-urgent BGP next-hop iteration changes after a 5-second delay.

[HUAWEI-bgp] nexthop recursive-lookup delay 3

The device responds to all BGP next-hop iteration changes after a 3-second delay.

[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay 6

The device immediately responds to urgent BGP next-hop iteration changes and responds to non-urgent BGP next-hop iteration changes after a 6-second delay.

[HUAWEI-bgp] nexthop recursive-lookup delay
[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay

The device responds to all BGP next-hop iteration changes after a 5-second delay.

[HUAWEI-bgp] nexthop recursive-lookup delay 3
[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay

The device responds to urgent BGP next-hop iteration changes after a 3-second delay and responds to non-urgent BGP next-hop iteration changes after a 5-second delay.

[HUAWEI-bgp] nexthop recursive-lookup delay 3
[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay 6

The device responds to urgent BGP next-hop iteration changes after a 3-second delay and responds to non-urgent BGP next-hop iteration changes after a 6-second delay.

[HUAWEI-bgp] nexthop recursive-lookup delay
[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay 6

The device responds to urgent BGP next-hop iteration changes after a 5-second delay and responds to non-urgent BGP next-hop iteration changes after a 6-second delay.

Precautions

The delay time specified in the nexthop recursive-lookup non-critical-event delay command must be greater than or equal to that specified in the nexthop recursive-lookup delay command if both commands are run.

Example

# Enable the device to respond to non-urgent BGP next-hop iteration changes after a 10-second delay.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] nexthop recursive-lookup non-critical-event delay 10

out-delay

Function

The out-delay command configures a delay for sending Update packets to all BGP peers.

The undo out-delay command deletes the configured delay value.

The default delay value is 0, indicating that the intermediate device on the primary path sends Update packets without a delay.

Format

out-delay delay-value

undo out-delay

Parameters

Parameter Description Value
delay-value Specifies the delay for sending Update packets. The value is an integer that ranges from 0 to 3600, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a scenario with both primary and backup routes, traffic may be lost after it switches back to the primary path. Use a VPN FRR scenario as an example. PE3 and CE2 connect both to PE1 and PE2. The primary path is PE3 -> PE1 -> CE2, and the backup path is PE3 -> PE2 -> CE2. CE2 uses BGP to communicate with PE1 and PE2. FRR is configured on PE3. If PE1 restarts or the link between PE3 and PE1 fails, traffic switches from the primary path to the backup path. After the primary path recovers, traffic switches back to the primary path. If PE3 completes refreshing forwarding entries before PE1 does, PE1 may temporarily fail to forward traffic from PE3, and packet loss may occur. The severity of packet loss is proportional to the number of routes stored on PE1.

To solve this problem, run the out-delay command on PE1 to configure a delay for sending Update packets. An appropriate delay ensures that traffic switches back to the primary path after PE1 completes refreshing forwarding entries.

To configure a delay for sending Update packets to all BGP peers, run the out-delay command. To configure a delay for sending Update packets to a specified BGP peer or peer group, run the peer out-delay command.

Precautions

If you run the peer out-delay command more than once, the latest configuration overrides the previous one.

If the out-delay and peer route-update-interval commands are both configured, only the out-delay command takes effect.

If a network has high route convergence requirements, do no use the out-delay command.

Example

# Set the delay for sending Update packets to all BGP peers to 300s in the BGP view.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] out-delay 300
Related Topics

peer advertise-community

Function

The peer advertise-community command configures a device to advertise a community attribute to its peer or peer group.

The undo peer advertise-community command restores the default setting.

By default, a device advertises no community attribute to its peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } advertise-community

undo peer { group-name | ipv4-address | ipv6-address } advertise-community

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BPG-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP L2VPN-AD address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer advertise-community command is used to configure a device to advertise a community attribute to its peer or peer group. If a device advertises a community attribute to its peer group, all the members of the peer group will inherit the configuration. This simplifies the application of routing policies and facilitates route maintenance and management.

Prerequisites

Peer relationships have been established using the peer as-number command.

A specific community attribute has been defined in a routing policy.

Example

# Configure a device to advertise a community attribute to its peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 advertise-community

peer advertise-ext-community

Function

The peer advertise-ext-community command enables a device to advertise an extended community attribute to its peer or peer group.

The undo peer advertise-ext-community command restores the default setting.

By default, a device advertises no extended community attribute to its peer or peer group.

This command is not supported by the S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720S-SI and S5720SI.

Format

peer { group-name | ipv6-address } advertise-ext-community

undo peer { group-name | ipv6-address } advertise-ext-community

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

Views

BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer advertise-ext-community command is used to enable a device to advertise an extended community attribute to a specified peer or peer group. If a device advertises an extended community attribute to a specified peer group, all the members of the peer group will inherit the configuration. This simplifies the application of routing policies and facilitates route maintenance and management.

Prerequisites

Peer relationships have been established using the peer as-number command.

A specific extended community attribute has been defined in a routing policy.

Example

# Configure a device to advertise an extended community attribute to its peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 2:3::4:5 as-number 200
[HUAWEI-bgp] ipv6-family vpn-instance abc
[HUAWEI-bgp6-abc] peer 2:3::4:5 as-number 200
[HUAWEI-bgp6-abc] peer 2:3::4:5 advertise-ext-community

peer allow-as-loop

Function

The peer allow-as-loop command sets the number of local AS number repetitions.

The undo peer allow-as-loop command restores the default setting.

By default, the local AS number cannot be repeated.

Format

peer { group-name | ipv4-address | ipv6-address } allow-as-loop [ number ] [ global-as [ vpn-as ] ]

undo peer { group-name | ipv4-address | ipv6-address } allow-as-loop [ number ] [ global-as [ vpn-as ] ]

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
number Specifies the number of local AS number repetitions. The value is an integer that ranges from 1 to 10. The default value is 1.
global-as Specifies a global AS number. -
vpn-as Specifies a VPN instance AS number. -
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view , BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, and BGP L2VPN-AD address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

  • The global-as and vpn-as parameters apply only to BGP VPN instance IPv4 and BGP VPN instance IPv6 address family views.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP uses AS numbers to detect routing loops. The AS numbers in the AS_Path of each received route are matched against the local AS number configured using the bgp command, the fake AS number configured using the peer fake-as command, and the VPN instance AS number configured using the as-number command. The largest number of times any of the configured AS numbers is repeated is considered as the maximum number. In the Hub and Spoke networking, if EBGP runs between a Hub-PE and a Hub-CE on a Hub site, the route sent from the Hub-PE to the Hub-CE carries the AS number of the Hub-PE. If the Hub-CE sends a routing update to the Hub-PE, the Hub-PE will deny it because the routing update contains the AS number of the Hub-PE.

To ensure proper route transmission in the Hub and Spoke networking, configure all the BGP peers on the path, along which the Hub-CE advertises private network routes to the Spoke-CE, to accept the routes in which the AS number repeats once.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the peer allow-as-loop command is run for a peer or peer group multiple times, the latest configuration overrides the previous one.

Example

# Set the number of local AS number repetitions to 2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 allow-as-loop 2

peer as-number

Function

The peer as-number command creates a peer or configures an AS number for a specified peer group.

The undo peer as-number command deletes a specified peer or the AS number of a specified peer group.

By default, no BGP peer is configured, and no AS number is specified for a peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } as-number { as-number-plain | as-number-dot }

undo peer { group-name as-number | ipv4-address | ipv6-address }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address

Specifies the IPv4 address of a peer.

The IPv4 address can be the IP address of an interface that is directly connected to the peer or the IP address of a loopback interface of the reachable peer.

It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation. The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer ipv4-address as-number { as-number-plain | as-number-dot } command is used to create a BGP peer.

The peer group-name as-number { as-number-plain | as-number-dot } command is used to configure an AS number for a specified peer group.

Precautions

If a peer does not join any peer group or the peer group to which a peer belongs is not configured with an AS number, deleting the AS number of the peer will reset the peer relationship.

If a peer in a peer group is not configured with an AS number, deleting the AS number of the peer group will interrupt the connection on the peer.

The AS number of an external peer group must be different from the local AS number.

Example

# Set the AS number to 100 for IPv4 peer 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.1 as-number 100

# Set the AS number to 100 for a peer group named test.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group test
[HUAWEI-bgp] peer test as-number 100

peer as-path-filter

Function

The peer as-path-filter command configures a BGP route filtering policy based on an AS_Path list for a peer or peer group.

The undo peer as-path-filter command cancels the existing configuration.

By default, no route filtering policy based on an AS_Path list is configured for a peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } as-path-filter { as-path-filter-number | as-path-filter-name } { import | export }

undo peer { group-name | ipv4-address | ipv6-address } as-path-filter { as-path-filter-number | as-path-filter-name } { import | export }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
as-path-filter-number Specifies the number of an AS_Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter-name Specifies the name of an AS_Path filter. The name is a string of 1 to 51 case-sensitive characters. It cannot be all numbers.When double quotation marks are used around the string, spaces are allowed in the string.
import Applies a route filtering policy to received routes. -
export Applies a route filtering policy to routes to be advertised. -
  • ipv4-address is valid only in the BGP view, BPG-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the peer as-path-filter command is used to apply a route filtering policy based on an AS_Path list to BGP routes, the routes that do not match the policy are filtered out.

Prerequisites

Peer relationships have been established using the peer as-number command.

The ip as-path-filter command has been run to define an AS-Path filter.

Precautions

Only one AS_Path filter can be used to filter the routes received from the same peer. Similarly, only one AS_Path filter can be used to filter routes to be advertised to the same peer.

Creating an AS_Path filter before it is referenced is recommended. By default, the command in an IPv4 address family cannot reference a non-existent AS_Path filter, but the command in an IPv6 address family can reference a non-existent AS_Path filter. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent AS_Path filter is referenced using the current command, all routes are advertised to the specified peer, or all routes advertised by the specified peer are accepted.

Example

# Configure an AS_Path filter for a peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 as-path-filter 3 export

peer bfd

Function

The peer bfd command sets BFD detection parameters for a peer or peer group.

The undo peer bfd command restores default BFD detection parameter values.

By default, the interval for sending BFD packets is 1000 ms, the interval for receiving BFD packets is 1000 ms, and the local detection multiplier is 3.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier } *

peer { group-name | ipv6-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier | wtr wtr-value } *

undo peer { group-name | ipv4-address } bfd { min-tx-interval | min-rx-interval | detect-multiplier } *

undo peer { group-name | ipv6-address } bfd { min-tx-interval | min-rx-interval | detect-multiplier | wtr } *

undo peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier } *

undo peer { group-name | ipv6-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier | wtr wtr-value } *

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
min-tx-interval min-tx-interval Specifies the interval at which BFD packets are sent.

The value is an integer that ranges from 100 to 1000, in milliseconds. After the set service-mode enhanced command is configured on the S5720HI, the value ranges from 3 to 1000.By default, the minimum interval for receiving BFD packets is 1000 ms.

min-rx-interval min-rx-interval Specifies the interval at which BFD packets are received.

The value is an integer that ranges from 100 to 1000, in milliseconds. After the set service-mode enhanced command is configured on the S5720HI, the value ranges from 3 to 1000.By default, the minimum interval for receiving BFD packets is 1000 ms.

detect-multiplier multiplier Specifies the local detection time multiplier. The value is an integer that ranges from 3 to 50. By default, the value is 3.
wtr wtr-value Specifies the interval for waiting for the BFD session to restore. The value is an integer that ranges from 1 to 60, in minutes. By default, the value is 0 minute, indicating no waiting.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BFD provides millisecond-level fault detection. It helps BGP to detect faults in neighboring devices or links more quickly, and instructs BGP to recalculate routes for correct packet forwarding. The peer bfd command can be used to set the values of BFD session parameters on a specified interface.

The BFD configuration of a peer takes precedence over that of the peer group to which the peer belongs. If BFD is not configured on a peer and the peer group to which the peer belongs is enabled with BFD, the peer will inherit the BFD configurations of the peer group.

Prerequisites

Peer relationships have been established using the peer as-number command.

A BFD session can be established only when the corresponding BGP session is in the Established state.

Precautions

If the peer bfd command is run multiple times, the latest configuration overwrites the previous one. The BFD session uses the latest parameters as the detection parameters.

Assume that BFD is configured on a peer group. If the peer bfd block command is not run on members of the peer group, the members will establish BFD sessions.

If BFD parameters are set on a peer, a BFD session will be established by using the BFD parameters on the peer.

Example

# Configure BFD and set detection parameters on peer 10.2.2.9.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.2.2.9 as-number 200
[HUAWEI-bgp] peer 10.2.2.9 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 5

peer bfd block

Function

The peer bfd block command prevents a peer from inheriting the BFD function of its peer group.

The undo peer bfd block command restores the default configuration.

By default, a peer inherits the BFD function from its peer group.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

peer { ipv4-address | ipv6-address } bfd block

undo peer { ipv4-address | ipv6-address } bfd block

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BFD provides millisecond-level fault detection. It helps BGP to detect faults in neighboring devices or links more quickly, and instructs BGP to recalculate routes for correct packet forwarding. If a peer group is configured with BFD, all members of the peer group will establish BFD sessions. The peer bfd block command can be used to prevent a peer from inheriting the BFD function from its peer group.

Prerequisites

Peer relationships have been established using the peer as-number command.

A BFD session has been established.

Precautions

After the peer bfd block command is run on a peer, the corresponding BFD session on the peer is deleted. As a result, fast link fault detection cannot be implemented.

The peer bfd block command and the peer bfd enable command are mutually exclusive. After the peer bfd block command is run, related BFD sessions are automatically deleted.

Example

# Prevent peer 10.2.2.9 from inheriting the BFD function of its peer group.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.2.2.9 as-number 200
[HUAWEI-bgp] peer 10.2.2.9 bfd block

peer bfd enable

Function

The peer bfd enable command enables BFD for peers or a peer group.

The undo peer bfd enable command disables BFD for peers or a peer group.

By default, BFD is disabled for peers or a peer group.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

peer { group-name | ipv4-address | ipv6-address } bfd enable [ single-hop-prefer ]

undo peer { group-name | ipv4-address | ipv6-address } bfd enable

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

single-hop-prefer

Indicates that single-hop BFD sessions are preferentially established. single-hop-prefer takes effect only on IBGP peers. By default, single-hop-prefer is not specified, and multi-hop sessions are established between direct IBGP peers (Huawei devices). To interconnect a Huawei device and a non-Huawei device that defaults the sessions between IBGP peers to single-hop, configure single-hop-prefer in the command.

-

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP uses BFD to quickly detect faults in links between BGP4 peers. This accelerates network convergence. The peer bfd enable command is used to configure a device to establish a BFD session with its peer or peer group by using default detection parameter values.

Prerequisites

Peer relationships have been established using the peer as-number command.

A BFD session can be established only when the corresponding BGP peer relationship is in the Established state.

Precautions

The BFD configuration of a peer takes precedence over that of the peer group to which the peer belongs. If BFD is not configured on a peer and the peer group to which the peer belongs is enabled with BFD, the peer inherits the BFD configurations from the peer group.

Before enabling BFD on a BGP peer, enable BFD in the system view. If no BFD detection parameter is specified, a BFD session is established by using default parameter values.

The peer bfd block command and the peer bfd enable command are mutually exclusive.

Example

# Configure BFD for peer 10.2.2.9.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.2.2.9 as-number 200
[HUAWEI-bgp] peer 10.2.2.9 bfd enable

peer capability-advertise

Function

The peer capability-advertise command enables a BGP device to advertise optional BGP capabilities to its peer.

The undo peer capability-advertise command restores the default setting.

By default, a BGP device advertises route-refresh and 4-byte AS number capabilities to its peer.

Format

peer { group-name | ipv4-address } capability-advertise { 4-byte-as | route-refresh | conventional }

peer ipv6-address capability-advertise { 4-byte-as | route-refresh }

undo peer { group-name | ipv4-address } capability-advertise { 4-byte-as | route-refresh | conventional }

undo peer ipv6-address capability-advertise { 4-byte-as | route-refresh }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
4-byte-as Indicates the 4-byte AS number capability. -
route-refresh Indicates the route-refresh capability. -
conventional Indicates the regular router capability. -
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer capability-advertise route-refresh command is used to configure a device to advertise the route-refresh capability to its peer.

The peer capability-advertise conventional command is used to configure a device to advertise the regular router capability to its peer. If conventional is specified in the command, the router does not have all extension functions such as route-refresh capability, GR capability, and multi-address family negotiation. This allows the router to be compatible with routers of earlier versions.

The peer capability-advertise 4-byte-as command is used to configure a device to advertise the 4-byte AS number capability to its peer. If AS number resources are used up, this command can be used to configure devices to use 4-byte AS numbers.

Prerequisites

Peer relationships have been established using the peer as-number command.

The corresponding BGP session must be in the Established state.

Precautions

Enabling or disabling the regular router capability causes the teardown and re-establishment of sessions.

Example

# Configure a BGP device to advertise the route-refresh capability to its peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.89.2.33 as-number 100
[HUAWEI-bgp] peer 10.89.2.33 capability-advertise route-refresh

peer connect-interface

Function

The peer connect-interface command specifies a source interface from which BGP packets are sent, and a source address used for initiating a connection.

The undo peer connect-interface command restores the default setting.

By default, the outbound interface of a BGP packet serves as the source interface of the BGP packet.

Format

peer { group-name | ipv4-address } connect-interface interface-type interface-number [ ipv4-source-address ]

peer { group-name | ipv6-address } connect-interface interface-type interface-number [ ipv6-source-address ]

undo peer { group-name | ipv4-address | ipv6-address } connect-interface

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
interface-type interface-number Specifies the type and number of an interface. -
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
ipv4-source-address Specifies an IPv4 source address used for establishing a connection. It is in dotted decimal notation.
ipv6-source-address Specifies an IPv6 source address used for establishing a connection. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The command is used in the following scenarios:
  • To establish a BGP peer connection between two indirectly connected physical interfaces, the peer connect-interface command must be run on both sides.

    To establish a BGP peer connection between a local loopback interface and a remote interface, the loopback interface must be specified as the source interface in the command. To establish a BGP peer connection between a local physical interface and a remote interface, the physical interface must be specified as the source interface in the command.

  • If multiple IP addresses are configured for the physical interface that needs a BGP peer connection established with a remote interface, the peer connect-interface command must be run, with ipv4-source-address or ipv6-source-address set to the source IP address.
  • If two devices need multiple BGP peer connections established through different interfaces, the peer connect-interface command must be run for each BGP peer connection, with the source interface specified.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

Running the peer connect-interface command causes the teardown and re-establishment of peer relationships.

Because the BGP peer relationships in various address families on the same device share one TCP connection, connect-interface configured in the BGP view can be inherited in the IPv4 unicast address family.

To enable a device to send BGP packets even if its physical interface fails, you can configure the device to use a loopback interface as the source interface of the BGP packets. When configuring a device to use a loopback interface as the source interface of BGP packets, note the following points:

  • The loopback interface of the device's BGP peer must be reachable.

  • In the case of an EBGP connection, the peer ebgp-max-hop command needs to be run to enable the two devices to establish an indirect peer relationship.

If the specified interface borrows the IP address of another interface and then the IP address of the specified interface is changed, BGP still uses the borrowed IP address to keep the connection if no connection reestablishment is triggered, and data receiving and sending is not affected; if connection reestablishment is triggered, BGP uses the new IP address to reestablish the connection.

Example

# Specify a source interface for sending BGP packets and a source address for initiating a connection.

<HUAWEI> system-view
[HUAWEI] bgp 100 
[HUAWEI-bgp] peer 10.16.2.3 as-number 100 
[HUAWEI-bgp] peer 10.16.2.3 connect-interface vlanif 100
Related Topics

peer default-route-advertise

Function

The peer default-route-advertise command configures a BGP device to advertise a default route to its peer or peer group.

The undo peer default-route-advertise command restores the default setting.

By default, a BGP device does not advertise default routes to its peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv4-address1 { mask1 | mask-length1 } } &<1-4> | conditional-route-match-any { ipv4-address2 { mask2 | mask-length2 } } &<1-4> ]

peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv6-address1 prefix-length1 } &<1-4> | conditional-route-match-any { ipv6-address2 prefix-length2 } &<1-4> ]

undo peer { group-name | ipv4-address | ipv6-address } default-route-advertise

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. The value is in dotted decimal notation.
prefix-length1 Specifies the IPv6 prefix range using the mask length. The value is an integer that ranges from 0 to 128. If ::0 less-equal 128 is used, all IPv6 addresses will be matched.
prefix-length2 Specifies the IPv6 prefix range using the mask length. The value is an integer that ranges from 0 to 128. If ::0 less-equal 128 is used, all IPv6 addresses will be matched.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
route-policy route-policy-name Specifies the name of a route-policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
conditional-route-match-all Configures the BGP device to send default routes to a peer or peer group when the routing table contains all conditional routes. -
ipv4-address1 Specifies the IPv4 address of conditional routes. The value is in dotted decimal notation.
ipv6-address1 Specifies the IPv6 address of conditional routes. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
mask1 Specifies the mask of conditional routes. The value is in dotted decimal notation.
mask-length1 Specifies the mask length of conditional routes. The value is an integer that ranges from 0 to 32.
conditional-route-match-any Configures the BGP device to send default routes to a peer or peer group when the routing table contains any conditional route. -
ipv4-address2 Specifies the IPv4 address of conditional routes. The value is in dotted decimal notation.
ipv6-address2 Specifies the IPv6 address of conditional routes. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
mask2 Specifies the mask of conditional routes. The value is in dotted decimal notation.
mask-length2 Specifies the mask length of conditional routes. The value is an integer that ranges from 0 to 32.
  • ipv4-address is only valid in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is only valid in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

  • conditional-route-match-all and conditional-route-match-any are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, and BGP-VPN instance IPv4 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Default routes are commonly used on a network that meets the following conditions:

  • Each device has multiple EBGP peers and receives all routes on the network from each EBGP peer.

  • There are multiple route reflectors (RRs), and each RR receives all routes on the network.

If load balancing is not implemented on the network, a BGP peer receives at most one copy of active routes on the network. If load balancing is implemented on the network, the number of active routes received by a BGP peer will be increased by multiple times, causing the number of routes on the network to sharply increase. To greatly reduce the number of routes on such a network, configure a BGP device to advertise only default routes to its BGP peer and use default routes for traffic load balancing.

Prerequisites

BGP peer relationships have been established using the peer as-number command.

Precautions

After this command is run, a BGP device sends a default route with the next hop as itself to its peer or peer group regardless of whether default routes exist in the routing table.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, the attributes of the default route to be advertised to the specified peer or peer group are not changed.

Example

# Configure a BGP device to advertise a default route to its peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 default-route-advertise

peer description (BGP)

Function

The peer description command configures a description for a peer or peer group.

The undo peer description command deletes the description of a peer or peer group.

By default, no description is configured for a peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } description description-text

undo peer { group-name | ipv4-address | ipv6-address } description

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
description-text Specifies a description, which can be letters and digits. The value is a string of 1 to 80 characters, with spaces supported.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer description can be used to configure a description for a peer or peer group, which facilitates management of peers or peer groups. The description records information about the peer or peer group, such as the VPN instance to which the peer or peer group belongs, and devices that establish peer relationships with the peer or peer group.

Precautions

The description configured by using the peer description command for a peer is displayed from the first non-space character, and a maximum of 80 characters can be displayed.

Follow-up Procedure

You can run display bgp peer ipv4-address verbose command can be used to view the description of a peer.

Example

# Configure a description for a peer group named group1.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group group1
[HUAWEI-bgp] peer group1 description ISP1

peer ebgp-max-hop

Function

The peer ebgp-max-hop command configures a BGP device to establish an EBGP peer relationship with a peer on an indirectly-connected network and set the maximum number of hops between the two devices.

The undo peer ebgp-max-hop command restores the default setting.

By default, an EBGP connection can be set up only on a directly-connected physical link.

Format

peer { group-name | ipv4-address | ipv6-address } ebgp-max-hop [ hop-count ]

undo peer { group-name | ipv4-address | ipv6-address } ebgp-max-hop

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
hop-count Specifies the maximum number of hops. The value is an integer that ranges from 1 to 255. The default value is 255. If the maximum number of hops is 1, a device cannot establish an EBGP connection with a peer on an indirectly-connected network.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A directly-connected physical link must be available between EBGP peers. Otherwise, the peer ebgp-max-hop command must be used to allow EBGP peers to establish a TCP connection over multiple hops.

If loopback interfaces are used to establish an EBGP peer relationship, the peer ebgp-max-hop command (hop-count ≥ 2) must be run; otherwise, the peer relationship cannot be established.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the peer ebgp-max-hop command is used on one end of an EBGP connection, it must also be used on the other end.

The configurations of GTSM and EBGP-MAX-HOP affect the TTL values of sent BGP packets, and the configurations of the two functions are mutually exclusive.

Example

# Allow an indirectly connected EBGP peer with the IP address of 10.1.1.2 to establish a connection with the local device.

<HUAWEI> system-view
[HUAWEI] bgp 100 
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 ebgp-max-hop

peer enable (BGP)

Function

The peer enable command enables a BGP device to exchange routes with a specified peer or peer group in the address family view.

The undo peer enable command disables a BGP device from exchanging routes with a specified peer or peer group.

By default, only the peer in the BGP IPv4 unicast address family view is automatically enabled.

Format

peer { group-name | ipv4-address | ipv6-address } enable

undo peer { group-name | ipv4-address | ipv6-address } enable

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, and BGP L2VPN-AD address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, only the peer in the BGP IPv4 unicast address family view is automatically enabled. After the peer as-number command is used in the BGP view, the system automatically runs the peer enable command to enable a peer. In other address family views, however, a peer must be enabled manually.

After the undo default ipv4-unicast command is run, the peer enable command needs to be run in the BGP view or the BGP-IPv4 unicast address family view to enable the IPv4 unicast address family for the created BGP peer.

Precautions

Enabling or disabling a BGP peer in an address family, for example, running the peer enable command or the undo peer enable command in a VPNv4 address family, causes teardown and re-establishment of the BGP connection of the peer in other address families.

Example

# Disable a BGP device from exchanging IPv4 routes with a specified peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] undo peer 10.1.1.2 enable
Related Topics

peer fake-as

Function

The peer fake-as command specifies a fake AS number for a local peer.

The undo peer fake-as command restores the default setting.

By default, a peer uses the actual local AS number.

Format

peer { group-name | ipv4-address | ipv6-address } fake-as { as-number-plain | as-number-dot } [ prepend-global-as ]

undo peer { group-name | ipv4-address | ipv6-address } fake-as

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation. The value is in the x.y format. Here, "x" and "y" are integers that range from 1 to 65535 and 0 to 65535 respectively.
prepend-global-as Indicates that the actual AS number is added to packets to be sent. -
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer fake-as command is often used for network deployment changing of carriers' networks. For example, if carrier A purchases the network of carrier B and the networks of the two carriers belong to different ASs, the ASs of the two carriers need to be combined and the AS number of carrier B needs to be changed to the AS number of carrier A. BGP peers (in another AS) of devices on carrier B's network may not be willing to have their BGP configurations changed or changed immediately during network combination. As a result, the connections with these BGP peers will be interrupted.

To ensure that the ASs are combined properly, you can run the peer fake-as command on the ASBR on carrier's B network to set the AS number of carrier B to the fake AS number of carrier A. This setting enables the BGP peers of devices on carrier B's network to use the fake AS number to set up connections.

If prepend-global-as is specified in the command and the local end establishes an EBGP peer relationship with the remote end using the fake AS number, the local end adds the actual AS number to the packets to be sent to the remote end.

Prerequisites

Peers have been created by using the peer as-number command.

Precautions

If the peer fake-as command is run several times for a peer or a peer group, the latest configuration will overwrite the previous one.

The peer fake-as command takes effect only for EBGP peers, and the configured fake AS number cannot be the same as the peer AS number.

After the 4-byte AS number capability is disabled on a peer, configuring a 4-byte fake AS number for the peer may cause a failure to establish a BGP session.

Example

# Set a 2-byte fake AS number for a peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200 
[HUAWEI-bgp] peer 10.1.1.2 fake-as 99

# Set a 4-byte fake AS number for a peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200 
[HUAWEI-bgp] peer 10.1.1.2 fake-as 100.200
Related Topics

peer filter-policy

Function

The peer filter-policy command configures a filtering policy to advertise routes to or receive routes from peers or peer group.

The undo peer filter-policy command deletes the filtering policy used to advertise routes to or receive routes from peers or peer group.

By default, no filtering policy is configured to advertise routes to or receive routes from peers or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } filter-policy { acl-number | acl-name acl-name | acl6-number | acl6-name acl6-name } { import | export }

undo peer { group-name | ipv4-address | ipv6-address } filter-policy { acl-number | acl-name acl-name | acl6-number | acl6-name acl6-name } { import | export }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
acl-number Specifies the number of a basic ACL. The value is an integer that ranges from 2000 to 2999.
acl-name acl-name Specifies the name of an ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
acl6-number Specifies the number of a basic IPv6 ACL. The value is an integer that ranges from 2000 to 2999.
acl6-name acl6-name Specifies the name of an IPv6 ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The name should start with a letter and can contain numbers, hyphens (-), or underlines (_).
import Filters received routes. -
export Filters routes to be advertised. -
  • ipv4-address, acl-name acl-name, and acl-number are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address, acl6-name acl6-name, and acl6-number are valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer filter-policy command is used to configure an ACL-based policy for filtering routes received from peers or routes to be advertised to peers.

A proper basic ACL needs to be selected based on the address family of a peer or peer group.

Prerequisites

Peer relationships have been established using the peer as-number command.

A basic ACL needs to be configured.

Precautions

If the peer filter-policy command is run multiple times, the latest configuration overwrites the previous one. For example, if the peer 10.1.1.2 filter-policy 2600 import command is run and then the peer 10.1.1.2 filter-policy 2400 import command is run, the configuration of the peer 10.1.1.2 filter-policy 2400 import command overwrites that of the peer 10.1.1.2 filter-policy 2600 import command.

When the rule command is run to configure rules for an ACL, only the source address range specified by source and the time period specified by time-range take effect.

Example

# Set the IPv4 filtering policy for peers.

<HUAWEI> system-view
[HUAWEI] acl 2000
[HUAWEI-acl-basic-2000] rule permit
[HUAWEI-acl-basic-2000] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 filter-policy 2000 import
# Set the IPv6 filtering policy for peers.
<HUAWEI> system-view
[HUAWEI] acl ipv6 2001
[HUAWEI-acl6-basic-2001] rule permit
[HUAWEI-acl6-basic-2001] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] peer fc00:0:0:2::3 as-number 200
[HUAWEI-bgp] ipv6-family unicast
[HUAWEI-bgp-af-ipv6] peer fc00:0:0:2::3 filter-policy 2000 import

peer group

Function

The peer group command adds a peer to a peer group.

The undo peer group command deletes a peer from a peer group and all configurations of the peer.

By default, no peer is in peer group.

Format

peer { ipv4-address | ipv6-address } group group-name

undo peer { ipv4-address | ipv6-address } group group-name

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view, and BGP-EVPN address family view.

  • ipv6-address is valid only in the BGP view, BGP-IPv6 unicast address family view, and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view, BGP-EVPN address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a large-scale BGP network, there are a large number of peers and many of them have the same routing policies. To configure these peers, you have to repeatedly use some commands. In such a case, configuring peer groups can simplify configurations. If you intend to perform the same configuration on several peers, create and configure a peer group. Then, add the peers to the peer group. The peers will inherit the configurations of the peer group.

Precautions

  • Peers with different AS numbers can be added to the same peer group. If a peer has an AS number, the peer keeps its own AS number after being added to a peer group. If a peer has no AS number but the peer group to which the peer will be added has an AS number, the peer inherits the AS number of the peer group after being added to the peer group.

  • The members of a peer group can be configured with different route receiving and advertising policies.

  • The undo peer group command has the same function with the undo peer command and the undo peer enable command.

  • By default, only the IPv4 peers configured in the BGP-IPv4 unicast address family view are automatically added to a peer group. That is, after the peer ipv4-address group group-name command is configured in the BGP view, the system configures the peer ipv4-address group group-name command in the BGP-IPv4 unicast address family view. In other address family views, peers must be manually added to a peer group.

Example

# Create an IBGP peer group named test, and then add a peer to it.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group test internal
[HUAWEI-bgp] peer 10.1.1.1 group test

# Create an EBGP peer group named test and add an IPv6 peer to this peer group.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group test external
[HUAWEI-bgp] peer 1:2::3:4 as-number 200
[HUAWEI-bgp] peer 1:2::3:4 group test
[HUAWEI-bgp] ipv6-family unicast
[HUAWEI-bgp-af-ipv6] peer test enable
[HUAWEI-bgp-af-ipv6] peer 1:2::3:4 group test

peer ignore

Function

The peer ignore command prevents a BGP device from establishing a session with a peer or peer group.

The undo peer ignore command permits a BGP device from establishing a session with a peer or peer group.

By default, the device is permitted to set up the session with the BGP peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } ignore

undo peer { group-name | ipv4-address | ipv6-address } ignore

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BGP-VPN instance IPv4 address family view, and BGP-VPN instance IPv6 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a BGP device needs to transitorily close the session with a peer and reconfiguring the peer requires too much workload, the peer ignore command can be used to avoid the reconfiguration of the peer. For example, if the peer relationship frequently alternates between Up and Down because of the upgrade of a peer or the adjustment of the link, the BGP peer relationship needs to be interrupted temporarily. In this case, the peer ignore command can be used on the stabler end to prevent frequent flapping of the route or peer relationship.

The peer ignore command is used to tear down sessions between a BGP device and its peer or peer group and delete all related routing information. In the case of a peer group, a large number of sessions are suddenly torn down.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

After the peer ignore command is run on a device, the session between the device and its peer is closed and all the related routing information is cleared.

After a BGP session is successfully established, running the peer ignore command interrupts the BGP session. The interrupted BGP session cannot be established again, and the status of the corresponding BGP peer relationship is displayed as Idle.

Running the peer ignore command together with the peer enable command equals running of the reset bgp command. Both methods can be used to configure a device to re-establish a session.

Example

# Prohibit a device from establishing any session with peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 ignore

peer ip-prefix

Function

The peer ip-prefix command configures a route filtering policy based on an IP address prefix list for a peer or peer group.

The undo peer ip-prefix command cancels the route filtering policy based on an IP address prefix list of a peer or peer group.

By default, no route filtering policy based on an IP address prefix list is configured for a peer or peer group.

Format

peer { group-name | ipv4-address } ip-prefix ip-prefix-name { import | export }

peer { group-name | ipv4-address | ipv6-address } ipv6-prefix ipv6-prefix-name { import | export }

undo peer { group-name | ipv4-address } ip-prefix [ ip-prefix-name ] { import | export }

undo peer { group-name | ipv4-address | ipv6-address } ipv6-prefix [ ipv6-prefix-name ] { import | export }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ip-prefix ip-prefix-name Indicates the filtering policy that is based on the IPv4 prefix list of the peer or peer group. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
import Applies a filtering policy to the routes received from a peer or peer group. -
export Applies a filtering policy to the routes to be advertised to a peer or peer group. -
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
ipv6-prefix ipv6-prefix-name Indicates the filtering policy that is based on the IPv6 prefix list of the peer or peer group. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view, and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer ip-prefix command can be used to configure a route filtering policy that is based on an IP prefix list to filter routes received or routes to be advertised, implementing route control.

Prerequisites

Peer relationships have been established using the peer as-number command.

If the peer ip-prefix command specifies an IP prefix list that does not exist for a peer or peer group, use the ip ip-prefix or ip ipv6-prefix command to create an IP prefix list.

Precautions

If an IP prefix list is specified for a peer group, all the members of the peer group inherit the configuration.

After an IP prefix list is specified for a peer or peer group, the peer or peers in the peer group filter the routes to be advertised to or received from other peers based on the IP prefix list. Only the routes that pass the filtering of the IP prefix list can be advertised or received.

Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes are advertised to the specified peer, or all routes advertised by the specified peer are accepted.

Example

# Configure a route filtering policy based on an IP prefix list.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 ip-prefix list1 import

peer keychain (BGP)

Function

The peer keychain command configures the keychain authentication for establishing the TCP connection between BGP peers.

The undo peer keychain command restores the default setting.

By default, the keychain authentication is not configured for BGP peers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

peer { group-name | ipv4-address | ipv6-address } keychain keychain-name

undo peer { group-name | ipv4-address | ipv6-address } keychain

Parameters

Parameter Description Value
group-name Specifies the name of a BGP peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a BGP peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a BGP peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
keychain-name Specifies the name of the keychain authentication. The value is a string of 1 to 47 case-insensitive characters. Except the question mark (?) and space. However, when double quotation marks (") are used around the string, spaces are allowed in the string.
NOTE:

If the peer address is an IPv6 address and keychain authentication is configured, the authentication algorithm supports only HMAC-MD5, HMAC-SHA1-12, or HMAC-SHA-256.

ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Configuring keychain authentication improves the security of the TCP connection. You must configure keychain authentication specified for TCP-based applications on both BGP peers. Note that encryption algorithms and passwords configured for the keychain authentication on both peers must be the same; otherwise, the TCP connection cannot be set up between BGP peers and BGP messages cannot be transmitted.

Prerequisites

Peer relationships have been established using the peer as-number command.

Before configuring the BGP keychain authentication, a keychain in accordance with the configured keychain-name must be configured first. For keychain configuration details, see Keychain Configuration in the S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Security.

Precautions

The peer keychain command and the peer password command are mutually exclusive. SHA256 and HMAC-SHA256 encryption algorithms are recommended in keychain authentication.

Example

# Configure the keychain authentication named Huawei for BGP peers.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 keychain Huawei

peer keep-all-routes

Function

The peer keep-all-routes command saves all the BGP routing updates from the specified peer or the peer group after the BGP connection is set up, even though those routes do not pass the configured ingress policy.

The undo peer keep-all-routes command restores the default setting.

By default, only the BGP routing updates received from the peers and passing the configured ingress policy are saved.

Format

peer { group-name | ipv4-address | ipv6-address } keep-all-routes

undo peer { group-name | ipv4-address | ipv6-address } keep-all-routes

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, and BGP-IPv6 unicast address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After changing a BGP import policy, you can reset BGP connections for the new import policy to take effect immediately, interrupting these BGP connections temporarily. If a device's peer does not support route-refresh, the peer keep-all-routes command can be used on the device to remain all routing updates received from the peer so that the device can refresh its routing table without closing the connection with the peer.

Precautions

If the switch does not support the route-refresh capability, the peer keep-all-routes command needs to be run on the switch and its peer. If the peer keep-all-routes command is run on a device for the first time, the sessions between the device and its peers will be reestablished.

If the switch supports the route-refresh capability, running this command does not result in re-establishment of the sessions between the switch and its peers. After the refresh bgp command is run on the switch, however, the switch does not refresh its routing table.

If the switch supports the route-refresh capability, the peer keep-all-routes command does not need to be run on it.

Example

# Configure a device to store all BGP routing updates received from its IPv4 peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 keep-all-routes

peer label-route-capability (BGP)

Function

The peer label-route-capability command enables a BGP device to send labeled routes to a specified peer or peer group.

The undo peer label-route-capability command disables this function.

By default, this function is disabled.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

BGP view and BGP-IPv4 unicast address family view:

peer { group-name | ipv4-address } label-route-capability [ check-tunnel-reachable ]

undo peer { group-name | ipv4-address } label-route-capability

BGP-IPv6 unicast address family view:

peer ipv4-address label-route-capability

undo peer ipv4-address label-route-capability

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
check-tunnel-reachable Checks tunnel reachability when imported routes are sent as labeled routes. -

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

When the capability of sending labeled routes is enabled or disabled, BGP connection is automatically closed and the capability of the neighbor is re-negotiated.

To configure IPv6 provider edge (6PE), specify the peer as an IPv4 unicast address in the IPv6 unicast address family view.

Tunnel reachability checking can only be used to check tunnels on IPv4 public networks.
  • If tunnel reachability checking is enabled, BGP advertises IPv4 unicast routes to peers when routed tunnels are unreachable or advertises labeled routes to peers when routed tunnels are reachable. This eliminates the risk of establishing an MP-EBGP peer relationship between PEs over a faulty label switched path (LSP) because this will cause data forwarding failures.
  • If tunnel reachability checking is disabled, BGP advertises labeled routes to peers whether the tunnels for imported routes are reachable or not.

To disable tunnel reachability checking, run the peer { group-name | ipv4-address } label-route-capability command, not the undo peer label-route-capability command.

Before you run the peer label-route-capability command, the peer as-number command should be used to create a peer or peer group.

Example

# Enable BGP to send the labeled routes.
<HUAWEI> system-view
[HUAWEI] bgp 200
[HUAWEI-bgp] peer 10.2.3.4 as-number 200
[HUAWEI-bgp] ipv6-family
[HUAWEI-bgp-af-ipv6] peer 10.2.3.4 enable
[HUAWEI-bgp-af-ipv6] peer 10.2.3.4 label-route-capability

peer listen-only

Function

The peer listen-only command configures a peer or peer group to only detect connection requests and not to initiatively send connection requests.

The undo peer listen-only command restores the default setting.

By default, a peer or peer group detects and sends connection requests.

Format

peer { group-name | ipv4-address | ipv6-address } listen-only

undo peer { group-name | ipv4-address | ipv6-address } listen-only

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer listen-only command is used to configure a peer or peer group to only detect connection requests and not to initiatively send connection requests.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the peer listen-only command is run multiple times, the latest configuration overwrites the previous one.

After the peer listen-only command is executed, the local end does not initiate any connection request to a specified peer.

The peer listen-only command can be run at only one end of a peer relationship. If this command is run at both ends of a peer relationship, the ends fail to establish a connection.

Example

# Configure peer 10.1.1.1 to only detect connection requests from the remote peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.1 as-number 200
[HUAWEI-bgp] peer 10.1.1.1 listen-only

peer log-change

Function

The peer log-change command enables a BGP device to log the session status and events of a specified peer or a peer group.

The undo peer log-change command disables a BGP device to log the session status and events of a specified peer or a peer group.

By default, a BGP device is enabled to log the session status and events of a specified peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } log-change

undo peer { group-name | ipv4-address | ipv6-address } log-change

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

The peer log-change command can be used to enable a device to log the session status and events of a specified peer or peer group, facilitating service management.

Peer relationships have been established using the peer as-number command.

Example

# Configure a BGP device to log the session status and events of peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 log-change
Related Topics

peer next-hop-invariable

Function

The peer next-hop-invariable command configures PEs in different ASs not to change next hops of routes when the PEs advertise them to their EBGP peers, and configures the PEs to use the next hops of imported IGP routes when the PEs advertise them to their IBGP peers.

The undo peer next-hop-invariable command restores the default setting.

By default, when advertising routes to its EBGP peers and imported IGP routes to IBGP peers, a BGP speaker changes the next hop to its interface address.

Format

peer { ipv4-address | group-name } next-hop-invariable

undo peer { ipv4-address | group-name } next-hop-invariable

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-L2VPN address family view, BGP-VPLS address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the peer next-hop-invariable command is used on a device, the device does not change the next hop of an imported IGP route when advertising the route to its IBGP peers, and does not change the next hop of a route when advertising it to its EBGP peers.

In the inter-AS VPN option C networking where an RR is used, the peer next-hop-invariable command needs to be run to configure the RR not to change the next-hop address of a route when advertising the route to an EBGP peer. This ensures that the remote PE iterates a route to the BGP LSP destined for the local PE during traffic transmission.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Configuration Impact

After the peer next-hop-invariable command is used on a device, the device does not change the next hop of an imported IGP route when advertising the route to its IBGP peers, and does not change the next hop of a route when advertising it to its EBGP peers.

Precautions

The peer next-hop-invariable command configured on EBGP peers takes effect only for VPNv4 and VPNv6 routes.

If a device needs to advertise routes to its IBGP peer or peer group, the peer next-hop-invariable and peer next-hop-local commands are mutually exclusive on the device.

Example

# Configure a BGP device not to change the next hop of a route when the BGP device advertises it to its EBGP peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family vpnv4
[HUAWEI-bgp-af-vpnv4] peer 10.1.1.2 enable
[HUAWEI-bgp-af-vpnv4] peer 10.1.1.2 next-hop-invariable

# Use the next hop of an IGP route when advertising the IGP route to IBGP peers.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 next-hop-invariable

peer next-hop-local

Function

The peer next-hop-local command configures a BGP device to set its IP address as the next hop of routes when the BGP device advertises routes to an IBGP peer or peer group.

The undo peer next-hop-local command restores the default setting.

By default:

  • A BGP router sets its interface IP address as the next-hop address of routes when advertising these routes to an EBGP peer.
  • A BGP router does not change the next-hop address of non-labeled routes if the routes are from an EBGP peer and are to be sent to an IBGP peer. The router sets its interface IP address as the next-hop address of labeled routes if the routes are from an EBGP peer and are to be sent to an IBGP peer.
  • A BGP router does not change the next-hop address of routes if the routes are from an IBGP peer and are to be sent to an IBGP peer.

Format

peer { group-name | ipv4-address | ipv6-address } next-hop-local

undo peer { group-name | ipv4-address | ipv6-address } next-hop-local

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BPG-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-L2VPN address family view, and BGP L2VPN-AD address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view, and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer next-hop-local command is usually run on an autonomous system boundary router (ASBR). By default, when an ASBR forwards a route learned from an EBGP peer to its IBGP peers, the ASBR does not change the next hop of the route. The next-hop address of a route advertised by an EBGP peer is the address of the EBGP peer. After being forwarded to the IBGP peers, the route cannot become an active route because of the unreachable next hop. The peer next-hop-local command needs to be run to configure the ASBR to change the next hop of the route to its IP address when the ASBR advertises the route to an IBGP peer. Therefore, after being forwarded to the IBGP peer, the route can become an active route because the next hop is reachable.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Precautions

The peer next-hop-local command is applicable to IBGP peers.

Regarding non-labeled BGP routes on a public network, running the peer next-hop-local command on a route reflector to change the next hop of BGP routes does not take effect.

Regarding labeled BGP routes, running this command on a route reflector to change the next hop of BGP routes takes effect.

Running this command on a local device to change the next hop of routes imported or aggregated by the local device does not take effect.

If a device needs to advertise routes to its IBGP peer or peer group, the peer next-hop-local and peer next-hop-invariable commands are mutually exclusive on the device.

The peer next-hop-local command can be configured in the L2VPN-AD address family view, but the configuration does not take effect.

This command is not supported on RRs in BGP VPNv6 scenarios. If it is incorrectly configured on an RR in a BGP VPNv6 scenario, traffic will be interrupted.

Example

# Configure a BGP device to set its IP address as the next hop of routes when advertising the routes to peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 next-hop-local

peer out-delay

Function

The peer out-delay command configures a delay for sending Update packets.

The undo peer out-delay command deletes the delay for sending Update packets.

The default delay is 0, indicating that Update packets are sent without a delay.

Format

peer { group-name | ipv4-address | ipv6-address } out-delay delay-value

undo peer { group-name | ipv4-address | ipv6-address } out-delay

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. The value is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
delay-value Specifies the delay for sending Update packets. The value is an integer that ranges from 0 to 3600, in seconds.
  • The ipv4-address parameter applies to the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-VPN instance IPv4 address family view, and BGP L2VPN-AD address family view.

  • The ipv6-address parameter applies to the BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-IPv4 multicast address family view, and BGP L2VPN-AD address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a scenario in which primary and backup routes exist, packets may get lost after traffic switches back to the primary path from the backup path. Use a VPN FRR scenario as an example. PE3 and CE2 connect both to PE1 and PE2. The primary path is PE3 -> PE1 -> CE2, and the backup path is PE3 -> PE2 -> CE2. CE2 uses BGP to communicate with PE1 and PE2. FRR is configured on PE3. If PE1 restarts or the link between PE3 and PE1 is disconnected, traffic switches from the primary path to the backup path. After the primary path recovers, traffic switches back to the primary path. If PE3 completes refreshing forwarding entries before PE1 does so, PE1 may temporarily fail to forward traffic received from PE3, and packet loss may occur. The severity of packet loss is proportional to the number of routes stored on PE1.

To solve this problem, run the peer out-delay command on the PE1 to configure a delay for sending Update packets. An appropriate delay ensures that traffic switches back to the primary path after PE1 completes refreshing forwarding entries.

Precautions

If you run the peer out-delay command repeatedly, the latest configuration overrides the previous configurations.

If the peer out-delay and peer route-update-interval commands are both configured, only the peer out-delay command takes effect.

If a network has high route convergence requirements, do no use the peer out-delay command.

Example

# In the BGP view, configure the delay for sending Update packets to 10.1.1.1 as 300s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.1 out-delay 300

peer password

Function

The peer password command enables a BGP device to implement MD5 authentication for BGP messages exchanged during the establishment of a TCP connection with a peer.

The undo peer password command restores the default setting.

By default, a BGP device does not perform MD5 authentication for BGP messages exchanged during the establishment of a TCP connection with a peer.

Format

peer { group-name | ipv4-address | ipv6-address } password { cipher cipher-password | simple simple-password }

undo peer { group-name | ipv4-address | ipv6-address } password

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
cipher cipher-password Specifies a cipher text password. The value is a string of case-sensitive characters without spaces. When the value is displayed in plaintext, its length ranges from 1 to 255. When the value is displayed in ciphertext, its length ranges from 20 to 392.
simple simple-password Specifies a plain text password.
NOTICE:

If simple is selected, the password is saved in the configuration file in plain text. This brings security risks. It is recommended that you select cipher to save the password in cipher text.

The value is a string of 1 to 255 case-sensitive characters, without spaces.
  • ipv4-address is valid only in the BGP view, BGP-VPN instance IPv4 address family view, and BGP-VPN instance IPv6 address family view.
  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP uses TCP as the transport layer protocol. To enhance BGP security, MD5 authentication can be implemented for BGP packets exchanged during the establishment of a TCP connection. MD5 authentication sets the MD5 authentication password for the TCP connection, and the authentication is performed by TCP.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

After the peer password command is run, if the MD5 authentication fails, no TCP connection is established.

MD5 authentication and keychain authentication are mutually exclusive on a peer.

After the peer password command is run on a device to enable MD5 authentication, the device will re-establish the peer relationship with its peer.

Example

# Configure authentication for the TCP connection between a device and peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 password cipher huawei

peer preferred-value

Function

The peer preferred-value command sets a preferred value for the routes that a BGP device learns from its peer.

The undo peer preferred-value command restores the default preferred value for the routes that a BGP device learns from its peer.

By default, the preferred value of a route learned from a BGP peer is 0.

Format

peer { group-name | ipv4-address | ipv6-address } preferred-value value

undo peer { group-name | ipv4-address | ipv6-address } preferred-value

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
value Specifies the preferred value of the routes that a BGP device learns from its peer. The value is an integer that ranges from 0 to 65535.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP L2VPN-AD address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the peer preferred-value command is run, all the routes learned from the specified peer have the preferred value. If there are multiple routes to the same address prefix, the route with the highest preferred value is preferred.

Prerequisites

A BGP peer has been configured. If the peer preferred-value command is used but no BGP peer exists, a message is displayed, indicating that the peer does not exist.

Precautions

If a preferred value is set for the routes that a BGP device learns from a peer group, all members of the peer group inherit the configuration.

Example

# Set the preferred value to 50 for the routes that a BGP device learns from a specified peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 preferred-value 50

peer public-as-only

Function

The peer public-as-only command configures the AS-Path attribute in a BGP Update packet not to carry the private AS number. Only the public AS number is contained in the update packets.

The undo peer public-as-only command restores the default setting.

By default, the AS-Path attribute in a BGP Update packet is allowed to carry private AS numbers.

Format

peer { group-name | ipv4-address | ipv6-address } public-as-only [ force ]

undo peer { group-name | ipv4-address | ipv6-address } public-as-only

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
force

In the following two cases, BGP does not delete the private AS number after the command is used:

  • The AS_Path of a route contains the AS number of the peer. In this case, deleting the private AS numbers may lead to a routing loop.

  • The AS_Path list contains both public network AS numbers and private AS numbers, indicating that the route has passed through the public network. Deleting the private AS numbers may lead to a forwarding error.

To enable the device to delete the private AS numbers from the AS_Path attribute before sending update packets even in the preceding scenarios, specify force in the command.

-
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP L2VPN-AD address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In general, an AS number ranges from 1 to 4294967295. The public AS number ranges from 1 to 64511, and 65536 (1.0 in the format of x.y) to 4294967295 (65535.65535 in the format of x.y), and the private AS number ranges from 64512 to 65534. 65535 is used as the reserved AS number in certain circumstances.

Public AS numbers can be used on the Internet. Private AS numbers cannot be advertised to the Internet, and they are used only within ASs. If private AS numbers are advertised to the Internet, a routing loop may occur. After this command is configured, if the AS path attribute contains only private AS numbers, BGP deletes the private AS numbers and then advertises these update routes.

BGP does not delete private AS numbers in either of the following scenarios if the peer public-as-only command is run, without any parameter following public-as-only specified:
  • The AS_Path attribute of a route carries the AS number of the remote peer. In this case, deleting private AS numbers may lead to a routing loop.

  • The AS_Path attribute carries both public and private AS numbers, which indicates that the route has passed through the public network. In this case, deleting private AS numbers may lead to a traffic forwarding error.

Prerequisites

Peer relationships have been established using the peer as-number command.

Example

# Configure a device to remove all private AS numbers from the AS_Path attribute when sending a BGP Update packet to its peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 public-as-only

peer reflect-client

Function

The peer reflect-client command configures the local device as the route reflector and the peer or peer group as the client of the route reflector.

The undo peer reflect-client command restores the default setting.

By default, the route reflector and its client are not configured.

Format

peer { group-name | ipv4-address | ipv6-address } reflect-client

undo peer { group-name | ipv4-address | ipv6-address } reflect-client

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, and BGP L2VPN-AD address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Full-meshed connections need to be established between IBGP peers to ensure the connectivity between the IBGP peers. If there are n switches in an AS, n*(n-1)/2 IBGP connections need to be established. A large number of IBGP peers use a lot of network and CPU resources. An RR can be used to solve the problem.

In an AS, one switch functions as an RR and other switches function as clients. The clients establish IBGP connections with the RR. The RR and its clients form a cluster. The RR reflects routes among the clients, and therefore the clients do not need to establish any IBGP connection. Assume that an AS has n devices. If one of the devices functions as a RR, and other devices function as clients, the number of IBGP connections to be established is n-1. This means that network and CPU resources are greatly reduced.

An RR is easy to configure, because it needs to be configured only on the device that functions as a reflector and clients do not need to know that they are clients.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

The device where the peer reflect-client command is run serves as the RR and a specified peer or peer group serves as the client of the RR.

The peer reflect-client command can be only used between IBGP peers or IBGP peer groups.

reflect-client configured in an address family is valid in this family address and cannot be inherited by other address families. Configuring reflect-client in a specified address family is recommended.

Example

# Configure a peer as a client of an RR.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 reflect-client

peer route-limit

Function

The peer route-limit command sets the maximum number of routes that can be received from a peer.

The undo peer route-limit command restores the default setting.

By default, there is no limit on the number of routes that can be received from a peer.

Format

peer { group-name | ipv4-address | ipv6-address } route-limit limit [ percentage ] [ alert-only | idle-forever | idle-timeout minutes ]

undo peer { group-name | ipv4-address | ipv6-address } route-limit

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
limit Specifies the maximum number of routes that can be received from a peer. -
percentage Specifies the percentage of received routes when the switch starts to generate alarms. The value is an integer that ranges from 1 to 100. The default value is 75.
alert-only Indicates that if the number of received routes exceeds the limit, an alarm will be generated and no additional routes will be accepted. -
idle-forever Indicates that after the number of routes exceeds the limit, no connection is established automatically until the reset bgp command is run. -
idle-timeout minutes Specifies the value of the timeout timer. The connection, which is closed because the number of routes exceeds the threshold, is automatically reestablished after the timeout timer expires. Before the timer expires, the reset bgp command can be used to re-establish a connection. The value is an integer that ranges from 1 to 1200, in minutes.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP L2VPN-AD address family, BGP-L2VPN address family view, BGP-VPLS address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view, BGP-L2VPN address family view, BGP-VPLS address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer route-limit command is used to set the maximum number of routes that a BGP switch is allowed to receive from its peer. This provides a mechanism for controlling the routes received from peers in addition to distribution lists, filtering lists, and route mappings.

If a peer relationship between two devices is in the Established state, the following situations occur:
  • If the number of routes received by the switch exceeds the upper limit and the peer route-limit command is used for the first time, the switch and its peer re-establish the peer relationship, regardless of whether alert-only is set.

  • If the upper limit set on the switch is increased to be greater than the number of received routes, the switch sends Refresh packets to receive routes again. If the switch does not support the route-refresh capability, the switch needs to re-establish the connection with its peer.

  • If the upper limit set on the switch is reduced but is still greater than the number of received routes, only configuration parameters need to be modified.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the peer route-limit command is run for a peer group, the peers of the peer group inherit the configuration.

If the peer relationship is in the Idle state because the number of received routes exceeds the upper limit and idle-forever or idle-timeout is set, the reset bgp command can be used to re-establish the peer relationship.

Assume that none of alert-only, idle-forever, and idle-timeout is configured. If the number of routes exceeds the upper limit, an alarm is generated and recorded in the log. Then, the peer relationship is disconnected. The devices try to re-establish the peer relationship after 30 seconds.

Example

# Set the maximum number of routes that can be received from a peer to 5000.
<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 route-limit 5000
Related Topics

peer route-policy

Function

The peer route-policy command specifies a route-policy for filtering routes received from a peer or peer group or routes to be advertised to a peer or peer group.

The undo peer route-policy command restores the default setting.

By default, no route-policy is configured for filtering routes received from a peer or peer group or routes to be advertised to a peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } route-policy route-policy-name { import | export }

undo peer { group-name | ipv4-address | ipv6-address } route-policy route-policy-name { import | export }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
route-policy-name Specifies the name of a route-policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
import Applies a route-policy to routes to be imported from a peer or peer group. -
export Applies a route-policy to routes to be advertised to a peer or peer group. -
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, and BGP L2VPN-AD address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a route-policy is created, the peer route-policy command is used to apply a Route-Policy to a peer or a peer group so that the routes advertised to or received from the peer or peer group can be controlled. To be specific, only the necessary routes are received from or advertised to the peer or peer group. In this manner, route management is implemented, the scale of the routing table is reduced, and fewer network resources are consumed.

Prerequisites

Peer relationships have been established using the peer as-number command.

If the peer route-policy command specifies a route-policy that does not exist, use the route-policy command to create the route-policy.

Precautions

Currently, the peer route-policy command cannot be used to apply a route-policy to set preferences for BGP routes.

The preference command cannot configure the preference for routes imported using the network command or the import-route command. The preference for these routes is 0.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, the configured priority is set for all routes; if no priority is configured, the default priority is set for the routes.

Example

# Apply a route-policy named test-policy to the routes received from a peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 route-policy test-policy import

peer route-update-interval

Function

The peer route-update-interval command sets the interval at which a device sends routing updates carrying the same prefix to a peer or peer group.

The undo peer route-update-interval command restores the default setting.

By default, the interval at which routing updates are sent to IBGP peers is 15s, and the interval at which routing updates are sent to EBGP peers is 30s.

Format

peer { group-name | ipv4-address | ipv6-address } route-update-interval interval

undo peer { group-name | ipv4-address | ipv6-address } route-update-interval

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
interval Specifies the minimum interval at which routing updates are sent. The value is an integer that ranges from 0 to 600, in seconds.
  • group-name is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, and BGP-VPN instance IPv6 address family view.

  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view,BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When routes change, the switch sends routing updates to notify its peers. If a route changes frequently, the peer route-update-interval command can be used to adjust the interval at which Update packets are sent for changes of this route. This frees the switch from sending Update packets for every route change.

Prerequisites

If the peer route-update-interval command is used but no peer exists, a message is displayed, indicating that the peer does not exist.

Precautions

If a route is withdrawn or added, the switch immediately sends an Update message to its peers, regardless of the peer route-update-interval configuration. If a route is added and the interval between the last route addition time and the current route addition time is greater than the interval configured using the peer route-update-interval command, the switch immediately sends an Update message to its peers. If a route is added and the interval between the last route addition time and the current route addition time is less than the interval configured using the peer route-update-interval command, the switch sends an Update message to its peers only after the configured interval expires.

Example

# Set the interval at which routing updates are sent to a peer to 10s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 route-update-interval 10

peer timer

Function

The peer timer command sets the Keepalive timer and Hold timer for a peer or peer group.

The undo peer timer command restores the default values of the Keepalive timer and Hold timer.

By default, the value of a Keepalive timer is 60s and the value of a Hold timer is 180s.

Format

peer { group-name | ipv4-address | ipv6-address } timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

undo peer { group-name | ipv4-address | ipv6-address } timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

undo peer { group-name | ipv4-address | ipv6-address } timer keepalive hold [ min-holdtime ]

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
keepalive-time Specifies the Keepalive period. The value is an integer that ranges from 0 to 21845, in seconds.
hold-time Specifies the holdtime. The value is an integer that can be 0, or ranges from 3 to 65535, in seconds.
NOTE:

Setting the hold interval of a BGP peer or peer group to be longer than 20s is recommended. If the hold interval of a BGP peer or peer group is shorter than 20s, the session may be closed.

min-holdtime min-holdtime Specifies the minimum Holdtime configured on the local device.
NOTE:

The value of min-holdtime configured cannot exceed the value of hold-time.

The value is an integer that ranges from 20 to 65535, in seconds.
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After establishing a BGP connection, two peers send Keepalive messages periodically to each other to detect the status of the BGP connection. If a device receives no Keepalive message or any other types of packets from its peer within the holdtime, the device considers the BGP connection closed, and it closes the BGP connection.

When the peers set up a connection, the values of keepalive-time and hold-time are determined by negotiations between the peers. Each of the two peers sends the other an Open packet containing hold-time. The smaller of the hold-time values contained in the Open packets from both peers is used. The smaller of the locally configured keepalive-time value and one third of the negotiated hold-time value is used as the actual keepalive-time value.

The peer timer command is used to set the Keepalive period and holdtime.

  • If short Keepalive period and holdtime are set, BGP can detect a link fault quickly and implement link switching. The number of Keepalive messages on the network, however, is increased. This increases device loads and consumption of network bandwidth resources.

  • If long Keepalive period and holdtime are set, the number of Keepalive messages on the network is reduced. This reduces device loads. If, however, the Keepalive period is too long, BGP is unable to detect link status changes in a timely manner, causing many packets to be lost.

If the local device establishes BGP peer relationships with many devices, it needs to process huge BGP messages. If hold-time negotiated among BGP peers is small, the timer may expire before the local device processes the Keepalive messages sent from other BGP peers. The peer relationships are then interrupted, and routes flap. To solve the preceding problem, you can configure an appropriate value for min-holdtime min-holdtime based on the CPU processing capability of the local device.

If the value of min-holdtime is changed, but the values of keepalive-time and hold-time negotiated between two BGP peers remain unchanged, the established peer relationship is not affected. Only when the local device attempts to re-establish a relationship with a remote device, the value of min-holdtime configured on the local device takes effect. The local device compares min-holdtime with hold-time sent from the remote device. If the value of min-holdtime exceeds that of hold-time, hold-time negotiation fails, and the peer relationship fails to be established.

If min-holdtime is configured on the local device, and the value of hold-time sent from the remote device is 0, hold-time negotiation between the two devices succeeds. The negotiated value of hold-time is 0, and the peer relationship is established. The value 0 of hold-time indicates that the peer relationship never expires.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the value of a timer changes, the BGP peer relationship between devices will be disconnected. This is because the devices need to re-negotiate the values of keepalive-time and hold-time. Therefore, exercise caution before changing the value of a timer.

The Keepalive period must be at least three times of the holdtime.

When setting the values of keepalive-time and hold-time, note the following points:

  • The values of keepalive-time and hold-time cannot both be set to 0. This renders the BGP timers invalid. BGP is unable to detect link faults using the timers.

  • The hold-time value cannot be significantly greater than the keepalive-time value. A setting of timer keepalive 1 hold 65535, for example, would be improper. If the holdtime is too long, link faults cannot be detected in a timely manner.

The Keepalive period and Holdtime can be configured globally, or on a particular peer or peer group. The Keepalive period and Holdtime configured on a specific peer or peer group take precedence over the global Keepalive period and Holdtime. Using this command can still change the Keepalive period and Holdtime configured on a peer or peer group, although they were globally configured through the timer command.

Example

# Set the Keepalive timer and Hold timer for peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200 
[HUAWEI-bgp] peer 10.1.1.2 timer keepalive 10 hold 30
Related Topics

peer tnl-policy

Function

The peer tnl-policy command applies the tunnel policy to the specified IPv4 peer.

The undo peer tnl-policy command removes the tunnel policy applied to the peer.

By default, no tunnel policy is applied to the peer.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

peer ipv4-address tnl-policy tnl-policy-name

undo peer ipv4-address tnl-policy

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of the peer. -
tnl-policy-name Specifies the name of the tunnel policy. The name is a string of 1 to 39 characters. It is case-sensitive.

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

When you configure the 6PE to support the tunnel, you need to configure the tunnel policy and apply the tunnel policy by using the command.

Before you configure the peer tnl-policy command, the peer as-number command should be used to create a peer or peer group.

Example

# Apply the tunnel policy to the specified peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 100
[HUAWEI-bgp] ipv6-family unicast
[HUAWEI-bgp-af-ipv6] peer 10.1.1.2 enable
[HUAWEI-bgp-af-ipv6] peer 10.1.1.2 tnl-policy policy-a

peer timer connect-retry

Function

The peer timer connect-retry command sets a ConnectRetry interval for a peer or peer group.

The undo peer timer connect-retry command restores the default setting.

By default, the ConnectRetry interval is 32s.

Format

peer { group-name | ipv4-address | ipv6-address } timer connect-retry connect-retry-time

undo peer { group-name | ipv4-address | ipv6-address } timer connect-retry

Parameters

Parameter Description Value
group-name Specifies the name of a BGP peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies an IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies an IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
connect-retry-time Specifies a ConnectRetry interval. The value ranges from 1 to 65535, in seconds.
  • ipv4-address can be set only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view.

Views

BGP view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When BGP initiates a TCP connection, the ConnectRetry timer is stopped if the TCP connection is established successfully. If the first attempt to establish a TCP connection fails, BGP tries again to establish the TCP connection after the ConnectRetry timer expires. The ConnectRetry interval can be adjusted as needed.
  • The ConnectRetry interval can be reduced in order to lessen the time BGP waits to retry establishing a TCP connection after the first attempt fails.
  • To suppress route flapping caused by constant peer flapping, the ConnectRetry interval can be increased to accelerate route convergence.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Precautions

A ConnectRetry interval can be configured globally, or on a particular peer or peer group. A ConnectRetry interval configured on a specific peer or peer group takes precedence over a global ConnectRetry interval.
  • If both the peer { ipv4-address | ipv6-address } timer connect-retry connect-retry-time command and the peer group-name timer connect-retry connect-retry-time command are run on a device, the configuration of the peer { ipv4-address | ipv6-address }timer connect-retry connect-retry-time command takes effect, but the configuration of the peer group-name timer connect-retry connect-retry-time command does not.

  • If both the peer { group-name | ipv4-address | ipv6-address } timer connect-retry connect-retry-time command and the timer connect-retry connect-retry-time command are run on a device, the configuration of the peer { group-name | ipv4-address | ipv6-address } timer connect-retry connect-retry-time command takes effect, but the configuration of the timer connect-retry connect-retry-time command does not.

Example

# Set the ConnectRetry interval to 60s for peer 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 timer connect-retry 60
Related Topics

peer tracking

Function

The peer tracking command enables BGP peer tracking.

The undo peer tracking The command restores the interval between peer unreachability discovery and connection interruption to the default value (9s).

The peer tracking disable command disables BGP peer tracking.

The undo peer tracking disable command enables BGP peer tracking. The default interval between peer unreachability discovery and connection interruption is 9s.

By default, BGP peer tracking is enabled, and the interval between peer unreachability discovery and connection interruption is 9s.

Format

peer { group-name | ipv4-address | ipv6-address } tracking [ delay delay-time ]

undo peer { group-name | ipv4-address | ipv6-address } tracking

peer { group-name | ipv4-address | ipv6-address } tracking disable

undo peer { group-name | ipv4-address | ipv6-address } tracking disable

Parameters

Parameter Description Value
group-name Specifies the name of a BGP peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a BGP peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a BGP peer. The address is a 32-digit hexadecimal number in the X:X:X:X:X:X:X:X format.
delay delay-time Indicates the interval between when BGP detects the peer unreachable and when BGP tears down the corresponding connection. The value is an integer that ranges from 0 to 65535, in seconds. The default value is 0 seconds.
  • ipv4-address can be set only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address can be set only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a network where BFD is unsuitable to be deployed, you can configure BGP peer tracking on the local device to implement fast network convergence by rapidly detecting the unreachable state of the peer.

A proper value of delay-time can ensure network stability when a peer is detected unreachable.

  • If delay-time is set to 0, BGP immediately tears down the connection between the local device and its peer after the peer is detected unreachable.

  • If IGP route flapping occurs and delay-time for an IBGP peer is set to 0, the peer relationship between the local device and the peer alternates between Up and Down. Therefore, delay-time for an IBGP peer should be set to a value greater than the actual IGP route convergence time.

  • When BGP neighbors successfully perform the GR negotiation, the active/standby switchover occurs on the BGP neighbors, to prevent the failure of GR, delay-time should be set to a value greater than GR convergence time. If delay-time is set to be smaller than the GR convergence time, the connection between the local device and the BGP peer will be torn down, which leads to the failure of GR.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Precautions

IGP is configured with GR, and the BGP neighbor relationship is established based on IGP routes. In such a situation, when a node fails on the network and the master/slave switchover occurs on the node, IGP does not delete the routes from the node, and BGP neighbors cannot sense the fault on the node. Therefore, the BGP peer tracking function does not take effect.

Example

# Configure BGP peer tracking.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 tracking delay 20

peer valid-ttl-hops

Function

The peer valid-ttl-hops command applies the GTSM function on the peer or peer group.

The undo peer valid-ttl-hops command cancels the application of the GTSM function on the peer or peer group.

By default, the GTSM function on the peer or peer group is not configured.

Format

peer { group-name | ipv4-address | ipv6-address } valid-ttl-hops [ hops ]

undo peer { group-name | ipv4-address | ipv6-address } valid-ttl-hops

Parameters

Parameter Description Value
group-name Specifies the name of the peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
hops Specifies the number of TTL hops to be checked. The value is an integer that ranges from 1 to 255. The default value is 255. If the value is configured as hops, the valid TTL range of the detected packet is [255 - hops + 1, 255].
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.
  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To protect a device against the attacks of forged BGP packets, you can configure GTSM to check whether the TTL value in the IP packet header is within the specified range.

Prerequisites

Before configuring GTSM for a peer group, run the peer group command to add peers to the peer group.

Precautions

When the undo peer valid-ttl-hops command is run and no parameter is specified, all the GTSM configurations on a peer or a peer group are deleted.

The configuration in the BGP view is also valid for the extension of MP-BGP. This is because they use the same TCP connection.

The GTSM configurations are symmetrical, that is, GTSM must be enabled on both ends of the BGP connection at the same time.

  • GTSM and EBGP-MAX-HOP are mutually exclusive because both of them affect the TTL of the sent BGP packet. Therefore, the two functions cannot be enabled on a peer or peer group simultaneously.

  • If GTSM is enabled on two directly connected EBGP peers, the fast sensing function is invalid on the interfaces directly connecting the two EBGP peers. This is because BGP considers the EBGP peers indirectly connected when GTSM is enabled on the EBGP peers.

Example

# Configure the GTSM function for the peer.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] peer 10.1.1.2 valid-ttl-hops 1

# Configure the GTSM function for the peer group.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group gtsm-group external
[HUAWEI-bgp] peer gtsm-group valid-ttl-hops 1
Related Topics

preference (BGP)

Function

The preference command configures the protocol preferences for external routes, internal routes, aggregated routes, and crossed routes.

The undo preference command restores the default protocol preferences.

By default, the protocol preferences of external routes, internal routes, aggregated routes, and crossed routes are all 255.

Format

preference { external internal local | route-policy route-policy-name }

preference external internal local route-policy route-policy-name

undo preference

Parameters

Parameter Description Value
external

Specifies the protocol preference for external routes. An external route is the optimal route learned from an EBGP peer outside the local AS.

The value is an integer that ranges from 1 to 255. The smaller the value is, the higher the preference is.
internal

Specifies the protocol preference for internal routes. An internal route is a route learned from an IBGP peer inside the local AS.

The value is an integer that ranges from 1 to 255. The smaller the value is, the higher the preference is.
local
Specifies the protocol preference for aggregated and crossed routes. This parameter takes effect for the following routes:
  • Manually summarized routes generated using the aggregate (BGP) command
  • Automatically summarized routes generated using the summary automatic command
  • Routes generated through remote route cross
  • Routes generated through local route cross
For details about these routes, see Precautions.
The value is an integer that ranges from 1 to 255. The smaller the value is, the higher the preference is.
route-policy route-policy-name Specifies the name of a route-policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Running the preference command to set protocol preferences for BGP routes affects route selection among BGP routes and routes of other routing protocols.

After a route-policy is configured on a device, the device sets preferences only for the routes received from peers, which meet the matching rules. The routes that do not meet the rules use the default preference.

The smaller the preference value, the higher the preference.

Different protocol preferences can be configured for BGP routes in different address family views.

If both external internal local and route-policy route-policy-name are specified in the command, the priority of the routes that match the route-policy is set based on the route-policy, and the priorities of other routes are set based on the external internal local configuration.

Prerequisites

Create the route-policy first if the preference command uses the route-policy to set preferences.

Perform the following steps when the route-policy is used to set preferences:

  • Use the route-policy command to create the route-policy, and enter the route-policy view.

  • Configure the if-match clause to set the matching rules for routes. The relationship between the if-match clauses in a node of a route-policy is "AND". A route must match all the rules before the action defined by the apply clause is taken. If no if-match clause is specified, all routes will match the node in the route-policy.

  • Use the apply preference command to set preferences for routes that pass the filtering.

Precautions

  • Currently, the peer route-policy command cannot be used to apply a route-policy to set preferences for BGP routes.

  • The preference command cannot configure the preference for routes imported using the network command or the import-route command. The preference for these routes is 0.

  • Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, the configured priority is set for all routes; if no priority is configured, the default priority is set for the routes.

  • In this command, the local parameter specifies the protocol preference for aggregated routes and crossed routes. This parameter takes effect for the following routes:
    • Manually aggregated routes generated using the aggregate (BGP) command. The Route type field for this type of route displays Aggregated route. For example:
      <HUAWEI> display bgp routing-table 10.0.0.0
       BGP local router ID : 192.168.2.4
       Local AS number : 200
       Paths:   1 available, 1 best, 1 select
       BGP routing table entry information of 10.0.0.0/8:
       Aggregated route
       Route Duration: 04h50m46s
       Direct Out-interface: NULL0
       Original nexthop: 127.0.0.1
       Qos information : 0x0
       AS-path {65001 10 100}, origin incomplete, pref-val 0, valid, local, best, select, active, pre 255
       Aggregator: AS 200, Aggregator ID 192.168.2.4, Atomic-aggregate
       Advertised to such 3 peers:
          10.1.7.2
          172.16.1.2
          192.168.1.2
      ...
    • Automatically aggregated routes generated using the summary automatic command. The route type for these routes displays Summary automatic route. For example:
      <HUAWEI> display bgp routing-table 10.0.0.0
       BGP local router ID : 192.168.2.4
       Local AS number : 200
       Paths:   1 available, 1 best, 1 select
       BGP routing table entry information of 10.0.0.0/8:
       Summary automatic route
       Route Duration: 04h50m46s
       Direct Out-interface: NULL0
       Original nexthop: 127.0.0.1
       Qos information : 0x0
       AS-path {65001 10 100}, origin incomplete, pref-val 0, valid, local, best, select, active, pre 255
       Aggregator: AS 200, Aggregator ID 192.168.2.4, Atomic-aggregate
       Advertised to such 3 peers:
          10.1.7.2
          172.16.1.2
          192.168.1.2
      ...
    • Routes generated through remote route cross. The route type for these routes displays Remote-Cross route. For example:
      [HUAWEI-diagnose] display bgp vpnv4 vpn-instance vrf routing-table 172.16.17.161
      
      BGP local router ID : 10.17.0.17
      Local AS number : 100
      
      VPN-Instance vrf, Router ID 10.17.0.17:
      Paths:   1 available, 1 best, 1 select
      BGP routing table entry information of 172.16.17.161/32:
      Remote-Cross route
      Label information (Received/Applied): 155665/NULL
      From: 10.216.0.1 (10.17.0.9)
      Route Duration: 3d04h26m28s 
       Relay Tunnel Out-Interface: Vlanif100
      Relay token: 0x24e7
      Relay Tunnel Key: 7
      Original nexthop: 10.216.0.1
      Qos information : 0x0
      Ext-Community:RT <10 : 10>
      AS-path 100, origin incomplete, localpref 150, pref-val 1, valid, internal, best, select, active, pre 255, IGP cost 1
      ...
    • Routes generated through local route cross. The route type for these routes displays Local-Cross route. For example:
      [HUAWEI-diagnose] display bgp vpnv4 vpn-instance vrf1 routing-table 10.2.2.0
                                                                                                                                          
       BGP local router ID : 10.1.1.1                                                                                                      
       Local AS number : 100                                                                                                              
                                                                                                                                          
       VPN-Instance vrf1, Router ID 10.1.1.1:                                                                                               
       Paths:   1 available, 1 best, 1 select                                                                                             
       BGP routing table entry information of 10.2.2.0/24:                                                                                
       Local-Cross route(via VPN-Instance vrf2)                                                                                           
       Route Duration: 00h26m00s                                                                                                          
       Direct Out-interface: Vlanif40                                                                                                     
       Original nexthop: 10.2.2.2                                                                                                         
       Qos information : 0x0                                                                                                              
       Ext-Community:RT <100 : 1>                                                                                                         
       AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, active, pre 255
      ...

Example

# Set the protocol preference to 2 for external routes, 2 for internal routes, and 20 for aggregated routes and crossed routes.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] preference 2 2 20

reflect between-clients

Function

The reflect between-clients command enables route reflection among clients.

The undo reflect between-clients command disables route reflection among clients.

By default, route reflection among clients is enabled.

Format

reflect between-clients

undo reflect between-clients

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On some networks, if the clients of an RR establish full-mesh connections with each other, they can directly exchange routing information. Route reflection among clients is unnecessary. The undo reflect between-clients command can be used to prohibit the clients from reflecting routes to each other to reduce costs.

Prerequisites

An RR has been configured.

Precautions

The reflect between-clients command is run only on RRs.

Example

# Disable route reflection among fully-meshed clients.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] group rr-client internal
[HUAWEI-bgp] peer 10.1.2.1 group rr-client
[HUAWEI-bgp] peer 10.1.3.1 group rr-client
[HUAWEI-bgp] peer 10.1.4.1 group rr-client
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer rr-client reflect-client
[HUAWEI-bgp-af-ipv4] undo reflect between-clients

reflect change-path-attribute

Function

The reflect change-path-attribute command enables an route-reflector (RR) to modify the route attributes of BGP routes using the export policy.

The undo reflect change-path-attribute command disables an RR from modifying the route attributes of BGP routes using the export policy.

By default, an RR is disabled from modifying route attributes of BGP routes using the export policy.

Format

reflect change-path-attribute

undo reflect change-path-attribute

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Using an RR to modify route attributes may cause route loops. According to RFC 4456, you cannot enable an RR to modify the route attributes using the export policy. So an RR is disabled from modifying route attributes using the export policy by default.

To re-plan the network traffic, run the reflect change-path-attribute command to enable the RR to modify the route attributes using the export policy. After the command is run, the following configurations take effect.

After the undo reflect change-path-attribute command is used, the previous configurations on the RR do not take effect.

Precautions

Export policies on the RR do not take effect before the reflect change-path-attribute command is run. After the reflect change-path-attribute command is run, these configurations may take effect and affect BGP route selection. Exercise caution when using this command.

For example, peer relationships are established between Switch A(10.1.1.1) and Switch B(10.1.1.2), and Switch A functions as an RR. If two configurations are on SwitchA:
  1. [HUAWEI] bgp 65001
    [HUAWEI-bgp] peer 10.1.1.2 next-hop-local
  2. [HUAWEI] route-policy aa permit node 10
    [HUAWEI-route-policy] apply ip-address next-hop 10.3.3.3
    [HUAWEI-route-policy] quit
    [HUAWEI] bgp 65001
    [HUAWEI-bgp] peer 10.1.1.2 route-policy aa export
Then:
  • Before the reflect change-path-attribute command is run, the former configuration takes effect but the latter does not. After A receives routes information from its IBGP peers, it reflects the information to Switch B, and changes the next hop to 10.1.1.1.

  • After the reflect change-path-attribute command is run, the latter configuration takes effect but the former does not. After A receives routes information from its IBGP peers, it reflects the information to Switch B, and changes the next hop to 10.3.3.3.

After you enable the reflect change-path-attribute command on the RR, the peer route-policy export command takes precedence over the peer next-hop-invariable and peer next-hop-local.

Example

# Enable the RR to modify the route attributes of the BGP routes by using the export policy.

<HUAWEI> system-view
[HUAWEI] bgp 65001
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] reflect change-path-attribute

reflector cluster-id

Function

The reflector cluster-id command sets a cluster ID for an RR.

The undo reflector cluster-id command restores the default setting.

By default, each RR uses its router ID as the cluster ID.

Format

reflector cluster-id cluster-id

undo reflector cluster-id

Parameters

Parameter Description Value
cluster-id Specifies the cluster ID of an RR. The value can be an integer that ranges from 1 to 4294967295 or in the format of an IPv4 address.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-VPLS address family view, BGP-L2VPN address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Sometimes, more than one RR needs to be configured in a cluster to improve network reliability and prevent single-point failures. If a cluster has more than one RR, the reflector cluster-id command needs to be used to set the same cluster ID for the RRs. This helps to identify the cluster and avoid routing loops.

Configuring an RR allows IBGP peers to advertise routes learned in the local AS to each other. The Cluster_List attribute is introduced to avoid loops within an AS. The Cluster_List is composed of a series of Cluster_IDs. It records all the RRs through which a route passes.

Precautions

If the reflector cluster-id command is run several times, the latest configuration overrides the previous one.

The reflector cluster-id command is run only on RRs.

To enable clients to receive routes reflected by RRs, ensure that the cluster ID of the RRs is different from the router ID of any client. If the cluster ID of the RRs is the same as the router ID of a client, the client will discard received routes.

Example

# Configure the cluster ID to 50 for the switch, which is an RR in a cluster.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] reflector cluster-id 50

refresh bgp

Function

The refresh bgp command softly resets a BGP connection.

Format

refresh bgp [ vpn-instance vpn-instance-name ipv4-family | vpnv4 ] { all | ipv4-address | group group-name | external | internal } { export | import } (The vpnv4 is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI)

refresh bgp ipv6 { all | group group-name | ipv4-address | ipv6-address | external | internal } { export | import } (The ipv4-address is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI)

refresh bgp vpnv6 { all | ipv4-address | group group-name | external | internal } { export | import } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

refresh bgp vpn-instance vpn-instance-name ipv6-family { all | ipv6-address | group group-name | external | internal } { export | import } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

refresh bgp l2vpn-ad { ipv4-address | all | group group-name | internal | external } { import | export } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpn-instance vpn-instance-name ipv4-family Softly resets the connection of a specified VPN instance enabled with an IPv4 address family. The value must be an existing VPN instance name.
vpnv4 Softly resets the BGP connections in a VPNv4 address family. -
all Softly resets all the BGP IPv4 connections. -
ipv4-address Specifies the IPv4 address of a BGP peer. It is in dotted decimal notation.
group group-name Specifies the name of a BGP peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
external Softly resets EBGP connections. -
internal Softly resets IBGP connections. -
export Triggers outbound soft resetting. -
import Triggers inbound soft resetting. -
ipv6 Softly resets BGP4+ connections. -
ipv6-address Specifies the IPv6 address of a BGP4+ peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
vpnv6 Softly resets the BGP connections in a VPNv6 address family. -
vpn-instance vpn-instance-name ipv6-family Resets the connection of a specified VPN instance enabled with an IPv6 address family. The value must be an existing VPN instance name.
l2vpn-ad Softly resets the BGP connections related to L2VPN-AD. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a device's peer supports route-refresh, the refresh bgp command can be used on the device to softly reset the BGP connection with the peer. BGP soft resetting can be used to refresh the BGP routing table and apply new routing policies, without closing any BGP connection.

Prerequisites

Configuring BGP soft resetting requires that the peers support the route-refresh capability.

Precautions

Assume that a device supports route-refresh and is configured with the peer keep-all-routes command. After the refresh bgp command is run on the device, the device does not refresh its routing table.

Example

# Perform inbound soft resetting for all BGP connections to make new configurations take effect.

<HUAWEI> refresh bgp all import
Related Topics

refresh bgp multicast

Function

The refresh bgp multicast command softly resets an MBGP connection. MBGP soft resetting can be used to refresh the MBGP routing table and apply new routing policies, without closing any MBGP connection.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

refresh bgp multicast { peer-address | all | group group-name } { import | export }

Parameters

Parameter Description Value
peer-address Softly resets the MBGP connections with a specified peer. The peer address is in dotted decimal notation.
all Softly resets all MBGP connections. -
group-name Specifies the name of an MBGP peer group. If the parameter is set, the MBGP connections between a device and the members of the specified MBGP peer group are softly reset. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
import Triggers inbound soft resetting. -
export Triggers outbound soft resetting. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

MBGP soft resetting requires that all MBGP devices on a network support the route-refresh capability. The reset bgp command can be used on a device that does not support the route-refresh capability to reset the connections between the device and its peer and enable the device to refresh its routing table.

Example

# Perform inbound soft resetting for all the MBGP connections to make new configurations take effect.

<HUAWEI> refresh bgp multicast all import

refresh bgp multicast external

Function

The refresh bgp multicast external command softly resets the connections between multicast EBGP peers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

refresh bgp multicast external { import | export }

Parameters

Parameter Description Value
import Triggers inbound soft resetting. -
export Triggers outbound soft resetting. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can run the refresh bgp multicast external command to softly reset the connections between multicast EBGP peers.

Example

# Trigger inbound soft resetting for all multicast EBGP connections.

<HUAWEI> refresh bgp multicast external import
Related Topics

refresh bgp multicast internal

Function

The refresh bgp multicast internal command softly resets the connections between multicast IBGP peers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

refresh bgp multicast internal { import | export }

Parameters

Parameter Description Value
import Triggers inbound soft resetting. -
export Triggers outbound soft resetting. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can run the refresh bgp multicast internal command to softly reset the connections between multicast IBGP peers.

Example

# Trigger inbound soft resetting for all multicast IBGP connections.

<HUAWEI> refresh bgp multicast internal import

reset bgp

Function

The reset bgp command resets specified BGP connections.

Format

reset bgp [ vpn-instance vpn-instance-name ipv4-family | vpnv4 ] { all | as-number-plain | as-number-dot | ipv4-address | group group-name | external | internal } [ graceful ]

reset bgp ipv4 all [ graceful ]

reset bgp ipv6 { all | as-number-plain | as-number-dot | group group-name | ipv6-address | ipv4-address | external | internal } [ graceful ] (The ipv4-address is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.)

reset bgp vpls { all | as-number-plain | as-number-dot | ipv4-address | external | internal } (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

reset bgp vpnv6 { all | as-number-plain | as-number-dot | ipv4-address | group group-name | external | internal } [ graceful ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

reset bgp vpn-instance vpn-instance-name ipv6-family { all | as-number-plain | as-number-dot | ipv6-address | group group-name | external } [ graceful ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

Parameters

Parameter Description Value
vpn-instance vpn-instance-name ipv4-family Resets the connection of a specified VPN instance enabled with an IPv4 address family. The value must be an existing VPN instance name.
vpnv4 Resets BGP connections associated with VPNv4. -
all Resets all BGP connections. -
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation. The value is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively.
ipv4-address Resets the BGP connection with a specified peer. It is in dotted decimal notation.
group group-name Resets the BGP connection with a specified peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
external Resets all EBGP connections. -
internal Resets all IBGP connections. -
ipv4 Resets BGP IPv4 connections. -
ipv6 Resets BGP IPv6 connections. -
ipv6-address Resets the TCP connection with a specified BGP4+ peer (all the routes learned by using the connection are deleted). The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
vpls Resets BGP connections associated with VPLS. -
vpnv6 Resets BGP connections associated with VPNv6. -
vpn-instance vpn-instance-name ipv6-family Resets the connection of a specified VPN instance enabled with an IPv6 address family. The value must be an existing VPN instance name.
graceful Resets BGP connections in GR mode. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The reset bgp command is used to make new BGP configurations take effect.

If a BGP routing policy is configured on the device that does not support Route-Refresh, the reset bgp command can be used to make the new routing policy to take effect.

To reset a BGP connection in GR mode, run the reset bgp command with the graceful parameter specified and run the graceful-restart peer-reset command. If the graceful parameter is not specified in the reset bgp command or if the graceful-restart peer-reset command is not run, the GR reset mode does not take effect, so that routing entries will be deleted for existing sessions, interrupting services. The services will be restored after the BGP peer relationship is reestablished.

The reset bgp ipv4 all command resets all public-network BGP IPv4 connections.

Precautions

After the reset bgp command is run on a device, the TCP connection established by the BGP device and the corresponding peer is reestablished. Exercise caution when running this command.

Example

# Reset all BGP connections.

<HUAWEI> reset bgp all

# Reset BGP connections with the peer 2001:DB8:1::1.

<HUAWEI> reset bgp ipv6 2001:DB8:1::1

# Reset all BGP connections with VPNv6.

<HUAWEI> reset bgp vpnv6 all

# Reset BGP sessions with BGP peers within a specified 2-byte AS number.

<HUAWEI> reset bgp vpnv6 100

# Reset BGP sessions with BGP peers within a specified 4-byte AS number.

<HUAWEI> reset bgp vpnv4 200.300

reset bgp dampening

Function

The reset bgp dampening command clears BGP route dampening information and releases the suppressed routes.

Format

reset bgp [ vpn-instance vpn-instance-name ipv4-family ] dampening [ ipv4-address [ mask | mask-length ] ]

reset bgp { ipv6 | vpn-instance vpn-instance-name ipv6-family } dampening [ ipv6-address prefix-length ]

reset bgp vpnv4 dampening [ ipv4-address [ mask | mask-length ] ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

The vpn-instance vpn-instance-name ipv6-family is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.

Parameters

Parameter Description Value
vpn-instance vpn-instance-name Clears the route dampening information of the specified VPN instance. The value must be an existing VPN instance name.
ipv4-family Indicates an IPv4 unicast address family. -
ipv4-address Specifies an IPv4 network address. It is in dotted decimal notation.
mask Specifies the network mask in dotted decimal notation. If neither of the mask and mask length is specified, the address is considered as a classful address. It is in dotted decimal notation.
mask-length Specifies the network mask length. If neither of the mask and mask length is specified, the address is considered as a classful address. The value is an integer that ranges from 0 to 32.
ipv6 Clears IPv6 route dampening information and releases the suppressed routes. -
ipv6-family Indicates an IPv6 unicast address family. -
ipv6-address Specifies the IPv6 network address. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the length of an IPv6 prefix in decimal notation. It specifies the number of bits in the network address. The value is an integer that ranges from 0 to 128.
vpnv4 Clears the route dampening information of the BGP VPNv4 routes and releases the suppressed routes. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Route dampening is enabled to solve the problem of route instability. In most situations, BGP is applied to complex networks where routes change frequently. Route dampening is then used to suppress instable routes.

The reset bgp dampening command is used to clear the dampening information about specified routes on the public network and release specified suppressed routes. If no IP address is specified in the command, the dampening information about all the routes on the public network is cleared and all suppressed routes are released.

Prerequisites

You can use display bgp routing-table dampened command to view the information about suppressed routes.

Precautions

After the reset bgp dampening command is run, the suppressed routes are released. If the status of some routes still changes frequently, route flapping may occur. Routing flapping consumes a large number of bandwidth and CPU resources.

When ipv6-address prefix-length is not specified, after you run the reset bgp ipv6 dampening command, IPv6 route dampening information in the whole BGP routing table is cleared.

Example

# Clear the dampening information about routes to network segment 10.1.0.0 and release suppressed routes.

<HUAWEI> reset bgp dampening 10.1.0.0 255.255.0.0

# Clear the dampening information about the IPv6 routes to network segment FC00:0:0:1:: and release suppressed routes.

<HUAWEI> reset bgp ipv6 dampening fc00:0:0:1:: 64

# Clear the dampening information about the routes of IPv6 VPN instance named vpn1.

<HUAWEI> reset bgp vpn-instance vpn1 ipv6-family dampening

reset bgp flap-info

Function

The reset bgp flap-info command clears route flapping statistics.

Format

reset bgp [ vpn-instance vpn-instance-name ipv4-family ] flap-info [ as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ mask | mask-length ] | regexp as-path-regexp ]

reset bgp { ipv6 | vpn-instance vpn-instance-name ipv6-family } flap-info [ as-path-filter { as-path-filter-number | as-path-filter-name } | network-ipv6-address prefix-length | regexp as-path-regexp ]

reset bgp [ vpn-instance vpn-instance-name ipv4-family ] ipv4-address flap-info

reset bgp { ipv6 | vpn-instance vpn-instance-name ipv6-family } ipv6-address flap-info

reset bgp vpnv4 flap-info [ regexp as-path-regexp | as-path-filter { as-path-filter-number | as-path-filter-name } | ipv4-address [ mask | mask-length ] ] (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

reset bgp vpnv4 ipv4-address flap-info (supported only by the S5720EI, S5720HI, S6720S-EI and S6720EI)

The vpn-instance vpn-instance-name ipv6-family is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.

Parameters

Parameter Description Value
vpn-instance vpn-instance-name ipv4-family Clears the route flapping information of a specified VPN instance enabled with an IPv4 address family. The value must be an existing VPN instance name.
as-path-filter as-path-filter-number Clears route flapping statistics based on the number of a specified AS_Path filter. It is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Clears route flapping statistics based on the name of a specified AS_Path filter. The value of as-path-filter-name is a string of 1 to 51 case-sensitive characters.
NOTE:
When double quotation marks are used around the string, spaces are allowed in the string.
network-address Specifies the IPv4 prefix address that is used to filter the BGP IPv4 routes. It is in dotted decimal notation.
mask Specifies the network mask that is used to filter the BGP IPv4 routes. If neither the mask nor the mask length is specified, the address is processed as a classful address. It is in dotted decimal notation.
mask-length Specifies the network mask length that is used to filter the BGP IPv4 routes. If neither the mask nor the mask length is specified, the address is processed as a classful address. The value is an integer that ranges from 0 to 32.
regexp as-path-regexp Clears statistics about the flapping routes that match the AS_Path regular expression. -
ipv6 Clears the route flapping statistics on all IPv6 peers. -
vpn-instance vpn-instance-name ipv6-family Clears the route flapping information of a specified VPN instance enabled with an IPv6 address family. The value must be an existing VPN instance name.
network-ipv6-address Specifies the IPv6 prefix address that is used to filter the BGP IPv6 routes. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies the network mask length that is used to filter the BGP IPv6 routes. The value is an integer that ranges from 0 to 128.
ipv4-address Specifies the network address of an IPv4 peer. It is in dotted decimal notation.
ipv6-address Specifies the network address of an IPv6 peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
vpnv4 Resets route flapping statistics of BGP VPNv4 routes. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The process of adding a route to and then deleting the route from a routing table is called route flapping.

When route flapping occurs, the routing protocol sends Update packets to neighbors. The neighbors that receive the Update packets need to recalculate routes and modify the routing table. Therefore, frequent route flapping consumes great bandwidth and CPU resources and even seriously affects network operations.

The reset bgp flap-info command is used to clear the flapping information about routes. This allows the switch to re-collect statistics about flapping routes and helps to monitor route changes and locate network problems.

Prerequisites

You can use display bgp routing-table flap-info command to view the information about BGP route flapping.

If there are a large number of flapping routes, define an AS_Path filter or an AS_Path regular expression to be referenced in the reset bgp flap-info command. The flapping statistics of the routes matching the AS_Path filter or the AS_Path regular expression are then cleared.

Precautions

After the reset bgp flap-info command is run, the flapping statistics of routes are reset and cannot be displayed.

Follow-up Procedure

After the flapping statistics of routes are cleared, run the display bgp routing-table flap-info command again to display the flapping statistics about BGP routes in order to locate problems.

Example

# Clear the flapping statistics about the routes that match AS_Path filter 10.

<HUAWEI> reset bgp flap-info as-path-filter 10

# Clear the flapping statistics about the BGP4+ routes of the VPN instance named vpn1.

<HUAWEI> reset bgp vpn-instance vpn1 ipv6-family flap-info
Related Topics

reset bgp flapping-count

Function

The reset bgp flapping-count command resets the flapping count of a specified BGP peer.

Format

reset bgp [ vpn-instance vpn-instance-name ipv4-family ] ipv4-address flapping-count

reset bgp { ipv6 | vpn-instance vpn-instance-name ipv6-family } ipv6-address flapping-count

The vpn-instance vpn-instance-name ipv6-family is only supported on S5720EI, S5720HI, S6720S-EI and S6720EI.

Parameters

Parameter Description Value
vpn-instance vpn-instance-name ipv4-family Specifies the name of VPN instance enabled with an IPv4 address family. The value must be an existing VPN instance name.
ipv4-address Specifies the IPv4 address of a BGP peer. It is in dotted decimal notation.
ipv6 Clears the flapping count of a specified BGP IPv6 peer. -
vpn-instance vpn-instance-name ipv6-family Specifies the name of VPN instance enabled with an IPv6 address family. The value must be an existing VPN instance name.
ipv6-address Specifies the IPv6 address of a BGP peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP peer flapping affects the stability of a BGP network and BGP route convergence.

The reset bgp flapping-count command can be used to clear the flapping account of a BGP peer. This allows the switch to re-collect the flapping statistics of a peer to locate BGP network problems.

Precautions

After the reset bgp flapping-count command is run, the flapping statistics of BGP peers are reset and cannot be displayed.

Follow-up Procedure

After the reset bgp flapping-count command is used to clear the statistics count of a specified BGP peer, run the display bgp peer command to display the flapping count of BGP peers and locate BGP network problems.

Example

# Clear the flapping count of a specified BGP peer.

<HUAWEI> reset bgp 10.116.10.2 flapping-count

reset bgp multicast

Function

The reset bgp multicast command resets the connections between a device and specified MBGP peers.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

reset bgp multicast { all | peer-address | group group-name | as-number-plain | as-number-dot | external | internal } [ graceful ]

Parameters

Parameter Description Value
all Resets all MBGP connections. -
peer-address Resets the MBGP connection with a specified peer. The peer address is in dotted decimal notation.
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
as-number-plain Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295.
as-number-dot Specifies the number of the AS, in dotted notation. The value is in the x.y format. Here, "x" and "y" are integers that range from 1 to 65535 and 0 to 65535 respectively.
external Reset all EBGP connections. -
internal Reset all IBGP connections. -
graceful Specifies to reset MBGP connections in GR mode. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

After the reset bgp multicast command is run on a device, the TCP connection established by the device and the corresponding peer is reset and then reestablished. Exercise caution when running this command.

Example

# Reset the MBGP connections of all address families.

<HUAWEI> reset bgp multicast all

reset bgp multicast dampening

Function

The reset bgp multicast dampening command clears dampening information about routes in the MBGP routing table.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

reset bgp multicast dampening [ ip-address [ mask | mask-length ] ]

Parameters

Parameter Description Value
ip-address Specifies a network address. The value is in dotted decimal notation.
mask Specifies the mask of a network address. The value is in dotted decimal notation.
mask-length Specifies the mask length of a network address. The value is an integer that ranges from 0 to 32.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

If a network address is specified in the reset bgp multicast dampening command, running this command clears the dampening information about a specific route and releases the suppressed route.

Example

# Clear the dampening information about routes to network segment 10.1.0.0 and release suppressed routes.

<HUAWEI> reset bgp multicast dampening 10.1.0.0 255.255.0.0

reset bgp multicast external

Function

The reset bgp multicast external command resets all multicast EBGP connections.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

reset bgp multicast external [ graceful ]

Parameters

Parameter Description Value
graceful Resets MBGP connections in GR mode. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can run the reset bgp multicast external command to reset all multicast EBGP connections.

Example

# Reset all multicast EBGP connections.

<HUAWEI> reset bgp multicast external

reset bgp multicast flap-info

Function

The reset bgp multicast flap-info command clears route flapping statistics.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

reset bgp multicast flap-info [ ip-address [ mask | mask-length ] | as-path-filter { as-path-list-number | as-path-list-name } | regexp regexp ]

reset bgp multicast ip-address flap-info

Parameters

Parameter Description Value
ip-address Specifies a network address. The value is in dotted decimal notation.
mask-length Specifies the mask length of a network address. The value is an integer that ranges from 0 to 32.
mask Specifies the mask of a network address. The value is in dotted decimal notation.
as-path-filter as-path-list-number Clears route flapping statistics based on the number of a specified AS_Path filter. The value is an integer that ranges from 1 to 256.
as-path-filter as-path-list-name Clears route flapping statistics based on the name of a specified AS_Path filter. The value is a string of 1 to 51 case-sensitive characters without spaces.
regexp regexp Clears flapping statistics about the routes that match the AS_Path regular expression. The value is a string of 1 to 80 characters.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can run the reset bgp multicast flap-info command to clear route flapping statistics.

Example

# Clear the flapping statistics about the routes that match AS_Path filter 10.

<HUAWEI> reset bgp multicast flap-info as-path-filter 10

reset bgp multicast internal

Function

The reset bgp multicast internal command resets the multicast IBGP connections in an AS.

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

reset bgp multicast internal [ graceful ]

Parameters

Parameter Description Value
graceful Specifies to reset MBGP connections in GR mode. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can run the reset bgp multicast internal command to reset the multicast IBGP connections in an AS.

Example

# Reset all multicast IBGP connections.

<HUAWEI> reset bgp multicast internal

router-id (BGP)

Function

The router-id command configures a Router ID for the switch.

The undo router-id command deletes the Router ID configured for the switch.

By default, no BGP Router ID is configured, and the Router ID configured for the route management module through the router id command is used.

Format

router-id { ipv4-address | vpn-instance auto-select }

undo router-id [ vpn-instance auto-select ]

Parameters

Parameter Description Value
ipv4-address Specifies a Router ID. It is in dotted decimal notation.
vpn-instance auto-select Configures automatic Router ID selection for all BGP-VPN instance IPv4 address families. If a Router ID is manually specified for a BGP-VPN instance IPv4 address family, the manually specified Router ID takes precedence over the automatically selected Router ID. -

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The router-id command is used to configure a Router ID for the switch. Each Router ID uniquely identifies one BGP switch in an AS.

By configuring automatic Router ID selection for a BGP-VPN instance IPv4 address family, you can differentiate the configured Router ID of the BGP-VPN instance IPv4 address family from the BGP Router ID. For more information about the Router ID of a BGP-VPN instance IPv4 address family, see the router-id (BGP-VPN Instance IPv4 Address Family View) command.

Prerequisites

The bgp command is run to enable BGP.

Precautions

Changing or deleting a configured Router ID in the BGP view resets a BGP session. If a BGP session has been established in a BGP-VPN instance IPv4 address family, deleting the configured Router ID resets the BGP session. Exercise caution when changing or deleting a Router ID.

By default, the switch that is not configured with any interface uses the Router ID of 0.0.0.0 assigned by routing management.

Example

# Configure a Router ID for the switch.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] router-id 10.1.1.1
# Configure automatic Router ID selection for all BGP-VPN instance IPv4 address families.
<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] router-id vpn-instance auto-select

router-id (BGP-VPN Instance IPv4 Address Family View)

Function

The router-id command configures router ID for BGP VPN instance IPv4 address family.

The undo router-id command deletes the router ID configured for BGP VPN instance IPv4 address family.

By default, no router ID is configured for BGP VPN instance IPv4 address family, and the BGP router ID is used as the router ID.

Format

router-id { ipv4-address | auto-select }

undo router-id

Parameters

Parameter Description Value
ipv4-address Specifies the router ID of a BGP VPN instance IPv4 address family. The router ID is expressed in the IPv4 address format. It is in dotted decimal notation.
auto-select Configures automatic route ID selection for the current BGP VPN instance IPv4 address family. -

Views

BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By configuring router ID for BGP VPN instance IPv4 address family, you can differentiate the configured router ID of BGP VPN instance IPv4 address family from the BGP router ID.

For example, if two VPN instances named vrf1 and vrf2 are configured on a PE, and a BGP session needs to be established between the interfaces bound to the two VPN instances, you need to configure different router IDs for the two VPN instance IPv4 address families. If no router ID is configured for the two VPN instance IPv4 address families, no BGP session can be established because the two VPN instance IPv4 address families have the same router ID, which is consistent with the BGP router ID.

Rules for automatically selecting a router ID for a BGP VPN instance IPv4 address family are as follows:

  • If loopback interfaces configured with IP addresses are bound to the VPN instance, the largest IP address among the IP addresses of the loopback interfaces is selected as the router ID.

  • If no loopback interfaces configured with IP addresses are bound to the VPN instance, the largest IP address among the IP addresses of other interfaces bound to the VPN instance is selected as the router ID, regardless of whether the interface is Up or Down.

Precautions

If a BGP session has been established in a BGP VPN instance IPv4 address family, changing or deleting the configured router ID resets the BGP session. So, confirm the action before you use the router-id command.

Example

# Configure a router ID for a BGP VPN instance IPv4 address family.
<HUAWEI> system-view
[HUAWEI] ip vpn-instance vrf1
[HUAWEI-vpn-instance-vrf1] route-distinguisher 100:1
[HUAWEI-vpn-instance-vrf1-af-ipv4] quit
[HUAWEI-vpn-instance-vrf1] quit
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family vpn-instance vrf1
[HUAWEI-bgp-vrf1] router-id 192.168.100.1

route-select delay

Function

The route-select delay command configures a delay for selecting routes.

The undo route-select delay command deletes the delay for selecting routes.

The default delay is 0, indicating that routes are selected without a delay.

Format

route-select delay delay-value

undo route-select delay

Parameters

Parameter Description Value
delay-value Specifies the delay for selecting routes. The value is an integer that ranges from 0 to 3600, in seconds.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-IPv4 multicast address family view, BGP L2VPN-AD address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a scenario in which primary and backup routes exist, packets may get lost after traffic switches back to the primary path from the backup path. Figure 7-1 illustrates a VPN FRR scenario. PE3 and CE2 connect both to PE1 and PE2. The primary path is PE3 -> PE1 -> CE2, and the backup path is PE3 -> PE2 -> CE2. CE2 uses BGP to communicate with PE1 and PE2. FRR is configured on PE3. If PE1 restarts or the link between PE3 and PE1 is disconnected, traffic switches from the primary path to the backup path. After the primary path recovers, traffic switches back to the primary path. If PE3 completes refreshing forwarding entries before PE1 does so, PE1 may temporarily fail to forward traffic after a switchback. As a result, packet loss may occur. The severity of packet loss is proportional to the number of routes stored on PE1.

To solve this problem, run the route-select delay command on PE3 to configure a delay for selecting a route to PE1. An appropriate delay ensures that traffic switches back to the primary path after PE1 completes refreshing forwarding entries.

Figure 7-1  VPN FRR networking

Precautions

If you run the route-select delay command repeatedly, the latest configuration overrides the previous configurations. If a route selection delay timer has started when you configure a new route select delay, the new route selection delay takes effect since the next route selection.

Example

# Configure the delay for selecting routes as 300s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] route-select delay 300

routing-table limit threshold-alarm

Function

The routing-table limit threshold-alarm command configures alarm and alarm clear thresholds for the number of BGP routes.

The undo routing-table limit threshold-alarm command restores the default settings.

By default, the alarm threshold is 80%, and the alarm clear threshold is 70%.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI

Supported

S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

routing-table limit threshold-alarm upper-limit upper-limit-value lower-limit lower-limit-value

undo routing-table limit threshold-alarm [ upper-limit upper-limit-value lower-limit lower-limit-value ]

Parameters

Parameter Description Value
upper-limit upper-limit-value Specifies an alarm threshold for the number of BGP routes. The value is an integer that ranges from 1 to 100, in percentage. The default value is 80.
lower-limit lower-limit-value Specifies an alarm clear threshold for the number of BGP routes. The value is an integer that ranges from 1 to 100, in percentage. The default value of is 70. lower-limit-value must be smaller than upper-limit-value; otherwise, alarms are generated and cleared repeatedly if route flapping occurs.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The number of BGP routes that can be added to a routing table is limited. If the value exceeds the limit, new routes cannot be added to the routing table, causing service interruptions. To address this problem, run the routing-table limit threshold-alarm command to configure alarm and alarm clear thresholds for the number of BGP routes. Alarms are then generated and cleared as expected. The alarms act as a prompt for checking whether an exception occurs and to take preventive measures.

  • When the ratio of BGP routes to the maximum value exceeds upper-limit-value, an alarm is generated. New routes can still be accepted until the number of BGP routes reaches the maximum value.
  • When the ratio falls below lower-limit-value, the alarm is cleared.

Configuration Impact

If the routing-table limit threshold-alarm command is run multiple times, the latest configuration takes effect.

Precautions

In addition to the routing-table limit threshold-alarm command, the snmp-agent trap enable feature-name bgp trap-name { hwBgpRouteThresholdExceed | hwBgpRouteThresholdClear } command must be run to enable the alarm and alarm clear functions; otherwise, alarms cannot be generated and cleared as expected.

Example

# Configure alarm and alarm clear thresholds for the number of BGP routes.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] routing-table limit threshold-alarm upper-limit 70 lower-limit 60

routing-table rib-only

Function

The routing-table rib-only command prevents BGP routes from being added into the IP routing table.

The undo routing-table rib-only command restores the default setting.

By default, the preferred BGP routes are added to the IP routing table.

Format

routing-table rib-only [ route-policy route-policy-name ]

undo routing-table rib-only

Parameters

Parameter Description Value
route-policy route-policy-name Specifies the name of a Route-Policy. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In BGP/MPLS IP VPN networking, if the BGP routing table has large numbers of VPN routes, these routes will consume large numbers of memory resources after being delivered to the IP VPN routing table. If these routes are not used in traffic forwarding, you can run the routing-table rib-only command to prevent these routes from being added to the IP VPN routing table. If some of these routes are not used in traffic forwarding, you can run the routing-table rib-only route-policy command to prevent this part of routes from being added to the IP VPN routing table.

If a route reflector (RR) is used and preferred BGP routes do not need to be used during the forwarding, the routing-table rib-only command can be used to make BGP routes unable to be added to the IP routing table or the forwarding layer. This improves forwarding efficiency and the system capacity.

When route-policy route-policy-name is specified in the command, the routes matching the policy are not added to the IP routing table, and the routes not matching the policy are added to the IP routing table with the route attributes unchanged.

Configuration Impact

After the routing-table rib-only command is run, the routes preferred by BGP are not added to the IP routing table.

The routing-table rib-only command does not take effect on the labeled routes.

Precautions

The routing-table rib-only command and the active-route-advertise command are mutually exclusive.

Creating a route-policy before it is referenced is recommended. By default, nonexistent route-policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent route-policy is referenced using the current command, all routes are not delivered to the IP routing table.

Example

# Configure the routing policy named ribonly to prevent certain BGP routes from being added into the IP routing table.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] routing-table rib-only route-policy ribonly

shutdown (BGP)

Function

The shutdown command terminates all sessions between a device and its BGP peers.

The undo shutdown command restores the default setting.

By default, the function of closing all sessions between a device and its BGP peers is disabled.

Format

shutdown

undo shutdown

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Running the shutdown command closes all sessions between a device and its peers. Exercise caution when using this command.

During system upgrade or maintenance, the sessions between a device and its BGP peers need to be closed to minimize the impact of BGP route flapping on the network. If a large number of BGP peers exist, the shutdown command can be run in the BGP view to close all sessions with BGP peers. This frees you from running the peer ignore command repeatedly to close the sessions one by one.

Example

# Close all sessions between a device and its BGP peers.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] shutdown
Warning: All BGP peer sessions will be interrupted. Continue? [Y/N]:y

slow-peer detection disable

Function

The slow-peer detection disable command disables slow peer detection.

The undo slow-peer detection disable command restores the default configuration.

By default, slow peer detection is enabled.

Format

slow-peer detection disable

undo slow-peer detection disable

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An update peer-group may consist of multiple BGP peers. If a network problem (congestion for example) occurs and slows down the speed at which the local device advertises routes to a BGP peer in the update peer-group, the speed at which the local device advertises routes to other BGP peers in the update peer-group is affected. To address this problem, slow peer detection is enabled by default.

When slow peer detection is enabled, the local device identifies the BGP peer to which routes are sent the slowest based on the time taken to send 100 packets to each BGP peer. If this time is greater than the period threshold for slow peer detection plus the average time taken to send 100 packets to BGP peers (excluding the longest and shortest times), the local device considers the peer a slow peer and removes it from the update peer-group. Slow peer detection prevents this slow peer from affecting route advertisement to other peers in the update peer-group.

To disable slow peer detection, run this command.

Example

# Disable slow peer detection.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] slow-peer detection disable

slow-peer detection threshold

Function

The slow-peer detection threshold command sets a period threshold for slow peer detection.

The undo slow-peer detection command restores the default configuration.

By default, the period threshold for slow peer detection is 300s.

Format

slow-peer detection threshold threshold-value

undo slow-peer detection [ threshold threshold-value ]

Parameters

Parameter Description Value
threshold threshold-value Specifies a period threshold for slow peer detection. The value is an integer that ranges from 120 to 3600, in seconds.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When slow peer detection is enabled, the local device identifies the BGP peer to which routes are sent the slowest based on the time taken to send 100 packets to each BGP peer. If this time is greater than the period threshold for slow peer detection plus the average time taken to send 100 packets to BGP peers (excluding the longest and shortest times), the local device considers the peer a slow peer and removes it from the update peer-group. Slow peer detection prevents this slow peer from affecting route advertisement to other peers in the update peer-group.

By default, slow peer detection is enabled and the period threshold for slow peer detection is 300s. To adjust the period threshold for slow peer detection, run this command.

Configuration Impact

If the command is run more than once, the latest configuration overrides the previous one.

Precautions

After a slow peer is removed from the update peer-group, the peer relationship between the local device and the slow peer is reestablished.

Example

# Set the period threshold for slow peer detection to 200s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] slow-peer detection threshold 200

snmp-agent trap enable feature-name bgp

Function

The snmp-agent trap enable feature-name bgp command enables the trap function for the BGP module.

The undo snmp-agent trap enable feature-name bgp command disables the trap function for the BGP module.

By default, the trap function is disabled for the BGP module.

Format

snmp-agent trap enable feature-name bgp [ trap-name { backward | established } ]

undo snmp-agent trap enable feature-name bgp [ trap-name { backward | established } ]

Parameters

Parameter Description Value
trap-name Enables the trap function for a specified type of BGP events. -
backward Enables the trap function upon the disconnection of BGP neighbors. -
established Enables the trap function when BGP neighbors are in Established state. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The BGP module is not configured with the function of excessive traps. To enable the trap function for one or more events, specify the trap-name parameter.

Example

# Enable the trap function upon the disconnection of BGP neighbors.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name bgp trap-name backward

summary automatic

Function

The summary automatic command enables automatic aggregation for the locally imported routes.

The undo summary automatic command disables automatic aggregation for the locally imported routes.

By default, automatic aggregation is disabled for the locally imported routes.

Format

summary automatic

undo summary automatic

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In the BGP-IPv4 unicast address family view, the summary automatic command is used to configure a BGP device to automatically aggregate locally imported routes on the public network.

The summary automatic command is used to configure a BGP device to automatically aggregate locally imported routes on a private network.

In the BGP-VPN instance IPv4 address family view, the summary automatic command is used to aggregate the routes imported by BGP. These routes can be direct routes, static routes, RIP routes, OSPF routes, or IS-IS routes. After this command is run on a BGP device, the BGP device aggregates routes based on the natural network segment (for example, 10.1.1.0/24 and 10.2.1.0/24 are aggregated to 10.0.0.0/8, a Class A address), and sends only the aggregated route to its peers. This reduces the number of routes.

Precautions

BGP route aggregation is classified into manual aggregation and automatic aggregation. The command is used to implement automatic aggregation. Manual aggregation takes precedence over automatic aggregation.

The summary automatic command is invalid for the routes imported by using the network command.

Example

# Enable automatic aggregation for imported routes.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] summary automatic
Related Topics

supernet unicast advertise

Function

The supernet unicast advertise enable command configures a BGP device to advertise BGP supernet unicast routes to its peers.

The undo supernet unicast advertise enable or supernet unicast advertise disable command restores the default configuration.

By default, BGP supernet unicast routes are considered invalid and cannot be advertised to BGP peers or delivered to the IP routing table.

Format

supernet unicast advertise enable

supernet unicast advertise disable

undo supernet unicast advertise enable

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A BGP supernet route has the same destination address and next-hop address or has a more detailed destination address than the next-hop address. Any route that meets one of the following conditions is a BGP supernet route.
  • If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same, and the destination address mask is greater than or equal to the next-hop address mask.
  • If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are different. However, if you perform bitwise AND operations on the next-hop address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same.

For example, the route destined for 10.6.6.6 in the following command output is a BGP supernet route.

<HUAWEI> display bgp routing-table
 BGP Local router ID is 10.1.1.2
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 1
        Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
   *>i  10.6.6.6/32        10.6.6.6       0          100       0       ? 

BGP supernet routes include BGP supernet labeled routes and BGP supernet unicast routes. To allow a Huawei device to advertise BGP supernet unicast routes that it receives from a connected non-Huawei device to its BGP peers, run the supernet unicast advertise enable command on the Huawei device.

Example

# Configure a BGP device to advertise BGP supernet unicast routes to its peers.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] supernet unicast advertise enable

timer (BGP)

Function

The timer command sets the values for the Keepalive timer and Hold timer.

The undo timer command restores the default values of the Keepalive timer and Hold timer.

By default, the value of a Keepalive timer is 60s and the value of a Hold timer is 180s.

Format

timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

undo timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

undo timer keepalive hold [ min-holdtime ]

Parameters

Parameter Description Value
keepalive keepalive-time Specifies the Keepalive period. The value is an integer that ranges from 0 to 21845, in seconds.
hold hold-time Specifies the holdtime. The value is an integer that can be 0, or ranges from 3 to 65535, in seconds.
min-holdtime min-holdtime Specifies the minimum holdtime configured on the local device.
NOTE:

The value of min-holdtime configured cannot exceed the value of hold-time.

The value is an integer that ranges from 20 to 65535, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a connection is established between peers, the values of keepalive-time and hold-time are negotiated by the peers.
  • The smaller of the hold-time values carried by Open messages of both peers is taken as the hold-time value.

  • The smaller of one third of the hold-time value and the locally configured keepalive-time value is taken as the keepalive-time value.

If the local device establishes BGP peer relationships with many devices, it needs to process huge BGP messages. If hold-time negotiated among BGP peers is small, the timer may expire before the local device processes the Keepalive messages sent from other BGP peers. The peer relationships are then interrupted, and routes flap. To solve the preceding problem, you can configure an appropriate value for min-holdtime min-holdtime based on the CPU processing capability of the local device.

If the value of min-holdtime is changed, but the values of keepalive-time and hold-time negotiated between two BGP peers remain unchanged, the established peer relationship is not affected. Only when the local device attempts to re-establish a relationship with a remote device, the value of min-holdtime configured on the local device takes effect. The local device compares min-holdtime with hold-time sent from the remote device. If the value of min-holdtime exceeds that of hold-time, hold-time negotiation fails, and the peer relationship fails to be established.

If min-holdtime is configured on the local device, and the value of hold-time sent from the remote device is 0, hold-time negotiation between the two devices succeeds. The negotiated value of hold-time is 0, and the peer relationship is established. The value 0 of hold-time indicates that the peer relationship never expires.

Precautions

The timers configured for a specific peer or peer group by using the peer timer command override the timers configured for all BGP peers by using the timer command.

If the value of a timer changes, the BGP peer relationship between devices is disconnected. This is because the devices need to re-negotiate the values of keepalive-time and hold-time. Therefore, exercise caution before changing the value of a timer.

Setting the Hold timer value to at least three times the Keepalive timer value is recommended. When setting the values of keepalive-time and hold-time, note the following points:
  • The values of keepalive-time and hold-time cannot both be set to 0. This renders the BGP timers become invalid. This means that BGP is unable to detect link faults using the timers.

  • The hold-time value cannot be significantly greater than the keepalive-time value. A setting of timer keepalive 1 hold 65535, for example, would be improper. If the holdtime is too long, link faults cannot be detected in a timely manner.

Example

# On a BGP device, set the value of the Keepalive timer to 30s and the value of the Hold timer to 90s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] timer keepalive 30 hold 90
Related Topics

timer connect-retry

Function

The timer connect-retry command sets a global ConnectRetry interval.

The undo timer connect-retry command restores the default setting.

By default, the ConnectRetry interval is 32s.

Format

timer connect-retry connect-retry-time

undo timer connect-retry

Parameters

Parameter Description Value
connect-retry-time Specifies a ConnectRetry interval. The value is an integer that ranges from 1 to 65535, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When BGP initiates a TCP connection, the ConnectRetry timer is stopped if the TCP connection is established successfully. If the first attempt to establish a TCP connection fails, BGP tries again to establish the TCP connection after the ConnectRetry timer expires. The ConnectRetry interval can be adjusted as needed.
  • The ConnectRetry interval can be reduced in order to lessen the time BGP waits to retry establishing a TCP connection after the first attempt fails.
  • To suppress route flapping caused by constant peer flapping, the ConnectRetry interval can be increased to accelerate route convergence.

Precautions

A ConnectRetry interval can be configured globally, or on a particular peer or peer group. A ConnectRetry interval configured on a specific peer or peer group takes precedence over a global ConnectRetry interval.

If both the peer { group-name | ipv4-address | ipv6-address } timer connect-retry connect-retry-time command and the timer connect-retry connect-retry-time command are run on a device, the configuration of the peer { group-name | ipv4-address | ipv6-address } timer connect-retry connect-retry-time command takes effect, but the configuration of the timer connect-retry connect-retry-time command does not.

Example

# Set a global BGP ConnectRetry interval to 60s.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] timer connect-retry 60

undo synchronization (BGP)

Function

The undo synchronization command disables synchronization between BGP and an IGP.

By default, synchronization between BGP and an IGP is disabled.

Format

undo synchronization

Parameters

None

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

You can run the undo synchronization command to disable synchronization between BGP and an IGP.

Example

# Disable synchronization between BGP and an IGP.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] undo synchronization
Translation
Favorite
Download
Update Date:2021-10-30
Document ID:EDOC1000178165
Views:1024182
Downloads:5661
Average rating:0.0Points

Digital Signature File

digtal sigature tool