NetEngine AR600, AR6100, AR6200, and AR6300 V300R019 Command Reference

BGP Configuration Commands

BGP Configuration Commands

Support for BGP

Hardware Requirements

This section is applicable to all models. For details about differences for specific models, see the description in the corresponding section.

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.

It is an integer ranging 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.

It is an integer ranging 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 aggregation is classified into manual aggregation and automatic aggregation. The aggregate command can be used to configure manual aggregation. This command can aggregate routes in the local BGP routing table. Manually-aggregated routes take precedence over automatically-aggregated routes.

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

The parameter as-set is used to create an aggregated 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 aggregated 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 aggregated routes are advertised. Aggregated 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 aggregated.

The parameter attribute-policy is used to set attributes for an aggregated 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 an aggregated route.

Precautions

If the undo aggregate command is run, the system will match routes base on the configured parameter attribute-policy, origin-policy, suppress-policy, as-set, or detail-suppressed. If the parameter is not 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

apply-label explicit-null

Function

The apply-label explicit-null command enables IPv6 Provider Edge (6PE) routes to share the explicit null label.

The undo apply-label explicit-null command disables 6PE routes from sharing the explicit null label.

By default, the function is disabled.

Format

apply-label explicit-null

undo apply-label explicit-null

Parameters

None

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To save label resources on a 6PE device and avoid the problem that IPv6 routes cannot be advertised due to the shortage of labels, you can run the apply-label explicit-null command on the 6PE device.

Configuration Impact

After the apply-label explicit-null command is run on a 6PE device, all the IPv6 routes sent by the 6PE device to its peer share the explicit null label.

Precautions

If you run the apply-label explicit-null or undo apply-label explicit-null command after a 6PE peer relationship is established, temporary packet loss occurs.

Example

# Enable 6PE routes to share the explicit null label in the BGP-IPv6 unicast address family view.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ipv6-family unicast
[Huawei-bgp-af-ipv6] apply-label explicit-null

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 Source-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, no limit is configured on the maximum number of AS numbers in the AS_Path attribute, but the maximum number of AS numbers carried in the AS_Path attribute is limited by the BGP message length.

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.

The value is an integer ranging from 1 to 2000.

NOTE:
  • The maximum value of as-path-limit-num for the 2-byte and 4-byte AS number is the same.
  • If s-path-limit-num is not specified, the maximum number of AS numbers in the AS_Path attribute 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 router checks whether the number of AS numbers in the AS-Path attribute of the incoming route exceeds the maximum value. If the number of AS numbers exceeds the maximum value, the local router will discard the route. Therefore, if the maximum number of AS numbers in the AS-Path attribute is set too small, routes will be 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

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-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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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-IPv6 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

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 no MED is in the route attributes. When the MED is lost, the MED uses the maximum value 4294967295 if the bestroute med-none-as-maximum command is used. Otherwise, the MED uses the default value 0, which may cause a failure to select the optimal route.

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 for next hop iteration.

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

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

Only the AR651F-Lite does not support this function.

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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, labeled BGP IPv4 unicast routes that are iterated to IP addresses participate in route selection. In non-RR networking, or RR networking where the BGP next hop is changed, BGP needs to check whether there is an LSP destined for the next hop. If such an LSP is not found, BGP needs to establish an LSP. 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, packet loss may occur, which affects service stability. 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.

By default, the BGP VPNv4 routes can participate in route selection if the next hop iterates to an IP address. If the current device is an ASBR, it is required that the next hop of the preferred route can iterate to the LSP tunnel; if the ASBR is configured with load balancing, it is also required that next hop of the routes which are not preferred can iterate to the LSP tunnel so that these routes can participate in load balancing. Now the BGP VPNv4 routes can be set to participate in route selection when next hop iterates to the LSP tunnel.

Precautions

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

Example

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

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

# 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

bestroute routerid-prior-clusterlist

Function

The bestroute routerid-prior-clusterlist command enables Router 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 Router 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-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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 Router ID during BGP route selection. To enable Router 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:

    • Data packets are allowed to be transmitted from one AS to another AS.

    • Multiple connections to external ISPs and 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.

Exercise caution when using the undo bgp command because it will delete all BGP configurations on a device.

If the BGP AS number is changed, the route calculation result of the local or remote OSPF VPN process may be affected. Because the tag value of the LSAs of the OSPF VPN process is calculated based on the BGP AS number, the local tag value of the OSPF VPN process and the tag value carried in the LSA advertised by the OSPF VPN process change. After receiving an LSA, the local or remote OSPF process checks the tag of the LSA. If the local tag of the OSPF process is the same as the tag of the received LSA, the LSA is not used for OSPF route calculation.

Example

# Enable BGP and enter the BGP view.

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

bgp dynamic-session-limit

Function

The bgp dynamic-session-limit command configures a maximum number for dynamic BGP peer sessions.

The undo bgp dynamic-session-limit command restores the default configuration.

By default, a maximum of the total specification dynamic BGP peer sessions can be established.

Format

bgp dynamic-session-limit limit-value

undo bgp dynamic-session-limit [ limit-value ]

Parameters

Parameter Description Value
limit-value Specifies the maximum number of dynamic BGP peer sessions allowed. The value is an integer ranging from 1 to the maximum value defined in the PAF file.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the dynamic BGP peer function is enabled using the peer listen-net command, BGP listens to BGP connection requests from the network segment specified in the command and establish BGP peer relationships dynamically. If a large number of dynamic BGP peer sessions are established on the network segment, excessive system resources will be consumed. To prevent this problem, run the bgp dynamic-session-limit command to configure a maximum number for dynamic BGP peer sessions as required.

Precautions

This command does not apply to static BGP peer sessions.

Example

# Set the maximum number of dynamic BGP peer sessions to 128.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] bgp dynamic-session-limit 128

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

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 BGP specified 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

Integral AS number

The value is an integer ranging from 1 to 4294967295.

as-number-dot

AS number 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-AS 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

confederation nonstandard

Function

The confederation nonstandard command configures standard devices 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.

Format

confederation nonstandard

undo confederation nonstandard

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To make nonstandard devices interwork, configure this command on all routers 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 re-established.

Example

# Enable the router 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

Integral AS number

The value is an integer ranging from 1 to 4294967295.

as-number-dot

AS number 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 a sub-AS for the confederation.

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

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.

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 191.1.1.1 as-number 38
[Huawei-bgp] peer 191::1 as-number 39
[Huawei-bgp] ipv6-family unicast
[Huawei-bgp-af-ipv6] peer 191.1.1.1 enable
[Huawei-bgp-af-ipv6] peer 191.1.1.1 label-route-capability
[Huawei-bgp-af-ipv6] peer 191::1 enable
[Huawei-bgp-af-ipv6] confederation route unicast-to-label disable

dampening (BGP)

Function

The dampening command enables BGP route flap damping or modifies various BGP route flap damping parameters.

The undo dampening command disables BGP route flap damping.

By default, BGP route flap damping is not configured.

Format

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

undo dampening

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 reachable of a route.

The value is an integer that ranges from 1 to 45, in minutes. By default, it is 15.

reuse

Specifies the threshold value for the route to be unsuppressed. If the penalty of the route is lower than the value, the route is reused.

The value is an integer that ranges from 1 to 20000. By default, it is 750.

suppress

Specifies the threshold value for the route to be suppressed. The route is not used when the penalty reaches the threshold.

The value is an integer ranges from 1 to 20000. By default, it is 2000. It must be greater than the value of reuse.

ceiling

Specifies the ceiling of the threshold.

The value is an integer ranges from 1001 to 20000. By default, it is 16000. It must be greater than the value of suppress.

route-policy route-policy-name

Specifies the name of the Route-Policy.

The name must be unique and is a string of 1 to 40 characters. It is case-sensitive.

ibgp

Enables IBGP route flap damping.

NOTE:

The ibgp parameter takes effect only in the BGP-VPNv4 address pool 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

If the suppression policy for route dampening is configured, routes preferentially match suppression parameters defined by route-policy in the command.

If no optional parameter is configured in the command, the default value of each parameter is used. The four parameters of the command are mutually dependent. If you configure one of the parameters, the other parameters also need to be configured in the command.

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 router 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 router does not add the route to the IP routing table or advertise any Update packet to other BGP peers. BGP strips off the best flag of the route. If the route is marked with the d flag, the last packet received by the router is an Update packet; if the route is marked with the h flag, the last packet received by the router 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.

Configuration Impact

If the dampening command is run more than once, 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.

Precautions

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.

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 BGP route flap dampening and modify various BGP route flap damping parameters.

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

# Enable BGP route flap dampening and modify various IBGP route flap damping parameters.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ipv4-family vpnv4
[Huawei-bgp-af-vpnv4] dampening ibgp 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 ranging 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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support 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 router that runs BGP has multiple routes to the same destination, the router selects the route with the highest local preference as the optimal route.

Precautions

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

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 Multi-Exit-Discriminator (MED) for BGP routes.

The value is an integer ranging 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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support 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 and the new default MED will overwrite the previous one.

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 import 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 router.
  • 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.

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 inform 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 10-124 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
 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
 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
 Limit info    : Route number limit

 Error Type    : Resource exceed limit
 Date/Time     : 2010/03/22 11:40:39
 Limit info    : Label number limit
Table 10-125 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 prefix 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 10-126 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 ipv6 group [ group-name ]

display bgp evpn group [ group-name ]

display bgp mdt all { group [ group-name ] | update-peer-group [ index index ]

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

display bgp multicast group [ group-name ]

display bgp tunnel-encap-ext 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.

vpnv4

Displays information about BGP VPNv4 peer groups.

-

all

Displays information about all BGP VPNv4 or VPNv6 peer groups.

NOTE:

AR600 series do not support displaying information about all BGP VPNv4 peer groups.

-

vpn-instance vpn-instance-name

Displays information about BGP peer groups in a specified VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

ipv6

Displays information about IPv6 peer groups.

-

evpn

Displays information about EVPN peer groups.

-

vpnv6

Displays information about BGP VPNv6 peer groups.

-

multicast

Displays information about MBGP peer groups.

-

tunnel-encap-ext

Displays information about BGP update peer-groups in the Tunnel-encap-ext address family.

-

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 
 listen-net: 10.2.2.0 24
 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)
 listen-net: 10.2.2.0 24
 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 10-127 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.

listen-net

Network segment from which BGP listens to BGP connection requests.

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 reestablishes the connection when the maximum is exceeded and the BGP session is terminated.
  • alert-only: Allows the router to generate log message without terminating BGP session when the maximum is exceeded.
  • idle-forever: If a connection is terminated when the maximum is exceeded, BGP will not reestablish the connection until the reset bgp command is run.
  • idle-timeout: If a connection is terminated when the maximum is exceeded, BGP will reestablish the connection upon timeout.

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 the other 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 bgp ipv6 bfd session

Function

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

This command is supported in V300R019C10 and later versions.

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 VPNv6 instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported.

peer ipv6-address

Specifies the IPv6 address of the peer.

The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

all

Displays all BFD sessions set up by BGP4+.

-

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 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 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 VPNv6 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 BGP4+.

<Huawei> display bgp ipv6 bfd session all
  Local_Address   : 2001:db8:11::11  Peer_Address    : 2001:db8:22::22
  Tx-interval(ms) : 1000             Rx-interval(ms) : 1000
  Multiplier      : 3                Interface       : Unknown
  LD/RD           : 1111/4444        Session-State   : Init
  Wtr-interval(m) : 0

VPN-Instance vrf1:
  Local_Address  : 2001:db8:1::2     Peer_Address   : 2001:db8:1::1
  Tx-interval(ms): 0                 Rx-interval(ms): 0
  Multiplier     : 0                 Interface      : Unknown
  LD/RD          : 8195/0            Session-State  : Init
  Wtr-interval(m): 0
Table 10-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

VPN-Instance vrf1

VPN instance name VRF1

display bgp ipv6 routing-table

Function

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

Format

display bgp ipv6 routing-table [ verbose ]

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 | ipv4-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 time-range start-time end-time

Parameters

Parameter Description Value

verbose

Displays detailed information about routes.

-

ipv6-address

Specifies the IPv6 address of the peer.

It is a 32-bit 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.

It is an integer ranging 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 the 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 basic community filter.

It is an integer ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of advanced community filter.

It is an integer ranging 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.

-

advertised-routes

Displays the routes advertised to the specified peer.

-

dest-ipv6-address

Specifies the destination IPv6 address.

It is a 32-bit 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 five 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+ 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 10-129 Description of the display bgp ipv6 routing-table command output

Item

Description

BGP Local router ID

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 2001:db8:1::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 2001:db8:1::1/128:
 From: 2001:db8:10::2  Route Duration: 00h17m46s  
 Relay IP Nexthop: ::
 Relay IP Out-Interface: 
 Original nexthop: 2001:db8:20::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 10-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 2001:db8:1::1/128:

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

From

IP address of the router that sends the route. 2001:db8: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 verbose

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 | ipv4-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

verbose

Displays detailed information.

-

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.

It is an integer ranging 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 the 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 basic community filter.

It is an integer ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of advanced community filter.

It is an integer ranging from 100 to 199.

peer

