No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

AR500, AR510, and AR530 V200R007 Commands Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
BGP Configuration Commands

BGP Configuration Commands

NOTE:

Among the AR500 series routes, AR502G-L-D-H and AR502GR-L-D-H do not support BGP.

The AR510 series routes do not support BGP4+.

NOTE:

AR503GW-LM7, AR503GW-LcM7, AR509G-L-D-H, AR509GW-L-D-H, AR510, and AR530 series support IPv4 unicast networks and IPv4 multicast networks.

AR500, and AR530 series support IPv6 unicast networks.

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.
NOTE:
  • 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 igp, egp, and incomplete. 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 a 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

as-notation plain

Function

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

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

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

Format

as-notation plain

undo as-notation plain

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

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

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

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

Precautions

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

Example

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

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

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

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

as-path-limit

Function

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

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

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

Format

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

undo as-path-limit

Parameters

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

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

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

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

Precautions

After the as-path-limit command is configured, a industrial switch 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 industrial switch 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-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

NOTE:

AR510 series does not support BGP-VPNv4 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

Example

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

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

bestroute med-confederation (BGP)

Function

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

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

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

Format

bestroute med-confederation

undo bestroute med-confederation

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

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.

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support this command.

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, labeled BGP IPv4 unicast routes that are iterated to IP address.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-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

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.

Example

# Enable BGP and enter the BGP view.

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

check-first-as

Function

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

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

By default, the function is enabled.

Format

check-first-as

undo check-first-as

Parameters

None

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

Precautions

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

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

Follow-up Procedure

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

Example

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

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

compare-different-as-med

Function

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

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

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

Format

compare-different-as-med

undo compare-different-as-med

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

Precautions

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

Example

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

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

confederation id

Function

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

The undo confederation id command removes the 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
Related Topics

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 industrial switch 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 industrial switch 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
Related Topics

dampening

Function

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

The undo dampening command restores the default configuration.

By default, BGP route flap suppression is disabled.

Format

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

undo dampening [ ibgp ]

Parameters

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

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP route flap dampening measures the stability of a route by using a penalty value. The greater the penalty value, the less stable the route. Each time route flapping occurs, that is, when the industrial switch 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 industrial switch router does not add the route to the IP routing table or advertise any Update packet to other BGP peers. If the route is marked with the d flag, the last packet received by the industrial switch router is an Update packet; if the route is marked with the h flag, the last packet received by the industrial switch 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.

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

Precautions

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

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

Note the following items when configuring BGP route flap dampening:

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

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

NOTE:

The dampening command is valid only for EBGP routes.

The dampening ibgp command is valid only for BGP VPNv4 routes.

Example

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

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

# Enable IBGP 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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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 industrial switch router that runs BGP has multiple routes to the same destination, the industrial switch router selects the route with the highest local preference as the optimal route.

Precautions

If the industrial switch 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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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 industrial switch 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 8-111  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 8-112  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 8-113  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 ]

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.
NOTE:
Only the AR510 series supports this parameter.
-
all Displays 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. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

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

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

Precautions

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

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

Example

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

<Huawei> display bgp group my-peer

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

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

Item

Description

BGP peer-group

Indicates the name of a BGP peer group

Remote AS

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

Authentication type configured

Indicates the configured BGP authentication type:
  • MD5

  • None: indicates that no BGP authentication is configured.

Group's BFD has been enabled

Indicates that BFD has been enabled for a peer group.

Type

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

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

Configured hold timer value

Indicates the value of the Hold timer.

Keepalive timer value

Indicates the value of the Keepalive timer.

Minimum route advertisement interval

Indicates the minimum interval between route advertisements.

listen-only has been configured

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

PeerSession Members

Indicates peers that set up sessions.

Maximum allowed route limit

Indicates the maximum number of allowed BGP routes.

Threshold

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

Parameter

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

Peer Preferred Value

Indicates the preferred value of a peer.

Peer Members

Indicates that the following information is about peers.

Peer

Indicates the IP address of a peer.

V

Indicates the BGP version.

AS

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

MsgRcvd

Indicates the number of received messages.

MsgSent

Indicates the number of sent messages.

OutQ

Indicates the number of messages to be sent to peers.

Up/Down

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

State

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

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

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

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

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

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

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

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

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

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

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

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

  • OpenSent: indicates that BGP has sent one Open message to its peer and waits for 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.

Related Topics

display bgp ipv6 routing-table

Function

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

Format

display bgp ipv6 routing-table

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

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

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

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

