06-Layer 3 - IP Routing Command Reference

HomeSupportRoutersH3C SR8800 Router SeriesReference GuidesCommand ReferencesH3C SR8800 Command Reference-Release3347-6W10306-Layer 3 - IP Routing Command Reference
06-BGP Commands
Title Size Download
06-BGP Commands 388.12 KB

Contents

BGP configuration commands 1

aggregate· 1

balance (BGP/BGP-VPN instance view) 2

bestroute as-path-neglect (BGP/BGP-VPN instance view) 3

bestroute compare-med (BGP/BGP-VPN instance view) 4

bestroute med-confederation (BGP/BGP-VPN instance view) 4

bgp· 5

compare-different-as-med (BGP/BGP-VPN instance view) 6

confederation id· 6

confederation nonstandard· 7

confederation peer-as 8

dampening (BGP/BGP-VPN instance view) 9

default ipv4-unicast 10

default local-preference (BGP/BGP-VPN instance view) 10

default med (BGP/BGP-VPN instance view) 11

default-route imported (BGP/BGP-VPN instance view) 12

display bgp group· 13

display bgp network· 14

display bgp paths 15

display bgp peer 16

display bgp peer received ip-prefix· 19

display bgp routing-table· 20

display bgp routing-table as-path-acl 22

display bgp routing-table cidr 23

display bgp routing-table community· 24

display bgp routing-table community-list 25

display bgp routing-table dampened· 26

display bgp routing-table dampening parameter 27

display bgp routing-table different-origin-as 28

display bgp routing-table flap-info· 29

display bgp routing-table label 30

display bgp routing-table peer 31

display bgp routing-table regular-expression· 32

display bgp routing-table statistic· 32

display router id· 33

ebgp-interface-sensitive· 33

filter-policy export (BGP/BGP-VPN instance view) 34

filter-policy import (BGP/BGP-VPN instance view) 35

graceful-restart (BGP view) 36

graceful-restart timer restart 37

graceful-restart timer wait-for-rib· 38

group (BGP/BGP-VPN instance view) 38

ignore-first-as 39

import-route (BGP/BGP-VPN instance view) 40

log-peer-change· 41

network (BGP/BGP-VPN instance view) 41

network short-cut (BGP/BGP-VPN instance view) 42

peer advertise-community (BGP/BGP-VPN instance view) 43

peer advertise-ext-community (BGP/BGP-VPN instance view) 44

peer allow-as-loop (BGP/BGP-VPN instance view) 44

peer as-number (BGP/BGP-VPN instance view) 45

peer as-path-acl (BGP/BGP-VPN instance view) 46

peer bfd· 47

peer capability-advertise conventional (BGP view) 48

peer capability-advertise orf 48

peer capability-advertise orf non-standard· 50

peer capability-advertise route-refresh· 51

peer capability-advertise suppress-4-byte-as 51

peer connect-interface (BGP/BGP-VPN instance view) 52

peer default-route-advertise (BGP/BGP-VPN instance view) 53

peer description (BGP/BGP-VPN instance view) 54

peer ebgp-max-hop (BGP/BGP-VPN instance view) 55

peer enable (BGP/BGP-VPN instance view) 56

peer fake-as (BGP/BGP-VPN instance view) 56

peer filter-policy (BGP/BGP-VPN instance view) 57

peer group (BGP/BGP-VPN instance view) 58

peer ignore (BGP/BGP-VPN instance view) 59

peer ip-prefix· 59

peer keep-all-routes (BGP/BGP-VPN instance view) 60

peer log-change (BGP/BGP-VPN instance view) 61

peer next-hop-local (BGP/BGP-VPN instance view) 62

peer password· 62

peer preferred-value (BGP/BGP-VPN instance view) 63

peer public-as-only (BGP/BGP-VPN instance view) 64

peer reflect-client (BGP/BGP-VPN instance view) 65

peer route-limit (BGP/BGP-VPN instance view) 66

peer route-policy (BGP/BGP-VPN instance view) 67

peer route-update-interval (BGP/BGP-VPN instance view) 68

peer substitute-as (BGP/BGP-VPN instance view) 69

peer timer (BGP/BGP-VPN instance view) 70

preference (BGP/BGP-VPN instance view) 71

reflect between-clients (BGP view/BGP-VPN instance view) 72

reflector cluster-id (BGP view/BGP-VPN instance view) 72

refresh bgp· 73

reset bgp· 74

reset bgp dampening· 74

reset bgp flap-info· 75

reset bgp ipv4 all 76

router id· 76

router-id· 77

summary automatic· 78

synchronization (BGP view) 78

timer (BGP/BGP-VPN instance view) 79

 


 

 

NOTE:

·       The term router in this document refers to both routers and Layer 3 switches.

·       For more information about routing policy configuration commands in this document, see the chapter “Routing policy configuration commands.”

 

aggregate

Syntax

aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *

undo aggregate ip-address { mask | mask-length }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

ip-address: Summary address.

mask: Summary route mask, in dotted decimal notation.

mask-length: Length of summary route mask, in the range 0 to 32.

as-set: Creates a summary with AS set.

attribute-policy route-policy-name: Sets the attributes of the summary route according to the routing policy The routing policy name is a case-sensitive string of 1 to 63 characters.

detail-suppressed: Only advertises the summary route.

suppress-policy route-policy-name: Suppresses specific routes defined in the routing policy. The routing policy name is a case-sensitive string of 1 to 63 characters.

origin-policy route-policy-name: References the routing policy to specify routes for summarization. The routing policy name is a case-sensitive string of 1 to 63 characters.

Table 1 Functions of the keywords

Keywords

Function

as-set

Used to create a summary route, whose AS path contains the AS path information of summarized routes. Use this keyword carefully when many AS paths need to be summarized, because the frequent changes of these specific routes may lead to route oscillation.

detail-suppressed

This keyword does not suppress the summary route, but it suppresses the advertisement of all the more specific routes. To summarize only some specific routes, use the peer filter-policy command.

suppress-policy

Used to create a summary route and suppress the advertisement of some summarized routes. If you want to suppress some routes selectively and leave other routes still advertised, use the if-match clause of the route-policy command.

origin-policy

Selects only routes satisfying the routing policy for route summarization.

attribute-policy

Sets attributes except the AS-PATH attribute for the summary route. The same work can be done by using the peer route-policy command.

 

Description

Use the aggregate command to create a summary route in the BGP routing table.

Use the undo aggregate command to remove a summary route.

By default, no summary route is configured.

Examples

# In BGP view, create a summary of 192.213.0.0/16 in the BGP routing table.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] aggregate 192.213.0.0 255.255.0.0

# In BGP-VPN instance view, create a summary of 192.213.0.0/16 in BGP routing table (the VPN has been created).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] aggregate 192.213.0.0 255.255.0.0

balance (BGP/BGP-VPN instance view)

Syntax

balance number

undo balance

View

BGP view, VPN instance view

Default level

2: System level

Parameters

number: Number of BGP routes for load balancing, in the range of 1 to 8. When it is set to 1, load balancing is disabled.

Description

Use the balance command to configure the number of BGP routes for load balancing.

Use the undo balance command to disable load balancing.

By default, no load balancing is configured.

Unlike IGP, BGP has no explicit metric for making load balancing decision. Instead, it implements load balancing using route selection rules.

Related commands: display bgp routing-table.

Examples

# In BGP view, set the number of routes participating in BGP load balancing to 2.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] balance 2

# In BGP-VPN instance view, set the number of routes participating in BGP load balancing to 2 (the VPN has been created).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] balance 2

bestroute as-path-neglect (BGP/BGP-VPN instance view)

Syntax

bestroute as-path-neglect

undo bestroute as-path-neglect

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the bestroute as-path-neglect command to configure BGP not to consider the AS_PATH during best route selection.

Use the undo bestroute as-path-neglect command to configure BGP to consider the AS_PATH during best route selection.

By default, BGP considers the AS_PATH during best route selection.

Examples

# In BGP view, ignore AS_PATH in route selection.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] bestroute as-path-neglect

# In BGP-VPN instance view, ignore AS_PATH in route selection (the VPN has been created).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] bestroute as-path-neglect

bestroute compare-med (BGP/BGP-VPN instance view)

Syntax

bestroute compare-med

undo bestroute compare-med

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the bestroute compare-med command to enable the comparison of the MED for paths from each AS.

Use the undo bestroute compare-med command to disable this comparison.

This comparison is not enabled by default.

Examples

# In BGP view, enable the comparison of MEDs for paths from each AS when selecting the best route.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] bestroute compare-med

# In BGP-VPN instance view, enable the comparison of MED for paths from each AS when selecting the best route. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] bestroute compare-med

bestroute med-confederation (BGP/BGP-VPN instance view)

Syntax

bestroute med-confederation

undo bestroute med-confederation

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the bestroute med-confederation command to enable the comparison of the MED for paths from confederation peers during best route selection.

Use the undo bestroute med-confederation command to disable the comparison.

The comparison is not enabled by default.

The system only compares MED values for paths from peers within the confederation. Paths from external ASs are advertised throughout the confederation without MED comparison.

Examples

# In BGP view, enable the comparison of the MED for paths from peers within the confederation.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] bestroute med-confederation

# In BGP-VPN instance view, enable the comparison of the MED for paths from peers within the confederation. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] bestroute med-confederation

bgp

Syntax

bgp as-number

undo bgp [ as-number ]

View

System view

Default level

2: System level

Parameters

as-number: Specifies the local AS number from 1 to 4294967295.

Description

Use the bgp command to enable BGP and enter the BGP view.

Use the undo bgp command to disable BGP.

By default, BGP is not enabled.

Examples

# Enable BGP and set local AS number to 100.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp]

compare-different-as-med (BGP/BGP-VPN instance view)

Syntax

compare-different-as-med

undo compare-different-as-med

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the compare-different-as-med command to enable the comparison of the MED for paths from peers in different ASs.

Use the undo compare-different-as-med command to disable the comparison.

The comparison is disabled by default.

If several paths to one destination are available, the path with the smallest MED is selected.

Do not use this command unless associated ASs adopt the same IGP protocol and routing selection method.

Examples

# In BGP view, enable the comparison of the MED for paths from peers in different ASs.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] compare-different-as-med

# In BGP-VPN instance view, enable the comparison of the MED for paths from peers in different Ass. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] compare-different-as-med

confederation id

Syntax

confederation id as-number

undo confederation id

View

BGP view

Default level

2: System level

Parameters

as-number: Number of the AS that contains multiple sub-ASs, in the range 1 to 4294967295.

Description

Use the confederation id command to configure a confederation ID.

Use the undo confederation id command to remove a specified confederation.

By default, no confederation ID is configured.

Configuring a confederation can reduce IBGP connections in a large AS. You can split the AS into several sub-ASs, and each sub-AS remains fully meshed. These sub-ASs form a confederation. Key IGP attributes of a route, such as the next hop, MED, local preference, are not discarded when crossing each sub-AS. The sub-ASs still look like a whole from the perspective of other ASs. This can ensure the integrity of the former AS, and solve the problem of too many IBGP connections in the AS.

Related commands: confederation nonstandard and confederation peer-as.

Examples

# Confederation 9 consists of four sub-ASs numbered 38, 39, 40 and 41. The peer 10.1.1.1 is a member of the confederation and the peer 200.1.1.1 is outside of the confederation. Take sub AS 41 as an example.