Displays the routing information for the specified BGP peer.

-

ipv6-address

Specifies the IPv6 address of the peer.

It is a 32-bit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

ipv4-address

Specifies the IPv4 address of the peer.

The value 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

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

To display the statistics about BGP IPv6 routes, run display bgp ipv6 routing-table statistics command.

Example

# Display statistics of BGP4+ routes.

<Huawei> display bgp ipv6 routing-table statistics

 Total Number of Routes: 4
Table 10-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 mdt routing-table

Function

The display bgp mdt routing-table command displays BGP Multicast Distribution Tree (MDT) routes.

Format

display bgp mdt { all | vpn-instance vpn-instance-name } routing-table [ network [ { mask | mask-length } [ longer-prefixes ] ] ]

display bgp mdt route-distinguisher route-distinguisher routing-table [ network [ mask | mask-length ] ]

display bgp mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table [ as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as ]

display bgp mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table regular-expression as-regular-expression

display bgp mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

display bgp mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table community [ aa:nn | community-number ] & <1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp mdt all routing-table peer ipv4-address { advertised-routes [ statistics | ipv4-address ] | received-routes [ active ] [ statistics ] | no-advertise network [ mask | mask-length ] }

display bgp mdt all routing-table peer ipv4-address received-routes network

Parameters

Parameter Description Value

all

Displays all the BGP routes of MDT.

-

route-distinguisher route-distinguisher

Displays BGP routing information of the specified Route Distinguisher (RD).

-

vpn-instance vpn-instance-name

Displays the BGP routing information of the specified VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

network

Specifies the IPv4 network address.

-

mask | mask-length

Specifies mask in dotted decimal notation or mask-length.

-

longer-prefixes

Matches according to the mask longer than the specified length.

-

as-path-filter

Displays the routes that match the specified filter.

-

as-path-filter-number

Specifies the number of the matching AS_Path filter.

-

as-path-filter-name

Specifies the name of the matching AS_Path filter.

It is case-sensitive.

cidr

Displays the information about the Classless Inter-Domain Routing (CIDR).

-

different-origin-as

Displays routes that have the same destination address but different source ASs.

-

regular-expression as-regular-expression

Specifies the matched AS regular expression.

The value is a string of 1 to 80 characters.

community-filter

Displays the routes that match the specified BGP community filter.

-

community-filter-name

Specifies the name of the community filter.

-

basic-community-filter-number

Specifies the number of basic community filter.

-

advanced-community-filter-number

Specifies the number of advanced community filter.

-

community

Displays the routing information of the specified BGP community attribute in the routing table.

-

aa:nn

Specifies the community attribute number. You can set a maximum of 29 community numbers.

-

community-number

Specifies the community number.

-

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.

-

peer ipv4-address

Displays the routing information for the specified BGP peer.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

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

When BGP MDT 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.

Example

# Display all the BGP MDT routing information.

<Huawei> display bgp mdt all routing-table

 BGP Local router ID is 192.168.7.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

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         0.0.0.0         0                     0      ?

 Route Distinguisher: 200:1

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  1.1.1.1/32         192.168.100.10  0          100        0      33 55?
 *>i  2.2.2.2/32         192.168.100.10  0          100        0      33 55?

 Total number of routes of IPv4-MDT-family for vpn-instance vrf1: 3
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         0.0.0.0         0                     0      ?
 * i                     192.168.100.10  0          100        0      33 55?
 *>i  2.2.2.2/32         192.168.100.10  0          100        0      33 55?

# Display all the BGP MDT routing information of the VPN instance named vpna.

<Huawei> display bgp mdt vpn-instance vpna routing-table

Total Number of Routes: 2

 BGP Local router ID is 2.2.2.9
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
      Network          NextHop        MED      LocPrf    PrefVal Path/Ogn

 *>i  10.1.1.0/24      1.1.1.9         0        100        0      ?
 *>i  10.2.1.0/24      3.3.3.9         0        100        0      ?

# Display the BGP MDT routing information of the specified RD.

<Huawei> display bgp mdt route-distinguisher 100:1 routing-table

 BGP Local router ID is 192.168.7.1
 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: 1

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         0.0.0.0         0                     0      ?

 Total number of routes of IPv4-MDT-family for vpn-instance vrf1: 3
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         0.0.0.0         0                     0      ?
 * i                     192.168.100.10  0          100        0      33 55?
 *>i  2.2.2.2/32         192.168.100.10  0          100        0      33 55?

# Display all BGP MDT routes of community 1000:100.

<Huawei> display bgp mdt all routing-table community 1000:100

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

 Total number of routes from all PE: 1

 Route Distinguisher: 100:1

      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.1.1.0/24        1.1.1.1         0          100        0      <1000:100>

 Total number of routes of IPv4-MDT-family for vpn-instance vpna: 1
      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.1.1.0/24        1.1.1.1         0          100        0      <1000:100>
Table 10-132 Description of the display bgp mdt routing-table command output

Item

Description

Network

Network address in the BGP routing table

Next Hop

Next Hop address through which the packet has to be sent

MED

Multi-Exit discriminator

LocPrf

Local priority

PrefVal

Value preferred by the protocol

Path/Ogn

AS_Path number and the attributes of Origin

Community

Community attributes

# Display all BGP MDT routes of community 1000:100 with the internet community attribute.

<Huawei> display bgp mdt all routing-table community 1000:100 internet

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

 Total number of routes from all PE: 1

 Route Distinguisher: 100:1


      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.1.1.0/24        1.1.1.1         0          100        0      <1000:100>

 Total number of routes of IPv4-MDT-family for vpn-instance vpna: 4
      Network            NextHop        MED        LocPrf    PrefVal Community

 *>i  10.1.1.0/24        1.1.1.1         0          100        0      <1000:100>
 *>   10.2.1.0/24        0.0.0.0         0                     0
 *                       10.2.1.1        0                     0
 *>   10.2.1.2/32        0.0.0.0
Table 10-133 Description of the display bgp mdt all routing-table peer received-routes 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.

Route Distinguisher

Route distinguisher.

BGP routing table entry information of 2.2.2.2/32

The following information is about 2.2.2.2/32 routing entries.

From

IP address of the router that sends the route. 2.2.2.2 is the IP address of the source interface of the peer with which the BGP connection is established, and 2.2.2.9 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.

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.

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.

IGP cost

IGP cost of the next hop.

MDT group address

Group address of MDT.

Not advertised to any peer yet

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

# Display detailed information about the specified invalid BGP MDT routes.
<Huawei> display bgp mdt all routing-table 1.1.1.11
BGP local router ID : 192.168.1.108 
Local AS number : 100 

Total routes of Route Distinguisher(1:2): 1 
BGP routing table entry information of 1.1.1.11/32: 
From: 1.1.1.1 (192.168.1.104) 
Route Duration: 00h00m05s 
Relay IP Nexthop: 48.1.1.4 
Relay IP Out-Interface: Ethernet0/0/1 
Original nexthop: 1.1.1.1 
Qos information : 0x0 
Ext-Community:RT <111 : 1> 
AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for route-policy not pass

MDT group address: 232.1.1.2 
Not advertised to any peer yet 


Total number of routes of IPv4-MDT-family for vpn-instance 2: 1 
BGP routing table entry information of 1.1.1.11/32: 
From: 1.1.1.1 (192.168.1.104) 
Route Duration: 00h00m05s 
Original nexthop: 1.1.1.1 
Qos information : 0x0 
Ext-Community:RT <111 : 1> 
AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, internal, pre 255, invalid for route-policy not pass
MDT group address: 232.1.1.2 
Not advertised to any peer yet 
Table 10-134 Description of the display bgp mdt 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(1:2)

The total number of routes with the RD of 1:2.

BGP routing table entry information of 1.1.1.11/32

The following information is about 1.1.1.11/32 routing entries.

From

IP address of the router that sends the route. 192.168.1.104 is the IP address of the source interface of the peer with which the BGP connection is established, and 1.1.1.1 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.

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.

internal

The BGP route is an internal route.

pre 255

The priority of the BGP route is 255.

invalid for route-policy not pass

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.

MDT group address

Group address of MDT.

Not advertised to any peer yet

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

display bgp mdt brief

Function

The display bgp mdt brief command displays brief information about VPN instances in BGP-MDT address family.

Format

display bgp mdt { all | vpn-instance vpn-instance-name } brief

Parameters

Parameter Description Value

all

Displays information about Multicast Distribution Tree (MDT) instances and all VPN instances.

-

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters, 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

When the display bgp mdt brief command is used to display information about MDT, VPN instances are listed in the lexicographic order of the VPN instance name.

Example

# Display brief information about MDT instances and all VPN instances.

<Huawei> display bgp mdt all brief

MDT:
  Rd Num              Peer Num            Route Num
  0                   1                   0