display bgp ipv6 routing-table different-origin-as

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

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

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

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

Parameters

Parameter Description Value
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 8-115  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 bgp ipv6 routing-table statistics

Function

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

Format

display bgp ipv6 routing-table statistics

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

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

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

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

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

Parameters

Parameter Description Value
as-path-filter Displays the routes that match the specified filter. -
as-path-filter-number Specifies the number of the matching AS-Path filter. 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.
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

None

Example

# Display statistics of BGP4+ routes.

<Huawei> display bgp ipv6 routing-table statistics

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

Item

Description

Total Number of Routes

Total number of routes in the routing table.

display bgp multicast group

Function

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

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 8-117  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 8-118  Description of the display bgp multicast network command output

Item

Description

BGP Local Router ID

ID of the local MBGP router

Local AS Number

Number of the local AS

Network

Network address locally advertised

Mask

Mask of the network address

Route-policy

Used Routing policy

Related Topics

display bgp multicast paths

Function

The display bgp multicast paths command displays 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

None.

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

None.

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

Related Topics

display bgp multicast routing-table

Function

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

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

None.

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

None.

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

None.

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

None.

Example

# Display the routing information the 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 8-125  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

None.

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

Related Topics

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

None.

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

Related Topics

display bgp multicast routing-table different-origin-as

Function

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

Format

display bgp multicast routing-table different-origin-as

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None.

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 8-128  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-path-filter-number specifies the AS path regular expression. The value is a string of 1 to 80 characters.
as-path-filter as-path-filter-number Displays the statistics of the route flapping for the specified AS path list. as-path-filter-number indicates the matched AS path list number. The value is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Displays the statistics of the route flapping for the specified AS path list. as-path-filter-number indicates the matched AS path list name. The value is a string of 1 to 51 case-sensitive characters without spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None.

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 8-129  Description of the display bgp multicast routing-table flap-info command output

Item

Description

BGP Local router ID

BGP local router ID

Network

Network address in the MBGP routing table

From

IP address of MBGP peer from which the route is received

Flaps

Count of route flapping

Duration

Duration of 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 }

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. -
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 mask-length. The value is an integer ranging from 0 to 32.
longer-prefixes Use 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

None.

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

None

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

None

Example

# Display statistics about routes in the MBGP routing table.

<Huawei> display bgp multicast routing-table statistics
Total Number of Routes: 50
Table 8-132  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 8-133  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

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

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

Item

Description

Local AS Number

Indicates the local AS number.

Network

Indicates the locally-advertised network address.

Mask

Indicates the mask of the network address.

Route-policy

Indicates the used routing policy.

# Display information about BGP VPNv4 routes that are imported using the network command.
<Huawei> display bgp vpnv4 all network
  BGP Local Router ID is 10.2.2.9
  Local AS Number is 100
 VPN-Instance vrf1, Router ID 10.2.2.9:
  Network          Mask            Route-policy
  10.4.4.4         255.255.255.255
 VPN-Instance vrf2, Router ID 10.2.2.9:
  Network          Mask            Route-policy
  10.5.5.5         255.255.255.255
Table 8-135  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 8-136  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 ]

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

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 Huawei AR Series IOT Gateway - 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 8-137  Description of the display bgp paths command output

Item

Description

Address

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

Refcount

Indicates the number of times that the route is referenced.

MED

Indicates the MED of the route.

Path

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

Origin

Indicates the origin of the route.

display bgp peer

Function

The display bgp peer command displays information about BGP peers.

Format

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

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

display bgp ipv6 peer [ verbose ]

