05-MPLS Volume

HomeSupportSwitchesH3C S7500E Switch SeriesReference GuidesCommand ReferencesH3C S7500E Series Ethernet Switches Command Manual(Release 6300 series V1.03)05-MPLS Volume
04-MPLS L3VPN Commands
Title Size Download
04-MPLS L3VPN Commands 231.4 KB

Table of Contents

1 MPLS L3VPN Configuration Commands· 1-1

MPLS L3VPN Configuration Commands· 1-1

default local-preference (BGP-VPNv4 subaddress family view) 1-1

default med (BGP-VPNv4 subaddress family view) 1-2

description (VPN instance view) 1-2

display bgp vpnv4 all routing-table· 1-3

display bgp vpnv4 group· 1-6

display bgp vpnv4 network· 1-8

display bgp vpnv4 paths· 1-9

display bgp vpnv4 peer 1-10

display bgp vpnv4 route-distinguisher routing-table· 1-15

display bgp vpnv4 routing-table label 1-19

display bgp vpnv4 vpn-instance routing-table· 1-20

display fib statistics vpn-instance· 1-22

display fib vpn-instance· 1-23

display ip vpn-instance· 1-24

display ospf sham-link· 1-25

display tunnel-policy· 1-27

domain-id· 1-27

export route-policy· 1-28

ext-community-type· 1-29

filter-policy export (BGP-VPNv4 subaddress family view) 1-30

filter-policy import (BGP-VPNv4 subaddress family view) 1-31

import route-policy· 1-31

ip binding vpn-instance· 1-32

ip vpn-instance· 1-32

ipv4-family· 1-33

nesting-vpn· 1-34

peer advertise-community (BGP-VPNv4 subaddress family view) 1-35

peer allow-as-loop· 1-35

peer as-path-acl (BGP-VPNv4 subaddress family view) 1-36

peer default-route-advertise vpn-instance· 1-37

peer enable· 1-38

peer filter-policy (BGP-VPNv4 subaddress family view) 1-38

peer group· 1-39

peer ip-prefix (BGP-VPNv4 subaddress family view) 1-40

peer label-route-capability (BGP view, BGP VPN instance view) 1-41

peer next-hop-invariable (BGP-VPNv4 subaddress family view) 1-41

peer next-hop-local 1-42

peer preferred-value (BGP-VPNv4 subaddress family view) 1-43

peer public-as-only (BGP-VPNv4 subaddress family view) 1-44

peer reflect-client 1-44

peer route-policy (BGP-VPNv4 subaddress family view) 1-45

peer vpn-instance enable· 1-46

peer vpn-instance group· 1-47

peer vpn-instance route-policy import 1-48

policy vpn-target 1-48

reflect between-clients· 1-49

reflector culster-id· 1-50

refresh bgp vpn-instance· 1-51

refresh bgp vpnv4· 1-52

reset bgp vpn-instance· 1-52

reset bgp vpn-instance dampening· 1-53

reset bgp vpn-instance flap-info· 1-54

reset bgp vpnv4· 1-54

route-distinguisher (VPN instance view) 1-55

route-tag· 1-56

routing-table limit 1-57

rr-filter 1-57

sham-link· 1-58

tnl-policy (VPN instance view) 1-60

tunnel-policy· 1-60

tunnel select-seq load-balance-number 1-61

vpn-target (VPN instance view) 1-62

 


 

For information about BGP L2VPN address family, refer to MPLS L2VPN Configuration in the MPLS Volume.

 

MPLS L3VPN Configuration Commands

default local-preference (BGP-VPNv4 subaddress family view)

Syntax

default local-preference value

undo default local-preference

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

value: Default value for the local preference, in the range 0 to 4294967295. A greater value represents a higher priority.

Description

Use the default local-preference command to set the default value of the local preference.

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

By default, the default value of the local preference is 100.

Examples

# With devices A and B connected to the outside AS, configure B with a default local preference of 180 in BGP-VPNv4 subaddress family view, allowing the route going through B to be preferred when more than one route is present.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] default local-preference 180

default med (BGP-VPNv4 subaddress family view)

Syntax

default med med-value

undo default med

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

med-value: MED value, in the range 0 to 4,294,967,295.

Description

Use the default med command to set the default system metric.

Use the undo default med command to restore the default.

With other criteria the same, the system selects the route with a smaller MED value as the AS external route.

By default, the MED value is 0.

Examples

# Set the default MED to 10 for PE1 in BGP-VPNv4 subaddress family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] default med 10

description (VPN instance view)

Syntax

description text

undo description

View

VPN instance view

Default Level

2: System level

Parameters

text: Description for the VPN instance, a string of 1 to 80 characters.

Description

Use the description command to configure a description for a VPN instance.

Use the undo description command to delete the description.

Examples

# Configure the description of VPN instance vpn1.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] description This is vpn1

display bgp vpnv4 all routing-table

Syntax