VPN-Instance(IPv4-MDT-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 10-135 Description of the display bgp mdt all brief command output

Item

Description

Rd Num

Number of Route Distinguishers (RDs)

Peer Num

Number of peers

Route Num

Number of routes

VPN-Instance Name

Name of a VPN instance

display bgp mdt routing-table statistics

Function

The display bgp mdt routing-table statistics command displays the statistics of the BGP Multicast Distribution Tree (MDT) routes.

Format

display bgp mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table statistics

display bgp mdt { all | route-distinguisher route-distinguisher | 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 mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table statistics regular-expression as-regular-expression

display bgp mdt { all | route-distinguisher route-distinguisher | 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 mdt { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table statistics community [ aa:nn | community-number ] & <1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]

display bgp mdt routing-table peer statistics

Parameters

Parameter Description Value

all

Displays all the BGP routes of MDT.

-

route-distinguisher route-distinguisher

Displays BGP routing information of the specified Route Distinguisher (RD).

-

vpn-instance vpn-instance-name

Displays the BGP routing information of the specified VPN instance.

-

as-path-filter

Displays the routes that match the specified filter.

-

as-path-filter-number

Specifies the number of the matched AS_Path filter.

-

as-path-filter-name

Specifies the name of the matching AS_Path filter.

It is case-sensitive.

cidr

Displays the information about the Classless Inter-Domain Routing (CIDR).

-

different-origin-as

Displays the routes that have the same destination address but different source AS number.

-

regular-expression as-regular-expression

Indicates the matched AS regular expression.

The value is a string of 1 to 80 characters.

community-filter

Displays the routing information that matches the specified BGP community filter.

-

community-filter-name

Specifies the name of the community filter.

-

basic-community-filter-number

Specifies the number of basic community filter.

-

whole-match

Indicates exact matching.

-

advanced-community-filter-number

Specifies the number of advanced community filter.

-

community

Displays the routing information of the specified BGP community attribute in the routing table.

-

aa:nn

Specifies the community number.

-

community-number

Specifies the community number.

-

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.

-

peer ipv4-address

Displays the routing information for the specified BGP peer.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display the statistics of the BGP MDT routing table.

<Huawei> display bgp mdt all routing-table statistics

 Total number of routes from all PE: 20

 Total number of routes of IPv4-MDT-family for vpn-instance vpn1: 12
Table 10-136 Description of the display bgp mdt routing-table statistics command output

Item

Description

Total number of routes from all PE

The number of the routes received from PEs in the BGP MDT routing table

Total number of routes of IPv4-MDT-family for vpn-instance

The number of the routes of the specified VPN instance in the BGP MDT routing table

display bgp multicast group

Function

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

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
 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 10-137 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

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.

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 10-138 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

display bgp multicast paths

Function

The display bgp multicast paths command displays the information about path attributes of MBGP.

Format

display bgp multicast paths [ as-regular-expression ]

Parameters

Parameter Description Value

as-regular-expression

Displays the regular expression of the matched AS.

The value is a string of 1 to 80

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the information about path attributes of MBGP, run display bgp multicast paths command.

Example

# Display the information about MBGP paths.

<Huawei> display bgp multicast paths 1

Total Number of Routes: 17


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

Item

Description

Total Number of Routes

Total Number of Routes

Address

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

Refcount

Number of times that the route are 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 the information about a specified MBGP peer. If peer-address is not specified, the information about all MBGP peers is displayed.

Format

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

Parameters

Parameter Description Value

peer-address

Specifies the address of an MBGP peer.

The address is in dotted decimal notation.

verbose

Specifies the detailed information about an MBGP peer.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the information about a specified MBGP peer, run display bgp multicast peer command.

Example

# Display the 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 10-140 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

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

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.

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 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 10-141 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 1.1.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 1.1.1.1/32:
 From: 2.2.2.2 (10.1.1.2)
 Route Duration: 00h01m15s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: 
 Original nexthop: 20.1.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 1.1.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: 20.1.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 10-142 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 1.1.1.1/32

The following information is about 1.1.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 2.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.

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 the routing information that matches the filtering list.

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 matched AS Path filtering list.

The value is an integer that ranges from 1 to 256.

as-path-filter-name

Specifies the name of the matched AS Path filtering list.

The value is a string of 1 to 51 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the routing information that matches the filtering list, run display bgp multicast routing-table as-path-filter command.

Example

# Display routing information that match the AS-path filtering list 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 10-143 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 packet

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

AS_Path and the Origin attribute

display bgp multicast routing-table cidr

Function

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

Format

display bgp multicast routing-table cidr

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the routing information of classless inter-domain routing (CIDR), run display bgp multicast routing-table cidr command.

Example

# Display the 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 10-144 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 packet

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

Displays the AS path and the Origin attribute

display bgp multicast routing-table community

Function

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

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 MBGP communities.

It is an integer ranging 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 the precise matching.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the routing information of a specified MBGP community, run display bgp multicast routing-table community command.

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 10-145 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.

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 basic community filter.

The value is an integer that ranges from 1 to 99.

advanced-community-filter-number

Specifies the number of advanced community filter.

The value is an integer that ranges from 100 to 199.

community-filter-name

Specifies the name of the community filter.

The value is a string of 1 to 51 case-sensitive characters without spaces.

whole-match

Indicates the exact matching.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the multicast routing information that matches a specified MBGP community list, run display bgp multicast routing-table community-filter command.

Example

# Display the 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 10-146 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 the packet

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 the dampened MBGP routes.

Format

display bgp multicast routing-table [ statistics ] dampened

Parameters

Parameter Description Value

statistics

Displays the statistics of dampened routes.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the dampened MBGP routes, run display bgp multicast routing-table dampened command.

Example

# Display the dampened routes of MBGP.

<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 10-147 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 the attributes of Origin

display bgp multicast routing-table dampening parameter

Function

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

Format

display bgp multicast routing-table dampening parameter

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the information about the MBGP dampening parameters, run display bgp multicast routing-table dampening parameter command.

Example

# Display the 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 10-148 Description of the display bgp multicast routing-table dampening parameter command output

Item

Description

Maximum Suppress Time (in second)

Maximum suppression time (in second)

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

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.

Format

display bgp multicast routing-table different-origin-as

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

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

Example

# Displays 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 10-149 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 packet

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

Displays the AS path and the Origin attribute

display bgp multicast routing-table flap-info

Function

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

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-regular-expression 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-name 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

To display the information about MBGP route flapping, run display bgp multicast routing-table flap-info command.

Example

# Display the information about the route flapping of MBGP.

<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 10-150 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 the peer from which the route is received

Flaps

Count of route flapping

Duration

Duration of the route flapping

Reuse

Reuse value

Path/Ogn

AS-Path number and the attributes of Origin

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.

Format

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

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 address is in dotted decimal notation.

advertised-routes

Indicates the routes sent to a specified peer.

-

no-advertise

Indicates the routes are not advertised.

-

network

Specifies the IPv4 network address.

The address is in dotted decimal notation.

mask

Specifies the address mask.

The address is in dotted decimal notation.

mask-length

Specifies the mask length.

The value is an integer ranging 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.

-

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

To display the routes received from or sent to a specified MBGP peer, run display bgp multicast routing-table peer command.

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 10-151 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 packet

MED

Multi-Exit discriminator

LocPrf

Local preference

PrefVal

Preferred value of protocols

Path/Ogn

Displays the AS path and the 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.

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, spaces not supported.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display the routes that match the specified AS_Path regular expression, run display bgp multicast routing-table regular-expression command.

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 10-152 Description of the display bgp multicast routing-table regular-expression command output

Item

Description

BGP local router ID

BGP local router ID

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 bgp multicast routing-table statistics

Function

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

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

To display the statistics of the MBGP routes, run display bgp multicast routing-table statistics command.

Example

# Display statistics about routes in the MBGP routing table.

<Huawei> display bgp multicast routing-table statistics
Total Number of Routes: 50
Table 10-153 Description of the display bgp multicast routing-table statistics command output

Item

Description

Total Number of Routes

Indicates the 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.

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 ranging 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 10-154 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

display bgp multicast network

Parameters

Parameter Description Value

vpnv4

Displays the VPNv4 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

ipv6

Displays the IPv6 routes advertised by BGP.

-

vpnv6

Displays the VPNv6 routing information advertised by BGP through the network command.

-

multicast

Displays the routing information advertised by Multicast BGP (MBGP) through the network command.

-

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 10-155 Description of the display bgp network command output

Item

Description

Local AS Number is

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 10.2.2.9:
  Network          Mask            Route-policy
  10.5.5.5         255.255.255.255
Table 10-156 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
Table 10-157 Description of the display bgp ipv6 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.

Prefix

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

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 ]

display bgp multicast paths [ as-regular-expression ]

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

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 path attributes of BGP Virtual Private Network version 6 (VPNv6).

-

all

Displays the AS_Path information of all VPNv4 routes.

-

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

ipv6

Displays the path attributes of IPv6-BGP routes in the local BGP database.

-

multicast

Displays the path attributes of Multicast BGP (MBGP).

-

mdt

Displays the path attributes of Multicast Distribution Tree (MDT).

-

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 Command Outputs" in the NetEngine AR600, AR6100, AR6200, and AR6300 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 10-158 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 information about BGP4+ paths.

<Huawei> display bgp ipv6 paths

Total Number of Routes: 6
Total Number of Paths: 4

    Address       Refcount  MED         Path/Origin
    0x41036F0     1         0            i
    0x4103758     1         0            i
    0x41037C0     1         0            i
    0x41038F8     3         0            200i

# Display information about BGP4+ paths of VPN instance named vpn1.

<Huawei> display bgp vpnv6 vpn-instance vpn1 paths

 Total number of routes of IPv6-family for vpn-instance vpn1: 2
 Total Number of Paths: 3

    Address       Refcount  MED         Path/Origin
    0xF9E4120     1                     100?
    0xF9E42EC     1         0           65410?
    0xF9E40C4     1         0            ?

# Display the BGP4+ paths, including AS_Path 65420, of VPN instance named vpn1.

<Huawei> display bgp vpnv6 vpn-instance vpn1 paths 65420*

 Total number of routes of IPv6-family for vpn-instance vpn1: 1

    Address       Refcount  MED         Path/Origin
    0xF9E42EC     1         0           65420?

# Display the 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?

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 vpnv6 vpn-instance vpn-instance-name peer [ { group-name | ipv6-address } log-info | [ ipv6-address ] verbose ]

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

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

display bgp ipv6 peer [ verbose ]

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

display bgp ipv6 peer ipv4-address verbose

display bgp evpn peer [ [ ipv4-address ] verbose ]

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

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

display bgp tunnel-encap-ext peer [ [ ipv4-address ] verbose ]

Parameters

Parameter Description Value

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters, 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 to be displayed. To display IPv6 Provider Edge (6PE) peers, run the display bgp ipv6 peer ipv4-address verbose command.

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 instances.

-

ipv6

Displays IPv6 peers.

-

ipv6-address

Specifies the IPv6 address of a peer to be displayed.

The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

evpn

Displays information about EVPN peer groups.

-

vpnv6

Displays information about BGP Virtual Private Network version 6 (VPNv6) peers.

-

multicast

Displays Multicast BGP (MBGP) peers.

-

tunnel-encap-ext

Displays routing information in the Tunnel-encap-ext address family.

-

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
 Status codes: * - Dynamic
 BGP Local router ID : 10.2.3.4
 local AS number : 10
 Total number of peers : 2                 
 Peers in established state : 1

 Total number of dynamic peers : 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 10-159 Description of the display bgp peer command output

Item

Description

Status codes: * - Dynamic

Status code. If the value starts with an asterisk (*), the peer is a dynamic peer. Currently, the value can only be * - Dynamic.

BGP Local router ID

Indicates the ID of the BGP local router.

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.

Total number of dynamic peers

Total number of dynamic BGP peers.

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.

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

  • 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 the other 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
         Dynamic peer          
         Belong to peer-group: gp1 
         Belong to listen-net: 10.2.2.0 24
         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
         Received mac routes: 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 10-160 Description of the display bgp peer verbose command output

Item

Description

Type

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

Dynamic peer

The peer is a dynamic BGP peer.

Belong to peer-group

Peer group to which the peer belongs.

Belong to listen-net

Network segment to which the dynamic peer belongs.

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.

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

  • 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 the other 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.

Received mac routes

Number of MAC routes received.

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

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 capability is enabled.

Listen-only has been configured

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

Peer optional capabilities

Capability supported by peers (optional).

  • Peer supports bgp multi-protocol extension: Indicates the BGP peer supports BGP multi-protocol extension.
  • Peer supports bgp route refresh capability: Indicates the BGP peer supports BGP route refresh.
  • Peer supports bgp 4-byte-as capability: Indicates the BGP peer supports BGP 4-byte AS numbers.

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 BFD 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 10-161 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

 Status codes: * - Dynamic
 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

 Total number of dynamic peers : 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
         Dynamic peer 
         Belong to peer-group: gp2   
         Belong to listen-net: 10.1.2.0 24
         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
                  Received mac routes: 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

  2001:db8:1::1   4   200       17       19     0 00:09:59 Established       3

# Display information about IPv6 peers.

<Huawei> display bgp ipv6 peer 2001:db8:1::1 verbose
         BGP Peer is 2001:db8:1::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
         Received mac routes: 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 bgp peer orf ip-prefix

Function

The display bgp peer orf ip-prefix command displays the prefix-based Outbound Routes Filter (ORF) received by a device from a specified peer.

Format

display bgp peer ipv4-address orf ip-prefix

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After a device successfully negotiates the ORF capability with its peer, this command can be used to display information about the prefix-based ORF received from the peer.

Example

# Display the prefix-based ORF received by a device from a peer at 10.1.1.2.

<Huawei> display bgp peer 10.1.1.2 orf ip-prefix
Total number of ip-prefix received: 1
 Index  Action  Prefix           MaskLen  MinLen  MaxLen
 10     Permit  10.4.4.0         24       32      32
Table 10-162 Description of the display bgp peer orf ip-prefix command output

Item

Description

Index

Indicates the index of an IP prefix list.

Action

Indicates the action associated with an IP prefix list, which can be one of the following:

  • deny
  • permit

Prefix

Indicates an IP prefix.

MaskLen

Indicates the mask length of an IP prefix.

MinLen

Indicates the minimum mask length of an IP prefix.

MaxLen

Indicates the maximum mask length of an IP prefix.

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 : 500

   Capacity Statistics     Used Number

   BGP Peer Session          3
   IBGP Peer Session         3
   EBGP Peer Session         0
Table 10-163 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 [ verbose | 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 { advertised-routes [ ipv4-address [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] }

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 accepted-routes

display bgp routing-table peer ipv4-address no-advertise ipv4-address [ ipv4-address | mask-length ]

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

Parameters

Parameter Description Value

verbose

Displays detailed information about BGP routes.

-

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 ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of an advanced community filter.

The value is an integer ranging 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 BGP routes carrying the Internet 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.

-

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

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 10-164 Description of the display bgp routing-table command output

Item

Description

BGP Local Router ID

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: Ethernet3/0/1
 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 10-165 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.

Qos information

QoS information.

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 1.1.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 1.1.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: 20.1.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 1.1.1.1/32:
 From: 2.2.2.2 (10.1.1.2)
 Route Duration: 00h00m51s  
 Relay IP Nexthop: 0.0.0.0
 Relay IP Out-Interface: 
 Original nexthop: 20.1.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 10-166 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 1.1.1.1/32

The following information is about 1.1.1.1/32 routing entries.

From

IP address of the router that sends the route. 10.1.1.1 is the IP address of the source interface of the peer with which the BGP connection is established, and 2.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.

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 dampened

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table [ statistics ] dampened

display bgp ipv6 routing-table [ statistics ] dampened

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

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 10-167 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 10-168 Description of the display bgp ipv6 routing-table dampened command output

Item

Description

PrefixLen

Prefix length

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 vpnv4 all routing-table dampening parameter

display bgp ipv6 routing-table dampening parameter

display bgp vpnv6 vpn6-instance vpn6-instance-name routing-table dampening parameter

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

ipv6

Displays configured BGP4+ route dampening parameters.

-

vpnv6

Displays the BGP route dampening parameters of a VPNv6 instance.

-

all

Displays all BGP VPNv4 route dampening parameters

-

vpn6-instance vpn6-instance-name

Specifies the name of a VPNv6 instance.

The value is a string of 1 to 31 case-sensitive characters, 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

To display configured BGP route dampening parameters, run display bgp routing-table dampening parameter command.

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 10-169 Description of the display bgp routing-table dampening parameter command output

Item

Description

Maximum Suppress Time (in second)

Indicates the maximum time taken for route suppression, in seconds.

Ceiling Value

Indicates the penalty ceiling.

Reuse Value

Indicates the threshold for a route to be unsuppressed.

HalfLife Time(in second)

Indicates the half life of a reachable route, in seconds.

Suppress-Limit

Indicates the 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

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 routing-table flap-info [ regular-expression as-regular-expression | as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ { mask | mask-length } [ longer-match ] ] ]

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table flap-info [ as-path-filter { as-path-filter-number | as-path-filter-name } | regular-expression as-regular-expression | network-address [ { mask | mask-length } [ longer-match ] ] ]

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 ]

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 ] ] }

Parameters

Parameter Description Value

vpnv4

Displays statistics about BGP route flapping of a VPNv4 instance.

-

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 any 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 ranging from 0 to 32.

longer-match

Matches a route with a longer prefix.

-

prefix-length