<Sysname> system-view

[Sysname] bgp 41

[Sysname-bgp] confederation id 9

[Sysname-bgp] confederation peer-as 38 39 40

[Sysname-bgp] group Confed38 external

[Sysname-bgp] peer Confed38 as-number 38

[Sysname-bgp] peer 10.1.1.1 group Confed38

[Sysname-bgp] group Remote98 external

[Sysname-bgp] peer Remote98 as-number 98

[Sysname-bgp] peer 200.1.1.1 group Remote98

confederation nonstandard

Syntax

confederation nonstandard

undo confederation nonstandard

View

BGP view

Default level

2: System level

Parameters

None

Description

Use the confederation nonstandard command to make the router compatible with routers not compliant with RFC3065 in the confederation.

Use the undo confederation nonstandard command to restore the default.

By default, all routers in the confederation comply with RFC3065.

All routers should be configured with this command to interact with those nonstandard routers in the confederation.

Related commands: confederation id and confederation peer-as.

Examples

# AS 100 contains routers not compliant with RFC 3065 and comprises two sub-ASs, 64000 and 65000.

<Sysname> system-view

[Sysname] bgp 64000

[Sysname-bgp] confederation id 100

[Sysname-bgp] confederation peer-as 65000

[Sysname-bgp] confederation nonstandard

confederation peer-as

Syntax

confederation peer-as as-number-list

undo confederation peer-as [ as-number-list ]

View

BGP view

Default level

2: System level

Parameters

as-number-list: Sub-AS number list. Up to 32 sub-ASs can be configured in one command line. The expression is as-number-list = as-number &<1-32>, in which as-number specifies a sub-AS number, and &<1-32> indicates up to 32 numbers can be specified.

Description

Use the confederation peer-as command to specify confederation peer sub-ASs.

Use the undo confederation peer-as command to remove specified confederation peer sub-ASs.

By default, no confederation peer sub-ASs are configured.

Before this configuration, you must use the confederation id command to specify the confederation for the sub-ASs.

If the undo confederation peer-as command without the as-number-list argument is used, all confederation peer sub-ASs are removed.

Related commands: confederation nonstandard and confederation id.

Examples

# Specify confederation peer sub ASs 2000 and 2001.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] confederation id 10

[Sysname-bgp] confederation peer-as 2000 2001

dampening (BGP/BGP-VPN instance view)

Syntax

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

undo dampening

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

half-life-reachable: Specifies a half-life for active routes from 1 to 45 minutes. By default, the value is 15 minutes.

half-life-unreachable: Specifies a half-life for suppressed routes from 1 to 45 minutes. By default, the value is 15 minutes.

reuse: Specifies a reuse threshold value for suppressed routes from 1 to 20000. A suppressed route whose penalty value decreases under the value is reused. By default, the reuse value is 750.

suppress: Specifies a suppression threshold from 1 to 20000. The route with a penalty value higher than the threshold is suppressed. The default value is 2000.

ceiling: Specifies a ceiling penalty value from 1001 to 20000. The value must be bigger than the suppress value. By default, the value is 16000.

route-policy-name: Routing policy name, a case-sensitive string of 1 to 63 characters.

half-life-reachable, half-life-unreachable, reuse, suppress and ceiling are mutually dependent. Once any one is configured, all the others should also be specified.

Description

Use the dampening command to enable BGP route dampening, configure dampening parameters, or both.

Use the undo dampening command to disable route dampening.

By default, no route dampening is configured.

The command dampens only EBGP routes rather than IBGP routes.

Related commands: reset bgp dampening, reset bgp flap-info, display bgp routing-table dampened, display bgp routing-table dampening parameter, and display bgp routing-table flap-info.

Examples

# In BGP view, configure BGP route dampening.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] dampening 15 15 1000 2000 10000

# In BGP-VPN instance view, configure BGP route dampening. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] dampening 15 15 1000 2000 10000

default ipv4-unicast

Syntax

default ipv4-unicast

undo default ipv4-unicast

View

BGP view

Default level

2: System level

Parameters

None

Description

Use the default ipv4-unicast command to enable the default use of IPv4 unicast address family for the peers that are established using the peer as-number command.

Use the undo default ipv4-unicast command to disable the default use of IPv4 unicast address family for the peers that are established using the peer as-number command.

The use of IPv4 unicast address family is enabled by default.

The default ipv4-unicast or undo default ipv4-unicast command applies to only BGP peers that are established after it is executed.

The default ipv4-unicast or undo default ipv4-unicast command applies to only BGP peers that are established using the peer as-number command.

After executing the undo default ipv4-unicast command, you can use the peer enable command to enable the use of IPv4 address family for a peer.

Examples

# Enable the default use of IPv4 unicast address family for the peers that are established using the peer as-number command.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] default ipv4-unicast

default local-preference (BGP/BGP-VPN instance view)

Syntax

default local-preference value

undo default local-preference

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

value: Default local preference, in the range 0 to 4294967295. The larger the value is, the higher the preference is.

Description

Use the default local-preference command to configure the default local preference.

Use the undo default local-preference command to restore the default value.

By default, the default local preference is 100.

Using this command can affect BGP route selection.

Examples

# In BGP view, set the default local preference to 180.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] default local-preference 180

# In BGP-VPN instance view, set the default local preference to 180. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] default local-preference 180

default med (BGP/BGP-VPN instance view)

Syntax

default med med-value

undo default med

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

med-value: Default MED value, in the range 0 to 4294967295.

Description

Use the default med command to specify a default MED value.

Use the undo default med command to restore the default.

By default, the default med-value is 0.

Multi-exit discriminator (MED) is an external metric for routes. Different from local preference, MED is exchanged between ASs and will stay in the AS once it enters the AS. The route with a lower MED is preferred. When a router running BGP obtains several routes with an identical destination but different next-hops from various external peers, it will select the best route depending on the MED value. In the case that all other conditions are the same, the system first selects the route with the smallest MED as the best external route.

Examples

# In BGP view, configure the default MED as 25.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] default med 25

# In BGP-VPN instance view, configure the default MED as 25. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] default med 25

default-route imported (BGP/BGP-VPN instance view)

Syntax

default-route imported

undo default-route imported

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the default-route imported command to allow default route redistribution into the BGP routing table.

Use the undo default-route imported command to disallow the redistribution.

By default, default route redistribution is not allowed.

The default-route imported command must be used with the import-route command to redistribute default routes into the BGP routing table.

Related commands: import-route.

Examples

# In BGP view, allow default route redistribution from OSPF into BGP.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] default-route imported

[Sysname-bgp] import-route ospf 1

# In BGP-VPN instance view, enable redistributing default route from OSPF into BGP. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] default-route imported

[Sysname-bgp-vpn1] import-route ospf 1

display bgp group

Syntax