display bgp ipv6 peer ipv6-address { log-info | 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. 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-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.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

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

Precautions

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

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

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

Example

# Display peer information.

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

  Peer        V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

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

Item

Description

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 nuber of the peer.

Peers in established state

Indicates the nuber of the peer in established state.

Peer

Indicates the IP address of the peer.

V

Indicates the BGP version used on the peer.

AS

Indicates the AS number.

MsgRcvd

Indicates the number of received messages.

MsgSent

Indicates the number of sent messages.

OutQ

Indicates the message to be sent to the specified peer.

Up/Down

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

State

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

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

  • 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
         BGP version 4, Remote router ID 10.1.1.1
         Update-group ID: 1 
         BGP current state: Established, Up for 00h57m53s
         BGP current event: RecvKeepalive
         BGP last state: Established
         BGP Peer Up count: 1
         Received total routes: 0
         Received active routes total: 0
         Advertised total routes: 2
         Port: Local - 42796        Remote - 179
         Configured: Connect-retry Time: 32 sec
         Configured: Min Hold Time: 0 sec
         Configured: Active Hold Time: 180 sec   Keepalive Time:60 sec
         Received  : Active Hold Time: 180 sec
         Negotiated: Active Hold Time: 180 sec   Keepalive Time:60 sec
         Peer optional capabilities:
         Peer supports bgp multi-protocol extension
         Peer supports bgp route refresh capability
         Peer supports bgp 4-byte-as capability
         Address family IPv4 Unicast: advertised and received
 Received: 
                  Total messages                 60
                  Update messages                1
                  Open messages                  1
                  KeepAlive messages             58
                  Notification messages          0
                  Refresh messages               0
 Sent: 
                  Total messages                 61
                  Update messages                2
                  Open messages                  1
                  KeepAlive messages             58
                  Notification messages          0
                  Refresh messages               0
 Authentication type configured: None
 Last keepalive received: 2012/03/06 19:17:37
 Last keepalive sent    : 2012/03/06 19:17:37
 Last update    received: 2012/03/06 19:17:43
 Last update    sent    : 2012/03/06 19:17:37

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

Item

Description

Type

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

BGP version

Indicates the BGP version.

remote router ID

Indicates the router ID of the peer.

Update-group ID

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

BGP current state

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

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

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

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

4-byte-As is enabled

Listen-only has been configured

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

Peer Preferred Value

Indicates the preferred value of the peer.

Routing policy configured

Indicates the configured routing policy.

Peer's BFD has been enabled

Indicates that BFP has been enabled on the peer.

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

Item

Description

Error Code

Error code.

Error Subcode

Error subcode.

Notification

Notification packet sent or received by a peer.

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

<Huawei> display bgp vpnv4 vpn-instance vrf1 peer

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

  Peer        V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

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

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

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

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

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

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

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

# Display information about IPv6 peers.

<Huawei> display bgp ipv6 peer

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

  Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

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

# Display information about IPv6 peers.

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

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

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

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

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 8-141  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 8-142  Description of the display bgp resource command output

Item

Description

BGP Peer session support total number

Maximum number of BGP peer sessions that are supported.

Capacity Statistics

BGP peer session type.

Used Number

Number of currently configured peer sessions.

BGP Peer Session

Total number of currently configured BGP peer sessions.

IBGP Peer Session

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

EBGP Peer Session

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

display bgp routing-table

Function

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

Format

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

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

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

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

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

display bgp routing-table peer ipv4-address { 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 time-range start-time end-time

Parameters

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

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

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 8-143  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 8-144  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 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 8-145  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 8-146  Description of the display bgp ipv6 routing-table dampened command output

Item

Description

PrefixLen

Prefix length

Related Topics

display bgp routing-table dampening parameter

Function

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

Format

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

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

None

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 8-147  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
Related Topics

display bgp routing-table flap-info

Function

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

Format

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

display bgp routing-table flap-info [ regular-expression as-regular-expression | as-path-filter as-path-filter-number | 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 ]

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 vpn6-instance vpn6-instance-name routing-table flap-info [ regular-expression as-regular-expression ]

display bgp vpnv6 vpn6-instance vpn6-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 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.
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.
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

None

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 8-148  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 vpn-instance vpn-instance-name routing-table [ statistics ] label

display bgp vpnv6 all routing-table [ statistics ]

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

None.

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 8-149  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 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 ] routing-table peer statistics

Parameters

Parameter Description Value
multicast Displays statistics about routes in the IP multicast routing table. -
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.

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 8-150  Description of the display bgp routing-table peer statistics command output

Item

Description

BGP local router ID Local router ID
Local AS number AS number
Total number of peers Total number of peers
Number of Peers in established state Number of peers in the established state
Peer IP address of a peer
Received routes Total number of routes received from the peer
Advertised routes Total number of routes advertised to the peer

display bgp routing-table statistics

Function

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

Format

display bgp routing-table statistics

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

display bgp routing-table statistics cidr

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

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

display bgp routing-table statistics dampened

display bgp routing-table statistics different-origin-as

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

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

Parameters

Parameter Description Value
as-path-filter as-path-filter-number Displays the routes that match the specified the number of the matching AS-Path filter. It is an integer that ranges from 1 to 256.
as-path-filter as-path-filter-name Displays the routes that match the specified the name of the matching AS-Path filter. The name is a string of 1 to 51 characters without any space. It is case-sensitive.
cidr Displays CIDR information. -
community Displays the routes carrying the specified BGP community attribute in the routing table. -
community-number Specifies the community number. 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. -

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 8-151  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 ] 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.
ipv6 Displays information about the BGP update-groups of IPv6 routes. -
vpnv4 Displays information about the BGP update-groups of a VPNv4 instance.
NOTE:
Only the AR510 series support this parameter.
-
vpn-instance vpn-instance-name Specifies the name of a VPN instance.
NOTE:
Only the AR510 series support this 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

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 8-152  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 8-153  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 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