Specifies the prefix length.

It is an integer ranging from 0 to 128.

vpnv6

Displays statistics about route flapping of a VPNv6 instance.

-

route-distinguisher route-distinguisher

Displays the Route Distinguisher dampened BGP routes.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display statistics about BGP route flapping, run display bgp routing-table flap-info command.

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 10-170 Description of the display bgp routing-table flap 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.

Flaps

Indicates the total number of times of route flapping.

Duration

Indicates the total time length of flapping.

Reuse

Indicates the reuse value.

Path/Ogn

Indicates the AS_Path number and the 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.

Format

display bgp routing-table label [ statistics | include-mask ]

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table [ statistics ] label

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table label [ include-mask ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table [ statistics ] label

display bgp vpnv6 all routing-table [ statistics ]

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.

-

vpnv6

Displays VPNv6 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 is a string of 1 to 31 case-sensitive characters, 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

To display labeled routes in the BGP routing table, run display bgp routing-table label command.

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 10-171 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 routing information.

<Huawei> display bgp ipv6 routing-table label
Total Number of Routes: 3

  Network     Prefix     NextHop           Label
  2001:db8::4 128     ::FFFF:20.0.0.2      1024
  2001:db8::5 128     ::FFFF:20.0.0.2      1025
  2001:db8::6 128     ::FFFF:20.0.0.2      1026
Table 10-172 Description of the display bgp routing-table label command output

Item

Description

Prefix

IP prefix.

# Display BGP4 labeled routes of all IPv6 VPN instances.

<Huawei> display bgp vpnv6 all routing-table label
 BGP Local router ID is 1.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              Prefix     NextHop            In/Out Label
 *>  2001:db8:1::         64     2001::1                1039/NULL

 Route Distinguisher: 100:2
     Network              Prefix     NextHop            In/Out Label
 *>i 2001:db8:2::         64     ::FFFF:3.3.3.9         NULL/1037

 VPN-Instance vpn1, Router ID 10.4.4.4 :
 Total Number of Routes: 1
     Network              Prefix     NextHop            In/Out Label
 *>i 2001:db8:2::         64     ::FFFF:3.3.3.9         NULL/1037

# Display the BGP4+ labeled routes of the VPN instance named vpna.

<Huawei> display bgp vpnv6 vpn-instance vpna routing-table label
 BGP Local router ID is 1.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 vpna, Router ID 10.4.4.4 :
 Total Number of Routes: 1
     Network              Prefix     NextHop            In/Out Label
 *>i 2001:db8:2::         64     ::FFFF:3.3.3.9         NULL/1037

# Display IPv4 labeled routes carrying masks.

<Huawei> display bgp routing-table label include-mask
 BGP Local router ID is 2.2.2.2
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 10

        Network           NextHop           In/Out Label
 *>i   10.1.92.0/24      1.1.1.1           NULL/1035
 *>i   10.1.93.0/24      1.1.1.1           NULL/1034
 *>i   10.1.94.0/24      1.1.1.1           NULL/1033

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 vpnv4 { all | vpn-instance vpn-instance-name } routing-table peer ipv4-address no-advertise network [ mask | mask-length ]

display bgp multicast 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 ipv6 routing-table peer ipv4-address no-advertise network [ mask | mask-length ]

display bgp tunnel-encap-ext all routing-table peer ipv4-address no-advertise prefix-route

display bgp evpn all routing-table peer ipv4-address no-advertise { inclusive-route inclusive-route | mac-route mac-route | prefix-route prefix-route }

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 IP 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 ranging 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 ranging from 0 to 128.

mdt

Displays the routes that a device is prevented from advertising to a specified peer in the multicast distribution tree (MDT) address family.

-

tunnel-encap-ext

Displays the routes that a device is prevented from advertising to a specified peer in the Tunnel-encap-ext address family.

-

evpn

Displays the routes that a device is prevented from advertising to a specified peer in the EVPN address family.

-

prefix-route

Specifies an IP prefix route.

The value is in the L:X.X.X.X:M format, where:
  • L: The value is fixed at 0.

  • X.X.X.X: The value is a host IP address.

  • M: The value is a host IP address mask.

inclusive-route

Displays information about inclusive multicast routes.

-

inclusive-route

Specifies an inclusive multicast route.

The value is in the M:L:X.X.X.X format, where:
  • M: The value is fixed at 0.

  • X.X.X.X: Source IP address of the device that originates the inclusive multicast route.

  • L: Mask length of the source IP address of the device that originates the inclusive multicast route.

mac-route

Displays information about MAC advertisement routes.

-

mac-route

Specifies a MAC advertisement route.

The value is in the E:M:H-H-H:L:X.X.X.X or E:M:H-H-H:L:[X:X::X:X] format, where:
  • E: ID of the VLAN to which the MAC address belongs.

  • M: The value is fixed at 48, indicating the length of the MAC address.

  • H-H-H: MAC address. Each H is a 4-digit hexadecimal number, such as 00e0 and fc01. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is displayed as 00e0.

  • L: Mask length of the IP address corresponding to the MAC address.

  • X.X.X.X: IP address corresponding to the MAC address.

  • X:X::X:X: IPv6 address corresponding to the MAC address.

prefix-route

Displays information about IP prefix routes.

-

prefix-route

Specifies an IP prefix route.

The value is in the L:X.X.X.X:M or L:[X:X::X:X]:M format:
  • L: The value is fixed at 0.

  • X.X.X.X: The value is a host IP address.

  • M: The value is a host IP address mask.

  • X:X::X:X: IPv6 address corresponding to the MAC address.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check the BGP 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 3.3.3.4/32 that a device is prevented from advertising to peer with IP address 1.1.1.1 in the IPv4 unicast address family.

<Huawei> display bgp routing-table peer 1.1.1.1 no-advertise 3.3.3.4 32
 BGP routing table entry information of 3.3.3.4/32:
 From: 1.1.1.1 (10.1.1.1)
 Route Duration: 22h36m17s  
 Relay IP Nexthop: 10.1.1.1
 Relay IP Out-Interface: GigabitEthernet1/0/0
 Original nexthop: 1.1.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 10-173 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 carried in the route.

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 { vpnv4 | vpnv6 } { all | vpn-instance vpn-instance-name } routing-table peer statistics

display bgp [ multicast | ipv6 ] routing-table peer statistics

display bgp evpn routing-table peer statistics

display bgp tunnel-encap-ext routing-table peer statistics

Parameters

Parameter Description Value

multicast

Displays statistics about routes in the IP multicast routing table.

-

ipv6

Displays statistics about routes in the BGP IPv6 unicast 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

evpn

Displays information about EVPN peer groups.

-

tunnel-encap-ext

Displays information about routes in the Tunnel-encap-ext address family.

-

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 10-174 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

display bgp routing-table verbose

Parameters

Parameter Description Value

as-path-filter as-path-filter-number

Displays the routes that match the specified 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 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.

It is an integer ranging 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.

It is an integer ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of an advanced community filter.

It is an integer ranging 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.

-

verbose

Displays detailed information.

-

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 10-175 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 { vpn-instance vpn-instance-name | all } ] update-peer-group [ index update-group-index ]

display bgp vpnv6 { all | vpn-instance vpn-instance-name } update-peer-group [ index update-group-index ]

display bgp tunnel-encap-ext update-peer-group [ index update-peer-group-index ]

Parameters

Parameter Description Value

index update-group-index

Specifies the index of an update-group.

The value is an integer ranging 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

vpnv6

Displays information about BGP Virtual Private Network version 6 (VPNv6) update-groups.

-

all

Displays information about all the update-groups in a VPNv4 or VPNv6 address family.

-

tunnel-encap-ext

Displays information about BGP update peer-groups in the Tunnel-encap-ext address family.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display bgp update-peer-group command is used to display information about all the update-groups in the IPv4 unicast address family on the public network.

The display bgp update-peer-group index command is used to display information about the update-group matching a specified index in the IPv4 unicast address family on the public network.

The display bgp vpnv4 all update-peer-group command is used to display information about all the update-groups in the VPNv4 unicast address family.

The display bgp vpnv4 all update-peer-group index command is used to display information about the update-group matching a specified index in the VPNv4 unicast address family on the public network.

The display bgp vpnv4 vpn-instance update-peer-group command is used to display information about the update-groups in the IPv4 unicast address family in a specified VRF.

The display bgp vpnv4 vpn-instance update-peer-group index command is used to display information about the update-group matching a specified index in the IPv4 unicast address family in a specified VRF.

Example

# Display information about the update-groups in a certain 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 10-176 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 10-177 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 tunnel-encap-ext update-peer-group

Function

The display bgp tunnel-encap-ext update-peer-group command displays information about BGP update peer-groups in the Tunnel-encap-ext address family.

Format

display bgp tunnel-encap-ext update-peer-group [ index update-peer-group-index ]

Parameters

Parameter Description Value

index update-peer-group-index

Specifies the index of a BGP update peer-group.

The value is an integer.

Views

All view

Default Level

3: Management level

Usage Guidelines

On a Tunnel-encap-ext network, to check information about BGP update peer-groups in the Tunnel-encap-ext address family, run the display bgp tunnel-encap-ext update-peer-group command.

Example

# Display information about the BGP update peer-group with the index 0 in the Tunnel-encap-ext address family.

<Huawei> display bgp tunnel-encap-ext update-peer-group index 0
                                                                                
  Group ID               : 0                                                    
  BGP Version            : 4                                                    
  Group Type             : internal                                             
  Addr Family            : TUNNEL-ENCAP-EXT                                     
  AdvMinTimeVal          : 0                                                    
  Total Peers            : 1                                                    
  Leader Peer            : 101.1.61.1                                           
                                                                                
  Total format packet number     : 0                                            
  Total send packet number       : 0                                            
  Total replicate packet number  : 0                                            
  The replication percentages(%) : 0                                            
                                                                                
  Group ID               : 0                                                    
  Total Peers            : 1                                                    
  Current State          : Pending                                              
  Previous State         : Pending                                              
  Current Event          : PeerSwitchOut                                        
                                                                                
  Status                 : 0x0                                                  
  PolicyBitMap           : 0x0                                                  
  PolicyBitMapExt        : 0x0                                                  
                                                                                
  Counter:                                                                      
  Peers Switch In        : 0                                                    
  Peers will Switch Out  : 0                                                    
  Peers have Switch Out  : 0                                                    
  Peers Need Smooth      : 0                                                    
  Peers Need Refresh     : 0                                                    
  Peers Under GR Helper  : 0                                                    
                                                                                
  Running Jobs                                                                  
                                                                                
  Running Timers                                                                
  Timer                            Value(s)         TimeLeft(s)                 
  Peer Switch Back                 300              151                         
                                                                                
  Advetise List Count:                                                          
  Realtime Nomal List    : 0                                                    
  Realtime Label List    : 0                                                    
  Batch Nomal List       : 0                                                    
  Batch Label List       : 0                                                    
                                                                                
  Peers List             :                                                      
  Pending List           :                                                      
                           Peer ID(101.1.61.1),                                 
  Syncing List           :                                                      
  Sending List           :                                                      
  Waiting List           :                  
Table 10-178 Description of the display bgp tunnel-encap-ext update-peer-group command output

Item

Description

The TUNNEL-ENCAP-EXT instance's update peer group number

Number of BGP update peer-groups in the Tunnel-encap-ext instance

Keep buffer update peer group number

Number of update peer-groups stored in the batch buffer

Memory-block-number

Number of memory blocks that have been applied for in the update peer-group

Group ID

ID of the BGP update peer-group

Group Type

Type of a BGP update peer-group:

  • external: EBGP update peer-group

  • internal: IBGP update peer-group

  • external-confed: EBGP update peer-group in the confederation

  • internal-confed: IBGP update peer-group in the confederation

  • unknown: unknown update peer-group

Total Peers

Total number of BGP peers in the update peer-group

Leader Peer

Leader peer in the update peer-group

Peers List

List of all BGP peers in the update peer-group

Pending List

List of BGP peers that do not need to send data in the update peer-group

Syncing List

List of BGP peers that are sending data in real time in the update peer-group

Peer ID

IP address of the peer

PeerFlag

Flag of the BGP peer

Sending List

List of BGP peers that are sending data in batches in the update peer-group

Waiting List

List of BGP peers that are waiting to send data in the update peer-group

BGP Version

BGP version

Addr Family

Address family

AdvMinTimeVal

Minimum interval (in seconds) at which Update messages with the same route prefix are sent

Total format packet number

Number of Update messages in the update peer-group

Total send packet number

Number of Update messages sent to all BGP peers in the update peer-group

Total replicate packet number

Absolute value of the difference between Total send packet number and Total format packet number, that is, absolute value of the difference between the number of Update messages that are sent to all peers in the update peer-group and the number of Update messages in the update peer-group

The replication percentages(%)

Percentage of the number of replicated Update messages to the total number of sent Update messages, that is, (Total send packet numberTotal format packet number)/Total send packet number

Current State

Current status of the update peer-group:
  • Pending: waiting to send data
  • BatchSend: sending data in batches
  • RealtimeSend: sending data in real time

Previous State