display bgp group [ group-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

group-name: Peer group name, a string of 1 to 47 characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp group command to display peer group information.

Examples

# Display the information of the peer group aaa.

<Sysname> display bgp group aaa

 

 BGP peer-group is aaa

 Remote AS 200

 Type : external

 Maximum allowed prefix number: 4294967295

 Threshold: 75%

 Configured hold timer value: 180

 Keepalive timer value: 60

 Minimum time between advertisement runs is 30 seconds

 Peer Preferred Value: 0

 No routing policy is configured

  Members:

  Peer            AS  MsgRcvd  MsgSent  OutQ PrefRcv Up/Down  State

 

  2.2.2.1         200        0        0     0       0 00:00:35 Active

Table 2 Output description

Field

Description

BGP peer-group

Name of the BGP peer group.

Remote AS

AS number of peer group.

type

Type of the BGP peer group: IBGP or EBGP.

Maximum allowed prefix number

Maximum prefixes allowed to receive from the peer group.

Threshold

Percentage of received prefixes from the peer group to maximum prefixes allowed to receive from the peer group; If the percentage is reached, the system generates alarm messages.

Configured hold timer value

Holdtime interval.

Keepalive timer value

Keepalive interval.

Minimum time between advertisement runs

Minimum interval for route advertisements.

Peer Preferred Value

Preferred value specified for the routes from the peer

No routing policy is configured

No routing policy is configured.

Members

Detailed information of the members in the peer group.

Peer

IPv4 address of the peer.

V

BGP version running on the peer.

AS

AS number of the peer.

MsgRcvd

Number of messages received.

MsgSent

Number of messages sent.

OutQ

Number of messages to be sent.

PrefRcv

Number of prefixes received.

Up/Down

The lasting time of the session/the lasting time of the current state (when no session is established).

State

State machine state of the peer.

 

display bgp network

Syntax

display bgp network [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp network command to display routing information advertised with the network command.

Examples

# Display routing information advertised with the network command.

<Sysname> display bgp network

 

  BGP Local Router ID is 10.1.4.2.

  Local AS Number is 400.

  Network          Mask            Route-policy        Short-cut

 

  100.1.2.0        255.255.255.0

  100.1.1.0        255.255.255.0                       Short-cut

Table 3 Output description

Field

Description

BGP Local Router ID

BGP Local Router ID

Local AS Number

Local AS Number

Network

Network address

Mask

Mask

Route-policy

Routing policy

Short-cut

Short-cut route

 

display bgp paths

Syntax

display bgp paths [ as-regular-expression | | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

as-regular-expression: AS path regular expression, a string of 1 to 80 characters.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp paths command to display information about BGP AS paths.

Examples

# Display information about BGP AS paths with AS number starting from 200.

<Sysname> display bgp paths ^200

 

    Address       Hash    Refcount  MED         Path/Origin

    0x5917100     11      1         0           200 300i  

Table 4 Output description

Field

Description

Address

Route address in the local database, in dotted hexadecimal notation.

Hash

Hash index.

Refcount

Count of routes that reference the path.

MED

MED of the path.

Path

AS_PATH attribute of the path, recording the ASs it has passed to avoid routing loops

Origin

Origin attribute of the path:

·       iIndicates the route is interior to the AS.

·       Summary routes and routes defined using the network command are considered IGP routes.

·       eIndicates that a route is learned from the exterior gateway protocol (EGP).

·       ?Short for INCOMPLETE. It indicates that the origin of a route is unknown and the route is learned by other means.

 

display bgp peer

Syntax

display bgp peer [ ip-address { log-info | verbose } | group-name log-info | verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip-address: IP address of an peer to be displayed, in dotted decimal notation.

group-name: Name of a peer group to be displayed, a string of 1 to 47 characters.

log-info: Displays the log information of the specified peer.

verbose: Displays the detailed information of the peer/peer group.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp peer command to display peer/peer group information.

Examples

# Display the detailed information of the peer 10.110.25.20.

<Sysname> display bgp peer 10.110.25.20 verbose

 

         Peer: 10.110.25.20 Local: 2.2.2.2

         Type: EBGP link

         BGP version 4, remote router ID 1.1.1.1

         BGP current state: Established, Up for 00h01m51s

         BGP current event: RecvKeepalive

         BGP last state: OpenConfirm

         Port:  Local - 1029     Remote - 179

         Configured: Active Hold Time: 180 sec   Keepalive Time: 60 sec

         Received  : Active Hold Time: 180 sec

         Negotiated: Active Hold Time: 180 sec   Keepalive Time: 60 sec

         Peer optional capabilities:

         Peer support bgp multi-protocol extended

         Peer support bgp route refresh capability

         Address family IPv4 Unicast: advertised and received

 

 Received: Total 5 messages, Update messages 1

 Sent: Total 4 messages, Update messages 0

 Maximum allowed prefix number: 4294967295

 Threshold: 75%

 Minimum time between advertisement runs is 30 seconds

 Optional capabilities:

 Route refresh capability has been enabled

  ORF advertise capability based on prefix (type 64):

    Local: both

    Negotiated: send

 Peer Preferred Value: 0

 BFD: Enabled

 

 Routing policy configured:

 No routing policy is configured

Table 5 Output description

Field

Description

Peer

IP address of the peer.

Local

Local router ID.

Type

Peer type.

BGP version

BGP version.

remote router ID

Router ID of the peer.

BGP current state

Current state of the peer.

BGP current event

Current event of the peer.

BGP last state

Previous state of the peer.

Port

TCP port numbers of the local router and its peer.

Configured: Active Hold Time

Local holdtime interval.

Keepalive Time

Local keepalive interval.

Received: Active Hold Time

Remote holdtime interval.

Negotiated: Active Hold Time

Negotiated holdtime interval.

Peer optional capabilities

Optional capabilities supported by the peer, including BGP multiprotocol extensions and route refresh.

Address family IPv4 Unicast

Routes are advertised and received in IPv4 unicasts.

Received

Total numbers of received packets and updates.

Sent

Total numbers of sent packets and updates.

Maximum allowed prefix number

Maximum allowed prefix number.

Threshold

Percentage of received prefixes from the peer group to maximum prefixes allowed to receive from the peer group; If the percentage is reached, the system generates alarm messages.

Minimum time between advertisement runs

Minimum route advertisement interval.

Optional capabilities

Optional capabilities enabled by the peer.

Route refresh capability has been enabled

The route-refresh capability has been enabled.

ORF advertise capability based on prefix (type 64):

The BGP peer supports the ORF capability based on IP prefix. The capability value is 64.

Local: both

The local BGP router supports both the ORF sending and receiving capabilities.

Negotiated: send

Negotiation result: The local BGP router can send Router-refresh messages carrying the ORF information, and the peer can receive Router-refresh messages carrying the ORF information. (This field is not displayed if neither the send nor the receive capability is supported.)

Peer Preferred Value

Preferred value specified for the routes from the peer.

BFD

BFD state: enabled or disabled.

Routing policy configured

Local routing policy.

 

# Display the log information of the peer 10.110.25.20.

<sysname> display bgp peer 10.110.25.20 log-info

 

 Peer : 10.110.25.20

 

     Date      Time    State Notification

                             Error/SubError

 

  10-Jul-2008 15:46:17 Down  Send Notification with Error 1/1

                             Message Header Error/Connection Not Synchronized

  10-Jul-2008 09:23:00 Up   

  10-Jul-2008 07:46:17 Down  Receive Notification with Error 3/2

                             UPDATE Message Error/Unsupported optional Parameter

  10-Jul-2008 06:23:00 Up

  10-Jul-2008 05:46:17 Down  Send Notification with Error 6/4

                             Cease/Administrative Reset

Table 6 Output description

Field

Description

Peer

IP address of the peer.

Date

Date on which the Notification was sent or received.

Time

Time at which the Notification was sent or received.

State

BGP session state:

·       UpIndicates the BGP session is up.

·       DownIndicates the BGP session is down.

Notification

Notification message.

Error/SubError

Error refers to the error code, which identifies the type of the Notification.

SubError refers to the error subcode of the Notification, which identifies the specific information about the reported error.

 

display bgp peer received ip-prefix

Syntax

display bgp peer ip-address received ip-prefix [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip-address: IP address of a BGP peer.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp peer received ip-prefix command to display the prefix information in the ORF packet from the specified BGP peer.

Examples

# Display the prefix information in the ORF packet from the BGP peer 10.110.25.20.

<Sysname> display bgp peer 10.110.25.20 received ip-prefix

ORF ip-prefix entries: 2

ge: greater-equal   le: less-equal

  index  rule   prefix                 ge    le

  10     permit 111.111.111.0/24       26    32

  20     deny   2.1.1.0/24             26    32

Table 7 Output description

Field

Description

ORF ip-prefix entries

Number of ORF prefix entries.

index

Index of a prefix entry.

rule

Matching rule of the prefix.

prefix

Prefix information.

ge

greater-equal, indicating the mask length must be greater than or equal to the specific value.

le

less-equal, indicating the mask length must be less than or equal to the specific value.

 

display bgp routing-table

Syntax

display bgp routing-table [ ip-address [ { mask | mask-length } [ longer-prefixes ] ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip-address: Destination IP address.

mask: Network mask, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

longer-prefixes: Displays the routing entries selected through the following steps:

1.      AND the specified destination IP address with the specified mask.

2.      AND the destination IP address of each route with the specified mask.

3.      Find the calculation results of 2) that match the result of 1) and display the route with the longest mask among the matching routes that have a mask shorter than or equal to the specified mask.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table command to display specified BGP routing information in the BGP routing table.

Examples

# Display BGP routing table information.

<Sysname> display bgp routing-table

 

 Total Number of Routes: 1

 

 BGP Local router ID is 10.10.10.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

 *>  40.40.40.0/24     20.20.20.1       0                     0       200 300i

Table 8 Output description

Field

Description

Total Number of Routes

Total Number of Routes.

BGP Local router ID

BGP local router ID.

Status codes

Status codes, including:

·       * – valid—Valid route.

·       ^ - VPNv4 best—Best VPNv4 route.

·       > – best—Best route.

·       d – damped—Dampened route.

·       h – history—History route.

·       i – internal—Internal route.

·       s – suppressed—Suppressed route.

·       S – Stale—Stale route.

Origin

Origin attributes, including:

·       i – IGP—Originated in the AS.

·       e – EGP—Learned through EGP.

·       ? – incomplete—Learned by some other means.

Network

Destination network address.

Next Hop

Next hop IP address.

MED

MULTI_EXIT_DISC attribute.

LocPrf

Local preference value.

PrefVal

Preferred value of the route.

Path

AS_PATH attribute, recording the ASs the packet has passed to avoid routing loops.

PrefVal

Preferred value.

Ogn

Origin attribute of the route, which can be one of the following values:

·       i—Indicates that the route is interior to the AS. Summary routes and the routes injected with the network command are considered IGP routes.

·       e—Indicates that the route is learned from the Exterior Gateway Protocol (EGP).

·       ?—Short for INCOMPLETE. It indicates that the origin of the route is unknown and the route is learned by other means.

 

display bgp routing-table as-path-acl

Syntax

display bgp routing-table as-path-acl as-path-acl-number [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

as-path-acl-number: Displays routing information permitted by the AS path ACL, which is specifies with a number from 1 to 256.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table as-path-acl command to display BGP routes permitted by an as-path ACL.

Examples

# Display BGP routes permitted by AS path ACL 1.

<Sysname> display bgp routing-table as-path-acl 1

 

 BGP Local router ID is 20.20.20.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network            NextHop        MED        LocPrf      PrefVal Path/Ogn

 

 *>  40.40.40.0/24      30.30.30.1     0                      0       300i 

For description of the fields, see Table 8.

display bgp routing-table cidr

Syntax

display bgp routing-table cidr [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table cidr command to display BGP CIDR (Classless Inter-Domain Routing) routing information.

Examples

# Display BGP CIDR routing information.

<Sysname> display bgp routing-table cidr

 

 Total Number of Routes: 1

 

 BGP Local router ID is 20.20.20.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network          NextHop         MED        LocPrf     PrefVal Path/Ogn

 

 *>  40.40.40.0/24    30.30.30.1      0                     0       300i   

For description of the fields, see Table 8.

display bgp routing-table community

Syntax

display bgp routing-table community [ aa:nn&<1-13> ] [ no-advertise | no-export | no-export-subconfed ] * [ whole-match ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

aa:nn: Community number. Both aa and nn are in the range 0 to 65535.

&<1-13>: Argument before it can be entered up to 13 times.

no-advertise: Displays BGP routes that cannot be advertised to any peer.

no-export: Displays BGP routes that cannot be advertised out the AS. If a confederation is configured, it displays routes that cannot be advertised out the confederation, but can be advertised to other sub ASs in the confederation.

no-export-subconfed: Displays BGP routes that cannot be advertised out the AS or to other sub ASs in the configured confederation.

whole-match: Displays the BGP routes exactly matching the specified community attribute.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table community command to display BGP routing information with the specified BGP community attribute.

Examples

# Display BGP routing information with the specified BGP community.

<Sysname> display bgp routing-table community 11:22

 

 BGP Local router ID is 10.10.10.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

 *>  10.10.10.0/24      0.0.0.0         0                      0       i

 *>  40.40.40.0/24      20.20.20.1      0                      0       200 300i

For description of the fields, see Table 8.

display bgp routing-table community-list

Syntax

display bgp routing-table community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number }&<1-16> [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

basic-community-list-number: Specifies a basic community-list number from 1 to 99.

adv-community-list-number: Specifies an advanced community-list number from 100 to 199.

comm-list-name: Community list name, a string of 1 to 31 characters (not all are numbers).

whole-match: Displays routes exactly matching the specified basic-community-list.

&<1-16>: Specifies the argument before it can be entered up to 16 times.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table community-list command to display BGP routing information matching the specified BGP community list.

Examples

# Display BGP routing information matching BGP community list 100.

<Sysname> display bgp routing-table community-list 100

 

 BGP Local router ID is 1.2.3.4

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed,

 Origin codes: i - IGP, e - EGP, ? – incomplete

 

      Network            NextHop        Metric     LocPrf    PrefVal Path

 

 *>   3.3.3.0/30         1.2.3.4                             0       ?

 *>   4.4.0.0/20         1.2.3.4                             0       ?

 *>   4.5.6.0/26         1.2.3.4                             0       ?

 

For description of the fields, see Table 8.

display bgp routing-table dampened

Syntax

display bgp routing-table dampened [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table dampened command to display dampened BGP routes.

Examples

# Display dampened BGP routes.

<Sysname> display bgp routing-table dampened

 

 BGP Local router ID is 2.2.2.2

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network            From              Reuse     Path/Origin

 *d  77.0.0.0           12.1.1.1          00:29:20  100?

Table 9 Output description

Field

Description

From

IP address from which the route was received

Reuse

Reuse time of the route

 

For description of the other fields, see Table 8.

display bgp routing-table dampening parameter

Syntax

display bgp routing-table dampening parameter [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table dampening parameter command to display BGP route dampening parameters.

Related commands: dampening.

Examples

# Display BGP route dampening parameters.

<Sysname> display bgp routing-table dampening parameter

 Maximum Suppress Time(in second) : 3069

 Ceiling Value                    : 16000

 Reuse Value                      : 750

 Reach HalfLife Time(in  second)  : 900

 Unreach HalfLife Time(in  second): 900

 Suppress-Limit                   : 2000

Table 10 Output description

Field

Description

Maximum Suppress Time

Maximum Suppress Time

Ceiling Value

Ceiling penalty value

Reuse Value

Reuse value

Reach HalfLife Time(in second)

Half-life time of active routes

Unreach HalfLife Time(in second)

Half-life time of inactive routes

Suppress-Limit

Limit for a route to be suppressed

 

display bgp routing-table different-origin-as

Syntax

display bgp routing-table different-origin-as [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table different-origin-as command to display BGP routes originating from different autonomous systems.

Examples

# Display BGP routes originating from different ASs.

<Sysname> display bgp routing-table different-origin-as

 

 BGP Local router ID is 2.2.2.2

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network           NextHop         MED        LocPrf     PrefVal Path/Ogn

 

 *>  55.0.0.0         12.1.1.1         0                     0       100?

 *                    14.1.1.2         0                     0       300?

For description of the fields, see Table 8.

display bgp routing-table flap-info

Syntax

display bgp routing-table flap-info [ regular-expression as-regular-expression | [ as-path-acl as-path-acl-number | ip-address [ { mask | mask-length } [ longer-match ] ] ] [ | { begin | exclude | include } regular-expression ] ]

View

Any view

Default level

1: Monitor level

Parameters

as-regular-expression: Displays route flap information that matches the AS path regular expression, which is a string of 1 to 80 characters.

as-path-acl-number: Displays route flap information matching the AS path ACL. The number is in the range 1 to 256.

ip-address: Destination IP address.

mask: Mask, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

longer-match: Matches the longest prefix.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table flap-info command to display BGP route flap statistics.

Examples

# Display BGP route flap statistics.

<Sysname> display bgp routing-table flap-info

 

 BGP Local router ID is 2.2.2.2

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network        From        Flaps  Duration      Reuse  Path/Origin

 

 *>  55.0.0.0       12.1.1.1    2      00:00:16             100?

 *d  77.0.0.0       12.1.1.1    5      00:34:02   00:27:08  100?

Table 11 Output description

Field

Description

From

Source IP address of the route

Flaps

Number of routing flaps

Duration

Duration time of the flap route

Reuse

Reuse time of the route

 

For description of the other fields, see Table 8.

display bgp routing-table label

Syntax

display bgp routing-table label [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table label command to display labeled BGP routing information.

Examples

# Display labeled BGP routing information.

<Sysname> display bgp routing-table label

 BGP Local router ID is 6.6.6.7

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 2

        Network              NextHop           In/Out Label

 *>     4.4.4.4/32           127.0.0.1         3/NULL

 *>     5.5.5.5/32           1.1.1.1           NULL/1024

The In/Out Label field refers to the inbound/outbound label. For description of the other fields, see Table 8.

display bgp routing-table peer

Syntax

display bgp routing-table peer ip-address { advertised-routes | received-routes } [ network-address [ mask | mask-length ] | statistic ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip-address: IP address of a peer.

advertised-routes: Displays routing information advertised to the specified peer.

received-routes: Displays routing information received from the specified peer.

network-address: IP address of the destination network.

mask: Mask of the destination network, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

statistic: Displays route statistics.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table peer command to display BGP routing information advertised to or received from the specified BGP peer.

Related commands: display bgp peer.

Examples

# Display BGP routing information advertised to BGP peer 20.20.20.1.

<Sysname> display bgp routing-table peer 20.20.20.1 advertised-routes

 

 Total Number of Routes: 2

 

 BGP Local router ID is 30.30.30.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

     Network           NextHop         MED        LocPrf     PrefVal Path/Ogn

 

 *>  30.30.30.0/24     0.0.0.0         0                     0       i

 *>  40.40.40.0/24     0.0.0.0         0                     0       i

For description of the other fields, see Table 8.

display bgp routing-table regular-expression

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

as-regular-expression: AS path regular expression, a string of 1 to 80 characters.

Description

Use the display bgp routing-table regular-expression command to display BGP routing information matching the specified AS path regular expression.

Examples

# Display BGP routing information with AS number ended with 300.

<Sysname> display bgp routing-table regular-expression 300$

 

 BGP Local router ID is 20.20.20.1

 Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 

     Network           NextHop       MED        LocPrf    PrefVal Path/Ogn

 

 *>  40.40.40.0/24     30.30.30.1    0                    0       300i

For description of the other fields, see Table 8.

display bgp routing-table statistic

Syntax

display bgp routing-table statistic [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display bgp routing-table statistic command to display BGP routing statistics.

Examples

# Display BGP routing statistics.

<Sysname> display bgp routing-table statistic

 

 Total Number of Routes: 4

display router id

Syntax

display router id [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display router id command to display the global router ID.

Examples

# Display the global router ID.

<Sysname> display router id

         Configured router ID is 1.1.1.1

ebgp-interface-sensitive

Syntax

ebgp-interface-sensitive

undo ebgp-interface-sensitive

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the ebgp-interface-sensitive command to enable the clearing of EBGP session on any interface that becomes down.

Use the undo ebgp-interface-sensitive command to disable the function.

This function is enabled by default.

Examples

# In BGP view, enable the clearing of EBGP session on any interface that becomes down.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ebgp-interface-sensitive

# In BGP-VPN instance view, enable the clearing of EBGP session on any interface that becomes down. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] ebgp-interface-sensitive

filter-policy export (BGP/BGP-VPN instance view)

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ direct | isis process-id | ospf process-id | rip process-id | static ]

undo filter-policy export [ direct | isis process-id | ospf process-id | rip process-id | static ]

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

acl-number: Number of an ACL used to filter outgoing routing information, ranging from 2000 to 3999.

ip-prefix-name: Name of an IP prefix list used to filter outgoing routing information, a string of 1 to 19 characters.

direct: Filters direct routes.

isis process-id: Filters outgoing routes redistributed from an ISIS process. The ID is in the range 1 to 65535.

ospf process-id: Filters outgoing routes redistributed from the OSPF process with an ID from 1 to 65535.

rip process-id: Filters outgoing routes redistributed from a RIP process. The ID is in the range 1 to 65535.

static: Filters static routes.

Description

Use the filter-policy export command to configure the filtering of outgoing routes.

Use the undo filter-policy export command to remove the filtering.

If no routing protocol is specified, all outgoing routes are filtered.

By default, no route filtering is configured.

 

 

NOTE:

If you want to reference an advanced ACL (with a number from 3000 to 3999) in the command, the ACL should be configured with the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command to deny/permit a route with the specified destination, or with the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command to deny/permit a route with the specified destination and mask. The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the route (the subnet mask must be valid; otherwise, the configuration is ineffective).

 

Examples

# In BGP view, reference ACL 2000 to filter all outgoing routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] filter-policy 2000 export

# In BGP-VPN instance view, reference ACL 2000 to filter all outgoing routes. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] filter-policy 2000 export

# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass, and reference ACL 3000 to filter outgoing routes.

<Sysname> system-view

[Sysname] acl number 3000

[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0

[Sysname-acl-adv-3000] rule 100 deny ip

[Sysname-acl-adv-3000] quit

[Sysname] bgp 100

[Sysname-bgp] filter-policy 3000 export

filter-policy import (BGP/BGP-VPN instance view)

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } import

undo filter-policy import

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

acl-number: Number of an ACL used to filter incoming routing information, ranging from 2000 to 3999.

ip-prefix-name: Name of an IP prefix list used to filter incoming routing information, a string of 1 to 19 characters.

Description

Use the filter-policy import command to configure the filtering of incoming routing information.

Use the undo filter-policy import command to disable the filtering.

By default, incoming routing information is not filtered.

 

 

NOTE:

If you want to reference an advanced ACL (with a number from 3000 to 3999) in the command, the ACL should be configured with the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard command to deny/permit a route with the specified destination, or with the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command to deny/permit a route with the specified destination and mask. The source keyword specifies the destination address of a route and the destination keyword specifies the subnet mask of the route (the subnet mask must be valid; otherwise, the configuration is ineffective).

 

Examples

# In BGP view, reference ACL 2000 to filter incoming routing information.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] filter-policy 2000 import

# In BGP-VPN instance view, reference ACL 2000 to filter incoming routing information (the VPN has been created).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] filter-policy 2000 import

# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass, and reference ACL 3000 to filter incoming route information.

<Sysname> system-view

[Sysname] acl number 3000

[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0

[Sysname-acl-adv-3000] rule 100 deny ip

[Sysname-acl-adv-3000] quit

[Sysname] bgp 100

[Sysname-bgp] filter-policy 3000 import

graceful-restart (BGP view)

Syntax

graceful-restart

undo graceful-restart

View

BGP view

Default level

2: System level

Parameters

None

Description

Use the graceful-restart command to enable BGP Graceful Restart capability.

Use the undo graceful-restart command to disable BGP Graceful Restart capability.

By default, BGP Graceful Restart capability is disabled.

During main and backup boards switchover, a GR-capable BGP speaker can maintain the packet forwarding table. During restart, it may not maintain the forwarding table.

Examples

# Enable the Graceful Restart capability for BGP process 100.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] graceful-restart

graceful-restart timer restart

Syntax

graceful-restart timer restart timer

undo graceful-restart timer restart

View

BGP view

Default level

2: System level

Parameters

timer: Maximum time for a peer to reestablish a BGP session, in the range 3 to 600 seconds.

Description

Use the graceful-restart timer restart command to configure the maximum time  for a peer to reestablish a BGP session.

Use the undo graceful-restart timer restart command to restore the default.

By default, the maximum time for a peer to reestablish a BGP session is 150 seconds.

Before configuring this command, you must enable the BGP Graceful Restart capability.

Related commands: graceful-restart.

Examples

# Configure the maximum time for a peer to reestablish a BGP session as 300 seconds.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] graceful-restart timer restart 300

graceful-restart timer wait-for-rib

Syntax

graceful-restart timer wait-for-rib timer

undo graceful-restart timer wait-for-rib

View

BGP view

Default level

2: System level

Parameters

timer: Time to wait for the End-of-RIB marker, in the range 3 to 300 seconds.

Description

Use the graceful-restart timer wait-for-rib command to configure the time to wait for the End-of-RIB marker.

Use the undo graceful-restart timer wait-for-rib command to restore the default.

By default, the time to wait for the End-of-RIB marker is 180 seconds.

After a BGP session has been successfully (re)established, the End-of-RIB marker must be received within the time specified with this command.

Using this command can speed up route convergence.

Before configuring this command, you must enable the BGP Graceful Restart capability.

Related commands: graceful-restart.

Examples

# Set the time to wait for the End-of-RIB marker to 100 seconds.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] graceful-restart timer wait-for-rib 100

group (BGP/BGP-VPN instance view)

Syntax

group group-name [ external | internal ]

undo group group-name

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

external: Creates an EBGP peer group, which can be the group of another sub AS in a confederation.

internal: Creates an IBGP peer group.

Description

Use the group command to create a peer group.

Use the undo group command to delete a peer group.

An IBGP peer group is created if neither internal nor external is specified.

Examples

# In BGP view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] group test external

[Sysname-bgp] peer test as-number 200

[Sysname-bgp] peer 10.1.1.1 group test

[Sysname-bgp] peer 10.1.2.1 group test

# In BGP-VPN instance view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] group test external

[Sysname-bgp-vpn1] peer test as-number 200

[Sysname-bgp-vpn1] peer 10.1.1.1 group test

[Sysname-bgp-vpn1] peer 10.1.2.1 group test

ignore-first-as

Syntax

ignore-first-as

undo ignore-first-as

View

BGP view

Parameters

None

Description

Use the ignore-first-as command to configure BGP to ignore the first AS number of EBGP route updates.

Use the undo ignore-first-as command to configure BGP to check the first AS number of EBGP route updates.

By default, BGP checks the first AS number of a received EBGP route update. If the first AS number is not that of the BGP peer, the BGP router discards the route update.

Examples

# Configure BGP to ignore the first AS number of EBGP route updates.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ignore-first-as

import-route (BGP/BGP-VPN instance view)

Syntax

import-route protocol [ { process-id | all-processes } [ allow-direct | med med-value | route-policy route-policy-name ] * ]

undo import-route protocol [ process-id | all-processes ]

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

protocol: Redistributes routes from the specified routing protocol, which can be direct, isis, ospf, rip or static.

process-id: Process ID, in the range 1 to 65535. The default is 1. It is available only when the protocol is isis, ospf, or rip.

all-processes: Redistributes routes from all the processes of the specified protocol. This keyword takes effect only when the protocol is rip, ospf, or isis.

allow-direct: Redistributes direct routes from the specified protocol. This keyword is available only when the specified protocol is OSPF. Without this keyword, BGP does not redistribute direct routes from OSPF. If you specify the route-policy route-policy-name keyword together with the allow-direct keyword, make sure that no rule in the routing policy conflicts with any direct route. For example, do not configure the if-match route-type command for the routing policy to filter OSPF routes. Otherwise, the allow-direct keyword does not take effect.

med-value: Specifies a MED value for redistributed routes, ranging from 0 to 4294967295. If the argument is not specified, the cost of the redistributed route is used as its MED in the BGP routing domain.

route-policy-name: Name of a routing policy used to filter redistributed routes, a case-sensitive string of 1 to 63 characters.

Description

Use the import-route command to configure BGP to redistribute routes from a specified routing protocol and advertise redistributed routes.

Use the undo import-route command to disable route redistribution from a routing protocol.

By default, BGP does not redistribute routes from other protocols.

Only active routes can be redistributed. You can use the display ip routing-table protocol command to display route state information.

The ORIGIN attribute of routes redistributed with the import-route command is incomplete.

Examples

# In BGP view, redistribute routes from RIP.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] import-route rip

# In BGP-VPN instance view, redistribute routes from RIP. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] import-route rip

log-peer-change

Syntax

log-peer-change

undo log-peer-change

View

BGP view

Default level

2: System level

Parameters

None

Description

Use the log-peer-change command to enable the global BGP logging on peers going up and down.

Use the undo log-peer-change command to disable the function.

By default, the function is enabled.

Examples

# Enable BGP logging on peers going up and down.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] log-peer-change

network (BGP/BGP-VPN instance view)

Syntax

network ip-address [ mask | mask-length ] route-policy route-policy-name

undo network ip-address [ mask | mask-length ]

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

ip-address: Destination IP address.

mask: Mask of the network address, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

route-policy-name: Routing policy applied to the route. The name is a case-sensitive string of 1 to 63 characters.

Description

Use the network command to inject a network to the local BGP routing table.

Use the undo network command to remove a network from the BGP routing table.

By default, no network route is injected.

The network route to be injected must exist in the local IP routing table, and using a routing policy makes route management more flexible.

The ORIGIN attribute of the network route injected with the network command is IGP.

Examples

# In BGP view, inject the network segment 10.0.0.0/16.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] network 10.0.0.0 255.255.0.0

# In BGP-VPN instance view, advertise the network segment 10.0.0.0/16. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] network 10.0.0.0 255.255.0.0

network short-cut (BGP/BGP-VPN instance view)

Syntax

network ip-address [ mask | mask-length ] short-cut

undo network ip-address [ mask | mask-length ] short-cut

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

ip-address: Destination IP address.

mask: Mask of the network address, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

Description

Use the network short-cut command to configure an EBGP route as a shortcut route.

Use the undo network short-cut command to restore the default.

By default, a received EBGP route has a priority of 255.

The network short-cut command allows you configure an EBGP route as a shortcut route that has the same priority as a local route and is more likely to become the optimal route.

Examples

# In BGP view, configure route 10.0.0.0/16 as a shortcut route.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] network 10.0.0.0 255.255.0.0 short-cut

# In BGP-VPN instance view, configure route 10.0.0.0/16 as a shortcut route. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] network 10.0.0.0 255.255.0.0 short-cut

peer advertise-community (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } advertise-community

undo peer { group-name | ip-address } advertise-community

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer advertise-community command to advertise the community attribute to a peer/peer group.

Use the undo peer advertise-community command to disable the community attribute advertisement to a peer/peer group.

By default, no community attribute is advertised to any peer group/peer.

Related commands: ip community-list, if-match community, and apply community.

Examples

# In BGP view, advertise the community attribute to peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test advertise-community

# In BGP-VPN instance view, advertise the community attribute to peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test advertise-community

peer advertise-ext-community (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } advertise-ext-community

undo peer { group-name | ip-address } advertise-ext-community

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer advertise-ext-community command to advertise the extended community attribute to a peer/peer group.

Use the undo peer advertise-ext-community command to disable the extended community attribute advertisement to a peer/peer group.

By default, no extended community attribute is advertised to a peer/peer group.

Related commands: ip extcommunity-list, if-match extcommunity, and apply extcommunity.

Examples

# In BGP view, advertise the extended community attribute to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test advertise-ext-community

# In BGP-VPN view, advertise the extended community attribute to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test advertise-ext-community

peer allow-as-loop (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } allow-as-loop [ number ]

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

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

number: Specifies the number of times for which the local AS number can appear in routes from the peer/peer group, in the range 1 to 10. The default number is 1.

Description

Use the peer allow-as-loop command to allow the local AS number to exist in the AS_PATH attribute of routes from a peer/peer group, and to configure the number of times the local AS number can appear.

Use the undo peer allow-as-loop command to remove the configuration.

By default, the local AS number is not allowed in routes from a peer/peer group.

Related commands: display bgp routing-table peer.

Examples

# In BGP view, configure the number of times the local AS number can appear in AS-path attribute of routes from peer 1.1.1.1 as 2.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 1.1.1.1 allow-as-loop 2

# In BGP-VPN instance view, configure the number of times for which the local AS number can appear in AS-path attribute of routes from peer 1.1.1.1 as 2. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 1.1.1.1 allow-as-loop 2

peer as-number (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } as-number as-number

undo peer group-name as-number

undo peer ip-address

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

as-number: AS number of the peer or peer group, in the range 1 to 4294967295.

Description

Use the peer { group-name | ip-address } as-number as-number command to specify a peer/peer group with an AS number.

Use the undo peer group-name as-number command to delete a peer group.

Use the undo peer ip-address command to delete a peer.

By default, no peer or peer group is specified.

You can specify the AS number of a peer in either of the following ways:

·           Use the peer ip-address as-number as-number command. After that, the system creates the specified peer by default.

·           Specify the AS number of the peer when adding it to the specified peer group by using the peer ip-address group group-name as-number as-number command; or use the peer as-number command to specify the AS number of a peer group, and then a newly added peer will belong to the AS.

The AS number of a peer/peer group cannot be modified directly. To do so, you have to delete the peer/peer group and configure it again.

Examples

# In BGP view, specify peer group test in AS 100.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test as-number 100

# In BGP-VPN instance view, specify peer group test2 in AS 200. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test2 as-number 200

peer as-path-acl (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }

undo peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

as-path-acl-number: AS path ACL number, in the range 1 to 256.

export: Filters outgoing routes.

import: Filters incoming routes.

Description

Use the peer as-path-acl command to configure the filtering of routes incoming from or outgoing to a peer/peer group based on a specified AS path ACL.

Use the undo peer as-path-acl command to remove the configuration.

By default, no AS path ACL filtering is configured.

Related commands: ip as-path, if-match as-path, and apply as-path.

Examples

# In BGP view, reference the AS path ACL 1 to filter routes outgoing to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test as-path-acl 1 export

# In BGP-VPN instance view, reference the AS path ACL 1 to filter routes outgoing to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test as-path-acl 1 export

peer bfd

Syntax

peer ip-address bfd

undo peer ip-address bfd

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

ip-address: IP address of a peer.

Description

Use the peer bfd command to enable BFD for a BGP peer.

Use the undo peer bfd command to disable BFD for a BGP peer.

By default, BFD is disabled.

After the link to the BGP peer fails, BFD may detect the failure before the system performs GR. As a result, GR will fail. If GR capability is enabled for BGP, use BFD with caution. If GR and BFD are both enabled, do not disable BFD during a GR process; otherwise, GR may fail.

Examples

# Enable BFD for BGP peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 1.1.1.1 bfd

peer capability-advertise conventional (BGP view)

Syntax

peer { group-name | ip-address } capability-advertise conventional

undo peer { group-name | ip-address } capability-advertise conventional

View

BGP view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer capability-advertise conventional command to disable BGP multi-protocol extension and route refresh for a peer/peer group.

Use the undo peer capability-advertise conventional command to enable BGP multi-protocol extension and route refresh for a peer/peer group.

By default, BGP multi-protocol extension and route refresh are enabled.

Examples

# In BGP view, disable multi-protocol extension and route refresh for peer 160.89.2.33.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 160.89.2.33 as-number 100

[Sysname-bgp] peer 160.89.2.33 capability-advertise conventional

peer capability-advertise orf

Syntax

peer { group-name | ip-address } capability-advertise orf ip-prefix { both | receive | send }

undo peer { group-name | ip-address } capability-advertise orf ip-prefix { both | receive | send }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

both: Supports sending and receiving route-refresh messages carrying the ORF information.

receive: Supports receiving route-refresh messages carrying the ORF information.

send: Supports sending route-refresh messages carrying the ORF information.

Description

Use the peer capability-advertise orf command to enable the ORF capability for a BGP peer or peer group.

Use the undo peer capability-advertise orf command to disable the ORF capability for the BGP peer or peer group.

By default, the ORF capability is not enabled for a BGP peer or peer group.

·           After you enable the ORF capability, the local BGP router negotiates the ORF capability with the BGP peer through Open messages. After that, the BGP router can exchange ORF information in route-refresh messages with the peer. For non-standard ORF capability negotiation, you need also to configure the peer capability-advertise orf non-standard command.

·           After you disable the ORF capability, the local BGP router does not negotiate the ORF capability with the specified peer or peer group.

Table 12 Description of the both, send, and receive parameters and the negotiation result

Local parameter

Peer parameter

Negotiation result

send

·       receive

·       Both

The ORF sending capability is enabled locally and the ORF receiving capability is enabled on the peer.

receive

·       Send

·       Both

The ORF receiving capability is enabled locally and the ORF sending capability is enabled on the peer.

both

Both

Both the ORF sending and receiving capabilities are enabled locally and on the peer, respectively.

 

Examples

# Enable the ORF capability for the BGP peer 18.10.0.9. Then, after negotiation, the local router can exchange ORF information with the peer 18.10.0.9.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 18.10.0.9 as-number 100

[Sysname-bgp] peer 18.10.0.9 capability-advertise orf ip-prefix both

The related configuration needs to be made on the peer.

# In BGP-VPN instance view, enable the ORF capability for the BGP peer 18.10.0.9. Then, after negotiation, the local router can exchange ORF information with the peer 18.10.0.9. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 18.10.0.9 as-number 200

[Sysname-bgp-vpn1] peer 18.10.0.9 capability-advertise orf ip-prefix both

The related configuration needs to be made on the peer.

peer capability-advertise orf non-standard

Syntax

peer { group-name | ip-address } capability-advertise orf non-standard

undo peer { group-name | ip-address } capability-advertise orf non-standard

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Parameters

Use the peer capability-advertise orf non-standard command to enable the non-standard ORF capability (the early implementation of ORF is different from that defined in RFC) for a BGP peer or peer group.

Use the undo peer capability-advertise orf non-standard command to disable the non-standard ORF capability for the BGP peer or peer group.

By default, the non-standard ORF capability is not enabled for a BGP peer or peer group.

This command needs to be configured when the peer supports only non-standard ORF.

Related commands: peer capability-advertise orf.

Examples

# Enable the non-standard ORF capability for the BGP peer 18.10.0.9 (suppose the BGP peer 18.10.0.9 can only send non-standard ORF packets).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 18.10.0.9 as-number 100

[Sysname-bgp] peer 18.10.0.9 capability-advertise orf non-standard

[Sysname-bgp] peer 18.10.0.9 capability-advertise orf ip-prefix both

# In BGP-VPN instance view, enable the non-standard ORF capability for the BGP peer 18.10.0.9 (suppose the BGP peer 18.10.0.9 can only send non-standard ORF packets). (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 18.10.0.9 as-number 200

[Sysname-bgp-vpn1] peer 18.10.0.9 capability-advertise orf non-standard

[Sysname-bgp-vpn1] peer 18.10.0.9 capability-advertise orf ip-prefix both

peer capability-advertise route-refresh

Syntax

peer { group-name | ip-address } capability-advertise route-refresh

undo peer { group-name | ip-address } capability-advertise route-refresh

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer capability-advertise route-refresh command to enable the BGP route refresh capability.

Use the undo peer capability-advertise route-refresh command to disable the capability.

The capability is enabled by default.

Examples

# In BGP view, enable BGP route refresh for peer 160.89.2.33.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 160.89.2.33 as-number 100

[Sysname-bgp] peer 160.89.2.33 capability-advertise route-refresh

# In BGP-VPN instance view, enable BGP route refresh for peer 160.89.2.33. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 160.89.2.33 as-number 200

[Sysname-bgp-vpn1] peer 160.89.2.33 capability-advertise route-refresh

peer capability-advertise suppress-4-byte-as

Syntax

peer { group-name | ip-address } capability-advertise suppress-4-byte-as

undo peer { group-name | ip-address } capability-advertise suppress-4-byte-as

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer capability-advertise suppress-4-byte-as command to enable 4-byte AS number suppression.

Use the undo peer capability-advertise suppress-4-byte-as command to disable the function.

By default, the 4-byte AS number suppression function is disabled.

The device supports 4-byte AS numbers and uses 4-byte AS numbers by default. If the peer devices support only 2-byte AS numbers, you must enable the 4-byte AS number suppression function on the device.

If the peer device supports 4-byte AS numbers, do not enable the suppression function; otherwise, the BGP peer relationship cannot be established.

Examples

# In BGP view, enable 4-byte AS number suppression for peer 160.89.2.33.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 160.89.2.33 as-number 100

[Sysname-bgp] peer 160.89.2.33 capability-advertise suppress-4-byte-as

# In BGP-VPN instance view, enable 4-byte AS number suppression for peer 160.89.2.33. (The VPN must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 160.89.2.33 as-number 200

[Sysname-bgp-vpn1] peer 160.89.2.33 capability-advertise suppress-4-byte-as

peer connect-interface (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } connect-interface interface-type interface-number

undo peer { group-name | ip-address } connect-interface

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string 1 to 47 characters.

ip-address: IP address of a peer.

interface-type interface-number: Specifies an interface by its type and number.

Description

Use the peer connect-interface command to specify the source interface for establishing TCP connections to a peer/peer group.

Use the undo peer connect-interface command to restore the default.

By default, BGP uses the outbound interface of the best route to the BGP peer/peer group as the source interface for establishing a TCP connection to the peer/peer group.

Suppose interface A on the local router is connected to interface B on the peer router. When using the peer x.x.x.x as-number as-number command on the local router but x.x.x.x is not the IP address of interface B, you need to execute the peer connect-interface command on the peer to specify the source interface (the owner of IP address x.x.x.x) for establishing TCP connections.

To establish multiple BGP connections to another BGP router, you need to specify on the local router the respective source interfaces for establishing TCP connections to the peers on the peering BGP router; otherwise, the local BGP router may fail to establish TCP connections to the peers when using the outbound interfaces of the best routes as the source interfaces.

Examples

# In BGP view, specify loopback 0 as the source interface for routing updates to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test connect-interface loopback 0

# In BGP-VPN instance view, specify loopback 0 as the source interface for routing updates to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test connect-interface loopback 0

peer default-route-advertise (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } default-route-advertise [ route-policy route-policy-name ]

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

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

route-policy-name: Routing policy name, a case-sensitive string of 1 to 63 characters.

Description

Use the peer default-route-advertise command to advertise a default route to a peer/peer group.

Use the undo peer default-route-advertise command to disable default route advertisement to a peer/peer group.

By default, no default route is advertised to a peer/peer group.

With this command used, the router unconditionally sends a default route with the next hop being itself to the peer/peer group regardless of whether the default route is available in the routing table.

Examples

# In BGP view, advertise a default route to peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test default-route-advertise

# In BGP-VPN instance view, advertise a default route to peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test default-route-advertise

peer description (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } description description-text

undo peer { group-name | ip-address } description

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

description-text: Description information for the peer/peer group, a string of 1 to 79 characters.

Description

Use the peer description command to configure the description information for a peer/peer group.

Use the undo peer description command to remove the description information of a peer/peer group.

By default, no description information is configured for a peer/peer group.

Create a peer/peer group before configuring a description for it.

Related commands: display bgp peer.

Examples

# In BGP view, configure the description information of the peer group test as ISP1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test description ISP1

# In BGP-VPN instance view, configure the description information of the peer group test as ISP1. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test description ISP1

peer ebgp-max-hop (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } ebgp-max-hop [ hop-count ]

undo peer { group-name | ip-address } ebgp-max-hop

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

hop-count: Maximum hop count, in the range 1 to 255. The default is 64.

Description

Use the peer ebgp-max-hop command to allow establishing an EBGP connection with a peer/peer group that is on an indirectly connected network.

Use the undo peer ebgp-max-hop command to restore the default.

By default, this feature is disabled.

You can use the argument hop-count to specify the maximum route hop count of the EBGP connection.

Examples

# In BGP view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test ebgp-max-hop

# In BGP-VPN instance view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test ebgp-max-hop

peer enable (BGP/BGP-VPN instance view)

Syntax

peer ip-address enable

undo peer ip-address enable

View

BGP view, BGP VPN instance view

Default level

2: System level

Parameters

ip-address: IP address of a peer.

Description

Use the peer enable command to enable the specified peer.

Use the undo peer enable command to disable the specified peer.

By default, the BGP peer is enabled.

If a peer is disabled, the router will not exchange routing information with the peer.

Examples

# Disable peer 18.10.0.9.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 18.10.0.9 group group1

[Sysname-bgp] undo peer 18.10.0.9 enable

peer fake-as (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } fake-as as-number

undo peer { group-name | ip-address } fake-as

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

as-number: Local autonomous system number, in the range 1 to 4294967295.

Description

Use the peer fake-as command to configure a fake local AS number for a peer or peer group.

Use the undo peer fake-as command to remove the configuration.

By default, no fake local AS number is configured for a peer or peer group.

 

 

NOTE:

The peer fake-as command is only applicable to an EBGP peer or peer group.

 

Examples

# In BGP view, configure a fake AS number of 200 for the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test fake-as 200

# In BGP-VPN instance view, configure a fake AS number of 200 for the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test fake-as 200

peer filter-policy (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } filter-policy acl-number { export | import }

undo peer { group-name | ip-address } filter-policy [ acl-number ] { export | import }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

acl-number: ACL number, in the range 2000 to 3999.

export: Applies the filter-policy to routes advertised to the peer/peer group.

import: Applies the filter-policy to routes received from the peer/peer group.

Description

Use the peer filter-policy command to configure an ACL-based filter policy for a peer or peer group.

Use the undo peer filter-policy command to remove the configuration.

By default, no ACL-based filter policy is configured for a peer or peer group.

Related commands: peer as-path-acl.

Examples

# In BGP view, apply the ACL 2000 to filter routes advertised to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test filter-policy 2000 export

# In BGP-VPN instance view, apply the ACL 2000 to filter routes advertised to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test filter-policy 2000 export

peer group (BGP/BGP-VPN instance view)

Syntax

peer ip-address group group-name [ as-number as-number ]

undo peer ip-address group group-name

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

as-number: AS number of the peer, in the range 1 to 4294967295.

Description

Use the peer group command to add a peer to a peer group.

Use the undo peer group command to delete a specified peer from a peer group.

By default, no peer is added into a peer group.

If you have specified an AS number for the peer to be added, make sure that the as-number argument is consistent with the specified peer AS number.

If you have not created the peer to be added, the system automatically creates the peer when you execute the command.

Examples

# In BGP view, add the peer 10.1.1.1 to the EBGP peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] group test external

[Sysname-bgp] peer test as-number 2004

[Sysname-bgp] peer 10.1.1.1 group test

# In BGP-VPN view, add the peer 10.1.1.1 to the EBGP peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] group test external

[Sysname-bgp-vpn1] peer test as-number 2004

[Sysname-bgp-vpn1] peer 10.1.1.1 group test

peer ignore (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } ignore

undo peer { group-name | ip-address } ignore

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer ignore command to disable session establishment with a peer or peer group.

Use the undo peer ignore command to remove the configuration.

By default, session establishment with a peer or peer group is allowed.

After the peer ignore command is executed, the system disables the session with the specified peer or peer group and clears all the related routing information. For a peer group, all sessions with the peer group will be torn down.

Examples

# In BGP view, disable session establishment with peer 10.10.10.10.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 10.10.10.10 ignore

# In BGP-VPN instance view, disable session establishment with peer 10.10.10.10. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 10.10.10.10 ignore

peer ip-prefix

Syntax

peer { group-name | ip-address } ip-prefix ip-prefix-name { export | import }

undo peer { group-name | ip-address } ip-prefix { export | import }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.

export: Applies the filter to routes advertised to the specified peer/peer group.

import: Applies the filter to routes received from the specified peer/peer group.

Description

Use the peer ip-prefix command to reference an IP prefix list to filter routes received from or advertised to a peer or peer group.

Use the undo peer ip-prefix command to remove the configuration.

By default, no IP prefix list based filtering is configured.

Examples

# In BGP view, use the IP prefix list list 1 to filter routes advertised to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test ip-prefix list1 export

# In BGP-VPN view, use the IP prefix list list 1 to filter routes advertised to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test ip-prefix list1 export

peer keep-all-routes (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } keep-all-routes

undo peer { group-name | ip-address } keep-all-routes

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer keep-all-routes command to save original routing information from a peer or peer group, including routes that fail to pass the inbound policy (if configured).

Use the undo peer keep-all-routes command to disable this function.

By default, the function is not enabled.

Examples

# In BGP view, save routing information from peer 131.100.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 131.100.1.1 as-number 200

[Sysname-bgp] peer 131.100.1.1 keep-all-routes

# In BGP-VPN instance view, save routing information from peer 131.100.1.1. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 131.100.1.1 as-number 200

[Sysname-bgp-vpn1] peer 131.100.1.1 keep-all-routes

peer log-change (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } log-change

undo peer { group-name | ip-address } log-change

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer log-change command to enable the logging of session state and event information for a specified peer or peer group.

Use the undo peer log-change command to remove the configuration.

The logging is enabled by default.

Examples

# In BGP view, enable the logging of session state and event information for peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test log-change

# In BGP-VPN instance view, enable the logging of session state and event information for peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test log-change

peer next-hop-local (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } next-hop-local

undo peer { group-name | ip-address } next-hop-local

View

BGP view /BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer next-hop-local command to specify the router as the next hop for routes sent to a peer/peer group.

Use the undo peer next-hop-local command to remove the configuration.

By default, routes advertised to an EBGP peer/peer group take the local router as the next hop, and routes sent to an IBGP peer/peer group do not take the local router as the next hop.

Examples

# In BGP view, set the next hop of routes advertised to peer group test to the router itself.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test next-hop-local

# In BGP-VPN instance view, set the next hop of routes advertised to peer group test to the router itself. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test next-hop-local

peer password

Syntax

peer { group-name | ip-address } password { cipher | simple } password

undo peer { group-name | ip-address } password

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

cipher: Displays the configured password in cipher text format.

simple: Displays the configured password in plain text format.

password: Password, a string of 1 to 80 characters when the simple keyword is used, or when the cipher keyword and plain text password are used; a string of 24 or 108 characters when the cipher text password and the cipher keyword are used.

Description

Use the peer password command to configure BGP to perform MD5 authentication when a TCP connection is being established with a peer/peer group.

Use the undo peer password command to disable the function.

By default, no MD5 authentication is performed for TCP connection establishment.

Once MD5 authentication is enabled, both parties must be configured with the same authentication mode and password. Otherwise, the TCP connection will not be set up.

Examples

# In BGP view, perform MD5 authentication on the TCP connection set up between the local router 10.1.100.1 and the peer router 10.1.100.2.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 10.1.100.2 password simple aabbcc

# Perform the similar configuration on the peer.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 10.1.100.1 password simple aabbcc

# In BGP-VPN instance view, perform MD5 authentication on the TCP connection set up between the local router 10.1.100.1 and the peer router 10.1.100.2. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 10.1.100.2 password simple aabbcc

# Perform the similar configuration on the peer.

<Sysname> system-view

[Sysname] bgp 200

[Sysname-bgp] peer 10.1.100.1 password simple aabbcc

peer preferred-value (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } preferred-value value

undo peer { group-name | ip-address } preferred-value

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

value: Preferred value, in the range 0 to 65535.

Description

Use the peer preferred-value command to assign a preferred value to routes received from a peer or peer group.

Use the undo peer preferred-value command to restore the default value.

The default preferred value is 0.

Routes learned from a peer have an initial preferred value. Among multiple routes that have the same destination/mask and are learned from different peers, the one with the greatest preferred value is selected as the route to the destination.

 

 

NOTE:

If you both reference a routing policy and use the peer { group-name | ip-address } preferred-value value command to set a preferred value for routes from a peer, the routing policy sets the specified preferred value for routes matching it. Other routes not matching the routing policy uses the value set with the command. If the preferred value specified in the routing policy is zero, the routes matching it will also use the value set with the peer { group-name | ip-address } preferred-value value command. For information about using a routing policy to set a preferred value, see the command peer { group-name | ip-address } route-policy route-policy-name { export | import } in this document, and the command apply preferred-value preferred-value in the chapter “Routing policy configuration commands.”

 

Examples

# In BGP view, configure the preferred value as 50 for routes from peer 131.108.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 131.108.1.1 preferred-value 50

# In BGP-VPN instance view, configure the preferred value as 50 for routes from peer 131.108.1.1. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 131.108.1.1 preferred-value 50

peer public-as-only (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } public-as-only

undo peer { group-name | ip-address } public-as-only

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer public-as-only command to not keep private AS numbers in BGP updates sent to a peer/peer group.

Use the undo peer public-as-only command to keep private AS numbers in BGP updates sent to a peer/peer group.

By default, BGP updates carry private AS numbers.

The command does not take effect if the BGP update has both public and private AS numbers. The range of private AS number is from 64512 to 65535.

Examples

# In BGP view, carry no private AS number in BGP updates sent to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test public-as-only

# In BGP-VPN instance view, carry no private AS number in BGP updates sent to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test public-as-only

peer reflect-client (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } reflect-client

undo peer { group-name | ip-address } reflect-client

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer reflect-client command to configure the router as a route reflector and specify a peer/peer group as a client.

Use the undo peer reflect-client command to remove the configuration.

By default, neither the route reflector nor the client is configured.

The peer reflect-client command can be configured in both BGP view and BGP-VPNv4 subaddress family view. In BGP view, the command enables the router to reflect routes of the public network; in BGP-VPNv4 subaddress family view, the command enables the router to reflect routes of the private network. (You can enter BGP-VPNv4 subaddress family view by executing the ipv4-family vpnv4 command in BGP view. For more information about the ipv4-family vpnv4 command, see MPLS Command Reference.)

Related commands: reflect between-clients and reflect cluster-id.

Examples

# In BGP view, configure the local router as a route reflector and specify the IBGP peer group test as a client.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test reflect-client

# In BGP-VPN instance view, configure the local router as a route reflector and specify the IBGP peer group test as a client. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 109

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test reflect-client

peer route-limit (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } route-limit prefix-number [ { alert-only | reconnect reconnect-time } | percentage-value ] *

undo peer { group-name | ip-address } route-limit

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

prefix-number: Number of prefixes that can be received from the peer or peer group. If the number of prefixes received from the peer/peer group reaches the prefix-number, the router will tear down the connection to the peer/peer group.

alert-only: If the number of prefixes received from the peer/peer group reaches the prefix-number, the router will not tear down the connection to the peer/peer group but display an alarm message.

reconnect reconnect-time: Specifies a reconnect time, after which, the router will re-establish a connection to the peer/peer group. It has no default value and is in the range 1 to 65535 seconds.

percentage-value: Threshold value for the router to display an alarm message (the router displays an alarm message when the ratio of the number of received prefixes to the prefix-number reaches the percentage). It is in the range 1 to 100 and defaults to 75.

Description

Use the peer route-limit command to set the number of route prefixes that can be received from a peer/peer group.

Use the undo peer route-limit command to restore the default.

The number is not limited by default.

Examples

# In BGP view, set the number of route prefixes that can be received from peer 129.140.6.6 to 10000.

<Sysname> system-view

[Sysname] bgp 109

[Sysname-bgp] peer 129.140.6.6 as-number 110

[Sysname-bgp] peer 129.140.6.6 route-limit 10000

# In BGP-VPN instance view, set the number of route prefixes that can be received from peer 129.140.6.6 to 10000. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 109

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 129.140.6.6 as-number 110

[Sysname-bgp-vpn1] peer 129.140.6.6 route-limit 10000

peer route-policy (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } route-policy route-policy-name { export | import }

undo peer { group-name | ip-address } route-policy route-policy-name { export | import }

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a string of 1 to 47 characters.

ip-address: IP address of a peer.

route-policy-name: Routing policy name, a case-sensitive string of 1 to 63 characters.

export: Applies the routing policy to routes outgoing to the peer (or peer group).

import: Applies the routing policy to routes incoming from the peer (or peer group).

Description

Use the peer route-policy command to apply a routing policy to routes incoming from or outgoing to a peer or peer group.

Use the undo peer route-policy command to remove the configuration.

By default, no routing policy is applied to routes from/to the peer/peer group.

The peer route-policy command does not apply the if-match interface clause in the referenced routing policy. See the chapter “Routing policy configuration commands” for related commands.

Examples

# In BGP view, apply routing policy test-policy to routes outgoing to the peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test route-policy test-policy export

# In BGP-VPN instance view, apply the routing policy test-policy to routes outgoing to the peer group test. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test route-policy test-policy export

peer route-update-interval (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } route-update-interval interval

undo peer { group-name | ip-address } route-update-interval

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a sting of 1 to 47 characters.

ip-address: IP address of a peer.

interval: Minimum interval for sending the same update message. The range is 0 to 600 seconds. A value of 0 means to send the update message immediately.

Description

Use the peer route-update-interval command to specify the interval for sending the same update to a peer or peer group.

Use the undo peer route-update-interval command to restore the default value.

By default, the interval is 5 seconds for IBGP peers, and 30 seconds for EBGP peers.

Examples

# In BGP view, specify the interval for sending the same update to peer group test as 10 seconds.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test as-number 100

[Sysname-bgp] peer test route-update-interval 10

# In BGP-VPN instance view, specify the interval for sending the same update to peer group test as 10 seconds. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test as-number 100

[Sysname-bgp-vpn1] peer test route-update-interval 10

peer substitute-as (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } substitute-as

undo peer { group-name | ip-address } substitute-as

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a sting of 1 to 47 characters.

ip-address: IP address of a peer.

Description

Use the peer substitute-as command to replace the AS number of a peer/peer group in the AS_PATH attribute with the local AS number.

Use the undo peer substitute-as command to remove the configuration.

No AS number is replaced by default.

Examples

# In BGP view, substitute local AS number for AS number of peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 1.1.1.1 substitute-as

# In BGP-VPN instance view, substitute local AS number for AS number of peer 1.1.1.1. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer 1.1.1.1 substitute-as

peer timer (BGP/BGP-VPN instance view)

Syntax

peer { group-name | ip-address } timer keepalive keepalive hold holdtime

undo peer { group-name | ip-address } timer

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

group-name: Name of a peer group, a sting of 1 to 47 characters.

ip-address: IP address of a peer.

keepalive: Keepalive interval in seconds, ranging from 0 to 21845.

holdtime: Holdtime interval in seconds, whose value is 0 or in the range of 3 to 65535.

Description

Use the peer timer command to configure the keepalive interval and holdtime interval for a peer or peer group.

Use the undo peer timer command to restore the default.

By default, the keepalive and holdtime are 60s and 180s respectively.

The timers configured with this command are preferred to the timers configured with the timer command.

If the holdtime interval is configured as 0, no keepalive message will be sent to the peer, and the peer connection will never time out. If the keepalive interval is configured as 0 and the negotiated hold time is not 0, one third of the hold time is taken as the interval for sending keepalive messages.

If neither the holdtime interval nor the keepalive interval is configured as 0, the holdtime interval must be at least three times the keepalive interval.

After this command is executed, the peer connection is closed at once, and a new connection to the peer is negotiated using the configured hold time.

Related commands: timer.

Examples

# In BGP view, configure the keepalive interval and holdtime interval for peer group test as 60s and 180s.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test timer keepalive 60 hold 180

# In BGP-VPN instance view, configure the keepalive interval and holdtime interval for peer group test as 60s and 180s. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test timer keepalive 60 hold 180

# In BGP view, configure both the keepalive interval and holdtime interval for peer group test as 0 seconds, indicating the peer group will never time out.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer test timer keepalive 0 hold 0

# In BGP-VPN instance view, configure both the keepalive interval and holdtime interval for peer group test as 0 seconds, indicating the peer group will never time out. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] peer test timer keepalive 0 hold 0

preference (BGP/BGP-VPN instance view)

Syntax

preference { external-preference internal-preference local-preference | route-policy route-policy-name }

undo preference

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

external-preference: Preference of EBGP routes, in the range 1 to 255.

internal-preference: Preference of IBGP routes, in the range 1 to 255.

local-preference: Preference of local routes, in the range 1 to 255.

route-policy-name: Routing policy name, a case-sensitive string of 1 to 63 characters. Using the routing policy can set a preference for routes matching it. The default value applies to routes not matching the routing policy.

Description

Use the preference command to configure preferences for external, internal, and local routes.

Use the undo preference command to restore the default.

For external-preference, internal-preference and local-preference, the greater the preference value is, the lower the preference is, and the default values are 255, 255, 130 respectively.

Examples

# In BGP view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] preference 20 20 200

# In BGP-VPN instance view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] preference 20 20 200

reflect between-clients (BGP view/BGP-VPN instance view)

Syntax

reflect between-clients

undo reflect between-clients

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the reflect between-clients command to enable route reflection between clients.

Use the undo reflect between-clients command to disable this function.

By default, route reflection between clients is enabled.

After a route reflector is configured, it reflects the routes of a client to other clients. If the clients of a route reflector are fully meshed, you need disable route reflection between clients to reduce routing costs.

Related commands: reflector cluster-id and peer reflect-client.

Examples

# Disable route reflection between clients.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] undo reflect between-clients

# In BGP-VPN instance view, disable route reflection between clients. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] undo reflect between-clients

reflector cluster-id (BGP view/BGP-VPN instance view)

Syntax

reflector cluster-id { cluster-id | ip-address }

undo reflector cluster-id

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

cluster-id: Cluster ID in the format of an integer from 1 to 4294967295.

ip-address: Cluster ID in the format of an IPv4 address in dotted decimal notation.

Description

Use the reflector cluster-id command to configure the cluster ID of the route reflector.

Use the undo reflector cluster-id command to remove the configured cluster ID.

By default, each route reflector uses its router ID as the cluster ID.

Typcially, a cluster has only one route reflector. The router ID of the route reflector is the ID of the cluster. You can configure multiple route reflectors to improve network stability. Using this command can configure the identical cluster ID for all the route reflectors to avoid routing loops.

Related commands: reflect between-clients and peer reflect-client.

Examples

# Set the cluster ID to 80.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] reflector cluster-id 80

# In BGP-VPN instance view, set the cluster ID to 80. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] reflector cluster-id 80

refresh bgp

Syntax

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

View

User view

Default level

1: Monitor level

Parameters

ip-address: Soft-resets the BGP connection to a peer.

all: Soft-resets all BGP connections.

group-name: Soft-resets connections to a peer group, name of which is a sting of 1 to 47 characters.

external: EBGP connection.

internal: IBGP connection.

export: Outbound soft reset.

import: Inbound soft reset.

Description

Use the refresh bgp command to perform soft reset on specified BGP connections. Using this function can refresh the BGP routing table without tearing down BGP connections and apply a newly configured routing policy.

To perform BGP soft reset, all routers in the network must support route-refresh. If a router not supporting route-refresh exists in the network, you need to configure the peer keep-all-routes command to save all routing updates before performing soft reset.

Examples

# Perform inbound BGP soft reset.

<Sysname> refresh bgp all import

reset bgp

Syntax

reset bgp { as-number | ip-address [ flap-info ] | all | external | group group-name | internal }

View

User view

Default level

1: Monitor level

Parameters

as-number: Resets BGP connections to peers in the AS.

ip-address: Specifies the IP address of a peer with which to reset the connection.

flap-info: Clears route flap information.

all: Resets all BGP connections.

external: Resets all the EBGP connections.

group group-name: Resets connections with the specified BGP peer group.

internal: Resets all the IBGP connections.

Description

Use the reset bgp command to reset specified BGP connections.

Examples

# Reset all the BGP connections.

<Sysname> reset bgp all

reset bgp dampening

Syntax

reset bgp dampening [ ip-address [ mask | mask-length ] ]

View

User view

Default level

1: Monitor level

Parameters

ip-address: Destination IP address of a route.

mask: Mask, in dotted decimal notation.

mask-length: Mask length, in the range 0 to 32.

Description

Use the reset bgp dampening command to clear route dampening information and release suppressed routes.

Related commands: dampening and display bgp routing-table dampened.

Examples

# Clear damping information of route 20.1.0.0/16 and release the suppressed route.

<Sysname> reset bgp dampening 20.1.0.0 255.255.0.0

reset bgp flap-info

Syntax

reset bgp flap-info [ ip-address [ mask-length | mask ] | as-path-acl as-path-acl-number | regexp as-path-regular-expression ]

View

User view

Default level

1: Monitor level

Parameters

ip-address: Clears the flap statistics of a route.

mask-length: Mask length, in the range 0 to 32.

mask: Network mask, in dotted decimal notation.

as-path-acl-number: Clears the flap statistics of routes matching an AS path ACL, number of which is in the range 1 to 256.

as-path-regular-expression: Clears the flap statistics of routes matching the AS path regular expression, which is a string of 1 to 80 characters.

Description

Use the reset bgp flap-info command to clear the flap statistics of routes matching the specified filter.

Examples

# Clear the flap statistics of all routes matching AS path ACL 10.

<Sysname> reset bgp flap-info as-path-acl 10

reset bgp ipv4 all

Syntax

reset bgp ipv4 all

View

User view

Default level

1: Monitor level

Parameters

None

Description

Use the reset bgp ipv4 all command to reset all the BGP connections of IPv4 unicast address family.

Examples

# Reset all the BGP connections of IPv4 unicast address family.

<Sysname> reset bgp ipv4 all

router id

Syntax

router id router-id

undo router id

View

System view

Default level

2: System level

Parameters

router-id: Router ID, in the form of a dotted decimal IPv4 address.

Description

Use the router id command to configure a global router ID.

Use the undo router id command to remove the global router ID.

By default, no global router ID is configured.

Some routing protocols use a router ID to identify a router. You can configure a global router ID, which is used by routing protocols that have no router ID configured.

If no global router ID is configured, the highest loopback interface IP address, if any, is used as the router ID. If no loopback interface IP address is available, the highest physical interface IP address is used, regardless of the interface status.

 

 

NOTE:

·       During an active/standby switchover, the standby main board checks whether the previous router ID that is backed up before switchover is valid. If not, it selects a new router ID.

·       If the interface whose IP address is the router ID is removed or modified, a new router ID is selected. Other events, (the interface goes down; after a physical interface address is selected as the router ID, an IP address is configured for a loopback interface; a higher interface IP address is configured) will not trigger a router ID re-selection.

 

Examples

# Configure a global router ID.

<Sysname> system-view

[Sysname] router id 1.1.1.1

router-id

Syntax

router-id router-id

undo router-id

View

BGP view

Default level

2: System level

Parameters

router-id: Router ID in IP address format.

Description

Use the router-id command to specify a router ID.

Use the undo router-id command to remove the router ID.

To run BGP protocol, a router must have a router ID, which is an unsigned 32-bit integer, the unique ID of the router in the AS.

You can specify a router ID manually. Otherwise, the system selects the highest IP address among loopback interface addresses as the router ID. If no loopback interface addresses are available, the system selects the highest IP address among physical interface IP addresses as the router ID. Specify a loopback interface address as the router ID to enhance network reliability.

If the interface whose IP address is selected as the router ID or the manual router ID is deleted, the system selects a new router ID for the router.

Examples

# Specifies the Router ID as 10.18.4.221.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] router-id 10.18.4.221

summary automatic

Syntax

summary automatic

undo summary automatic

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

None

Description

Use the summary automatic command to enable automatic summarization for redistributed subnets.

Use the undo summary automatic command to disable automatic summarization.

By default, automatic summarization is disabled.

Neither the default route nor the routes imported using the network command can be summarized automatically.

The summary automatic command helps BGP limit the number of routes redistributed from IGP to reduce the size of the routing table.

Examples

# In BGP view, enable automatic route summarization.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] summary automatic

# In BGP-VPN instance view, enable automatic summarization (the VPN has been created).

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] summary automatic

synchronization (BGP view)

Syntax

synchronization

undo synchronization

View

BGP view

Default level

2: System level

Parameters

None

Description

Use the synchronization command to enable the synchronization between the BGP and IGP routes.

Use the undo synchronization command to disable the synchronization.

The feature is disabled by default.

With this feature enabled and when a non-BGP router is responsible for forwarding packets in an AS, BGP speakers in the AS cannot advertise routing information to other ASs unless all routers in the AS know the latest routing information.

When a BGP router receives an IBGP route, it checks only whether the next hop is reachable by default. If the synchronization is enabled, the IBGP route is synchronized and advertised to EBGP peers only when the route is also advertised by IGP. Otherwise, the IBGP route cannot be advertised to EBGP peers.

Examples

# Enable the synchronization between BGP and IGP routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] synchronization

timer (BGP/BGP-VPN instance view)

Syntax

timer keepalive keepalive hold holdtime

undo timer

View

BGP view, BGP-VPN instance view

Default level

2: System level

Parameters

keepalive: Keepalive interval in seconds, ranging from 0 to 21845.

holdtime: Holdtime interval in seconds, whose value is 0 or in the range of 3 to 65535.

Description

Use the timer command to configure BGP keepalive interval and holdtime interval.

Use the undo timer command to restore the default.

By default, BGP keepalive and holdtime intervals are 60s and 180s.

The timers configured with the peer timer command are preferred to the timers configured with this command.

If the holdtime interval is configured as 0, no keepalive message will be sent to the peer, and the peer connection will never time out. If the keepalive interval is configured as 0 and the negotiated hold time is not 0, one third of the hold time is taken as the interval for sending keepalive messages.

If neither the holdtime interval nor the keepalive interval is configured as 0, the holdtime interval must be at least three times the keepalive interval.

The configured timers apply to all BGP peers, but they become valid for a BGP peer only after the relevant BGP connection is reset.

After this command is executed, no peer connection is closed at once. The configured hold time is used for negotiation when a peer relationship is reestablished.

Related commands: peer timer.

Examples

# Configure keepalive interval and holdtime interval as 60s and 180s.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] timer keepalive 60 hold 180

# In BGP-VPN instance view, configure keepalive interval and holdtime interval as 60s and 180s. (The VPN has been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] timer keepalive 60 hold 180

# In BGP view, configure both the BGP keepalive interval and holdtime interval as 0 seconds, indicating no peer connection will time out.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] timer keepalive 0 hold 0

# In BGP-VPN instance view, configure both the keepalive interval and holdtime interval for vpn1 as 0 seconds, indicating no peer connection will time out. (vpn1 must have been created.)

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpn-instance vpn1

[Sysname-bgp-vpn1] timer keepalive 0 hold 0

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网