None

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 8-154  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 8-155  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 8-156  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 8-157  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 : 11
------------------------------------------------------------------------------
Trap name                       Default switch status   Current switch status
ESTABLISHED                     off                     on
BACKWARD                        off                     on
ROUTETHRESHOLDEXCEED            off                     on
ROUTETHRESHOLDCLEAR             off                     on
GRSTATUSCHANGE                  off                     on
HWESTABLISHED                   off                     on
HWBACKWARD                      off                     on
HWBGPROUTEMAXEXCEED             off                     off
HWBGPROUTEMAXCLEAR              off                     off
HWBGPROUTETHRESHOLDEXCEED       off                     off
HWBGPROUTETHRESHOLDCLEAR        off                     off
Table 8-158  Description of the display snmp-agent trap feature-name bgp all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the BGP module:

  • ESTABLISHED: indicates that the BGP neighbor has entered the Established state.
  • BACKWARD: indicates the disconnection of BGP neighbors.
  • ROUTETHRESHOLDEXCEED: indicates that the number of routes of BGP neighbors exceeds the alarm threshold.
  • ROUTETHRESHOLDCLEAR: indicates that the number of routes of BGP neighbors falls below the alarm threshold.
  • GRSTATUSCHANGE: indicates that the GR status of BGP neighbors changes.
  • HWESTABLISHED: indicates that the BGP neighbor has entered the Established state.
  • HWBACKWARD: indicates the disconnection of BGP neighbors.
  • HWBGPROUTEMAXEXCEED: indicates that the number of BGP routes exceeds the alarm threshold.
  • HWBGPROUTEMAXCLEAR: indicates that the number of BGP routes falls below the alarm threshold.
  • HWBGPROUTETHRESHOLDEXCEED: indicates that the number of BGP routes exceeds the alarm threshold.
  • HWBGPROUTETHRESHOLDCLEAR: indicates that the number of BGP routes falls below the alarm threshold.

Default switch status

Default status of the trap function:

  • on: The trap function is enabled by default.
  • off: The trap function is disabled by default.

Current switch status

Current status of the trap function:

  • on: The trap function is enabled.
  • off: The trap function is disabled.

ebgp-interface-sensitive

Function

The ebgp-interface-sensitive command immediately resets a BGP session on an interface that is directly connected to an external peer when the interface goes Down.

The undo ebgp-interface-sensitive command disables the function.

By default, this function is enabled.

Format

ebgp-interface-sensitive

undo ebgp-interface-sensitive

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the ebgp-interface-sensitive command is not configured, the system does not immediately select the sub-optimal route for packet transmission when an interface goes Down. Instead, the system waits for a period of time (defaulting to 180 seconds) before checking whether another interface can be used to send packets to the same destination address. This will interrupt services for a period of time. If the ebgp-interface-sensitive command is run, BGP can quickly detect EBGP link faults and use another interface to establish a BGP peer relationship with the remote peer.

When the interface used for a BGP connection alternates between Up and Down states, running the undo ebgp-interface-sensitive command can prevent the repeated reestablishment and deletion of the BGP session in the event of route flapping. This reduces the use of network bandwidth.

Precautions

If the interface used for a BGP connection alternates between Up and Down states, it would be better not to run the ebgp-interface-sensitive command to prevent route flapping.

Example

# Enable the function that automatically resets a BGP session.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ebgp-interface-sensitive

ext-community-change enable

Function

The ext-community-change enable command enables a device to change extended community attributes based on a Route-Policy.

The undo ext-community-change enable command disables a device from changing extended community attributes based on a Route-Policy.

By default, extended community attributes cannot be changed based on a Route-Policy.

Format

ext-community-change enable

undo ext-community-change enable

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, BGP prevents a device from changing extended community attributes from a peer or peer group based on an import policy or changing extended community attributes to be advertised to a peer or peer group based on an export policy. To enable a device to change extended community attributes from a peer or peer group based on an import policy and change extended community attributes to be advertised to a peer or peer group based on an export policy before advertising them, run the ext-community-change enable command.