Previous status of the update peer-group:
  • Pending: waiting to send data
  • BatchSend: sending data in batches
  • RealtimeSend: sending data in real time

Current Event

Event that triggers the current state of the update peer-group

Status

Current status flag of the update peer-group

PolicyBitMap

Grouping condition flag of the update peer-group

PolicyBitMapExt

Grouping condition extension flag of the update peer-group

Counter

Statistics about BGP peers

Peers Switch In

Number of BGP peers that are added to the update peer-group

Peers will Switch Out

Number of BGP peers that are to leave the update peer-group

Peers have Switch Out

Number of BGP peers that have left the update peer-group

Peers Need Smooth

Number of BGP peers that need smooth restoration

Peers Need Refresh

Number of BGP peers whose local routes need to be updated again

Peers Under GR Helper

Number of BGP peers in GR Helper state

Running Jobs

Jobs that are running

Running Timers

Timers that are running

Timer

Timer name

Value(s)

Timer period, in seconds

TimeLeft(s)

Remaining time in the timer period, in seconds

Advetise List Count

Statistics about the data sent by BGP peers

Realtime Nomal List

List of BGP peers that send unlabeled data in real time

Realtime Label List

List of BGP peers that send labeled data in real time

Batch Nomal List

List of BGP peers that send unlabeled data in batches

Batch Label List

List of BGP peers that send labeled data in batches

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 is a string of 1 to 31 case-sensitive characters, 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

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 10-179 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 | 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 | 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 ]

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table ipv4-address [ mask [ longer-prefixes ] | mask-length [ longer-prefixes ] ]

display bgp vpnv4 { all | 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 ] ]

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 | 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 { all | route-distinguisher route-distinguisher | 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 peer ipv4-address accepted-routes

display bgp vpnv4 { all | vpn-instance vpn-instance-name } routing-table time-range start-time end-time

display bgp vpnv4 { all | route-distinguisher route-distinguisher } routing-table [ verbose | statistics | ipv4-address [ mask | mask-length ] ]

display bgp vpnv4 vpn-instance vpn-instance-name routing-table [ verbose | statistics | ipv4-address [ { mask | mask-length }[ longer-prefixes ] ] ]

Parameters

Parameter Description Value

verbose

Displays detailed information about BGP public network routes.

-

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 ranging 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        3.3.3.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 10-180 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: GigabitEthernet0/0/2  
 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: GigabitEthernet0/0/2  
 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: GigabitEthernet0/0/2  
 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: GigabitEthernet0/0/2   
 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 10-181 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.

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 4.4.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 4.4.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 4.4.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 10-182 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 4.4.4.4/32

The following information is about 4.4.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.

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 4.4.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 | 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 | vpn-instance vpn-instance-name } routing-table statistics regular-expression as-regular-expression

display bgp vpnv4 { all | route-distinguisher route-distinguisher | 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 | 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 | 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 the BGP routes for VPNv4.

-

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 ranging 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 ranging 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 ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of an advanced community filter.

The value is an integer ranging 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

To display statistics about BGP VPNv4 routes, run display bgp vpnv4 all routing-table statistics command.

Example

# Display statistics about 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                                                      

# Display statistics about the VPNv4 routes with the specified RD.

<Huawei> display bgp vpnv4 route-distinguisher 100:1 routing-table statistics
                                                                                
 Route Distinguisher: 100:1                                                     
                                                                                
                                                                                
 Total Number of Routes: 2                                                      
                                                                                
 VPN-Instance vpn1, Router ID 10.1.1.9:                                          
                                                                                
 Total Number of Routes: 2
Table 10-183 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

The name of VPN instance is vpn1.

Router ID 10.1.1.9

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).

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 is a string of 1 to 31 case-sensitive characters, 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

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

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 10-184 Description of the display bgp vpnv6 all brief command output

Item

Description

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.

Format

display bgp vpnv6 { all | vpn-instance vpn-instance-name | route-distinguisher route-distinguisher } routing-table [ verbose | ipv6-address [ prefix-length ] ]

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 as-path-filter { as-path-filter-number | as-path-filter-name }

display bgp vpnv6 all routing-table

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 [ 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-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }

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 different-origin-as

display bgp vpnv6 route-distinguisher route-distinguisher routing-table different-origin-as

display bgp vpnv6 { all | vpn-instance vpn-instance-name } routing-table regular-expression as-regular-expression

display bgp vpnv6 route-distinguisher route-distinguisher 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 all routing-table peer ipv6-address { advertised-routes [ dest-ipv6-address [ prefix-length ] ] | received-routes [ active ] | no-advertise network [ mask | mask-length ] }

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 ipv6-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

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

verbose

Displays detailed information about BGP VPNv6 routes.

-

route-distinguisher route-distinguisher

Indicates the route distinguisher (RD).

The RD formats are divided into the following types:

  • 16-byte AS number: 32-bit 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 user-defined number cannot be both 0s. 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 1 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.
  • 32-bit IP address: 16-bit 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-bit 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 ranging 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.

-

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.

-

advertised-routes

Displays the routes advertised to a specified peer.

-

dest-ipv6–address

Specifies the destination IPv6 address.

-

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 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 :                                                            
                                                                                
 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 :
 *>  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 10-185 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 router 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 BGP4+ 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 BGP4+ routes with the specified destination address of the 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 routes whose AS_Path attribute contains 65420 in the BGP4+ routing table of a VPN instance named vpn1.

<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 :

 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 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 2001:db8:5::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 2001:db8:5::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 10-186 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 2001:db8:5::5/128

The following information is about 2001:db8:5::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.

Format

display bgp vpnv6 { all | route-distinguisher route-distinguisher | 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 { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table statistics regular-expression as-regular-expression

display bgp vpnv6 { all | route-distinguisher route-distinguisher | 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 { all | route-distinguisher route-distinguisher | 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

display bgp vpnv6 { all | route-distinguisher route-distinguisher | vpn-instance vpn-instance-name } routing-table [ verbose | ipv6-address [ prefix-length ] | statistics ]

Parameters

Parameter Description Value

all

Displays statistics about all BGP VPNv6 routes.

-

route-distinguisher route-distinguisher

Indicates the route distinguisher (RD).

The RD formats are divided into the following types:

  • 2-byte AS number:32-bit 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 user-defined number cannot be both 0s. 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 1 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.

  • 32-bit IP address:16-bit 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 ranging 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.

It is an integer ranging 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 characters without any space. It is case-sensitive.

basic-community-filter-number

Specifies the number of a basic community filter.

It is an integer ranging from 1 to 99.

advanced-community-filter-number

Specifies the number of an advanced community filter.

It is an integer ranging 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

Displays the active routes received from a specified peer.

-

verbose

Displays detailed information.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To display statistics about BGP VPNv6 routes, run display bgp vpnv6 all routing-table statistics command.

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 of BGP VPNv6 routes with RD 2001:db8:100:1 on local router.
<Huawei> display bgp vpnv6 route-distinguisher 2001:db8:100:1 routing-table statistics

 Route Distinguisher: 2001:db8:100:1


 Total Number of Routes: 1

 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 the number of BGP VPNv6 routes received from peer 1.1.1.1.

<Huawei> display bgp vpnv6 all routing-table peer 1.1.1.1 received-routes statistics
  Received routes total: 1
# Display statistics of VPN-IPv6 routes with the internet community attribute of the specified RD on the local router.
<Huawei> display bgp vpnv6 route-distinguisher 2001:db8: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 of all BGP VPNv6 routes of the specified community list on the local router.

<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 of all BGP VPNv6 routes that match the 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 2001:db8:2000::1 of the IPv6 VPN instance named vpn1.

<Huawei> display bgp vpnv6 vpn-instance vpn1 routing-table peer 2001:db8:2000::1 received-routes statistics
  Received routes total: 2

# Display statistics about the IPv6 routes sent by the local device to peer 2001:db8:2000::1 in a VPN instance named vpn1.

<Huawei> display bgp vpnv6 vpn-instance vpn1 routing-table peer 2001:db8: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

To display default configurations in BGP initialization, run display default-parameter bgp command.

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
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)                                        
                             label-route(ip)                                    
                             multicast(ip)                                      
                             vpn-instance(tunnel)                               
                             vpnv4(ip)                                          
     IPv6-family           : unicast(ip)                                        
                             vpn-instance(tunnel) 
                             vpnv6(ip)
                             6PE(tunnel)
 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 10-187 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.

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 10-188 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 10-189 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 10-190 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

3: Management 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 : 13
------------------------------------------------------------------------------
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
HWBGPDYNAMICPEERSESSIONEXCEED   off                     off 
HWBGPDYNAMICPEERSESSIONEXCEEDCLEAR                                 
                                off                     off
PEERSESSIONTHRESHOLDEXCEED      off                     off                     
PEERSESSIONTHRESHOLDCLEAR       off                     off 
Table 10-191 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.
  • HWBGPDYNAMICPEERSESSIONEXCEED: indicates the alarm generated when the number of dynamic BGP peer sessions exceeds the maximum number.

  • HWBGPDYNAMICPEERSESSIONEXCEEDCLEAR: indicates the alarm generated when the number of dynamic BGP peer sessions falls below the maximum number.

  • PEERSESSIONTHRESHOLDEXCEED: indicates the alarm generated when the number of BGP peer sessions exceeds the maximum number.
  • PEERSESSIONTHRESHOLDCLEAR: indicates the alarm generated when the number of BGP peer sessions falls below the maximum number.

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.

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.
    • peer advertise-ext-community
    • peer route-policy export

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 ranging from 2000 to 2999.

acl-name acl-name

Specifies the name of a named ACL.

The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (case sensitive).

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 ranging from 1 to 65535.

acl6-number

Specifies the number of a basic ACL6.

The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (case sensitive).

acl6-name acl6-name

Specifies the name of a named ACL6.

The value is a string of 1 to 32 case-sensitive characters without spaces. The name should start with a letter (case sensitive) 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-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, and BGP-VPNv6 address family view.

  • acl-name acl-name, acl-number, and ip-prefix ip-prefix-name are valid only in the BGP view, BGP-MDT address family 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, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

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 (BGP) 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.

When the rule command is run to configure rules for a named ACL, only the source address range specified by source and the time period specified by time-range are valid as the rules.

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 ranging from 2000 to 2999.

acl-name acl-name

Specifies the name of a named ACL.

The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (case sensitive).

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 32 case-sensitive characters without spaces. The name should start with a letter (case sensitive) 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-MDT address family view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and 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, and 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, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

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 a named ACL, only the source address range specified by source and the time period specified by time-range are valid as the rules.

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.

In practical application, in order to realize that business forwarding is not affected by motherboard failure, it is usually possible to configure BGP GR in the hardware environment of dual motherboard to make sense.

AR600, AR1600, AR6100, and AR6200 series support the GR Helper, and only AR6300 series support the GR Restarter.

Format

graceful-restart

undo graceful-restart

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP restart causes reestablishment of peer relationships and traffic interruption. After the graceful-restart command is run to enable GR, traffic interruption can be prevented in the event of BGP restart.

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.

In practical application, in order to realize that business forwarding is not affected by motherboard failure, it is usually possible to configure BGP GR in the hardware environment of dual motherboard to make sense.

AR600, AR1600, AR6100, and AR6200 series support the GR Helper, and only AR6300 series support the GR Restarter.

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 router 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 ranging from 3 to 3000, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a BGP session is established or reestablished, the BGP restarter needs to receive the End-Of-RIB flag within the period of time specified by the command. If no End-Of-RIB flag is received before that period expires, the BGP restarter exits from the GR process and chooses the optimal route from the current reachable routes.

Prerequisites

Graceful restart has been enabled before this command is used.

Precautions

The latest configuration overrides the previous one.

If there are lots of routes, setting time to a greater value is recommended.

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 peer group is not specified, an IBGP peer group is created by default.

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 ranging 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, IGP routes, including RIP, OSPF, and IS-IS routes, are imported 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 in 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.

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 mdt

ipv4-family multicast

ipv4-family vpnv4 [ unicast ]

ipv4-family vpn-instance vpn-instance-name

undo ipv4-family { multicast | mdt | vpnv4 [ unicast ] | vpn-instance vpn-instance-name }

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.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

vpn-instance vpn-instance-name

Associates a specified VPN instance with the IPv4 address family. Displays the BGP-VPN instance IPv4 address family view.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

mdt

Displays the BGP-MDT address family view.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

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]
# Enter the BGP-VPNv4 address family view.
<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ipv4-family vpnv4
[Huawei-bgp-af-vpnv4]

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 [ unicast | vpnv6 | vpn-instance vpn-instance-name ]

undo ipv6-family [ unicast | vpnv6 | vpn-instance vpn-instance-name ]

The vpnv6 parameter is supported in V300R019C13 and later versions.

Parameters

Parameter Description Value

unicast

Displays the unicast address family view.

-

vpnv6

Displays the BGP-VPNv6 address family view.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

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.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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]

# Enter the BGP-VPNv6 address family view.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ipv6-family vpn-instance vrf1
[Huawei-bgp6-vrf1]

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, and 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, the ranges as below:
  • AR651K, AR651, AR651W-8P, AR651W, AR657W, AR651-X8, AR651U-A4, AR651W-X4, AR1610-X6, AR6140K-9G-2AC, AR6121K: 1 to 8
  • AR651C, AR651F-Lite, AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, AR617VW-LTE4EA: 1 to 4
  • AR6140-16G4XG: 1 to 16
  • AR6140E-9G-2AC, AR6140-9G-2AC, AR6120-VW, AR6120, AR6121E, AR6121, AR6120-S, AR6140-S, AR6121-S, and AR6121C-S:
    • V300R019C10 and before versions: 1 to 4
    • V300R019C11 and after versions: 1 to 8
  • AR6140H-S: 1 to 16
  • SRU-100H, SRU-200H, SRU-400HK, SRU-600HK, SRU-400H, and SRU-600H: 1 to 16
  • SRU-100HH : 1 to 16

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.

NOTE:

This parameter is invalid in the BGP-IPv4 multicast 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 the maximum load-balancing command is run, multiple BGP equal-cost routes will implement load balancing, improving network resource efficiency.

After BGP load balancing is configured, the routes that meet the following conditions will become equal-cost routes and implement load balancing:

  • Original next-hop addresses are different.

  • PrefVal values are the same.

  • Local_Pref attributes are the same.

  • All BGP routes are summarized or non-summarized routes.

  • Origin attributes (IGP, EGP, or incomplete) are the same.

  • MED values are the same.

  • All BGP routes are EBGP or IBGP routes.

  • IGP metric values within an AS are the same.

  • AS_Path attributes are the same.

After the maximum load-balancing ebgp number command is run, only EBGP routes implement load balancing. After the maximum load-balancing ibgp number command is run, only IBGP routes implement load balancing. If neither ebgp nor ibgp is configured, both EBGP and IBGP routes participate in load balancing, and the number of EBGP routes for load balancing is the same as the number of IBGP routes for load balancing.

By default, after the maximum load-balancing ebgp number or maximum load-balancing ibgp number command is run on a BGP device, the BGP device does not change the next-hop of a route to itself before advertising the route to a peer, regardless of whether the route participates in load balancing.

Precautions

If the maximum load-balancing number, maximum load-balancing ebgp number, or maximum load-balancing ibgp number command is run multiple times, only the latest configuration takes effect.

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, the ranges as below:
  • AR651K, AR651, AR651W-8P, AR651W, AR657W, AR651-X8, AR651U-A4, AR651W-X4, AR1610-X6, AR6140K-9G-2AC, AR6121K: 1 to 8
  • AR651C, AR651F-Lite, AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, AR617VW-LTE4EA: 1 to 4
  • AR6140-16G4XG: 1 to 16
  • AR6140E-9G-2AC, AR6140-9G-2AC, AR6120-VW, AR6120, AR6121E, AR6121, AR6120-S, AR6140-S, AR6121-S, and AR6121C-S:
    • V300R019C10 and before versions: 1 to 4
    • V300R019C11 and after versions: 1 to 8
  • AR6140H-S: 1 to 16
  • SRU-100H, SRU-200H, SRU-400HK, SRU-600HK, SRU-400H, and SRU-600H: 1 to 16
  • SRU-100HH : 1 to 16

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

After the maximum load-balancing eibgp command is run in the BGP-VPN instance view, load balancing is implemented among equal-cost BGP VPN routes, including 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 (AIGP) metric values are the same.
  • Lengths of 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 protocol priorities of EBGP and IBGP routes are changed to be different, for example, using a route-policy, load balancing cannot be implemented among EBGP and IBGP routes.

Load balancing cannot be implemented among the following routes:
  • Blackhole routes and non-blackhole routes
  • Labeled routes and non-labeled routes
  • Local routes and non-local 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.

It is an integer ranging 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.

It is an integer ranging 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 an 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.

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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support 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.

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-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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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, or 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 10-192 provides examples of the two commands.

Table 10-192 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 ranging 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 CE connect both to PE1 and PE2. The primary path is PE3 -> PE1 -> CE, and the backup path is PE3 -> PE2 -> CE. CE 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 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

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 IP 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-VPN instance IPv4 address family view, BGP Tunnel-encap-ext IPv4 address family view, and BGP-VPNv4 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 Tunnel-encap-ext IPv4 address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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.

Before publishing the BGP group properties through the peer advertise-community Command, a specific community attribute has been defined by 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 does not advertise extended community attribute to its peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } advertise-ext-community