display bgp vpnv4 all routing-table [ network-address [ { mask | mask-length } [ longer-prefixes ] ] | as-path-acl as-path-acl-number | cidr | community [ aa:nn ]&<1-13> [ no-export-subconfed | no-advertise | no-export ] * [ whole-match ] | community-list { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16> | different-origin-as | peer ip-address { advertised-routes | received-routes } [ statistic ] | regular-expression as-regular-expression | statistic ]

View

Any view

Default Level

1: Monitor level

Parameters

network-address: IP address of the destination segment.

mask: Network mask, in dotted decimal notation.

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

longer-prefixes: Specifies to match the longest prefix.

as-path-acl as-path-acl-number: Filters routing information using the specified AS_PATH list. The as-path-acl-number argument ranges from 1 to 256.

cidr: Displays Classless Inter-Domain Routing (CIDR) information.

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

aa:nn&<1-13>: Community number. Both the aa and nn parameters range from 0 to 65535. &<1-13> means that you can enter the parameter combination up to 13 times.

no-export-subconfed: A route with this attribute is neither advertised out of the local AS, nor advertised to the other sub-ASs in the confederation.

no-advertise: A route with this attribute is not advertised to any other BGP peer.

no-export: A route with this attribute is not advertised out of the local AS or, If existing, confederation. However, it is advertised to the other sub-ASs in the confederation.

whole-match: Performs exact match.

community-list: Displays routing information of the specified BGP community list in the routing table.

basic-community-list-number: Basic community list number, in the range 1 to 99.

adv-community-list-number: Advanced community list number, in the range 100 to 199.

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

different-origin-as: Displays information about routes with different AS origins.

peer ip-address: Specifies a peer by its IP address.

advertised-routes: Specifies the routing information sent to the specified peer.

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

regular-expression as-regular-expression: Displays routing information matching the specified AS_PATH regular expression.

statistic: Displays BGP VPNv4 route statistics.

Description

Use the display bgp vpnv4 all routing-table command to display all BGP VPNv4 routing information.

Examples

# Display all BGP VPNv4 routing information.

<Sysname> display bgp vpnv4 all routing-table

 

 BGP Local router ID is 2.2.2.2

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

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

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

 

 Total number of routes from all PE: 2

 

 Route Distinguisher: 100:1

 

    Network            NextHop        In/Out Label      MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1         1025 /NULL      0          100

*>i 123.1.1.1/32       1.1.1.1         1024 /NULL      0          100

 

 Total routes of vpn-instance vpn1: 5

    Network            NextHop        In/Out Label      MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1                          0          100

*>  10.1.1.0/24        0.0.0.0         NULL /1025       0

*>  20.0.0.0           10.1.1.1        NULL /1026       0

*>i 123.1.1.1/32       1.1.1.1                          0          100

*>  124.1.1.1/32       0.0.0.0         NULL /1024       0

# Display the detailed information of the BGP VPNv4 routes with the prefix being 1.1.1.2 /32.

<Sysname> display bgp vpnv4 all routing-table 1.1.1.2 32

      

 BGP local router ID : 3.3.3.9     

 Local AS number : 100     

 

      

 Route Distinguisher: 100:1    

 Paths:   1 available, 1 best 

  

 BGP routing table entry information of 1.1.1.2/32: 

 Label information (Received/Applied): 1034/NULL  

 From            : 1.1.1.9 (1.1.1.9)     

 Original nexthop: 1.1.1.9    

 Ext-Community   : <RT: 111:1> 

 AS-path         : 65410

 Origin          : incomplete

 Attribute value : MED 0, localpref 100, pref-val 0, pre 255 

 State           : valid, internal, best,  

 Not advertised to any peers yet

    

   

 Total Number of Routes: 1(vpna)  

 Paths:   1 available, 1 best

     

 BGP routing table entry information of 1.1.1.2/32: 

 From            : 1.1.1.9 (1.1.1.9)  

 Relay Nexthop   : 0.0.0.0     

 Original nexthop: 1.1.1.9   

 Ext-Community   : <RT: 111:1>    

 AS-path         : 65410   

 Origin          : incomplete 

 Attribute value : MED 0, localpref 100, pref-val 0, pre 255 

 State           : valid, internal, best,

 Not advertised to any peers yet

 

 Not advertised to any VPNv4 peers yet

Table 1-1 display bgp vpnv4 all routing-table output description

Field

Description

BGP Local router ID

Router ID of the local BGP router

Status codes

Route status codes. Valid values include:

* - valid: Valid route

> - best: Best route

d - damped: Route damped for route flap

h - history: History route

i - internal: Internal route

s - suppressed: Suppressed route

S - Stale: Stale route

Origin

Route origin codes. Valid values include:

i - IGP (learned from within the AS)

e - EGP (learned through EGP)

? - incomplete (learned in any other way)

Total number of routes from all PE

Total number of VPNv4 routes from all PEs

Network

Network address

NextHop

Address of the next hop

In/Out Label

Incoming and outgoing labels

MED

Metric associated with the destination network

Total routes of vpn-instance vpn1

Total number of routes of the specified VPN instance

LocPrf

Local preference

Paths

Counts of routes, including:

l      available: Number of available routes.

l      best: Number of best routes

Label information

Route label information

l      Received: Received label information

l      Applied: Locally generated label information

Ext-Community

Extended community attribute

AS-path

The route’s AS path attribute (AS_PATH), which records all ASs the route has passed, and therefore can avoid route loops.

Attribute value

BGP routing attribute information

localpref

Local precedence

pref-val

Preferred value

pre

Protocol priority

State

Route status, which can be:

l      valid: Valid route

l      internal: Internal route

l      external: External route

l      local: Locally generated route

l      synchronize: Synchronized route

l      best: Best route

 

display bgp vpnv4 group

Syntax

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

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all VPNv4 peers.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

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

Description

Use the display bgp vpnv4 group command to display information about a specified or all BGP VPNv4 peer groups.

Examples

# Display information about BGP VPNv4 peer group a for VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 group a

 

 BGP peer-group is a

 remote AS number not specified

 Type : external

 Maximum allowed prefix number: 150000

 Threshold: 75%

 Configured hold timer value: 180

 Keepalive timer value: 60

 Minimum time between advertisement runs is 30 seconds

 Peer Preferred Value: 99

 No routing policy is configured

  Members:

  Peer       V   AS  MsgRcvd  MsgSent  OutQ PrefRcv Up/Down  State

  10.1.1.1   4   200   18       21     0     1      00:12:58 Established

Table 1-2 display bgp vpnv4 group command output description

Field

Description

BGP peer-group

Name of the BGP peer group

remote AS number

Number of the remote AS

Type

Type of the BGP peer group

Maximum allowed prefix number

Maximum number of routes that the VPN instance supports

Threshold

Threshold value

Configured hold timer value

Setting of the hold timer

Keepalive timer value

Keepalive interval

Peer Preferred Value

Weight for the routes from the peer

No routing policy is configured

Whether the VPN instance is configured with a routing policy

Peer

IP address of the peer

V

Version of BGP that the peer runs

AS

AS number of the peer group

MsgRcvd

Number of messages received

MsgSent

Number of messages sent

OutQ

Number of messages waiting to be sent to the peer

PrefRcv

Number of prefixes received

Up/Down

Duration of the BGP session in the current state

State

Status of the peer

 

display bgp vpnv4 network

Syntax

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

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all VPNv4 peers.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

Description

Use the display bgp vpnv4 network command to display information about BGP VPNv4 routes injected into a specified or all VPN instances.

Examples

# Display information about BGP VPNv4 routes injected into VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 network

  BGP Local Router ID is 1.1.1.1.

  Local AS Number is 100.

  Network          Mask            Route-policy

  10.0.0.0         255.0.0.0

Table 1-3 display bgp vpnv4 network command output description

Field

Description

BGP Local Router ID

Router ID of the local BGP router

Network

Advertised network route

Mask

Mask of the advertised network route

Route-policy

Routing policy configured

 

display bgp vpnv4 paths

Syntax

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

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all VPNv4 peers.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

as-regular-expression: Regular expression for filtering the AS path information to be displayed.

Description

Use the display bgp vpnv4 paths command to display the BGP VPNv4 AS path information.

Examples

# Display the BGP VPNv4 AS path information of VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 paths

 

    Address       Hash    Refcount  MED         Path/Origin

    0x6E72D18     0       1           0           200?

    0x6E72E50     0       1           0           i

    0x6E72B78     1       1           0           ?

    0x6E72BE0     1       2           0           ?

# Display all BGP VPNv4 AS path information.

<Sysname> display bgp vpnv4 all paths

 

    Address       Hash    Refcount  MED         Path/Origin

    0x6E72D80     4       1         0           200?

    0x6E72CB0     15      2         0           ?

Table 1-4 display bgp vpnv4 paths command output description

Field

Description

Address

Routing address in the local database

Hash

Hash bucket for storing routes

Refcount

Number of times that the path is referenced

MED

Metric for routes

Path/Origin

AS_PATH and origin attributes of the route, see Table 1-1.

 

display bgp vpnv4 peer

Syntax

display bgp vpnv4 all peer [ ip-address verbose | verbose ]

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

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all VPNv4 peers.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

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

log-info: Displays log information.

ip-address: IP address of the peer.

verbose: Displays detailed information.

Description

Use the display bgp vpnv4 peer command to display information about BGP VPNv4 peers.

Examples

# Display information about BGP VPNv4 peers of VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 peer

 BGP local router ID : 2.2.2.2

 Local AS number : 100

 Total number of peers : 1                 Peers in established state : 1

 

 Peer         V   AS  MsgRcvd  MsgSent  OutQ PrefRcv  Up/Down  State

 10.1.1.1    4   200    24       29       0       1      00:18:47 Established

Table 1-5 display bgp vpnv4 vpn-instance peer output description

Field

Description

BGP Local router ID

Router ID of the local BGP router

Peers in established state

Number of peers in the state of established

Peer

IP address of the peer

V

Version of BGP that the peer runs

AS

AS number of the peer group

MsgRcvd

Number of messages received

MsgSent

Number of messages sent

OutQ

Number of messages waiting to be sent to the peer

PrefRcv

Number of received prefixes

Up/Down

Duration of the BGP session in the current state

State

Status of the peer

 

# Display detailed information about BGP VPNv4 peers of VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 peer verbose

 

         Peer: 10.1.1.1  Local: 2.2.2.2

         Type: EBGP link

         BGP version 4, remote router ID 10.1.1.1

         BGP current state: Established, Up for 00h19m26s

         BGP current event: KATimerExpired

         BGP last state: OpenConfirm

         Port:  Local - 179      Remote - 1025

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

         Received  : Active Hold Time: 180 sec

         Negotiated: Active Hold Time: 180 sec

         Peer optional capabilities:

         Peer support bgp multi-protocol extended

         Peer support bgp route refresh capability

         Address family IPv4 Unicast: advertised and received

 

 Received: Total 25 messages, Update messages 1

 Sent: Total 30 messages, Update messages 4

 Maximum allowed prefix number: 150000

 Threshold: 75%

 Minimum time between advertisement runs is 30 seconds

 Optional capabilities:

 Route refresh capability has been enabled

Nesting-vpn peer (vpn-instance vrf1) has been configured

 Peer Preferred Value: 99

 

Routing policy configured:

 No routing policy is configured

Table 1-6 display bgp vpnv4 peer verbose output description

Field

Description

Peer

IP address of the peer

Local

IP address of the local router

Type

BGP type

BGP version

Version of BGP that the peer runs

remote router ID

Router ID of the remote router

BGP current state

Current status of the BGP session

Up for

Duration since the peer is established

BGP current event

Current event of the BGP session

BGP last state

State that the BGP session was in before transitioning to the current status

Port

Local and remote ports of the BGP session

Configured

Settings of the local timers, including the active hold interval and keepalive interval

Received

Received active hold interval

Negotiated

Negotiated active hold interval

Peer optional capabilities

Optional capabilities of the peer

Peer support bgp multi-protocol extended

The peer supports multiprotocol extension.

Peer support bgp route refresh capability

The peer supports route refresh capability.

Address family IPv4 Unicast

IPv4 unicast family capability

Received

Counts of received messages and received update messages

Sent

Counts of sent messages and sent update messages

Maximum allowed prefix number

Maximum number of routes that the VPN instance supports

Threshold

Threshold value

Optional capabilities

Local optional capabilities

Route refresh capability has been enabled

Whether the route refresh capability is supported

Nesting-vpn peer (vpn-instance vrf1)

Whether the VPNv4 peer is a nested VPN peer

Peer Preferred Value

Weight for the routes from the peer

 

# Display all BGP VPNv4 peer information.

<Sysname> display bgp vpnv4 all peer

 

 BGP local router ID : 2.2.2.2

 Local AS number : 100

 Total number of peers : 1                 Peers in established state : 1

 

  Peer     V   AS  MsgRcvd  MsgSent  OutQ  PrefRcv  Up/Down   State

  1.1.1.1  4  100   51       64        0     2      00:45:16  Established

Table 1-7 display bgp vpnv4 all peer command output description

Field

Description

Peer

IP address of the peer

V

Version of BGP that the peer runs

AS

AS number

MsgRcvd

Number of messages received

MsgSent

Number of messages sent

OutQ

Number of messages waiting to be sent to the peer

Up/Down

Duration of the BGP session in the current state

State

Status of the peer

 

# Display detailed information about BGP VPNv4 peer 1.1.1.1.

<Sysname> display bgp vpnv4 all peer 1.1.1.1 verbose

         Peer: 1.1.1.1   Local: 2.2.2.2

         Type: IBGP link

         BGP version 4, remote router ID 1.1.1.1

         BGP current state: Established, Up for 00h46m01s

         BGP current event: RecvKeepalive

         BGP last state: OpenConfirm

         Port:  Local - 1039     Remote - 179

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

         Received  : Active Hold Time: 180 sec

         Negotiated: Active Hold Time: 180 sec

         Peer optional capabilities:

         Peer support bgp multi-protocol extended

         Peer support bgp route refresh capability

         Address family IPv4 Unicast: advertised and received

         Address family VPNv4: advertised and received

 Received: Total 52 messages, Update messages 2

 Sent: Total 65 messages, Update messages 5

 Maximum allowed prefix number: 150000

 Threshold: 75%

 Minimum time between advertisement runs is 15 seconds

 Optional capabilities:

 Route refresh capability has been enabled

Nesting-vpn peer (vpn-instance vrf1) has been configured

 Connect-interface has been configured

 Peer Preferred Value: 0

 

 Routing policy configured:

 No routing policy is configured            

Table 1-8 display bgp vpnv4 all peer verbose output description

Field

Description

Peer

IP address of the peer

Local

IP address of the local router

Type

BGP type

BGP version

Version of BGP that the peer runs

remote router ID

Router ID of the remote router

BGP current state

Current status of BGP

Up for

Duration since the peer is established

BGP current event

Current event of the peer

BGP last state

State that BGP was in before transitioning to the current status

Port

Local and remote BGP port numbers

Configured

Settings of the local timers, including the active hold interval and keepalive interval

Received

Received active hold interval

Negotiated

Negotiated active hold interval

Peer optional capabilities

Optional capabilities of the peer

Peer support bgp multi-protocol extended

The peer supports multiprotocol extension.

Peer support bgp route refresh capability

The peer supports route refresh capability.

Address family IPv4 Unicast

IPv4 unicast family capability

Address family VPNv4

IPv4 address group VPNv4 capability

Received

Counts of received messages and received update messages

Sent

Counts of sent messages and the number of sent update messages

Maximum allowed prefix number

Maximum number of routes that the VPN instance supports

Threshold

Threshold value

Optional capabilities

Local optional capabilities

Route refresh capability

Whether the route refresh capability is supported

Nesting-vpn peer (vpn-instance vrf1)

Whether the VPNv4 peer is a nested VPN peer

Connect-interface

Whether a source interface is configured for route update messages

Peer Preferred Value

Weight configured for routes from the peer

 

# Display the log information of BGP VPNv4 peer whose address is 1.1.1.1.

<sysname> display bgp vpnv4 vpn-instance vpn1 peer 1.1.1.1 log-info

 

 Peer : 1.1.1.1

 

     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

                             Administrative Reset

Table 1-9 display bgp vpnv4 peer log-info command output description

Field

Description

Peer

IPv4 address of the peer

Date

Date when the notification message is sent or received

Time

Time when the notification message is sent or received

State

Connection state of the peer, which can be:

l      Up: The BGP session is in the Established state.

l      Down: The BGP session has been cut down.

Notification

Notification message

Error/SubError

Error: Notification message error code, which specifies the error type.

SubError: Notification message’s error subcode, which specifies the detailed information of the error.

 

display bgp vpnv4 route-distinguisher routing-table

Syntax

display bgp vpnv4 route-distinguisher route-distinguisher routing-table [ network-address [ mask | mask-length ] | as-path-acl as-path-acl-number | cidr | community [ aa:nn ]&<1-13> [ no-export-subconfed | no-advertise | no-export ] * [ whole-match ] | community-list { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16> | different-origin-as | regular-expression as-regular-expression ]

View

Any view

Default Level

1: Monitor level

Parameters

route-distinguisher: Route distinguisher (RD).

network-address: IP address of the destination segment.

mask: Network mask, in the format of X.X.X.X.

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

as-path-acl as-path-acl-number: Filters routing information using the specified AS_PATH list. The as-path-acl-number argument ranges from 1 to 256.

cidr: Displays Classless Interdomain Routing (CIDR) information.

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

aa:nn&<1-13>: Community number. Both the aa and nn parameters range from 0 to 65535. &<1-13> means that you can enter the parameter combination up to 13 times.

no-export-subconfed: A route with this attribute is neither advertised out of the local AS, nor advertised to the other sub-ASs in the confederation.

no-advertise: A route with this attribute is not advertised to any other BGP peer.

no-export: A route with this attribute is not advertised out of the local AS or, If existing, confederation. However, it is advertised to the other sub-ASs in the confederation.

whole-match: Performs exact matching.

community-list: Displays routing information of the specified BGP community list.

basic-community-list-number: Basic community list number, in the range 1 to 99.

adv-community-list-number: Advanced community list number, in the range 100 to 199.

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

different-origin-as: Displays information about routes with different AS origins.

regular-expression as-regular-expression: Displays routing information matching the specified AS regular expression.

Description

Use the display bgp vpnv4 route-distinguisher routing-table command to display the BGP VPNv4 routing information of a specified RD.

Related commands: route-distinguisher.

Examples

# Display the BGP VPNv4 routing information of RD 100:1.

<Sysname> display bgp vpnv4 route-distinguisher 100:1 routing-table

 

BGP Local router ID is 2.2.2.2

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

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

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

 

 Route Distinguisher: 100:1

 Total number of routes: 2

 

    Network            NextHop         In/Out Label   MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1         1025 /NULL      0          100

*>i 123.1.1.1/32       1.1.1.1         1024 /NULL      0          100

 

 Total routes of vpn-instance vpn1: 5

    Network            NextHop         In/Out Label   MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1                         0          100

*>  10.1.1.0/24        0.0.0.0         NULL /1025      0

*>  20.0.0.0           10.1.1.1        NULL /1026      0

*>i 123.1.1.1/32       1.1.1.1                         0          100

*>  124.1.1.1/32       0.0.0.0         NULL /1024      0

# Display the BGP VPNv4 routing information with the RD being 100:1 and IP address being 1.1.1.2.

<Sysname> display bgp vpnv4 route-distinguisher 100:1 routing-table 1.1.1.2 32

 

 BGP local router ID : 3.3.3.9                                          

 Local AS number : 100                                                   

                                                                         

                                                                        

 Route Distinguisher: 100:1                                            

 Paths:   1 available, 1 best                                         

                                                                       

 BGP routing table entry information of 1.1.1.2/32:                   

 Label information (Received/Applied): 1034/NULL                        

 From            : 1.1.1.9 (1.1.1.9)                                    

 Original nexthop: 1.1.1.9                                              

 Ext-Community   : <RT: 111:1>                                                 

 AS-path         : 65410                                                        

 Origin          : incomplete                                                  

 Attribute value : MED 0, localpref 100, pref-val 0, pre 255                   

 State           : valid, internal, best,                                      

 Not advertised to any peers yet                                               

                                                                               

                                                                               

 Total Number of Routes: 1(vpna)                                               

 Paths:   1 available, 1 best                                                  

                                                                               

 BGP routing table entry information of 1.1.1.2/32:                            

 From            : 1.1.1.9 (1.1.1.9)                                           

 Relay Nexthop   : 0.0.0.0                                                     

 Original nexthop: 1.1.1.9                                                      

 Ext-Community   : <RT: 111:1>                                                 

 AS-path         : 65410                                                       

 Origin          : incomplete                                                   

 Attribute value : MED 0, localpref 100, pref-val 0, pre 255                   

 State           : valid, internal, best,                                      

 Not advertised to any peers yet

The following table gives the description on the fields of the display bgp vpnv4 route-distinguisher routing-table command.

Table 1-10 Output description

Field

Description

BGP Local router ID

Router ID of the local BGP router

Status codes

Route status codes. For valid values, see Table 1-1.

Origin

Route origin codes. For valid values, see Table 1-1.

Network

Network address

NextHop

Address of the next hop

In/Out Label

Incoming/outgoing label

MED

Metric associated with the destination network

LocPrf

Local preference

Total routes of vpn-instance vpn1

Total number of routes of the specified VPN instance

Paths

Counts of routes, including:

l      available: Number of available routes.

l      best: Number of best routes

Label information

Route label information

l      Received: Received label information

l      Applied: Locally generated label information

Ext-Community

Extended community attribute

AS-path

The route’s AS path attribute (AS_PATH), which records all ASs the route has passed, and therefore can avoid route loops.

Attribute value

BGP routing attribute information

localpref

Local precedence

pref-val

Preferred value

pre

Protocol priority

State

Current state of the peer, which can be:

l      valid

l      internal

l      best

 

# Display the BGP VPNv4 routing information with RD being 100:1 and the network segment address being 10.0.0.0.

<Sysname> display bgp vpnv4 route-distinguisher 100:1 routing-table 10.0.0.0 255.0.0.0

 

BGP Local router ID is 2.2.2.2

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

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

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

 

 Route Distinguisher: 100:1

 Total number of routes: 1

 

    Network            NextHop         In/Out Label   MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1         1025 /NULL      0          100

 

 Total Number of Routes: 1(vpn1)

    Network            NextHop         In/Out Label   MED        LocPrf

 

*>i 10.0.0.0           1.1.1.1                          0          100

The following table gives the description on the fields of the display bgp vpnv4 route-distinguisher routing-table command.

Table 1-11 Output description

Field

Description

BGP Local router ID

Router ID of the local BGP router

Status codes

Route status codes. For valid values, see Table 1-1.

Origin

Route origin codes. For valid values, see Table 1-1.

Network

Network address in the BGP routing table

NextHop

Address of the next hop

In/Out Label

Incoming/outgoing label

MED

Metric associated with the destination network

LocPrf

Local preference

Total Number of Routes

Total number of routes of the specified VPN instance

 

display bgp vpnv4 routing-table label

Syntax

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

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all VPNv4 peers.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

Description

Use the display bgp vpnv4 routing-table label command to display information about labeled routes in the BGP routing table.

Examples

# Display information about labeled routes in the BGP routing table.

<Sysname> display bgp vpnv4 all routing-table label

 

BGP Local router ID is 2.2.2.2

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

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

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

 

 Total number of routes from all PE: 1

 

 Route Distinguisher: 100:1

 

        Network           NextHop           In/Out Label

 *>i    123.1.1.1         1.1.1.1           NULL/1024

 

 Total routes of vpn-instance vpn1: 4

 

        Network           NextHop           In/Out Label

 *>     10.1.1.0          0.0.0.0           1025/NULL

 *>     20.0.0.0          0.0.0.0           1026/NULL

 *>i    123.1.1.1         1.1.1.1           NULL/1024

 *>     124.1.1.1         0.0.0.0           1024/NULL

Table 1-12 display bgp vpnv4 routing-table label output description

Field

Description

BGP Local router ID

Router ID of the local BGP router

Status

Route status codes. For valid values, see Table 1-1.

Origin

Route origin codes. For valid values, see Table 1-1.

Route Distinguisher

RD

Network

Network address

NextHop

Address of the next hop

In/Out Label

Incoming/outgoing label. exp-null indicates an explicit null label.

Total routes of vpn-instance vpn1

Total number of routes from the specified VPN instance

 

display bgp vpnv4 vpn-instance routing-table

Syntax

display bgp vpnv4 vpn-instance vpn-instance-name routing-table [ network-address [ { mask | mask-length } [ longer-prefixes ] ] | as-path-acl as-path-acl-number | cidr | community [ aa:nn ]&<1-13>[ no-export-subconfed | no-advertise | no-export ]* [ whole-match ] | community-list { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16> | dampened | dampening parameter | different-origin-as | flap-info [ as-path-acl as-path-acl-number | network-address [ mask [ longer-match ] | mask-length [ longer-match ] ] | regular-expression as-regular-expression ] | peer ip-address { advertised-routes | received-routes } | regular-expression as-regular-expression | statistic ]

View

Any view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

network-address: IP address of the destination segment.

mask: Network mask, in the format of X.X.X.X.

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

longer-prefixes: Specifies to match the longest prefix.

as-path-acl as-path-acl-number: Filters routing information using the specified AS_PATH list. The as-path-acl-number argument ranges from 1 to 256.

cidr: Displays Classless Interdomain Routing (CIDR) information.

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

aa:nn&<1-13>: Community number. Both the aa and nn parameters range from 0 to 65535. &<1-13> means that you can enter the parameter combination up to 13 times.

no-export-subconfed: A route with this attribute is neither advertised out of the local AS, nor advertised to the other sub-ASs in the confederation.

no-advertise: A route with this attribute is not advertised to any other BGP peer.

no-export: A route with this attribute is not advertised out of the local AS or, If existing, confederation. However, it is advertised to the other sub-ASs in the confederation.

whole-match: Performs exact match.

community-list: Displays routing information of the specified BGP community list.

basic-community-list-number: Basic community list number, in the range 1 to 99.

adv-community-list-number: Advanced community list number, in the range 100 to 199.

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

dampened: Displays information about dampened BGP VPNv4 routes.

dampening parameter: Displays information about configured BGP VPNv4 route dampening parameters.

different-origin-as: Displays information about routes with different AS origins.

flap-info: Displays BGP VPNv4 route flap statistics.

longer-match: Displays flap statistics for routes with masks longer than that specified by the network-address { mask | mask-length } combination.

peer ip-address: Specifies a peer by its IP address.

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

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

regular-expression as-regular-expression: Displays routing information matching the specified AS regular expression.

statistic: Displays BGP VPNv4 route statistics.

Description

Use the display bgp vpnv4 vpn-instance routing-table command to display the BGP VPNv4 routing information of a specified VPN instance.

Examples

# Display the BGP VPNv4 routing information of VPN instance vpn1.

<Sysname> display bgp vpnv4 vpn-instance vpn1 routing-table

 

 Total Number of Routes: 5

 

 BGP Local router ID is 2.2.2.2

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

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

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

 Network            NextHop         MED        LocPrf   PrefVal Path/Ogn

 

 *>i 10.0.0.0      1.1.1.1         0          100        0       i

 *>  10.1.1.0/24   0.0.0.0         0                     0       ?

 *>  20.0.0.0      10.1.1.1        0                     99      200?

 *>i 123.1.1.1/32  1.1.1.1         0          100        0       ?

 *>  124.1.1.1/32  0.0.0.0         0                     0       ?

The following table gives the description on the fields of the display bgp vpnv4 vpn-instance routing-table command.

Table 1-13 Output description

Field

Description

BGP Local router ID

ID of the BGP-enabled local router

Status codes

Route status codes. For valid values, see Table 1-1.

Origin

Route origin codes. For valid values, see Table 1-1.

Network

Network address in the BGP routing table

NextHop

Address of the next hop

MED

Metric associated with the destination network

LocPrf

Local preference

PrefVal

Preferred value of the protocol

Path/Ogn

AS_PATH attribute/route origin of the route, see Table 1-1.

 

display fib statistics vpn-instance

Syntax

display fib statistics vpn-instance

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display fib statistics vpn-instance command to display the FIB information of the VPN instances.

Examples

# View statistics about the FIB entries.

<Sysname> display fib statistics vpn-instance

Route Entry Count          : 10

Table 1-14 display fib statistics vpn-instance command output description

Field

Description

Route Entry Count

Number of the route entries of all the VPN instances

 

display fib vpn-instance

Syntax

display fib vpn-instance vpn-instance-name [ include string ]

View

Any view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a case-sensitive string of 1 to 31 characters.

include: Displays the lines that include the specified string.

string: String for matching against the information to be displayed. It is case sensitive and consists of 1 to 256 characters.

Description

Use the display fib vpn-instance command to display the FIB information of a VPN instance.

Examples

# Display all FIB information of VPN instance vpn1.

<Sysname> display fib vpn-instance vpn1

<Sysname> display fib vpn-instance vpn1

FIB Table For vpn1:

 Total number of Routes : 2

Destination/Mask    OutInterface                  InnerLabel     Token

66.1.1.1/32         InLoopBack0                   NULL           invalid

66.1.1.0/24         InLoopBack0                   NULL           invalid

Table 1-15 display fib vpn-instance command output description

Field

Description

FIB entry count

Number of entries in the FIB

Destination/Mask

Destination address/mask length

OutInterface

Forwarding interface

Token

LSP index number

 

display ip vpn-instance

Syntax

display ip vpn-instance [ instance-name vpn-instance-name ]

View

Any view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

Description

Use the display ip vpn-instance command to display information about a VPN instance or all VPN instances.

If you do not specify any parameter, the command displays brief information about all VPN instances.

Examples

# Display information about all VPN instances.

<Sysname> display ip vpn-instance

  Total VPN-Instances configured : 2

 

  VPN-Instance Name      RD          Create Time

  vpn1                  22:1         2003/10/13 09:32:45

  vpn2                  33:3         2003/10/13 09:42:59

Table 1-16 display ip vpn-instance command output description

Field

Description

VPN-Instance Name

Name of the VPN instance

RD

RD of the VPN instance

Create Time

Time when the VPN instance was created

 

# Display detailed information about a VPN instance.

<Sysname> display ip vpn-instance instance-name vpn1

  VPN-Instance Name and ID : vpn1, 1

  Create time : 2006/04/08 13:01:30

  Up time : 0 days, 00 hours, 11 minutes and 42 seconds

  Route Distinguisher : 22:1

  Export VPN Targets :  3:3 5:5

  Import VPN Targets :  4:4 5:5

  Import Route Policy : poly-1

  Description : This is vpn1

  Maximum number of Routes : 500

  Interfaces :  Vlan-interface10

Table 1-17 display ip vpn-instance instance-name output description

Field

Description

VPN-Instance Name and ID

Name and ID of the VPN instance

CreateTime

Time when the VPN instance was created

Up time

Duration of the VPN instance

Route Distinguisher

RD of the VPN instance

Export VPN Targets

Export target attribute of the VPN instance

Import VPN Targets

Import target attribute of the VPN instance

Import Route Policy

Import routing policy of the VPN instance

Description

Description of the VPN instance

Maximum number of Routes

Maximum number of routes of the VPN instance

Interfaces

Interface to which the VPN instance is bound

 

display ospf sham-link

Syntax

display ospf [ process-id ] sham-link [ area area-id ]

View

Any view

Default Level

1: Monitor level

Parameters

process-id: OSPF process ID, in the range 1 to 65535.

area-id: OSPF area ID. It can be an integer in the range 0 to 4294967295 or in the format of an IPv4 address.

Description

Use the display ospf sham-link command to display information about sham links.

With neither process ID nor area ID specified, the command displays information about all configured sham links.

Related commands: sham-link.

Examples

# Display information about all OSPF sham links.

<Sysname> display ospf sham-link

           OSPF Process 100 with Router ID 100.1.1.2

 Sham Link:

 Area        RouterId     Source-IP     Destination-IP  State Cost

 0.0.0.1     100.1.1.2    3.3.3.3       5.5.5.5         P-2-P 10

Table 1-18 display ospf sham-link command output description

Field

Description

Area

OSPF area to which the sham link belongs

RouterId

Router ID of the sham link

Source-IP

Source IP address of the sham link

Destination-IP

Destination IP address of the sham link

State

Status of the sham link interface

Cost

Cost of the sham link

 

# Display information about OSPF sham links in area 1.

<Sysname> display ospf sham-link area 1

          OSPF Process 100 with Router ID 100.1.1.2

  Sham-Link: 3.3.3.3 --> 5.5.5.5

  Neighbour State: Full

  Area: 0.0.0.1

  Cost: 10  State: P-2-P, Type: Sham

  Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1

Table 1-19 display ospf sham-link area command output description

Field

Description

Sham-Link

Sham link expressed in the format of source IP address to destination IP address

Neighbour State

Status of the sham link neighbor

Area

Destination IP address of the sham link

Cost

Cost of the sham link

State

Status of the sham link

Type

Type of the sham link

Timers

Timers of the sham link

 

display tunnel-policy

Syntax

display tunnel-policy { all | policy-name tunnel-policy-name }

View

Any view

Default Level

1: Monitor level

Parameters

all: Specifies all tunneling policies.

tunnel-policy-name: Name of a tunneling policy, a string of 1 to 19 characters.

Description

Use the display tunnel-policy command to display information about a tunneling policy or all tunneling policies.

Related commands: tunnel-policy, tunnel select-seq load-balance-number.

Examples

# Display all tunneling policies.

<Sysname>display tunnel-policy all

Tunnel Policy Name   Select-Seq       Load balance No

------------------------------------------------------

t                    LSP              1

bbb                  LSP              1

# Display tunneling policy aaa.

<Sysname>display tunnel-policy policy-name aaa

Tunnel Policy Name   Select-Seq       Load balance No

------------------------------------------------------

aaa                  LSP              1

Table 1-20 display tunnel-policy command output description

Field

Description

Tunnel Policy Name

Name of the tunneling policy

Select-Seq

preference order for tunnel selection

Load balance No

Number of tunnels for load balancing

 

domain-id

Syntax

domain-id domain-id [ secondary ]

undo domain-id [ domain-id ]

View

OSPF view

Default Level

2: System level

Parameters

domain-id: OSPF domain ID, in integer or dotted decimal notation. If it is in integer, it ranges from 0 to 4,294,967,295.

secondary: Uses the domain ID as secondary. With this keyword not specified, the domain ID configured is primary.

Description

Use the domain-id command to configure an OSPF domain ID.

Use the undo domain-id command to restore the default.

By default, the OSPF domain ID is 0.

With no parameter specified, the undo domain-id command deletes all domain IDs.

Usually, routes injected from PEs are advertised as External-LSAs. However, routes to different destinations in the same OSPF domain must be advertised as Type-3 LSAs. Therefore, using the same domain ID for an OSPF domain is required.

Examples

# Configure the OSPF domain ID.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] domain-id 234

export route-policy

Syntax

export route-policy route-policy

undo export route-policy

View

VPN instance view

Default Level

2: System level

Parameters

route-policy: Name of the export routing policy for the VPN instance, a string of 1 to 19 characters.

Description

Use the export route-policy command to apply an export routing policy to a VPN instance.

Use the undo export route-policy command to remove the application.

You can configure an export routing policy when a finer control on the VPN instance routes to be redistributed is required, that is, when the control provided by the extended community attribute is not enough. An export routing policy may deny routes that are permitted by the export target attribute.

By default, all VPN instance routes permitted by the export target attribute can be redistributed.

Examples

# Apply export routing policy poly-1 to VPN instance vpn1.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] export route-policy poly-1

ext-community-type

Syntax

ext-community-type { domain-id type-code1 | router-id type-code2 | route-type type-code3 }

undo ext-community-type { domain-id | router-id | route-type }

View

OSPF view

Default Level

2: System level

Parameters

domain-id type-code1: Specifies the type code for the OSPF extended community attribute of Domain ID. Valid values are 0x0005, 0x0105, 0x0205, and 0x8005.

router-id type-code2: Specifies the type code for the OSPF extended community attribute of Router ID. Valid values are 0x0107 and 0x8001.

router-type type-code3: Specifies the type code for the OSPF extended community attribute of Route Type. Valid values are 0x0306 and 0x8000.

Description

Use the ext-community-type command to configure the type code of an OSPF extended community attribute.

Use the undo ext-community-type command to restore the default.

By default, the type codes for the OSPF extended community attributes of Domain ID, Router ID, and Route Type are 0x0005, 0x0107, and 0x0306 respectively.

Examples

# Configure the type codes of OSPF extended community attributes Domain ID, Router ID, and Route Type as 0x8005, 0x8001, and 0x8000 respectively for OSPF process 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] ext-communityroute-type domain-id 8005

[Sysname-ospf-100] ext-communityroute-type router-id 8001

[Sysname-ospf-100] ext-communityroute-type route-type 8000

filter-policy export (BGP-VPNv4 subaddress family 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-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

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

direct: Filters direct routes to be advertised.

isis process-id: Filters ISIS routes to be advertised that are from a specified ISIS process. The process-id argument is in the range 1 to 65535.

ospf process-id: Filters OSPF routes to be advertised that are from a specified OSPF process. The process-id argument is in the range 1 to 65535.

rip process-id: Filters RIP routes to be advertised that are from a specified RIP process. The process-id argument is in the range 1 to 65535.

static: Filters static routes to be advertised.

Description

Use the filter-policy export command to specify to filter all or certain types of routes to be advertised.

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

If you specify no routing protocol parameters for the filter-policy export command, all routes to be advertised will be filtered.

By default, MP-BGP does not filter routes to be advertised.

Only routes that survive the filtering are advertised by MP-BGP.

Examples

# In BGP-VPNv4 subaddress family view, specify to filter routes to be advertised by MP-BGP using ACL 2555.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] filter-policy 2555 export

filter-policy import (BGP-VPNv4 subaddress family view)

Syntax

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

undo filter-policy import

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

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

Description

Use the filter-policy import command to specify to filter received routes.

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

By default, received routes are not filtered.

Only routes that survive the filtering are added into the BGP routing table.

Examples

# In BGP-VPNv4 subaddress family view, specify to use ACL 2255 to filter received routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] filter-policy 2255 import

import route-policy

Syntax

import route-policy route-policy

undo import route-policy

View

VPN instance view

Default Level

2: System level

Parameters

route-policy: Name of the import routing policy for the VPN instance, a string of 1 to 19 characters.

Description

Use the import route-policy command to apply an import routing policy to a VPN instance.

Use the undo import route-policy command to remove the application.

You can configure an import routing policy when a finer control on the routes to be redistributed into a VPN instance is required, that is, when the control provided by the extended community attributes is not enough. An import routing policy may deny routes that are permitted by the import target attribute.

By default, all routes permitted by the import target attribute can be redistributed into the VPN instance.

Examples

# Apply import routing policy poly-1 to VPN instance vpn1.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] import route-policy poly-1

ip binding vpn-instance

Syntax

ip binding vpn-instance vpn-instance-name

undo ip binding vpn-instance vpn-instance-name

View

Interface view

Default Level

2: System level

Parameters

vpn-instance-name: Name of the VPN instance to be associated, a case-insensitive string of 1 to 31 characters.

Description

Use the ip binding vpn-instance command to associate an interface with a VPN instance.

Use the undo ip binding vpn-instance command to remove the association.

By default, an interface is associated with no VPN instance; it belongs to the public network.

When configured on an interface, the ip binding vpn-instance command clears the IP address of the interface. Therefore, you must re-configure the IP address of the interface after configuring the command.

Examples

# Associate interface VLAN-interface 1 with VPN instance vpn1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip binding vpn-instance vpn1

ip vpn-instance

Syntax

ip vpn-instance vpn-instance-name

undo ip vpn-instance vpn-instance-name

View

System view

Default Level

2: System level

Parameters

vpn-instance-name: Name for the VPN instance, a case-sensitive string of 1 to 31 characters.

Description

Use the ip vpn-instance command to create a VPN instance and enter VPN instance view.

Use the undo ip vpn-instance command to delete a VPN instance.

A VPN instance takes effect only after you configure an RD for it.

Related commands: route-distinguisher.

Examples

# Create a VPN instance named vpn1.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1]

ipv4-family

Syntax

ipv4-family { vpnv4 | vpn-instance vpn-instance-name }

undo ipv4-family { vpnv4 | vpn-instance vpn-instance-name }

View

BGP view

Default Level

2: System level

Parameters

vpnv4: Enters BGP-VPNv4 subaddress family view.

vpn-instance vpn-instance-name: Associates a VPN instance with an IPv4 address family and enter BGP VPN instance view. The vpn-instance-name argument is a string of 1 to 31 characters.

Description

Use the ipv4-family command to enter BGP-VPNv4 subaddress family view or BGP VPN instance view.

Use the undo ipv4-family command to remove all configurations performed in either of the two views.

Before entering BGP VPN instance view, you must create the VPN instance.

Examples

# Enter BGP-VPNv4 subaddress family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4]

# Associate VPN instance vpn1 with an IPv4 address family and enter BGP VPN instance view.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] quit

[Sysname] bgp 100

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

[Sysname-bgp-vpn1]

nesting-vpn

Syntax

nesting-vpn

undo nesting-vpn

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

None

Description

Use the nesting-vpn command to enable the nested VPN function.

Use the undo nesting-vpn command to disable the nested VPN function.

By default, the nested VPN function is disabled.

If a nested VPN peer connected to a PE needs to advertise VPNv4 routes, you need to enable nested VPN on the PE.

Examples

# Enable nested VPN.

<Sysname> system-view

[Sysname] bgp 10

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] nesting-vpn

peer advertise-community (BGP-VPNv4 subaddress family view)

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer advertise-community command to specify to advertise community attributes to a peer or peer group.

Use the undo peer advertise-community command to remove the configuration.

By default, no community attributes are advertised to any peer or peer group.

Examples

# In BGP-VPNv4 subaddress family view, specify to advertise community attributes to peer 3.3.3.3.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 3.3.3.3 advertise-community

peer allow-as-loop

Syntax

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

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

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

number: Maximum number that the local AS number can appear repeatedly in the AS-PATH attribute. It ranges from 1 to 10 and defaults to 1.

Description

Use the peer allow-as-loop command to allow the local AS number to appear in the AS-PATH attribute of a received route and to set the allowed maximum number of repetitions.

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

Examples

# In BGP-VPNv4 subaddress family view, allow the local AS number to appear repeatedly in the AS-PATH attribute of a route received from peer 1.1.1.1 for up to twice.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

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

# In BGP-L2VPN address family view, allow the local AS number to appear repeatedly in the AS-PATH attribute of a route received from peer 1.1.1.1 for up to twice.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

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

peer as-path-acl (BGP-VPNv4 subaddress family view)

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

as-path-acl-number: AS_PATH filtering list number, in the range 1 to 256.

import: Filters the received routes.

export: Filters the routes to be advertised.

Description

Use the peer as-path-acl command to specify to filter routes received from or to be advertised to a specified peer or peer group based on an AS_PATH list.

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

By default, no AS filtering list is applied to a peer or peer group.

Examples

# In BGP-VPNv4 subaddress family view, apply AS filtering list 3 to routes advertised by peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer test as-path-acl 3 export

peer default-route-advertise vpn-instance

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

Description

Use the peer default-route-advertise vpn-instance command to specify to advertise all default routes of a VPN instance to a peer or peer group.

Use the undo peer default-route-advertise vpn-instance command to remove the configuration.

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

Related commands: peer upe.

Examples

# In BGP-VPNv4 subaddress family view, specify to advertise default routes of VPN instance vpn1 to peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 enable

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 default-route-advertise vpn-instance vpn1

peer enable

Syntax

peer { group-name | ip-address } enable

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

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer enable command to enable a peer or peer group for an address family and enable the exchange of BGP routing information of the address family.

Use the undo peer enable command to disable the capability.

By default, only IPv4 routing information is exchanged between BGP peers/peer groups.

Examples

# Configure peer 1.1.1.1 and enable the peer for the BGP-VPNv4 subaddress family.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 1.1.1.1 as-number 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 enable

# Configure peer 1.1.1.1 and enable the peer for the BGP-L2VPN address family.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 1.1.1.1 as-number 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] peer 1.1.1.1 enable

peer filter-policy (BGP-VPNv4 subaddress family 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-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

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

export: Filters the routes to be advertised.

import: Filters the received routes.

Description

Use the peer filter-policy command to apply a filtering policy to a peer or peer group.

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

By default, no filtering policy is applied to a peer or peer group.

Related commands: peer as-path-acl.

Examples

# Apply a filtering policy to filter the received routes of a peer group.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer test filter-policy 2003 import

peer group

Syntax

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

undo peer ip-address group group-name

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

as-number as-number: Specifies an AS number, which ranges from 1 to 65535.

Description

Use the peer group command to add a peer into an existing peer group.

Use the undo peer group command to remove a peer from a peer group.

Examples

# In BGP-VPNv4 subaddress family view, add peer 1.1.1.1 into peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] group test external

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 group test

# In BGP-L2VPN address family view, add peer 1.1.1.1 into peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] group test external

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] peer 1.1.1.1 group test

peer ip-prefix (BGP-VPNv4 subaddress family view)

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

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

export: Filters the routes to be advertised.

import: Filters the received routes.

Description

Use the peer ip-prefix command to apply a route filtering policy based on IP prefix list to a peer or peer group.

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

By default, no route filtering policy based on IP prefix list is applied to a peer or peer group.

Examples

# In BGP-VPNv4 subaddress family view, specify to filter the received routes of a peer group using IP prefix list list1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer group1 ip-prefix list1 import

peer label-route-capability (BGP view, BGP VPN instance view)

Syntax

peer { group-name | ip-address } label-route-capability

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

View

BGP view, BGP VPN instance view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer label-route-capability command to enable the exchange of labeled routes with an IPv4 peer or peer group.

Use the undo peer label-route-capability command to disable the capability.

By default, the device does not advertise labeled routes to an IPv4 peer.

According to the networking scheme, the peer label-route-capability command enables the exchange of labeled IPv4 routes with:

l          ASBR PEs in the same AS.

l          PEs in the same AS.

l          the peer ASBR PE.

Examples

# Specify to exchange labeled IPv4 routes with peer 2.2.2.2.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] peer 2.2.2.2 label-route-capability

peer next-hop-invariable (BGP-VPNv4 subaddress family view)

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer next-hop-invariable command to configure the device not to change the next hop of a route when advertising it to a peer.

Use the undo peer next-hop-invariable command to restore the default.

By default, a device uses its address as the next hop when advertising a route to its EBGP peer. In the inter-provider option C application, you need to configure next-hop-invariable on the RR for multi-hop EBGP neighbors and reflector clients to ensure that the next hop of a VPN route will not be changed.

Related commands: peer ebgp-max-hop in BGP Commands of the IP Routing Volume.

Examples

# In BGP-VPNv4 subaddress family view, configure the device not to change the next hop of a route when advertising it to EBGP peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 next-hop-invariable

peer next-hop-local

Syntax

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

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

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer next-hop-local command to configure the device to use the local address as the next hop of a route when advertising it to a peer or peer group.

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

Examples

# In BGP-VPNv4 subaddress family view, configure the device to use the local address as the next hop of a route when advertising it to peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

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

# In BGP-L2VPN address family view, configure the device to use the local address as the next hop of a route when advertising it to peer group test.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

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

peer preferred-value (BGP-VPNv4 subaddress family view)

Syntax

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

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

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

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

Description

Use the peer preferred-value command to specify the preferred value for the routes received from the specified peer/peer group.

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

By default, the preferred value for the routes received from a peer/peer group is 0.

Examples

# Set the preferred value for the routes received from peer 131.108.1.1 to 50.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer 131.108.1.1 preferred-value 50

peer public-as-only (BGP-VPNv4 subaddress family view)

Syntax

peer { group-name | ip-address } public-as-only

undo peer { group-name | ip-address } public-as-only

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer public-as-only command to make outbound BGP updates carry no private AS numbers.

Use the undo peer public-as-only command to make outbound BGP updates carry private AS numbers.

By default, a BGP update carries private AS numbers.

If a BGP update to be sent carries any public AS number, this command does not take effect. The private AS number ranges from 64512 to 65535.

Examples

# In BGP-VPNv4 subaddress family view, configure the device to make BGP updates to be sent to peer group test carry no private AS numbers.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer test public-as-only

peer reflect-client

Syntax

peer { group-name | ip-address } reflect-client

undo peer { group-name | ip-address } reflect-client

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

Description

Use the peer reflect-client command to configure the local device to be a route reflector (RR) and set a peer or peer group as the client of the RR.

Use the undo peer reflect-client command to remove the configuration.

By default, no RR or RR client is configured.

Examples

# In BGP-VPNv4 subaddress family view, configure the local device to be an RR and set peer group test as the client of the RR.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer test reflect-client

# In BGP-L2VPN address family view, configure the local device to be an RR and set peer group test as the client of the RR.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] peer test reflect-client

peer route-policy (BGP-VPNv4 subaddress family 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-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

ip-address: IP address of the peer.

route-policy-name: Name of the routing policy, a string of 1 to 19 characters.

export: Filters the routes to be advertised.

import: Filters the received routes.

Description

Use the peer route-policy command to apply a routing policy to a peer or peer group.

Use the undo peer route-policy command to remove the application.

By default, no routing policy is applied to a peer or peer group.

Examples

# In BGP-VPNv4 subaddress family view, apply routing policy test-policy to peer group test to filter the received routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer test route-policy test-policy import

peer vpn-instance enable

Syntax

peer { group-name | peer-address } vpn-instance vpn-instance-name enable

undo peer { group-name | peer-address } vpn-instance vpn-instance-name enable

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

peer-address: IP address of the peer.

vpn-instance-name: Name of the VPN instance, a case-sensitive string of 1 to 31 characters.

Description

Use the peer vpn-instance enable command to activate a nested VPN peer or peer group and enable the capability of exchanging BGP-VPNv4 routes with the peer or peer group.

Use the undo peer vpn-instance enable command to disable the capability of exchanging BGP-VPNv4 routes with a nested VPN peer or peer group.

By default, nested VPN peers/peer groups can exchange only IPv4 routes; they cannot exchange BGP-VPNv4 routes.

Note that:

l          This configuration takes effect only after the nested VPN function is enabled.

l          Before specifying a nested VPN peer or peer group, be sure to configure the corresponding CE peer or peer group using the peer as-number command in BGP-VPN instance view.

l          Deleting the VPN instance to which a peer belongs will also delete the configuration of this command.

Examples

# Activate a nested VPN peer group named ebgp.

<Sysname> system-view

[Sysname] bgp 10

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

[Sysname-bgp-vpn1] group ebgp external

[Sysname-bgp-vpn1] quit

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer ebgp vpn-instance vpn1 enable

peer vpn-instance group

Syntax

peer peer-address vpn-instance vpn-instance-name group group-name

undo peer peer-address vpn-instance vpn-instance-name group group-name

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

peer-address: IP address of the peer.

vpn-instance-name: Name of the VPN instance, a case-sensitive string of 1 to 31 characters.

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

Description

Use the peer vpn-instance group command to add a peer to a nested VPN peer group.

Use the undo peer vpn-instance group command to remove a peer from a nested VPN peer group.

By default, a peer is not in any nested peer group.

Note that:

l          This configuration takes effect only after the nested VPN function is enabled.

l          Deleting the VPN instance to which a peer belongs will also delete the configuration of this command.

Examples

# Add peer 1.1.1.1 to the nested VPN peer group named ebgp.

<Sysname> system-view

[Sysname] bgp 10

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

[Sysname-bgp-vpn1] group ebgp external

[Sysname-bgp-vpn1] peer 1.1.1.1 as-number 600

[Sysname-bgp-vpn1] peer 1.1.1.1 group ebgp

[Sysname-bgp-vpn1] quit

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer ebgp vpn-instance vpn1 enable

[Sysname-bgp-af-vpnv4] peer 1.1.1.1 vpn-instance vpn1 group ebgp

peer vpn-instance route-policy import

Syntax

peer { group-name | peer-address } vpn-instance vpn-instance-name route-policy route-policy-name import

undo peer { group-name | peer-address } vpn-instance vpn-instance-name route-policy route-policy-name import

View

BGP-VPNv4 subaddress family view

Default Level

2: System level

Parameters

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

peer-address: IP address of the peer, in dotted decimal notation.

vpn-instance-name: Name of the VPN instance, a case-sensitive string of 1 to 31 characters.

route-policy-name: Name of the routing policy to be applied, a case-sensitive string of 1 to 19 characters.

Description

Use the peer vpn-instance route-policy import command to specify the routing policy to be applied to VPNv4 routes received from a nested VPN peer or peer group.

Use the undo peer vpn-instance route-policy import command to restore the default.

By default, no routing policy is applied.

A routing policy for a peer and a routing policy for the peer group to which the peer belongs are of the same priority; the one configured last takes effect.

Note that:

l          This configuration takes effect only after the nested VPN function is enabled.

l          Deleting the VPN instance to which a peer belongs will also delete the configuration of this command.

Examples

# Specify to apply routing policy comtest to VPNv4 routes received from peer group ebgp.

<Sysname> system-view

[Sysname] bgp 10

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] peer ebgp vpn-instance vpn1 route-policy comtest import

policy vpn-target

Syntax

policy vpn-target

undo policy vpn-target

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

None

Description

Use the policy vpn-target command to enable VPN target filtering for received VPNv4 routes.

Use the undo policy vpn-target command to disable the filtering, permitting all VPNv4 routes.

Only VPNv4 routes with export route target attributes matching the local import route target attributes are added into the routing table.

By default, the VPN target filtering function is enabled for received VPNv4 routes.

 

The command applies to inter-provider VPN option B schemes.

 

Examples

# In BGP-VPNv4 subaddress family view, enable VPN target filtering for received VPNv4 routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] policy vpn-target

# In BGP-L2VPN address family view, enable VPN target filtering for received VPNv4 routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] policy vpn-target

reflect between-clients

Syntax

reflect between-clients

undo reflect between-clients

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family 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 the function.

By default, route reflection between clients is enabled.

If fully meshed interconnections exist between the clients, route reflection is not required. Otherwise, an RR is required for routes to be reflected from one client to every other client.

Examples

# In BGP-VPNv4 subaddress family view, disable route reflection between clients.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] undo reflect between-clients

# In BGP-L2VPN address family view, disable route reflection between clients.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] undo reflect between-clients

reflector culster-id

Syntax

reflector cluster-id { cluster-id | ip-address }

undo reflector cluster-id

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

cluster-id: Cluster ID of the route reflector (RR), in the range 1 to 4294967295.

ip-address: IP address of the peer, which is to be used as the cluster ID of the RR.

Description

Use the reflector cluster-id command to specify a cluster ID for an RR.

Use the undo reflector cluster-id command to remove the cluster ID.

By default, the cluster ID is the router ID of an RR in the cluster.

Generally, a cluster contains only one RR, in which case the router ID of the RR is used for identifying the cluster. Setting multiple RRs can improve the network reliability. When there is more than one RR in a cluster, use the reflector cluster-id command to configure the same cluster ID for all RRs in the cluster.

Examples

# In BGP-VPNv4 subaddress family view, configure the local router as an RR of a cluster.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] reflector cluster-id 50

# In BGP-L2VPN address family view, configure the local router as an RR of a cluster.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] reflector cluster-id 50

refresh bgp vpn-instance

Syntax

refresh bgp vpn-instance vpn-instance-name { ip-address | all | external | group group-name } { export | import }

View

User view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

ip-address: Performs a soft reset of the BGP connection with a BGP peer identified by this IP address.

all: Performs a soft reset of all BGP VPN instance connections.

external: Performs a soft reset of EBGP sessions.

group group-name: Performs a soft reset of the connections with a BGP peer group identified by this name. The group-name argument is a string of 1 to 47 characters.

export: Performs a soft reset in the outbound direction.

import: Performs a soft reset in the inbound direction.

Description

Use the refresh bgp vpn-instance command to perform a soft reset of BGP connections in a VPN instance.

Examples

# Perform a soft reset of all BGP connections in VPN instance vpn1 in the inbound direction to make new configurations take effect.

<Sysname> refresh bgp vpn-instance vpn1 all import

refresh bgp vpnv4

Syntax

refresh bgp vpnv4 { ip-address | all | external | group group-name | internal } { export | import }

View

User view

Default Level

1: Monitor level

Parameters

ip-address: Performs a soft reset of the BGP VPNv4 connection with a BGP peer identified by this IP address.

all: Performs a soft reset of all BGP VPNv4 connections.

external: Performs a soft reset of EBGP sessions.

group group-name: Performs a soft reset of the VPNv4 connections with a BGP peer group identified by this name.

internal: Performs a soft reset of IBGP sessions.

export: Performs a soft reset in the outbound direction.

import: Performs a soft reset in the inbound direction.

Description

Use the refresh bgp vpnv4 command to perform a soft reset of BGP VPNv4 connections.

Examples

# Perform a soft reset of all BGP VPNv4 connections in the inbound direction to make new configurations take effect.

<Sysname> refresh bgp vpnv4 all import

reset bgp vpn-instance

Syntax

reset bgp vpn-instance vpn-instance-name { as-number | ip-address | all | external | group group-name }

View

User view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

as-number: Resets BGP connections with the peers in an AS identified by this number. This argument is in the range 1 to 65535.

ip-address: Resets the connection with a BGP peer identified by this IP address.

group group-name: Resets the connections with a BGP peer group identified by this name. The group-name argument is a string of 1 to 47 characters.

all: Resets all BGP connections.

external: Resets EBGP sessions.

Description

Use the reset bgp vpn-instance command to reset the BGP connections of a VPN instance.

Examples

# Reset all BGP connections of VPN instance vpn1.

<Sysname> reset bgp vpn-instance vpn1 all

reset bgp vpn-instance dampening

Syntax

reset bgp vpn-instance vpn-instance-name dampening [ network-address [ mask | mask-length ] ]

View

User view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

dampening: Specifies route flap dampening information.

mask: Network mask, in the format of X.X.X.X.

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

Description

Use the reset bgp vpn-instance dampening command to clear the route flap dampening information of a VPN instance.

Examples

# Clear the route flap dampening information of VPN instance vpn1.

<Sysname> reset bgp vpn-instance vpn1 dampening

reset bgp vpn-instance flap-info

Syntax

reset bgp vpn-instance vpn-instance-name ip-address flap-info

reset bgp vpn-instance vpn-instance-name flap-info [ ip-address [ mask | mask-length ] | as-path-acl as-path-acl-number | regexp as-path-regexp ]

View

User view

Default Level

1: Monitor level

Parameters

vpn-instance-name: Name of the VPN instance, a string of 1 to 31 characters.

ip-address: IP address of the BGP peer.

mask: Network mask, in the format of X.X.X.X.

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

as-path-acl-number: Number of the AS_PATH list, in the range 1 to 256.

as-path-regexp: AS_PATH regular expression.

Description

Use the reset bgp vpn-instance flap-info command to clear the route flap history information about BGP peers of a VPN instance.

Examples

# Clear route flap history information about BGP peer 2.2.2.2 of VPN instance vpn1.

<Sysname> reset bgp vpn-instance vpn1 2.2.2.2 flap-info

reset bgp vpnv4

Syntax

reset bgp vpnv4 { as-number | ip-address | all | external | internal | group group-name }

View

User view

Default Level

1: Monitor level

Parameters

as-number: Resets VPNv4 connections with the peers in an AS identified by this number.

ip-address: Resets the VPNv4 connection with a BGP peer identified by this IP address.

group-name: Resets the VPNv4 connections with a BGP peer group identified by this name.

all: Resets all BGP VPNv4 connections.

external: Resets EBGP sessions of VPNv4 connections.

internal: Resets IBGP sessions of VPNv4 connections.

Description

Use the reset bgp vpnv4 command to reset BGP VPNv4 connections.

Examples

# Reset all BGP VPNv4 connections to make new configurations take effect.

<Sysname> reset bgp vpnv4 all

route-distinguisher (VPN instance view)

Syntax

route-distinguisher route-distinguisher

View

VPN instance view

Default Level

2: System level

Parameters

route-distinguisher: Route distinguisher (RD) for the VPN instance, a string of 3 to 21 characters in either of the following two formats:

l          16-bit AS number:32-bit user-defined number. For example, 101:3.

l          32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.

Description

Use the route-distinguisher command to configure a route distinguisher (RD) for a VPN instance.

An RD is used to create the routing and FIB of a VPN.  By prefixing an RD to an IPv4 prefix, you get a VPN IPv4 prefix unique globally.

 

l          No RD is configured by default; you must configure an RD for each VPN instance.

l          A VPN instance takes effect only after you configure an RD for it.

l          Once you configure an RD for a VPN, you cannot remove the association.

l          You cannot change an RD directly; you can only delete the VPN instance, and then re-create the VPN instance and re-configure a new RD.

 

Examples

# Configure the RD of VPN instance vpn1.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] route-distinguisher 22:1

route-tag

Syntax

route-tag tag-value

undo route-tag

View

OSPF view

Default Level

2: System level

Parameters

tag-value: Tag for identifying injected VPN routes, in the range 0 to 4294967295.

Description

Use the route-tag command to configure the tag for identifying injected VPN routes.

Use the undo route-tag command to restore the default.

If the AS number is not greater than 65535, the first two octets of the default tag is always 0xD000 and the last two octets is the AS number of the local BGP. For example, if the local BGP AS number is 100, the default tag is 3489661028 in decimal. If the AS number is greater than 65535, the default tag is 0.

An OSPF instance-related VPN instance on a PE is usually configured with a VPN route tag, which must be included in Type 5/7 LSAs. PEs in the same AS are recommended to have the same route tag. The route tag is local significant and can be configured and take effect on only PEs receiving BGP routes and generating OSPF LSAs; it is not transferred in any BGP extended community attribute. Different OSPF processes can have the same route tag.

Tags configured with different commands have different priorities:

l          A tag configured with the import-route command has the highest priority.

l          A tag configured with the route-tag command has the second highest priority.

l          A tag configured with the default tag command has the lowest priority.

A received Type 5 or Type 7 LSA is neglected in route calculation if its tag is the same as the local one.

 

A configured route tag takes effect after you issue the reset ospf command.

 

Related commands: import-route in OSPF Commands of the IP Routing Volume.

Examples

# Configure the route tag for OSPF process 100 as 100.

<Sysname> system-view

[Sysname] ospf 100

[Sysname-ospf-100] route-tag 100

routing-table limit

Syntax

routing-table limit number { warn-threshold | simply-alert }

undo routing-table limit

View

VPN instance view

Default Level

2: System level

Parameters

number: Maximum number of routes for the VPN instance to support, in the range 1 to 128000..

warn-threshold: Threshold for warning. It is expressed in the maximum percentage of the number of routes for the VPN instance. It ranges from 1 to 100. When the specified threshold is reached, the system gives an alarm message but still allows new routes. If the number of routes received reaches the maximum supported, no more routes will be activated..

simply-alert: Specifies that when the maximum number of routes exceeds the threshold, the system still accepts routes and generates only a SYSLOG error message.

Description

Use the routing-table limit command to limit the maximum number of routes in a VPN instance, preventing too many routes from being accepted by a PE.

Use the undo routing-table limit command to cancel the configured limit.

Examples

# Specify that VPN instance vpn1 can receive up to 1000 routes, and can receive new routes after the threshold is exceeded.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] route-distinguisher 100:1

[Sysname-vpn-instance-vpn1] routing-table limit 1000 simply-alert

rr-filter

Syntax

rr-filter extended-community-list-number

undo rr-filter

View

BGP-VPNv4 subaddress family view, BGP-L2VPN address family view

Default Level

2: System level

Parameters

extended-community-list-number: Number of the extended community list supported by the RR group, in the range 1 to 199.

Description

Use the rr-filter command to create an RR reflection policy.

Use the undo rr-filter command to disable the function.

Only IBGP routes whose route target extended community attributes satisfy the matching conditions are reflected. This provides a way to implement load balancing between RRs.

Examples

# In BGP-VPNv4 subaddress family view, create an RR group and configure it to automatically filter the incoming VPNv4 route update packets based on the route target extended community attribute.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] ipv4-family vpnv4

[Sysname-bgp-af-vpnv4] rr-filter 10

# In BGP-L2VPN address family view, create an RR group and configure it to automatically filter the incoming VPNv4 route update packets based on the route target extended community attribute.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp] l2vpn-family

[Sysname-bgp-af-l2vpn] rr-filter 10

sham-link

Syntax

sham-link source-ip-address destination-ip-address [ cost cost | dead dead-interval | hello hello-interval | retransmit retrans-interval | trans-delay delay | simple [ cipher | plain ] password1 | { md5 | hmac-md5 } key-id [ cipher | plain ] password2 ] *

undo sham-link source-ip-address destination-ip-address [ cost | dead | hello | retransmit | trans-delay | simple | { md5 | hmac-md5 } key-id ] *

View

OSPF area view

Default Level

2: System level

Parameters

source-ip-address: Source IP address for the sham link.

destination-ip-address: Destination IP address for the sham link.

cost: Cost for the sham link. It ranges from 1 to 65,535 and defaults to 1.

dead-interval: Dead Interval in seconds. It ranges from 1 to 32,768 and defaults to 40. It must be equal to the dead interval of the router on the other end of the virtual link and be at least four times the hello interval.

hello-interval: Interval at which the interface sends Hello packets. It ranges from 1 to 8,192 seconds and defaults to 10 seconds. It must be equal to the hello interval of the router on the other end of the virtual link.

retrans-interval: Interval at which the interface retransmits LSAs. It ranges from 1 to 8,192 seconds and defaults to 5 seconds.

delay: Delay interval before the interface sends an LSA. It ranges from 1 to 8,192 seconds and defaults to 1 second.

simple [ cipher | plain ] password1: Uses simple authentication. If you specify neither the cipher nor the plain keyword, the password1 argument is a string of 1 to 8 characters. For the plain mode, the password1 argument is a string of 1 to 8 characters. For the cipher mode, the password1 argument can be either a string of 1 to 8 characters in plain text, or a string of 24 characters in cipher text.

md5: Uses MD5 algorithm for authentication.

hmac-md5: Uses HMAC-MD5 algorithm for authentication.

key-id: Authentication key ID of the interface, in the range 1 to 255. It must be the same as that of the peer.

cipher: Uses cipher text.

plain: Uses plain text.

password2: Password string, case-sensitive. If you specify neither the cipher nor the plain keyword, it is a string of 1 to 16 characters in plain text or a string of 24 characters in cipher text. For the plain mode, it is a string of 1 to 16 characters. For the cipher mode, it can be either a string of 1 to 16 characters in plain text, or a string of 24 characters in cipher text.

Description

Use the sham link command to configure a sham link.

Use the undo sham link command with no optional keyword to remove a sham link.

Use the undo sham link command with optional keywords to restore the defaults of the parameters for a sham link.

If two PEs belong to the same AS and a backdoor link is present, a sham link can be established between them.

For plain text authentication, the default authentication key type is plain. For authentication using MD5 algorithm or HMAC-MD5 algorithm, the default authentication key type is cipher.

Examples

# Create a sham link with the source address of 1.1.1.1 and the destination address of 2.2.2.2.

<Sysname> system-view

[Sysname] ospf

[Sysname-ospf-1] area 0

[Sysname-ospf-1-area-0.0.0.0] sham-link 1.1.1.1 2.2.2.2

tnl-policy (VPN instance view)

Syntax

tnl-policy tunnel-policy-name

undo tnl-policy

View

VPN instance view

Default Level

2: System level

Parameters

tunnel-policy-name: Name of the tunneling policy for the VPN instance, a string of 1 to 19 characters.

Description

Use the tnl-policy command to associate the current VPN instance with a tunneling policy.

Use the undo tnl-policy command to remove the association.

When selecting tunnels from the VPN tunnel management module, an application can use the tunneling policy as the criterion. With no tunneling policy associated with a VPN instance, the default tunneling policy is used.

Related commands: tunnel select-seq load-balance-number.

Examples

# Associate VPN instance vpn2 with tunneling policy po1.

<Sysname> system-view

[Sysname] tunnel-policy po1

[Sysname-tunnel-policy-po1] tunnel select-seq lsp load-balance-number 1

[Sysname-tunnel-policy-po1] quit

[Sysname] ip vpn-instance vpn2

[Sysname-vpn-instance-vpn2] route-distinguisher 22:33

[Sysname-vpn-instance-vpn2] tnl-policy po1

tunnel-policy

Syntax

tunnel-policy tunnel-policy-name

undo tunnel-policy tunnel-policy-name

View

System view

Default Level

2: System level

Parameters

tunnel-policy-name: Name for the tunneling policy, a string of 1 to 19 characters.

Description

Use the tunnel-policy command to establish a tunneling policy and enter tunneling policy view.

Use the undo tunnel-policy command to delete a tunneling policy.

Related commands: tunnel select-seq load-balance-number.

Examples

# Establish a tunneling policy named po1 and enter tunneling policy view.

<Sysname> system-view

[Sysname] tunnel-policy po1

[Sysname-tunnel-policy-po1]

tunnel select-seq load-balance-number

Syntax

tunnel select-seq { cr-lsp | lsp } * load-balance-number number

undo tunnel select-seq

View

Tunneling policy view

Default Level

2: System level

Parameters

cr-lsp: Specifies CR-LSP tunnels.

lsp: Specifies LSP tunnels.

number: Number of tunnels for load balancing, in the range 1 to 4.

Description

Use the tunnel select-seq load-balance-number command to configure the preference order for tunnel selection and the number of tunnels for load balancing.

Use the undo tunnel select-seq command to restore the default.

 

The S7500E series switches do not support CR-LSP tunnels. You can configure load balancing for only LSP tunnels.

 

By default, one LSP tunnel can be used. That is, only LSP tunnels can be used and the number of tunnels for load balancing is 1.

Examples

# Define a tunneling policy, specifying that only GRE tunnels can be used and the number of tunnels for load balancing be 2.

<Sysname> system-view

[Sysname] tunnel-policy po1

[Sysname-tunnel-policy-po1] tunnel select-seq gre load-balance-number 2

vpn-target (VPN instance view)

Syntax

vpn-target vpn-target&<1-8> [ both | export-extcommunity | import-extcommunity ]

undo vpn-target { all | { vpn-target&<1-8> [ both | export-extcommunity | import-extcommunity ] }

View

VPN instance view

Default Level

2: System level

Parameters

vpn-target&<1-8>: Adds the VPN target extended community attribute to the import or export VPN target extended community list and specify the VPN target in the format nn:nn or IP-address:nn. &<1-8> means that you can specify this argument for up to 8 times.

A VPN target attribute can be of 3 to 21 characters and in either of these two formats:

l          16-bit AS number:32-bit user-defined number. For example, 101:3.

l          32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.

both: Specifies both the export routing information to the destination VPN extended community and the import routing information from the destination VPN extended community. This is the default.

export-extcommunity: Specifies the export routing information to the destination VPN extended community.

import-extcommunity: Specifies the import routing information from the destination VPN extended community.

all: Specifies all export routing information to the destination VPN extended community and import routing information from the destination VPN extended community.

Description

Use the vpn-target command to associate the current VPN instance with one or more VPN targets.

Use the undo vpn-target command to remove the association of the current VPN instance with VPN targets.

VPN target has no default. You must configure it when creating a VPN instance.

Examples

# Associate the current VPN instance with VPN targets.

<Sysname> system-view

[Sysname] ip vpn-instance vpn1

[Sysname-vpn-instance-vpn1] route-distinguisher 100:1

[Sysname-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity

 EVT Assignment result:

 VPN-Target assignment is successful

[Sysname-vpn-instance-vpn1] vpn-target 4:4 import-extcommunity

 IVT Assignment result:

 VPN-Target assignment is successful

[Sysname-vpn-instance-vpn1] vpn-target 5:5 both

 IVT Assignment result:

 VPN-Target assignment is successful

 EVT Assignment result:

 VPN-Target assignment is successful

 

  • 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
新华三官网