Precautions

  • The ext-community-change enable and peer route-policy import commands must both be run so that the device can change extended community attributes from a peer or peer group based on an import policy.

  • The ext-community-change enable command must be run with either of the following commands so that the extended community attributes changed based on an export policy can be advertised to a peer or peer group.

Example

# Enable the device to change extended community attributes of the BGP routes receiverd 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 (a to z or A to Z, 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 (a to z or A to Z, 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 (a to z, 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.
NOTE:
  • protocol [ process-id ] is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, and BGP-VPN instance IPv6 address family view.

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

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

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPN instance IPv4 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 (a to z or A to Z, 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 (a to z, 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.
NOTE:
  • acl-name acl-name, acl-number, and ip-prefix ip-prefix-name are valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, 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.

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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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.

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.

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 industrial switch 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 3600, 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.

NOTE:

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 large 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 a IBGP peer group named in.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] group in internal

# Create a 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 multicast

ipv4-family vpnv4 [ unicast ]

ipv4-family vpn-instance vpn-instance-name

undo ipv4-family { multicast | 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:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does 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.

Views

BGP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before performing BGP configurations in an IPv4 address family, you need to run the ipv4-family command in the BGP view to enable the IPv4 address family, and then enter the address family view. By default, BGP uses the IPv4 unicast address family.

Precautions

To disable the IPv4 unicast address family from being the default BGP route, run the undo default ipv4-unicast command.

Example

# Enter the BGP-IPv4 unicast address family view.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] ipv4-family unicast
[Huawei-bgp-af-ipv4]

ipv6-family

Function

The ipv6-family command enters the IPv6 address family view of BGP.

The undo ipv6-family command quits the IPv6 address family view and deletes the configurations in the view.

Format

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

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

Parameters

Parameter Description Value
unicast Displays the unicast address family view. -
vpn-instance vpn-instance-name Associates a specified VPN instance with the IPv6 address family. You can enter the BGP-VPN instance IPv6 address family view by using the parameter. 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]

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 that ranges from 1 to 4.
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.

NOTE:

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 that ranges from 1 to 4.
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.
NOTE:
  • 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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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-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-IPv4 multicast address family view

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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 8-159 provides examples of the two commands.

Table 8-159  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

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.
NOTE:
  • ipv4-address is valid only in the BGP view, BPG-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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer advertise-community command is used to configure a device to advertise a community attribute to its peer or peer group. If a device advertises a community attribute to its peer group, all the members of the peer group will inherit the configuration. This simplifies the application of routing policies and facilitates route maintenance and management.

Prerequisites

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

A specific community attribute has been defined 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.
NOTE:
  • 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 ]

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

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.
NOTE:
  • ipv4-address is valid only in the BGP view, BPG-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, and BGP-VPN instance IPv6 address family view.

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP uses AS numbers to detect routing loops. The AS numbers in the AS_Path of each received route are matched against the local AS number configured using the bgp command, the fake AS number configured using the peer fake-as command, and the VPN instance AS number configured using the as-number command. The largest number of times any of the configured AS numbers is repeated is considered as the maximum number. In the Hub and Spoke networking, if EBGP runs between a Hub-PE and a Hub-CE on a Hub site, the route sent from the Hub-PE to the Hub-CE carries the AS number of the Hub-PE. If the Hub-CE sends a routing update to the Hub-PE, the Hub-PE will deny it because the routing update contains the AS number of the Hub-PE.

To ensure proper route transmission in the Hub and Spoke networking, configure all the BGP peers on the path, along which the Hub-CE advertises private network routes to the Spoke-CE, to accept the routes in which the AS number repeats once.

Prerequisites

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

Precautions

If the peer allow-as-loop command is run for a peer or peer group multiple times, the latest configuration overrides the previous one.

Example

# Set the number of local AS number repetitions to 2.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 10.1.1.2 as-number 200
[Huawei-bgp] ipv4-family unicast
[Huawei-bgp-af-ipv4] peer 10.1.1.2 allow-as-loop 2

peer as-number

Function

The peer as-number command creates a peer or configures an AS number for a specified peer group.

The undo peer as-number command deletes a specified peer or the AS number of a specified peer group.

By default, no BGP peer is configured, and no AS number is specified for a peer or peer group.

Format

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

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

Parameters

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

Specifies the IPv4 address of a peer.

The IPv4 address can be the IP address of an interface that is directly connected to the peer or the IP address of a loopback interface of the reachable peer.