undo peer { group-name | ipv4-address | 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.

ipv4-address

Specifies the IP 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, and BGP-VPN instance IPv4 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-IPv6 unicast address family view, 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 10.1.1.2 as-number 200
[Huawei-bgp] ipv4-family unicast
[Huawei-bgp-af-ipv4] peer 10.1.1.2 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 ranging from 1 to 10. The default value is 1.

global-as

Indicates a global AS number.

-

vpn-as

Indicates 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, and BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 }

peer group-name as-number { as-number-plain | as-number-dot } [ optional-as { optional-as-number-plain | optional-as-number-dot } & <1-5> ]

undo peer { group-name as-number | ipv4-address | ipv6-address }

undo peer group-name as-number { as-number-plain | as-number-dot } [ optional-as { optional-as-number-plain | optional-as-number-dot } & <1-5> ]

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

Integral AS number

The value is an integer ranging from 1 to 4294967295.

as-number-dot

AS number 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.

optional-as-number-plain

Specifies an integral optional AS number.

The value is an integer ranging from 1 to 4294967295.

optional-as-number-dot

Specifies an optional AS number in dotted notation.

The value is in the format of x.y, where x and y are integers ranging 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.

  • optional-as is valid only in the BGP view and BGP-VPN instance IPv4 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.

Dynamic peers on the same network segment must be added to the same peer group. If the dynamic peers reside in different ASs, run the peer group-name as-number { as-number-plain | as-number-dot } optional-as { optional-as-number-plain | optional-as-number-dot } & <1-5> command to configure an optional AS number for the 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 for external session group cannot be the same as 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 ranging 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, 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.

  • 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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 routers 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.

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.

Format

peer { group-name | ipv4-address | 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 | 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 | 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 prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

NOTE:

V300R019C10 and later versions support the parameter of ipv6-address.

min-tx-interval min-tx-interval

Specifies the interval at which BFD packets are sent.

The value is an integer ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.

min-rx-interval min-rx-interval

Specifies the interval at which BFD packets are received.

The value is an integer ranging from 10 to 2000, in milliseconds. The default value is 1000 milliseconds.

detect-multiplier multiplier

Specifies the local detection time multiplier.

The value is an integer ranging from 3 to 50.

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

V300R019C10 and later versions support 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.

If the peer's interface is a tunnel interface, the peer bfd command cannot be used to configure BFD for BGP. For example, BFD for EBGP cannot be configured in DSVPN scenarios.

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.

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 prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

NOTE:

V300R019C10 and later versions support the parameter of ipv6-address.

Views

BGP view, BGP-VPN instance IPv4 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.

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 prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

NOTE:

V300R019C10 and later versions support the parameter of ipv6-address.

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, 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

V300R019C10 and later versions support 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 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

If you enable or disable the route-refresh, general router, or 4-byte AS number function, the BGP peer relationship will be re-established, which can lead to a temporary network interruption. Therefore, exercise caution when running the related commands.

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 capability-advertise orf

Function

The peer capability-advertise orf command configures a BGP device to advertise the prefix-based outbound route filtering (ORF) capability to its peer or peer group.

The undo peer capability-advertise orf command restores the default setting.

By default, a BGP device does not advertise the prefix-based ORF capability to its peer or peer group.

Format

peer { group-name | ipv4-address } capability-advertise orf [ non-standard-compatible ] ip-prefix { both | receive | send } [ standard-match ]

undo peer { group-name | ipv4-address } capability-advertise orf [ non-standard-compatible ] ip-prefix { both | receive | send }

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.

non-standard-compatible

Indicates that ORF supported by Huawei devices is compatible with other devices.

-

both

Indicates that a peer or peer group is allowed to send and receive ORF packets.

-

receive

Indicates that a peer or peer group is allowed only to receive ORF packets.

-

send

Indicates that a peer or peer group is allowed only to send ORF packets.

-

standard-match

Filters routes according to the prefix matching rules defined in an RFC.

-

Views

BGP view or BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

ORF enables a BGP device to send to its BGP peer a set of routing policies that can be used by its peer to filter out unwanted routes during route advertisement.

Prerequisites

BGP peer relationships have been established using the peer as-number command.

Precautions

Because the ORF capability code supported by other devices may differ from that defined in the associated RFC, set the non-standard-compatible parameter to implement interworking between a Huawei device and a non-Huawei device. If the Huawei device adopts the ORF capability defined in the associated RFC but the non-Huawei device adopts its own ORF capability, ORF negotiation fails.

Example

# Configure a BGP device to advertise the prefix-based ORF capability to its peer or peer group.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 192.168.1.1 as-number 200
[Huawei-bgp] peer 192.168.1.1 capability-advertise orf ip-prefix both

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 a 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.

When loopback interfaces are used to establish a BGP connection, you are recommended to run the peer connect-interface command at both ends of the connection to ensure that the connection is correctly established. If this command is run on only one end, the BGP connection may fail to be established.

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 gigabitethernet 1/0/0

peer connected-check-ignore

Function

The peer connected-check-ignore command configures a device not to check the hop count when establishing a one-hop EBGP peer relationship using a loopback interface address.

The undo peer connected-check-ignore command cancels the configuration.

By default, a device checks the hop count when establishing a one-hop EBGP peer relationship using a loopback interface address.

Format

peer{ group-name | ipv4-address | ipv6-address } connected-check-ignore

undo peer{ group-name | ipv4-address | ipv6-address } connected-check-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.

The value is in dotted decimal notation.

ipv6-address

Specifies the IPv6 address of a peer.

The value consists of 128 octets, which are classified into 8 groups. Each group contains 4 hexadecimal numbers in the format X:X:X:X:X:X:X:X.

Views

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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow one-hop EBGP peer relationships to be established using loopback interface addresses, run the peer connected-check-ignore command or the peer ebgp-max-hop command (in which hop-count is greater than or equal to 2).

Example

# Configure the device not to check the hop count when establishing a one-hop EBGP peer relationship using a loopback interface address.

<Huawei> system-view
[Huawei] bgp 100 
[Huawei-bgp] peer 1.1.1.2 as-number 200
[Huawei-bgp] peer 1.1.1.2 connected-check-ignore

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.

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.

NOTE:

conditional-route-match-all is only valid in the BGP view, BGP-IPv4 unicast address family view, and BGP-VPN instance IPv4 address family view.

-

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.

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.

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.

NOTE:

conditional-route-match-any is only valid in the BGP view, BGP-IPv4 unicast address family view, and BGP-VPN instance IPv4 address family view.

-

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-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.

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.

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 prefix 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 discard-ext-community (BGP)

Function

The peer discard-ext-community command configures a BGP device to discard the extended community attributes carried by routes received from a specified peer.

The undo peer discard-ext-community command restores the default setting.

By default, BGP does not discard the extended community attributes carried by routes received from a specified peer.

Format

peer { group-name | ipv4-address | ipv6-address } discard-ext-community

undo peer { group-name | ipv4-address | ipv6-address } discard-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.

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 prefix 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, 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

Peer relationships have been established using the peer as-number command.

After the peer discard-ext-community command is run on a peer, the peer discards the extended community attributes carried by routes.

Example

# Configure a BGP device to discard the extended community attribute carried by a route.

<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 discard-ext-community

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 prefix 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 ranging 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 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 prefix 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 Tunnel-encap-ext IPv4 address family view, BGP-VPNv4 address family view, and BGP-EVPN 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-EVPN address family view, BGP Tunnel-encap-ext IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, only peers in the BGP IPv4 unicast address family are 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 view, 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
# Enable a BGP device to exchange BGP-VPNv4 routes with a specified peer.
<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 10.1.1.2 as-number 100
[Huawei-bgp] ipv4-family vpnv4
[Huawei-bgp-af-vpnv4] peer 10.1.1.2 enable

peer fake-as

Function

The peer fake-as command configures the local device to use the fake AS number to set up a BGP peer relationship with the specified 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 prefix 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 in carrier B's network to use the fake AS number to set up connections.

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 is valid only for EBGP peers.

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

peer filter-policy

Function

The peer filter-policy command configures a filtering policy to advertise or receive routes from peers or peer group.

The undo peer filter-policy command deletes the filtering policy used to advertise or receive routes from peers or peer group.

By default, no filtering policy is configured to advertise 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 prefix 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 ranging from 2000 to 2999.

acl-name acl-name

Specifies the name of an ACL.

The value is a string of 1 to 32 case-sensitive characters without spaces. The value must start with a letter (case sensitive).

acl6-number

Specifies the number of a basic IPv6 ACL.

The value is an integer ranging from 2000 to 2999.

acl6-name acl6-name

Specifies the name of an IPv6 ACL.

The value is a string of 1 to 32 case-sensitive characters without spaces. The name should start with a letter (case sensitive) 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, and BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 a named 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 removes a peer from a peer group and deletes all configurations of the peer.

By default, no peer group is created.

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 prefix 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-VPN instance IPv4 address family view, BGP-EVPN address family view, BGP Tunnel-encap-ext IPv4 address family view, and BGP-VPNv4 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 Tunnel-encap-ext IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-EVPN address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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.

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

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 prefix 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

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 | 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 | 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 prefix 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 and ip-prefix-name are 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, and BGP-VPNv4 address family view.

  • ipv6-address and ipv6-prefix-name 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, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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.

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.

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 prefix 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.

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

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.

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 NetEngine Configuration Guide - Security.

Precautions

The peer keychain command and the peer password command are mutually exclusive. SHA256 and HMAC-SHA256 encryption algorithm 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 prefix 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, 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-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 router does not support the route-refresh capability, the peer keep-all-routes command needs to be run on the router 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 re-established.

If the router supports the route-refresh capability, running this command does not result in re-establishment of the sessions between the router and its peers. After the refresh bgp command is run on the router, however, the router does not refresh its routing table.

After the keep-all-routes command is run, the undo peer keep-all-routes command becomes ineffective. To have the undo peer keep-all-routes command become effective, run the undo keep-all-routes command and then the peer keep-all-routes command.

If the router 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 and receive 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.

AR600 series does not support this function.

Format

peer { group-name | ipv4-address } label-route-capability [ check-tunnel-reachable ]

undo peer { group-name | 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.

NOTE:

This parameter can be configured only in the BGP view and BGP-IPv4 unicast address family view.

-

Views

BGP view, BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

When the capability of sending and receiving labeled routes is enabled or disabled, BGP connection is automatically closed and the capability of the neighbor is re-negotiated.

Configuring the check-tunnel-reachable parameter can only be used to check tunnels on IPv4 public networks.
  • If the check-tunnel-reachable parameter is configured, BGP advertises IPv4 unicast routes to peers when routed tunnels are unreachable or advertises labeled routes to peers when routed tunnels are reachable. In VPN scenario, this eliminates the risk of establishing an MP-EBGP peer relationship between PEs over a faulty LSP because this will cause data forwarding failures.

  • If the check-tunnel-reachable parameter is not configured, 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 (BGP) command, the peer as-number command should be used to create a peer or peer group.

Example

# Enable BGP to send and receive the labeled routes.
<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 label-route-capability
Enable BGP to send and receive labeled routes, and enable tunnel reachability checking.
<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 label-route-capability check-tunnel-reachable

peer listen-net

Function

The peer listen-net command configures BGP to listen to BGP connection requests from a specified network segment and establish BGP peer relationships dynamically.

The undo peer listen-net command restores the default configuration.

By default, BGP does not listen to BGP connection requests from any network segment.

Format

peer group-name listen-net network { mask | mask-length }

undo peer group-name listen-net network { mask | mask-length }

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The value is a string of 1 to 47 case-sensitive characters, spaces not supported.
network Specifies the address of the network segment from which BGP listens to BGP connection requests. The value is in dotted decimal notation.
mask Specifies the mask of the network segment from which BGP listens to BGP connection requests. The value is in dotted decimal notation.
mask-length Specifies the mask length of the network segment from which BGP listens to BGP connection requests. The value is an integer ranging from 0 to 32.

Views

BGP or BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When multiple BGP peers reside on the same network segment, and the number of the peers may change, you can run the peer listen-net command to configure BGP to listen to BGP connection requests from the network segment, establish BGP peer relationships dynamically, and add the peers to a peer group. This spares the local device from adding or deleting BGP peer configurations in response to each change in the peer number, which reduces the maintenance workload.

Prerequisites

A peer group has been configured using the group group-name command.

Precautions

If you run the command multiple times, BGP listens to BGP connection requests from multiple network segments.

Example

# Configure BGP to listen to BGP connection requests from network segment 20.1.1.0/24 and establish BGP peer relationships dynamically.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] group test internal
[Huawei-bgp] peer test listen-net 20.1.1.0 24

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 prefix 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
Warning: Changing the parameter in this command resets the peer session. Continue? [Y/N]:Y

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 prefix 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, or 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

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 configure 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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 it 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 it to its IBGP peers, and does not change the next hop of a route when advertising it to its EBGP peers.

Precautions

When the peer next-hop-invariable command is configured on EBGP peers, the command configuration 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 unicast 
[Huawei-bgp-af-ipv4] 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 device sets its IP address as the next hop address of routes when advertising them to its EBGP peer; the BGP device does not change the next hop address of routes when advertising them to its 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 prefix 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, and BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer next-hop-local command is usually run on an 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.

The peer next-hop-local command is valid only for the label routes on a BGP route reflector.

Precautions

If the peer next-hop-local command is run several times, the latest configuration overrides the previous one.

After the peer next-hop-local command is configured on a device, the device sets its IP address as the next hop of routes when the BGP device advertises the routes to its IBGP peer or peer group.

The peer next-hop-local command is applicable to IBGP peers.

When the BGP device advertises routes to an IBGP peer or peer group, the peer next-hop-local command and the peer next-hop-invariable command are mutually exclusive.

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-bit 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 ranging 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-VPN instance IPv4 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-IPv4 multicast address family view, BGP-EVPN address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 CE connect both to PE1 and PE2. The primary path is PE3 -> PE1 -> CE, and the backup path is PE3 -> PE2 -> CE. CE 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 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 prefix 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.

In the case of a plain text password, the value is a string of 1 to 255 case-sensitive characters, without spaces. In the case of a cipher text password, the value is a string of 20 to 392 case-sensitive characters, without spaces.

simple simple-password

Specifies a simple 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 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

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. Simple and MD5 authentication has potential risks. Keychain authentication is recommended.

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 YsHsjx_202206
Warning: The algorithm is not safe. Keychain authentication is recommended.

peer path-mtu auto-discovery

Function

The peer path-mtu auto-discovery command enables path MTU discovery.

The undo peer path-mtu auto-discovery command disables path MTU discovery.

By default, path MTU discovery is disabled.

Format

peer { group-name | ipv4-address } path-mtu auto-discovery

undo peer { group-name | ipv4-address } path-mtu auto-discovery

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.

Views

BGP view or BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When hosts on the same network communicate, the MTU of the network is important to both communication ends. When hosts need to communicate across multiple networks, the smallest MTU on the communication path is most important to both ends. This is because different networks along the communication path have different link-layer MTUs. The minimum MTU on the communication path is called the path MTU.

For example, if BGP packets are encapsulated in TCP packets and the default Maximum Segment Size (MSS) of a TCP packet is 536 bytes, the length of Update packets transmitted between BGP peers is 536 bytes. As a result, a large amount of BGP update information is distributed to different packets, and the number of ACK packets corresponding to the update information increases. Transmission this mode is inefficient. To improve the efficiency of transmitting BGP packets, the path MTU discovery mechanism can be used by both communication ends.

The path MTU has the following characteristics:
  • Uncertainty: During communication, the path MTU of hosts depends on the selected path and thus may change.
  • Inconsistency: The path MTUs in the inbound and outbound directions may be inconsistent because the path from the sender to the receiver may be different from the path from the receiver to the sender.

Precautions

After the peer path-mtu-discovery command is run, peers learn the number of bytes of the maximum data packet on a transmission path to prevent packet fragmentation.

By default, path MTU discovery is disabled on a peer because enabling path MTU discovery by default requires the additional cost. If the MTU is known during network planning, path MTU discovery does not need to be enabled.

Example

# Configure path MTU discovery for peer 1.1.1.2.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 1.1.1.2 path-mtu auto-discovery

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 prefix 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 ranging 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, EVPN address family view, and BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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-EVPN address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 a 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 both private and public 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 prefix 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, and BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In general, the number of the AS 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 prefix 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, and BGP-VPN instance IPv4 address family view, BGP Tunnel-encap-ext IPv4 address family view, and BGP-VPNv4 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 Tunnel-encap-ext IPv4 address family view, BGP-EVPN address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 routers in an AS, n (n-1)/2 IBGP connections need to be established. A large number of IBGP peer uses a lot of network and CPU resources. An RR can be used to solve the problem.

In an AS, one router functions as an RR and other routers 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 device 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 prefix 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.

The value is an integer. The value range varies according to devices:
  • AR651K, AR651, AR651-X8, AR651C, AR651F-Lite, AR651U-A4, AR651W-X4, AR651W-8P, AR651W, AR657W and AR1600 series: 1 to 80000.
  • AR6140K-9G-2AC, AR6140E-9G-2AC, AR6140-9G-2AC, AR6120, AR6120-VW, AR6121K, AR6121E, and AR6121: 1 to 300000.
  • AR6140-16G4XG: 1 to 100000.
  • AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, AR617VW-LTE4EA: 1 to 20000.
  • AR6140-S, AR6121-S, and AR6121C-S: 1 to 300000.
  • AR6120-S: 1 to 80000.
  • AR6140H-S: 1 to 100000.
  • SRU-100H, SRU-200H, SRU-400HK, SRU-600HK, SRU-400H, and SRU-600H: 1 to 300000.
  • SRU-100HH: 1 to 300000.

percentage

Specifies the percentage of received routes when the router starts to generate alarms.

The value is an integer ranging 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 re-established in the period specified by the timeout timer. Before the timer expires, the reset bgp command can be used to re-establish a connection.

The value is an integer ranging 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 Tunnel-encap-ext IPv4 address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, and BGP-EVPN 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 Tunnel-encap-ext 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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 router 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 router exceeds the upper limit and the peer route-limit command is used for the first time, the router and its peer re-establish the peer relationship, regardless of whether alert-only is set.

  • If the upper limit set on the router is increased to be greater than the number of received routes, the router sends Refresh packets to receive routes again. If the router does not support the route-refresh capability, the router needs to re-establish the connection with its peer.

  • If the upper limit set on the router 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

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 prefix 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 Tunnel-encap-ext IPv4 address family view, BGP-VPN instance IPv4 address family view, and BGP-VPNv4 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 Tunnel-encap-ext IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 command specifies a route-policy that does not exist, use the route-policy command to create the route-policy.

Precautions

If the peer route-policy command is run for a peer group, all the members of the peer group inherit the configuration.

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 prefix 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 BGP routing updates are sent.

The value is an integer ranging from 0 to 600, in seconds.

  • group-name is valid only in the BGP view, BGP-IPv4 unicast 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-IPv6 unicast 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-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When routes change, the router 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 router 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 removed or added, the router sends an Update (Withdraw) packet to its peers immediately, without waiting the interval set using the peer route-update-interval command to expire.

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 prefix 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 ranging from 0 to 21845, in seconds.

hold-time

Indicates 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 ranging 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 keepalive 1 hold 65535, for example, would be improper because this configuration will cause too many Keepalive messages on the network. Additionally, even if BGP does not receive any Keepalive messages in a long period of time, it does not considers the connection as disconnected.

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 takes 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.

After the keep-all-routes command is run, the undo peer { group-name | ipv4-address | ipv6-address } timer keepalive keepalive-time command becomes ineffective. To have the undo peer { group-name | ipv4-address | ipv6-address } timer keepalive keepalive-time command become effective, run the undo keep-all-routes command and then the peer { group-name | ipv4-address | ipv6-address } timer keepalive keepalive-time 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
Warning: Changing the parameter in this command resets the peer session. Continue?[Y/N]: y

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 prefix 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.

After the keep-all-routes command is run, the undo peer timer connect-retry command becomes ineffective. To have the undo peer timer connect-retry command become effective, run the undo keep-all-routes command and then the peer timer connect-retry command.

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

peer tracking

Function

The peer tracking command enables BGP peer tracking. That is, you can configure BGP to fast detect the unreachable state of a peer and re-establish the connection between the local device and the peer.

The undo peer tracking command disables BGP peer tracking.

By default, BGP peer tracking is disabled.

Format

peer { group-name | ipv4-address | ipv6-address } tracking [ delay delay-time ]

undo peer { group-name | ipv4-address | ipv6-address } tracking

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 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.

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.

The value is in dotted decimal notation.

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 valid-ttl-hops

Function

The peer valid-ttl-hops command applies the GTSM functions on the peer or peer group.

The undo peer valid-ttl-hops command cancels the application of the GTSM functions on the peer or peer group.

By default, GTSM functions on the peer or peer group are 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.

It 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.

It is an integer ranging 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 MP-BGP extensions. 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

preference (BGP)

Function

The preference command sets protocol preferences for EBGP routes, IBGP routes, and local BGP routes.

The undo preference command restores the default setting.

By default, the protocol preferences of EBGP routes, IBGP routes, and local BGP 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 of an EBGP route. An EBGP route is the optimal route learned from a peer outside the local AS.

The value is an integer ranging from 1 to 255. The smaller the value is, the higher the preference is.

internal

Specifies the protocol preference of an IBGP route. An IBGP route is a route learned from a peer inside the AS.

The value is an integer ranging from 1 to 255. The smaller the value is, the higher the preference is.

local

Specifies the protocol preference of a local BGP route. A local BGP route is a route obtained by using the summary automatic command (automatic summarization) or the aggregate (BGP) command (manual aggregation).

The value is an integer ranging 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.

Example

# Set the preference to 2 for an EBGP route, 2 for an IBGP route, and 20 for a local BGP route.

<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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 a route reflector (RR) to modify the path attributes of BGP routes using the export policy.

The undo reflect change-path-attribute command disables an RR from modifying the path attributes of BGP routes using the export policy.

By default, an RR is disabled from modifying path 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, EVPN address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPNv6 address family view, BGP-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Using an RR to modify path attributes may cause route loops. You cannot enable an RR to modify the path attributes using the export policy. So an RR is disabled from modifying path 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 path attributes using the export policy. After the command is run, the following configurations take effect.
  • Run the apply as-path command to modify the AS-Path attributes of BGP routes.
  • Run the apply comm-filter delete command to delete all community attributes from BGP routes.
  • Run the apply community command to modify the community attributes of BGP routes.
  • Run the apply cost command to modify the cost of BGP routes, that is to modify its MED.
  • Run the apply ip-address next-hop command to modify the next hop of BGP routes.
  • Run the apply ipv6 next-hop command to modify the next hop of BGP4+ routes.
  • Run the apply local-preference command to modify the local preference of BGP routes.
  • Run the apply origin command to modify the Origin attributes of BGP routes.
  • Run the apply extcommunity command to modify the extended community attributes of BGP routes.

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 Router A(10.1.1.1) and Router B(10.1.1.2), and Router A functions as an RR. If two configurations are on RouterA:
  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 Router 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 Router 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 path 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 ranging 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 Tunnel-encap-ext IPv4 address family view, BGP-EVPN address family view, BGP-VPNv6 address family view, BGP-MDT address family

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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 router, 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 | vpnv6 ] { all | ipv4-address | group group-name | external | internal } { export | import }

refresh bgp ipv6 { all | group group-name | ipv4-address | ipv6-address | external | internal } { export | import }

refresh bgp vpn-instance vpn-instance-name ipv6-family { all | ipv6-address | group group-name | external | internal } { export | import }

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

vpnv4

Softly resets the BGP connections in a VPNv4 address family.

-

vpnv6

Softly resets the BGP connections in a VPNv6 address family.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

all

Softly resets all IPv4 or IPv6 BGP 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 BGP peer.

The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

vpn-instance vpn-instance-name ipv6-family

Reset the connection of a specified VPN instance enabled with an IPv6 address family.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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

refresh bgp mdt

Function

The refresh bgp mdt command softly resets the BGP connections related to Multicast Distribution Tree (MDT). manually.

The softly resetting of BGP connection related to MDT can refresh the BGP routing table and apply a new policy without cutting off the BGP connection.

Format

refresh bgp mdt { ipv4-address | all | group group-name | internal | external } { import | export }

Parameters

Parameter Description Value
all Softly resets all the BGP connections related to MDT. -
ipv4-address Specifies the IPv4 address of the BGP peer. It is in dotted decimal notation.
group group-name Specifies the name of the 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 softly reset at the outgoing interface. -
import Triggers softly reset at the incoming interface. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a device's peer supports route-refresh, the refresh bgp mdt command can be used on the device to softly reset the BGP connection related to MDT 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.

If a delay is configured to apply a route-policy:
  • If an import policy is configured to filter the routes learned from a peer or peer group using the peer route-policy import command, BGP applies the import policy immediately when the refresh bgp mdt all command is run.
  • If an export policy is configured to filter the routes to be sent to a peer or peer group using the peer route-policy export command, BGP does not apply the export policy until the configured delay expires although the refresh bgp mdt all command is run.

Prerequisites

The route-refresh capability has been enabled on all BGP devices on the network.

Precautions

Assume that a device supports route-refresh and is configured with the peer keep-all-routes command. After the refresh bgp mdt command is run on the device, the device does not refresh its routing table.

Example

# Softly reset all the BGP connections related to MDT at the incoming interface to validate the new configuration.

<Huawei> refresh bgp mdt all import

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.

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.

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

To softly reset the connections between multicast EBGP peers, run refresh bgp multicast external command.

Example

# Trigger inbound soft resetting for all multicast EBGP connections.

<Huawei> refresh bgp multicast external import

refresh bgp multicast internal

Function

The refresh bgp multicast internal command softly resets the connections between multicast IBGP peers.

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

To softly reset the connections between multicast IBGP peers, run refresh bgp multicast internal command.

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 | vpnv6 ] { 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 ]