It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
as-number-plain 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.
NOTE:
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

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

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer ipv4-address as-number { as-number-plain | as-number-dot } command is used to create a BGP peer.

The peer group-name as-number { as-number-plain | as-number-dot } command is used to configure an AS number for a specified peer group.

Precautions

If a peer does not join any peer group or the peer group to which a peer belongs is not configured with an AS number, deleting the AS number of the peer will reset the peer relationship.

If a peer in a peer group is not configured with an AS number, deleting the AS number of the peer group will interrupt the connection on the peer.

The AS number 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. -
NOTE:
  • ipv4-address is valid only in the BGP view, BPG-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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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.

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 1000ms, the interval for receiving BFD packets is 1000ms, and the local detection multiplier is 3.

Format

peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier | wtr wtr-value }*

undo peer { group-name | ipv4-address } bfd { min-tx-interval | min-rx-interval | detect-multiplier | 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.
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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BFD provides millisecond-level fault detection. It helps BGP to detect faults in neighboring devices or links more quickly, and instructs BGP to recalculate routes for correct packet forwarding. The peer bfd command can be used to set the values of BFD session parameters on a specified interface.

The BFD configuration of a peer takes precedence over that of the peer group to which the peer belongs. If BFD is not configured on a peer and the peer group to which the peer belongs is enabled with BFD, the peer will inherit the BFD configurations of the peer group.

Prerequisites

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

A BFD session can be established only when the corresponding BGP session is in the Established state.

Precautions

If the peer bfd command is run multiple times, the latest configuration overwrites the previous one. The BFD session uses the latest parameters as the detection parameters.

Assume that BFD is configured on a peer group. If the peer bfd block command is not run on members of the peer group, the members will establish BFD sessions.

If BFD parameters are set on a peer, a BFD session will be established by using the BFD parameters on the peer.

Example

# Configure BFD and set detection parameters on peer 10.2.2.9.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 10.2.2.9 as-number 200
[Huawei-bgp] peer 10.2.2.9 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 5

peer bfd block

Function

The peer bfd block command prevents a peer from inheriting the BFD function of its peer group.

The undo peer bfd block command restores the default configuration.

By default, a peer inherits the BFD function from its peer group.

Format

peer ipv4-address bfd block

undo peer ipv4-address bfd block

Parameters

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

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 } bfd enable [ single-hop-prefer ]

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

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.

NOTE:

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. -
NOTE:
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

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

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer capability-advertise route-refresh command is used to configure a device to advertise the route-refresh capability to its peer.

The peer capability-advertise conventional command is used to configure a device to advertise the regular router capability to its peer. If conventional is specified in the command, the router does not have all extension functions such as route-refresh capability, GR capability, and multi-address family negotiation. This allows the router to be compatible with routers of earlier versions.

The peer capability-advertise 4-byte-as command is used to configure a device to advertise the 4-byte AS number capability to its peer. If AS number resources are used up, this command can be used to configure devices to use 4-byte AS numbers.

Prerequisites

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

The corresponding BGP session must be in the Established state.

Precautions

Enabling or disabling the regular router capability causes the teardown and re-establishment of sessions.

Example

# Configure a BGP device to advertise the route-refresh capability to its peer.

<Huawei> system-view
[Huawei] bgp 100
[Huawei-bgp] peer 10.89.2.33 as-number 100
[Huawei-bgp] peer 10.89.2.33 capability-advertise route-refresh

peer 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.
NOTE:
  • 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.

NOTE:

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.

NOTE:

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 0/0/1
Related Topics

peer default-route-advertise

Function

The peer default-route-advertise command configures a BGP device to advertise a default route to its peer or peer group.

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

By default, a BGP device does not advertise default routes to its peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv4-address1 { mask1 | mask-length1 } } &<1-4> | conditional-route-match-any { ipv4-address2 { mask2 | mask-length2 } } &<1-4> ]

peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv6-address1 prefix-length1 } &<1-4> | conditional-route-match-any { ipv6-address2 prefix-length2 } &<1-4> ]

undo peer { group-name | ipv4-address | ipv6-address } default-route-advertise

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. The value is in dotted decimal notation.
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.
NOTE:
  • 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.
NOTE:
  • 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.
NOTE:
  • 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.
NOTE:
  • 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.
NOTE:
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, and BGP-IPv4 multicast address family view, and BGP-VPNv4 address family view.

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

Views

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

NOTE:
The AR502G-L-D-H, AR502GR-L-D-H, AR510&AR530 series does not support BGP-VPNv4 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 aut