reset bgp vpn-instance vpn-instance-name ipv6-family { all | as-number-plain | as-number-dot | ipv6-address | group group-name | external } [ graceful ]

reset bgp evpn { all | as-number-plain | as-number-dot | group group-name | ipv4-address }

reset bgp tunnel-encap-ext { all | as-number-plain | as-number-dot | group group-name | ipv4-address }

Parameters

Parameter Description Value

vpn-instance vpn-instance-name ipv4-family

Resets the BGP connections of a specified VPN instance enabled with an IPv4 address family.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

vpnv4

Resets BGP connections related to VPNv4.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

vpnv6

Resets BGP connections related to VPNv6.

NOTE:

AR611W, AR611W-LTE4CN, AR617VW, , AR617VW-LTE4 AR617VW-LTE4EA, AR651C, and AR651F-Lite do not support this parameter.

-

all

Resets all BGP connections.

-

as-number-plain

Specifies an integral AS number.

The value is an integer ranging from 1 to 4294967295.

as-number-dot

Specifies an AS number 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.

The 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 IPv4 BGP connections.

-

ipv6

Resets IPv6 BGP connections.

-

ipv6-address

Resets the TCP connection with a specified BGP4+ peer (all the routes learned by using the connection are deleted).

The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

vpn-instance vpn-instance-name ipv6-family

Resets the BGP connection of a specified VPN instance enabled with an IPv6 address family.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

graceful

Resets BGP connections in GR mode.

-

evpn

Resets BGP connections related to the EVPN address family.

-

tunnel-encap-ext

Resets BGP connections related to the Tunnel-encap-ext address family.

-

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 relationship is re-established. Exercise caution when running this command.

Example

# Reset all BGP connections.

<Huawei> reset bgp all

# Reset BGP connections with the peer 2001:db8::9.

<Huawei> reset bgp ipv6 2001:db8::9

# Reset BGP sessions with BGP peers within a specified 4-byte AS number.

<Huawei> reset bgp vpnv4 200.300

# Reset all BGP VPNv6 connections.

<Huawei> reset bgp vpnv6 all

reset bgp dampening

Function

The reset bgp dampening command clears BGP route dampening information and release 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 ] ]

Parameters

Parameter Description Value

vpn-instance vpn-instance-name

Clears the route dampening information of the specified VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

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 prefix 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 [ as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ mask | mask-length ] | regexp as-path-regexp ]

reset bgp vpnv4 ipv4-address flap-info

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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

as-path-filter as-path-filter-number

Clears route flapping statistics based on 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 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 the mask or mask length is not 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 the mask or mask length is not 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 is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

network-ipv6-address

Specifies the IPv6 prefix address that is used to filter the BGP IPv6 routes.

The prefix 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 prefix 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 needs to recalculate routes and modify its 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 router 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

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

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 is a string of 1 to 31 case-sensitive characters, 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 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 is a string of 1 to 31 case-sensitive characters, 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 BGP peer. The prefix 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 router 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 mdt

Function

The reset bgp mdt command resets specified BGP connections related to MDT.

Format

reset bgp mdt { all | ipv4-address | group group-name | as-number-plain | as-number-dot } [ graceful ]

reset bgp mdt { internal | external } [ graceful ]

Parameters

Parameter Description Value

all

Resets all the BGP connections related to MDT.

-

as-number-plain

Specifies an Integral AS number.

The value is an integer ranging from 1 to 4294967295.

as-number-dot

Specifies an AS number 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 BGP connections with a specified BGP peer.

The value is in dotted decimal notation.

group group-name

Resets BGP connections related to MDT with the 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 related to MDT.

-

internal

Resets all IBGP connections related to MDT.

-

graceful

Reset BGP connections related to MDT in GR mode.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the BGP configuration is modified, you can run the reset bgp mdt command to make the new BGP configuration take effect.

If a BGP routing policy is configured on the router that does not support Route-Refresh, the reset bgp mdt 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 mdt 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 mdt 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.

After you run this command, the TCP connection is reset, and the neighbor relationship between two peers is reestablished. So, confirm the action before you use the command.

Example

# Reset all BGP connections related to MDT.

<Huawei> reset bgp mdt all

reset bgp multicast

Function

The reset bgp multicast command resets the connections between a device and specified MBGP peers.

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 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 is run on a device, the TCP connection established by the device and the corresponding peer relationship is reset and then re-established. 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.

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.

Format

reset bgp multicast external [ graceful ]

Parameters

Parameter Description Value

graceful

Specifies to reset MBGP connections in GR mode.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

To reset all multicast EBGP connections, run reset bgp multicast external command.

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.

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 a specified AS_Path filter.

The value is an integer ranging from 1 to 256.

as-path-filter as-path-list-name

Deletes route flapping statistics matching 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.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

To clear route flapping statistics, run reset bgp multicast flap-info command.

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.

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

To reset the multicast IBGP connections in an AS, run reset bgp multicast internal command.

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 router.

The undo router-id command deletes the router ID configured for the router.

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/IPv6 address families. If a router ID is manually specified for a BGP-VPN instance IPv4/IPv6 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 router. Each router ID uniquely identifies one BGP router in an AS.

By configuring automatic router ID selection for BGP-VPN instance IPv4/IPv6 address family, you can differentiate the configured router ID of BGP-VPN instance IPv4/IPv6 address family from the BGP router ID. For more information about the router ID of a BGP-VPN instance IPv4/IPv6 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/IPv6 address family, deleting the configured router ID resets the BGP session. Exercise caution when changing or deleting a router ID.

By default, the router 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 router.

<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 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.

The value is in dotted decimal notation.

auto-select

Configures automatic router 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 ranging from 0 to 3600, in seconds.

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-MDT address family view

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 address family view and BGP-MDT 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. To solve this problem, run the route-select delay command to configure a delay for selecting a route. An appropriate delay ensures that traffic switches back to the primary path after the device completes refreshing forwarding entries.

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%.

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 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.

Precautions

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

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

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-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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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-value

Specifies a period threshold for slow peer detection. If the time taken to send 100 packets to a BGP peer is greater than the configured period 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.

The value is an integer ranging from 120 to 3600, in seconds.

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

AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support BGP-VPNv4 address family view and BGP-VPNv6 address family view.

V300R019C13 and later versions support BGP-VPNv6 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 | grstatuschange | hwbackward | hwestablished | routethresholdclear | routethresholdexceed | hwbgproutethresholdclear | hwbgproutethresholdexceed | hwbgproutemaxclear | hwbgproutemaxexceed | hwbgpdynamicpeersessionexceed | hwbgpdynamicpeersessionexceedclear | peersessionthresholdexceed | peersessionthresholdclear } ]

undo snmp-agent trap enable feature-name bgp [ trap-name { backward | established | grstatuschange | hwbackward | hwestablished | routethresholdclear | routethresholdexceed | hwbgproutethresholdclear | hwbgproutethresholdexceed | hwbgproutemaxclear | hwbgproutemaxexceed | hwbgpdynamicpeersessionexceed | hwbgpdynamicpeersessionexceedclear | peersessionthresholdexceed | peersessionthresholdclear } ]

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.

-

grstatuschange

Enables the trap upon the BGP GR status change.

-

hwbackward

Enables the trap function upon the disconnection of BGP neighbors.

-

hwestablished

Enables the trap function when BGP neighbors are in Established state.

-

routethresholdclear

Enables the trap function when the number of BGP routes falls below the trap threshold.

-

routethresholdexceed

Enables the trap function when the number of BGP routes exceeds the trap threshold.

-

hwbgproutethresholdclear

Enables the trap function when the number of BGP routes falls below the threshold.

-

hwbgproutethresholdexceed

Enables the trap function when the number of BGP routes exceeds the threshold.

-

hwbgproutemaxclear

Enables the trap function when the number of BGP routes falls below the lower threshold of the maximum value.

-

hwbgproutemaxexceed

Enables the trap function when the number of BGP routes exceeds the upper threshold of the maximum value.

-

hwbgpdynamicpeersessionexceed

Enables the alarm that is generated when the number of dynamic BGP peer sessions exceeds the maximum number.

-

hwbgpdynamicpeersessionexceedclear

Enables the alarm that is generated when the number of dynamic BGP peer sessions falls below the maximum number.

-

peersessionthresholdexceed

Enables the alarm that is generated when the number of BGP peer sessions exceeds the maximum number.

-

peersessionthresholdclear

Enables the alarm that is generated when the number of BGP peer sessions falls below the maximum number.

-

Views

System view

Default Level

3: Management 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

The summary automatic command is used in the BGP-IPv4 unicast address family view to configure a BGP device to automatically aggregate locally-imported routes on the public network.

The summary automatic command is used in the BGP-VPN instance IPv4 address family view to configure a BGP device to automatically aggregate locally-imported routes on a private network.

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

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, or 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 ranging 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 ranging 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 timer configured through the peer timer command takes precedence over the one configured 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

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 ranges from 1 to 65535, in seconds.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Applicable Environment

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.

Note

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 } 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 } 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

Usage Scenario

None

Precautions

The device does not support synchronization between BGP and 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