Support - 10-MPLS L2VPN commands (2024)

ac interface

Use ac interfacein cross-connect view to bind an Ethernet service instance to a cross-connectand enter cross-connect AC view, or enter an existing cross-connect AC view.

Use ac interfacein auto-discovery cross-connect view to bind a Layer 3 interface or an Ethernetservice instance to a cross-connect.

Use undo ac interface to remove the binding.

Syntax

ac interface interface-typeinterface-number service-instanceinstance-id [ access-mode { ethernet | vlan } ] [ track track-entry-number&<1-3> ]

undo ac interface interface-typeinterface-number service-instance instance-id

Default

No Ethernet service instance is bound to across-connect.

Views

Cross-connect view

Auto-discovery cross-connect view

Predefined user roles

network-admin

Parameters

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

service-instance instance-id: Specifies an Ethernet service instance by its ID in the range of 1to 4096.

access-mode: Specifiesthe access mode. The default access mode is VLAN.

·ethernet: Specifies the Ethernet accessmode.

·vlan: Specifies the VLAN access mode.

track track-entry-number&<1-3>: Specifies a space-separated list of up to three track entrynumbers in the range of 1 to 1024. The AC is up only if a minimum of oneassociated track entry is in positive state.

Usage guidelines

After you execute this command, packetsmatching the Ethernet service instanceare forwarded to the bound PW or anotherAC.

The Ethernet service instance specified inthis command must have a packet match criterion configured by the encapsulation command.

The access mode determines how the PE treatsthe VLAN tag in Ethernet frames received from the AC. It also determines howthe PE forwards Ethernet frames to the AC.

·VLAN access mode—Ethernet frames received from the AC must carry a VLAN tag in theEthernet header. The VLAN tag is called a P-tag assigned by the serviceprovider. Ethernet frames sent to the AC must also carry the P-tag.

·Ethernet access mode—If Ethernet frames from the AC have a VLAN tag in the header, theVLAN tag is called a U-tag, and the PE ignores it. Ethernet frames sent to theAC do not carry the P-tag.

Examples

# Configure Ethernet service instance 200on Ten-GigabitEthernet 1/0/1 tomatch packets with an outer VLAN tag of 200. Bind the Ethernet service instanceto cross-connect actopw in cross-connect group vpn1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] service-instance200

[Sysname-Ten-GigabitEthernet1/0/1-srv200]encapsulation s-vid 200

[Sysname-Ten-GigabitEthernet1/0/1-srv200] quit

[Sysname-Ten-GigabitEthernet1/0/1] quit

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection actopw

[Sysname-xcg-vpn1-actopw] acinterface ten-gigabitethernet 1/0/1 service-instance200

[Sysname-xcg-vpn1-actopw-Ten-GigabitEthernet1/0/1-srv200]

# Configure Ethernet service instance 200on Ten-GigabitEthernet 1/0/1 tomatch packets with an outer VLAN tag of 200. Bind the Ethernet service instanceto the auto-discovery cross-connect in cross-connect group vpwsbgp.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] service-instance 200

[Sysname-Ten-GigabitEthernet1/0/1-srv200] encapsulations-vid 200

[Sysname-Ten-GigabitEthernet1/0/1-srv200] quit

[Sysname-Ten-GigabitEthernet1/0/1] quit

[Sysname] xconnect-group vpwsbgp

[Sysname-xcg-vpwsbgp] auto-discoverybgp

[Sysname-xcg-vpwsbgp-auto] site 1range 10 default-offset 0

[Sysname-xcg-vpwsbgp-auto-1] connectionremote-site-id 2

[Sysname-xcg-vpwsbgp-auto-1-2] ac interfaceten-gigabitethernet 1/0/1service-instance 200

Related commands

connection

display l2vpn interface

display l2vpn service-instance

encapsulation

pw-type

address-family l2vpn

Use address-family l2vpn to create the BGP L2VPN address family and enter its view, or enterthe view of the existing BGP L2VPN address family view.

Use undo address-family l2vpn to delete the BGP L2VPN address family and all settings from BGPL2VPN address family view.

Syntax

address-family l2vpn

undo address-family l2vpn

Default

No BGP L2VPN address family exists.

Views

BGP instance view

Predefined user roles

network-admin

Usage guidelines

To establish a BGP PW to a remote PE, youmust execute the peer enable command inBGP L2VPN address family view to enable the remote PE.

Examples

# Create the BGP L2VPN address family andenter BGP L2VPN address family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-familyl2vpn

[Sysname-bgp-default-l2vpn]

Related commands

peer enable (Layer 3—IP Routing Command Reference)

auto-discovery

Use auto-discovery to enable a cross-connect group to automatically discover neighborsand create PWs through BGP, and enter auto-discovery cross-connect group view.

Use undo auto-discovery to restore the default.

Syntax

auto-discovery bgp

undo auto-discovery

Default

A cross-connect group does not use BGP toautomatically discover neighbors and create PWs.

Views

Cross-connect group view

Predefined user roles

network-admin

Parameters

bgp: Enables thecross-connect group to automatically discover neighbors and create PWs throughBGP.

Usage guidelines

In auto-discovery cross-connect group view,you can configure parameters such as the local site, remote site, and routetarget for BGP. The local PE can use BGP to discover remote PEs and create PWs.

Examples

# Enable cross-connect group bbb to automatically discover neighbors and create PWsthrough BGP, and enter auto-discovery cross-connect group view.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto]

Related commands

display l2vpn pw

display l2vpn xconnect-group

backup-peer

Use backup-peerto configure a backup PW for a cross-connect and enter cross-connect backup PWview, or enter the view of an existing cross-connect backup PW.

Use undo backup-peer to restore the default.

Syntax

backup-peer ip-address pw-id pw-id [ in-label label-value out-label label-value ] [ pw-class class-name | tunnel-policy tunnel-policy-name ] *

undo backup-peer ip-address pw-id pw-id

Default

No backup PW exists for a cross-connect.

Views

Cross-connect PW view

Predefined user roles

network-admin

Parameters

ip-address: Specifiesthe LSR ID of the peer PE on the backup PW.

pw-id pw-id: Specifies a PW ID for the backup PW, in the range of 1 to4294967295.

in-label label-value: Specifies the incoming label for the backup PW. The value range is16 to 1023.

out-label label-value: Specifies the outgoing label for the backup PW. The value range is16 to 1048575.

pw-class class-name: Specifies a PW class by its name, a case-sensitive string of 1 to19 characters. You can specify a PW class to configure the PW dataencapsulation type and control word for the backup PW. If you do not specify aPW class, the PW data encapsulation type is determined by the link type of theinterface. The control word feature is not supported for PW data encapsulationtypes that do not require using control word.

tunnel-policy tunnel-policy-name: Specifies a tunnel policy by its name, a case-sensitive string of1 to 19 characters. If you do not specify a tunnel policy, the default tunnelpolicy is used.

Usage guidelines

This command configures a backup PW toimplement PW redundancy. The backup PW is used when the primary PW fails.

To configure a backup static PW, you mustspecify the in-label and out-label. To configure a backup LDP PW, you do not need to specify the in-label and out-label.

The peer LSR ID and PW ID for a backup PWmust be different from those for an existing VPLS PW or cross-connect PW.

Backup PW and multi-segment PW are mutuallyexclusive with each other. If you have configured a multi-segment PW, youcannot configure a backup PW for the two PWs that form the multi-segment PW. Ifyou have configured a backup PW for a PW, the PW cannot form a multi-segmentPW. For information about configuring a multi-segment PW, see the peer command.

When you add a static PW, you must makesure that static PW uses a different incoming label than an existing static LSPor static CRLSP. If the incoming label is duplicated, you cannot make the staticPW take effect by changing the incoming label of the static LSP or CRLSP.Instead, you must delete the static PW and then reconfigure the static PW withan unused incoming label.

Examples

# Configure a primary PW and a backup PWfor cross-connect pw2pw in cross-connect group vpn2. The primary PW is destined to 6.6.6.6 and has a PWID of 100. The backup PW is destined to 7.7.7.7 and has a PW ID of 200.

<Sysname> system-view

[Sysname] xconnect-group vpn2

[Sysname-xcg-vpn2] connection pw2pw

[Sysname-xcg-vpn2-pw2pw] peer 6.6.6.6pw-id 100 in-label 16 out-label 17

[Sysname-xcg-vpn2-pw2pw-6.6.6.6-100]backup-peer 7.7.7.7 pw-id 200 in-label 18 out-label 19

[Sysname-xcg-vpn2-pw2pw-6.6.6.6-100-backup]

Related commands

display l2vpn ldp

display l2vpn pw

peer

ccc

Use ccc tocreate a remote Circuit Cross Connect (CCC) connection.

Use undo ccc torestore the default.

Syntax

ccc in-label in-label-value out-label out-label-value { nexthop nexthop | out-interface interface-typeinterface-number } [ pw-class class-name ]

undo ccc

Default

No remote CCC connections exist.

Views

Cross-connect view

Predefined user roles

network-admin

Parameters

in-label in-label-value: Specifies an incoming label. The value range for the in-label-value argument is 16 to 1023.

out-label out-label-value: Specifies an outgoing label in the range of 16 to 1048575.

nexthop nexthop:Specifies the IP address of the next hop.

out-interface interface-typeinterface-number: Specifies the outgoinginterface by its type and number.

pw-class class-name: Specifies a PW class by its name, a case-sensitive string of 1 to19 characters. You can specify a PW class to configure the PW dataencapsulation type and control word. If you do not specify a PW class, the PWdata encapsulation type is determined by the interface type. The control wordfeature is not supported for PW data encapsulation types that do not requireusing control word.

Usage guidelines

A remote CCC connection is a static L2VPNconnection that is manually created by specifying the incoming and outgoinglabels on two PEs. A remote CCC connection does not need a public tunnel, butit requires configuring two static LSPs in opposite directions on each P devicebetween the two PEs. CCC employs only one level of label to transfer packets.The static LSPs on the P devices transfer data only for the CCC connection.

This command must be configured on both thelocal and remote PEs to create a remote CCC connection. The outgoing labelspecified on a device must be the same as the incoming label specified on thenext hop device.

After you create a remote CCC connection,you must execute the ac interface command tobind an Ethernet service instance. The PE can forward packets matching theEthernet service instance to the remote CCC connection.

Use the out-interface keyword to specify the outgoing interface only on a point-to-pointlink. On other interfaces, for example, VLAN interfaces, you must use the nexthop keyword to specify the next hop IP address.

For the PEs to forward packets over a CCCconnection, make sure the two PEs have the same CCC connection settings such asthe encapsulation type and control word feature.

Examples

# Create a remote CCC connection that hasincoming label 100, outgoing label 200, and next hop 10.1.1.1,and uses PW class pwc1.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] connection ccc1

[Sysname-xcg-bbb-ccc1] ccc in-label100 out-label 200 nexthop 10.1.1.1 pw-class pwc1

Related commands

ac interface

display l2vpn pw

connection

Use connectionto create a cross-connect and enter its view, or enter the view of an existingcross-connect.

Use undo connection to remove a cross-connect.

Syntax

connection connection-name

undo connection connection-name

Default

No cross-connects exist.

Views

Cross-connect group view

Predefined user roles

network-admin

Parameters

connection-name:Specifies the name of the cross-connect, a case-sensitive string of 1 to 20characters, excluding hyphens.

Usage guidelines

A cross-connect is a point-to-pointconnection.

You can perform the following operations incross-connect view:

·Execute the ac interfaceand peer commands to connect an AC to a PW, so the PE can forward packets betweenthe AC and the PW.

·Execute the peer commandtwice to connect two PWs to form a multi-segment PW.

·Execute the ac interfaceand ccc commands to connect an AC to a remote CCC connection, so the PE canforward packets between the AC and the remote CCC connection.

Examples

# Create cross-connect ac2pw for cross-connect group vpn1and enter cross-connect view.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection ac2pw

[Sysname-xcg-vpn1-ac2pw]

connection remote-site-id

Use connection remote-site-id to create an auto-discovery cross-connect and enter its view, orenter the view of an existing auto-discovery cross-connect.

Use undo connection remote-site-id toremove the auto-discovery cross-connect.

Syntax

connection remote-site-id remote-site-id

undo connection remote-site-id remote-site-id

Default

No auto-discovery cross-connects exist.

Views

Site view

Predefined user roles

network-admin

Parameters

remote-site-id:Specifies a remote site by its ID in the range of 0 to 256.

Usage guidelines

This command creates an auto-discoverycross-connect that uses BGP to establish a PW from the local site to thespecified remote site.

In auto-discovery cross-connect view, youcan execute ac interface to bind anAC to the auto-discovery cross-connect. The PE can forward packets between theAC and the PW.

Examples

# Create an auto-discovery cross-connectfrom site 1 to site 3 in site view, and enter auto-discovery cross-connectview.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] site 1 range10

[Sysname-xcg-bbb-auto-1] connectionremote-site-id 3

[Sysname-xcg-bbb-auto-1-3]

control-word enable

Use control-word enable to enable the control word feature.

Use undo control-word enable to disable the control word feature.

Syntax

control-word enable

undo control-word enable

Default

The control word feature is disabled.

Views

PW class view

Predefined user roles

network-admin

Usage guidelines

The control word field is between the MPLSlabel stack and the Layer 2 data. It carries control information for the Layer2 frame, for example, the sequence number.

The control word feature has the followingfunctions:

·Avoids fragment disorder. In multipathforwarding, fragments received might be disordered. You can configure thecontrol word feature so the device reorders the fragments according to thesequence number carried in the control word field.

·Identifies the original payload length forpackets that include padding.

When the PW data encapsulation type isEthernet or VLAN, the control word field is optional. Packets transmitted onthe PW carry the control word field only when control word is enabled on bothPEs.

Examples

# Enable the control word feature for PWclass pw100.

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100] control-wordenable

Related commands

display l2vpn pw-class

description

Use descriptionto configure a description for a cross-connect group.

Use undo description to restore the default.

Syntax

description text

undo description

Default

No description is configured for across-connect group.

Views

Cross-connect group view

Predefined user roles

network-admin

Parameters

text: Specifies adescription, a case-sensitive string of 1 to 80 characters.

Examples

# Configure a description of vpws for vpn2 for cross-connect group vpn2.

<Sysname> system-view

[Sysname] xconnect-group vpn2

[Sysname-xcg-vpn2] description vpwsfor vpn2

Related commands

display l2vpn xconnect-group

display bgp l2vpn signaling

Use display bgp l2vpn signaling to display MPLS L2VPN label block information discovered by BGP.

Syntax

display bgp [ instance instance-name] l2vpn signaling [ peer ip-address { advertised | received } [ statistics ] | route-distinguisher route-distinguisher [ site-id site-id [ label-offsetlabel-offset[ advertise-info ] ] ] | statistics ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

instance instance-name: Displays MPLS L2VPN label block information in a BGP instance. Theinstance-name argument specifies the BGP instance name, a case-sensitive stringof 1 to 31 characters. If you do not specify a BGP instance, this commanddisplays MPLS L2VPN label block information in the default BGP instance.

peer ip-address: Displays MPLS L2VPN label block information advertised to orreceived from a BGP peer. The ip-address argumentspecifies the peer IP address.

advertised: DisplaysMPLS L2VPN label block information advertised to the BGP peer.

received: Displays MPLSL2VPN label block information received from the BGP peer.

statistics: DisplaysBGP MPLS L2VPN label block statistics.

route-distinguisher route-distinguisher: Displays BGP MPLS L2VPN label block information for the routedistinguisher (RD), which is a string of 3 to 21 characters. You can specify anRD in one of the following formats:

·16-bit AS number:32-bit user-defined number. Forexample, 101:3.

·32-bit IP address:16-bit user-defined number. Forexample, 192.168.122.15:1.

·32-bit AS number:16-bit user-defined number, where theAS number must be equal to or greater than 65536. For example, 65536:1.

site-id site-id:Displays BGP MPLS L2VPN label block information for a site. The site-id argument specifies the site ID. The site ID range is 0 to 65535.

label-offset label-offset: Displays information about the BGP MPLS L2VPN label block with anoffset. The label-offset argumentspecifies the offset in the range of 0 to 65535.

advertise-info:Displays BGP MPLS L2VPN label block advertisem*nt information.

Usage guidelines

If you do not specify any parameters, thiscommand displays brief information about all BGP MPLS L2VPN label blocks.

Examples

# Display brief information about all BGPMPLS L2VPN label blocks.

<Sysname> display bgp l2vpnsignaling

BGP local router ID is 192.168.1.135

Status codes: * - valid, > -best, d - dampened, h - history,

s - suppressed, S -stale, i - internal, e - external

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

Total number of label blocks: 2

Route distinguisher: 2:2

Total number of label blocks: 2

Site ID LB offset LB range LBbase Nexthop

* > 1 0 101034 0.0.0.0

* >i 2 0 101162 192.3.3.3

Table 1 Command output

Field

Description

Status codes

Status codes:

·* – valid—Valid route.

·> – best—Best route.

·d – damped—Dampened route.

·h – history—History route.

·s – suppressed—Suppressed route.

·S – Stale—Stale route.

·i – internal—Internal route.

·e – external—External route.

Origin

Origin of the label block:

·i – IGP—Originated in the AS.

·e – EGP—Learned through EGP.

·? – incomplete—Unknown origin.

LB offset

Offset of the label block.

LB range

Size of the label block.

LB base

Initial value of the label block.

# Display detailedinformation about the BGP MPLS L2VPN label block that has RD 2:2, site ID 2,and offset 0.

<Sysname> display bgp l2vpnsignaling route-distinguisher 2:2 site-id 2 label-offset 0

BGP local router ID: 192.168.1.135

Local AS number: 100

Route distinguisher: 2:2

Total number of label blocks: 1

Paths: 1 available, 1 best

From : 192.3.3.3(192.168.1.140)

Original nexthop: 192.3.3.3

Ext-Community : <RT: 2:2>,<L2VPN info: MTU 1500, Encap type VLAN>

AS-path : (null)

Origin : igp

Attribute value : localpref 100,pref-val 0

Site ID : 2

LB offset : 0

LB base : 1162

LB range : 10

State : valid, internal,best

CSV : 0x01000ABFFF

Table 2 Command output

Field

Description

Paths

Number of label block messages:

·available—Number of available label block messages.

·best—Number of best label block messages.

From

IP address of the peer from which the label block was received.

Original nexthop

Original next hop. If the label block was obtained from a BGP route update, this field displays the next hop address in that BGP route update.

Ext-Community

Extended community attribute:

·RT—Route target.

·L2VPN info—L2VPN information, including the MTU and encapsulation type.

AS-path

AS path attribute, which records all ASs that the label block passed to prevent routing loops.

Origin

Origin of the label block:

·igp—Originated in the AS.

·egp—Learned through EGP.

·incomplete—Unknown origin.

Attribute value

Attribute of the label block:

·MED—Multi-Exit Discriminator attribute.

·localpref—Local preference value.

·pref-val—Preferred value.

·pre—Preference value.

LB offset

Offset of the label block.

LB base

Initial value of the label block.

LB range

Size of the label block.

State

State of the label block:

·valid.

·internal.

·external.

·local.

·best.

·not preferred for reason. For more information about the reasons, see Table 3.

CSV

Circuit status vector.

Table 3 Command output

Reason

Description

preferred-value

The information with the maximum preferred value is preferred.

local-preference

The information with the highest local priority is preferred.

local-origin-route

The locally generated information, imported information, and aggregated information are selected in turn.

as-path

The information with the shortest AS path is preferred.

origin

The information with an ORIGIN type of IGP, EGP, and Incomplete is selected in turn.

remote-route

The information learned from EBGP, EBGP confederation, IBGP confederation, and IBGP is selected in turn.

igp-cost

The route with the smallest IGP metric value to the next hop is preferred.

relydepth

Routes with a small recursion depth value are preferred.

rfc5004

Under the RFC5004 rule, the best route will not be changed by the BGP router after the BGP router receives routes from different EBGP neighbors if the current best route is an EBGP route.

router-id

The information published by the router with the smallest router ID is preferred. If the information contains RR attributes, the router ID is replaced with ORIGINATOR_ID during the information selection process.

peer-address

The information published by the peer with the lowest IP address is preferred.

received

The information that was learned first is preferred.

# Display BGP advertisem*nt information forthe specified MPLS L2VPN label block.

<Sysname> display bgp l2vpnsignaling route-distinguisher 2:2 site-id 1 label-offset 0 advertise-info

BGP local router ID: 192.168.1.135

Local AS number: 100

Route distinguisher: 2:2

Total number of label blocks: 1

Paths: 1 best

Site ID : 1

LB offset : 0

LB base : 1034

LB range : 10

CSV : 0x01000ADFFF

Advertised to peers (1 in total):

192.3.3.3

Table 4 Command output

Field

Description

Paths

Number of label block messages:

·available—Number of available label block messages.

·best—Number of best label block messages.

LB offset

Offset of the label block.

LB base

Initial value of the label block.

LB range

Size of the label block.

CSV

Circuit status vector.

Advertised to peers (1 in total)

Peers to which the label block has been advertised.

display l2vpnbgp

Use display l2vpn bgp to display MPLS L2VPN label block information.

Syntax

display l2vpn bgp [ local | peer ip-address ] [ xconnect-group group-name ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

local: Displays localMPLS L2VPN label block information.

peer ip-address:Displays MPLS L2VPN label block information received from the remote peer.

xconnect-group group-name: Displays MPLS L2VPN label block information for a cross-connectgroup. The group-name argumentspecifies the cross-connect group name, a case-sensitive string of 1 to 31characters. If you do not specify a cross-connect group, this command displaysMPLS L2VPN label block information for all cross-connect groups.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Usage guidelines

If you specify a peer, this commanddisplays both the label block received from the peer and the local label blockthat matches the received label block.

If you do not specify a peer or local, this command displays label blocks received from all peers andlocal label blocks that match the received ones. If no local label blockmatches the received ones, the command only displays the label blocks receivedfrom all peers.

A local label block matches a receivedlabel block if the following condition is met: local label block LO ≤ remotesite ID ≤ local label block LO + local label block LR – 1.

Examples

# Display brief information about labelblocks received from all peers.

<Sysname> display l2vpn bgp

Total number of BGP PWs: 1, 1 up, 0down

Xconnect-group Name: vpnb, Site ID:1

Rmt Site OffsetRD Nexthop In/Out Label State

2 02:2 192.3.3.3 1036/1163 Up

Table 5 Command output

Field

Description

Rmt Site

ID of the remote site.

Offset

Offset of the label block.

# Display detailed information about labelblocks received from all peers.

<Sysname> display l2vpn bgpverbose

Xconnect-group Name: vpnb, Site ID:1

Remote Site ID : 2

Offset : 0

RD : 2:2

PW State : Up

Encapsulation : VLAN

MTU : 1500

Nexthop : 192.3.3.3

Local VC Label : 1036

Remote VC Label : 1163

Link ID : 1

Local Label Block : 1034/10/0

Remote Label Block : 1162/10/0

Local Flow Label : -

Remote Flow Label : -

Export Route Target: 2:2

Table 6 Command output

Field

Description

Local VC Label

Incoming label of the PW.

Remote VC Label

Outgoing label of the PW.

Link ID

Link ID of the PW.

Local Label Block

Local label block: label base/label range/Label-block offset.

Remote Label Block

Remote label block: label base/label range/Label-block offset.

Local Flow Label

This field is not supported in the current software version.

Flow label capability of the local PE:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

Remote Flow Label

This field is not supported in the current software version.

Flow label capability of the remote PE:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

Export Route Target

Route target of the remote label block.

# Display brief information about all locallabel blocks.

<Sysname> display l2vpn bgplocal

Xconnect-group Name: vpnb

Site Offset Range Label BaseRD

1 0 10 10342:2

# Display detailed information about alllocal label blocks.

<Sysname> display l2vpn bgplocal verbose

Xconnect-group Name: vpnb

Site ID : 1

Offset : 0

RD : 2:2

Range : 10

Label Base : 1034

Link ID : 1

Table 7 Command output

Field

Description

Offset

Offset of the label block.

RD

RD of the label block. If no RD is configured, this field displays a hyphen (-).

Range

Range of the label block.

Label Base

Initial value of the label block.

Link ID

Link ID of the PW established using the label block.

The link ID is fixed to 1 because an MPLS L2VPN cross-connect can establish only one BGP PW.

Related commands

display l2vpn pw

display l2vpn forwarding

Use display l2vpn forwarding to display cross-connect forwarding information.

Syntax

display l2vpn forwarding { ac | pw } [ xconnect-group group-name ] [ slot slot-number ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

ac: Displays ACforwarding information.

pw: Displays PWforwarding information.

xconnect-group group-name: Displays forwarding information for a cross-connect group. The group-name argument specifies the cross-connect group name, a case-sensitivestring of 1 to 31 characters. If you do not specify a group, this commanddisplays forwarding information for all cross-connect groups.

slot slot-number: Specifies an IRF member device by its member ID. If you do notspecify a member device, this command displays cross-connect forwardinginformation for the master device.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Examples

# Display brief AC forwarding informationfor all cross-connect groups.

<Sysname> display l2vpnforwarding ac

Total number of cross-connections: 3

Total number of ACs: 3

ACXconnect-group Name Link ID

XGE1/0/1 srv1vpn1 0

XGE1/0/1 srv2vpn2 1

Table 8 Command output

Field

Description

Total number of cross-connections

Total number of cross-connects, including cross-connects not bound to any ACs.

AC

AC type:

Ethernet service instance on a Layer 2 interface.

# Display detailed AC forwardinginformation for all cross-connect groups.

<Sysname> display l2vpnforwarding ac verbose

Xconnect-group Name: vpws1

Connection Name: actopw

Interface: XGE1/0/3 Service Instance: 1

Link ID : 1

Access Mode : VLAN

Encapsulation : s-vid 16

Bandwidth : Unlimited

Connection Name: actopw2

Interface: XGE1/0/3 Service Instance: 4

Link ID : 1

Access Mode : VLAN

Encapsulation : untagged

Bandwidth : Unlimited

Xconnect-group Name: vpws5

Connection Name: actopw

Interface: Vlan14

Link ID : 0

Access Mode : VLAN

Table 9 Command output

Field

Description

Xconnect-group Name

Cross-connect group name.

Connection Name

Cross-connect name.

Service Instance

The field is available only when the AC is an Ethernet service instance on a Layer 2 interface.

Access Mode

AC access mode:

·VLAN.

·Ethernet.

Encapsulation

Match criterion of the Ethernet service instance. This field is displayed only when the AC type is Ethernet service instance on a Layer 2 interface.

Bandwidth

This field is not supported in the current software version.

Maximum bandwidth (in kbps) for traffic on the AC.

# Display brief PW forwarding informationfor all cross-connect groups.

<Sysname> display l2vpnforwarding pw

Total number of cross-connections: 1

Total number of PWs: 2, 2 up, 0blocked, 0 down

Xconnect-group NameIn/Out Label NID Link ID State

vpn11279/1151 1025 0 Up

vpn1 1278/11511027 1 Up

Table 10 Command output

Field

Description

Total number of cross-connections

Total number of cross-connects, including those not bound to any PW.

In/Out Label

Incoming and outgoing labels of the PW. A hyphen (-) indicates that no label exists.

NID

NHLFE ID for the public tunnel that carries the PW.

If equal-cost tunnels are available, this field displays multiple NIDs.

If no tunnel is available, this field displays None.

State

PW state: Up, Down, or Blocked.

Blocked indicates that the PW is a backup PW.

# Display detailed PW forwardinginformation for all cross-connect groups.

<Sysname> display l2vpnforwarding pw verbose

Xconnect-group Name: vpn1

Connection Name: ldp

Link ID: 0

PW Type : VLAN PWState : Up

In Label :1279 Out Label: 1151

MTU : 1500

PW Attributes : Main

VCCV CC : Router-Alert

VCCV BFD : -

Flow Label : -

Tunnel Group ID : 0x60000000

Tunnel NHLFE IDs: 1025

Link ID: 1

PW Type :VLAN PW State : Up

In Label :1278 Out Label: 1151

MTU : 1500

PW Attributes : Main

VCCV CC : Router-Alert

VCCV BFD : -

Flow Label : -

Tunnel Group ID : 0x160000001

Tunnel NHLFE IDs: 1027

Table 11 Command output

Field

Description

PW State

PW state: Up, Down, or Blocked.

Blocked indicates that the PW is a backup PW.

In Label

Incoming label of the PW. A hyphen (-) indicates that no label exists.

Out Label

Outgoing label of the PW. A hyphen (-) indicates that no label exists.

PW Attributes

PW attribute:

·Main—The PW is the primary PW.

·Backup—The PW is the backup PW.

VCCV CC

VCCV CC type:

Router-Alert—MPLS Router Alert Label.

This field displays a hyphen (-) if no VCCV CC type is specified.

VCCV BFD

This field is not supported in the current software version.

VCCV BFD type:

·Fault Detection with BFD. BFD packets use IP/UDP encapsulation (with IP/UDP headers).

·Fault Detection with Raw-BFD. BFD packets use PW-ACH encapsulation (without IP/UDP headers).

This field displays a hyphen (-) if BFD is not used to verify PW connectivity.

Flow Label

This field is not supported in the current software version.

Flow label capability:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

Tunnel Group ID

ID of the tunnel group for the PW.

Tunnel NHLFE IDs

NHLFE IDs of the public tunnels that carry the PW.

If equal-cost tunnels are available, this field displays multiple tunnel NHLFE IDs.

If no tunnel is available, this field displays None.

display l2vpn ldp

Use display l2vpn ldp to display LDP PW label information.

Syntax

display l2vpn ldp [ peer ip-address [ pw-id pw-id ] | xconnect-group group-name ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

peer ip-address:Displays LDP PW label information advertised by a peer PE. The ip-address argument specifies the LSR ID of the peer PE. If you do not specifya peer PE, this command displays LDP PW label information advertised by allpeer PEs.

pw-id pw-id:Displays LDP PW label information for a PW. The pw-id argument specifies the PW ID in the range of 1 to 4294967295. If youspecify peer ip-address withoutthis option, the command displays all LDP PW label information advertised bythe peer PE.

xconnect-group group-name: Displays LDP PW label information for a cross-connect group. The group-name argument specifies the cross-connect group name, a case-sensitivestring of 1 to 31 characters. If you do not specify a cross-connect group, thiscommand displays LDP PW label information for all cross-connect groups.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Examples

# Display brief information about all LDPPW labels.

<Sysname> display l2vpn ldp

Total number of LDP PWs: 5, 4 up, 1down

Peer PW ID/VPLS ID In/OutLabel State Owner

192.3.3.3 1001 775125/775126Up vpws1

192.3.3.3 1001 775125/775126Up vpws1

192.3.3.3 1003 775117/775122Up vpws3

192.3.3.3 1004 775120/775120Up vpws4

192.4.4.4 1000 775116/unknownDown vpws5

Table 12 Command output

Field

Description

PW ID/VPLS ID

This field displays the PW ID for FEC 128, and displays the VPLS ID for FEC 129. Only VPLS supports FEC 129.

Owner

Cross-connect group of the PW.

# Display detailed information about allLDP PW labels.

<Sysname> display l2vpn ldpverbose

Peer: 192.2.2.2 PW ID: 1000

Xconnect-group: vpn1

Connection : ldp

PW State : Up

PW Status Communication:Notification method

PW Preferential Forwarding StatusBit: Process

PW ID FEC (Local/Remote):

PW Type : VLAN/VLAN

Group ID : 0/0

Label : 1151/1279

Control Word: Disabled/Disabled

VCCV CC Type: -/-

VCCV CV Type: -/-

Flow Label : -/-

MTU : 1500/1500

PW Status : PW forwarding/PWforwarding

Table 13 Command output

Field

Description

Xconnect-group

Cross-connect group of the PW.

Connection

Cross-connect of the PW.

PW Status Communication

PW state communicate:

·Notification method—Uses notifications to communicate PW states.

·Label withdraw method—Assigns a PW label to the PW when the AC is up and withdraws the PW label when the AC goes down.

PW Preferential Forwarding Status Bit

PW state processing mode:

·Process—Process the received PW states.

·Ignore—Ignore the received PW states.

Control Word

Whether the control word feature is enabled.

VCCV CC Type

VCCV CC type:

Router-Alert—MPLS Router Alert Label.

This field displays a hyphen (-) if no VCCV CC type is specified.

For information about VCCV, see MPLS Configuration Guide.

VCCV CV Type

VCCV CV type:

LSP Ping—Uses MPLS LSP ping to verify PW connectivity.

This field displays a hyphen (-) if VCCV is not performed on the PW.

Flow Label

This field is not supported in the current software version.

Flow label capability:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

PW Status

PW status:

·PW forwarding—PW is ready for packet forwarding.

·PW not forwarding—PW is not ready for packet forwarding.

·AC receive fault—AC cannot receive packets.

·AC transmit fault—AC cannot send packets.

·PW receive fault—PW cannot receive packets.

·PW transmit fault—PW cannot send packets.

·PW standby—The PW is in standby state.

·Unknown—Unknown protocol.

display l2vpn pw

Use display l2vpn pw to display L2VPN PW information.

Syntax

display l2vpn pw [ xconnect-group group-name ] [ protocol { bgp | ldp | static } ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

xconnect-group group-name: Displays L2VPN PW information for a cross-connect group. The group-name argument specifies the cross-connect group name, a case-sensitivestring of 1 to 31 characters. If you do not specify a group, this commanddisplays L2VPN PW information for all cross-connect groups.

protocol: DisplaysL2VPN PW information established by a protocol. If you do not specify aprotocol, this command displays L2VPN PW information established by allprotocols.

bgp: Displays BGP PWinformation.

ldp: Displays LDP PWinformation.

static: Displays staticPW information, including remote CCC connections.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Usage guidelines

After you enable PW statistics, you can usethe displayl2vpn pw verbose command to display PWstatistics.

Examples

# Display brief information about all L2VPNPWs.

<Sysname> display l2vpn pw

Flags: M - main, B - backup, E -ecmp, BY - bypass, H - hub link, S - spoke link

N - no split horizon, A -administration, ABY - ac-bypass

PBY - pw-bypass

Total number of PWs: 2

2 up, 0 blocked, 0 down, 0 defect, 0idle, 0 duplicate

Xconnect-group Name: ldp

Peer PWID/RmtSite/SrvIDIn/Out Label Proto Flag Link ID State

192.3.3.3 500 1299/1299LDP M 0 Up

Xconnect-group Name: vpnb

Peer PWID/RmtSite/SrvIDIn/Out Label Proto Flag Link ID State

192.3.3.3 2 1036/1163BGP M 1 Up

Table 14 Command output

Field

Description

Flags

PW flag.

PWID/RmtSite/SrvID

This field displays the following:

·PW ID for a static or LDP PW.

·Remote site ID for a BGP PW.

Proto

Protocol that established the PW: LDP, Static, or BGP.

Flag

PW attribute:

·M—Primary PW.

·B—Backup PW.

·E - ECMP—The PW is an ECMP PW.

·A - Administration—The PW is an administration PW.

Link ID

Link ID of the PW.

State

PW state:

·Up—The PW is available.

·Down—The PW is not available.

·Blocked—The PW is a backup PW.

·Defect—BFD has detected a defect on the PW.

·Idle—The incoming label of the PW is not available.

·Dup—The incoming label of the static PW is used by a static LSP or a static CRLSP.

# Display detailed information about allPWs.

<Sysname> display l2vpn pwverbose

Xconnect-group Name: ldp

Connection Name: ldp

Peer: 192.3.3.3 PW ID: 500

Signaling Protocol : LDP

Link ID : 0PW State : Up

In Label : 1299Out Label: 1299

MTU : 1500

PW Attributes : Main

VCCV CC : -

VCCV BFD : -

Flow Label : -

Tunnel Group ID :0x800000160000000

Tunnel NHLFE IDs : 1026

Admin PW : -

Xconnect-group Name: vpnb

Connection of auto-discovery: Site 1

Peer: 192.3.3.3 Remote Site:2

Signaling Protocol : BGP

Link ID : 1PW State : Up

In Label : 1036Out Label: 1163

MTU : 1500

PW Attributes : Main

VCCV CC : -

VCCV BFD : -

Flow Label : -

Tunnel Group ID :0x800000160000000

Tunnel NHLFE IDs : 1026

Admin PW : -

Table 15 Command output

Field

Description

Xconnect-group Name

Cross-connect group name.

Connection Name

Cross-connect name, which is displayed for LDP, EVPN, and static PWs.

Peer

IP address of the peer PE of the PW.

Signaling Protocol

Protocol that established the PW: LDP, Static, or BGP

PW State

PW state:

·Up—The PW is available.

·Down—The PW is not available.

·Blocked—The PW is a backup PW.

·Defect—BFD has detected a defect on the PW.

·Idle—The incoming label of the PW is not available.

·Duplicate—The incoming label of the static PW is used by a static LSP or a static CRLSP.

Wait to Restore Time

Wait time to switch traffic from the backup PW to the primary PW when the primary PW recovers, in seconds. If the switchover is disabled, this field displays Infinite.

This field is available when both primary and backup PW exist, and is displayed only for the primary PW.

Remaining Time

Remaining wait time for traffic switchover, in seconds.

PW Attributes

PW attribute:

·Main—Primary PW.

·Backup—Backup PW.

·ECMP—ECMP PW.

·Administration—Administration PW.

VCCV CC

VCCV CC type:

·Control-Word—Control word.

·Router-Alert—MPLS Router Alert Label.

This field displays a hyphen (-) if no VCCV CC type is specified.

VCCV BFD

VCCV BFD type:

Fault Detection with BFD. BFD packets use IP/UDP encapsulation (with IP/UDP headers).

This field displays a hyphen (-) if BFD is not used to verify PW connectivity.

Flow Label

This field is not supported in the current software version.

Flow label capability:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

Tunnel Group ID

ID of the tunnel group for the PW.

Tunnel NHLFE IDs

NHLFE IDs of the public tunnels that carry the PW.

If equal-cost tunnels are available, this field displays multiple tunnel NHLFE IDs.

If no tunnel is available, this field displays None.

Admin PW

This field is not supported in the current software version.

Administration PW to which the PW is bound. This field displays a hyphen (-) if the PW is not bound to an administration PW.

Connection of auto-discovery

The PW is a BGP PW.

Site

Local site ID.

Remote site

Remote site ID.

display l2vpn pw state-machine

Use display l2vpn pw state-machine to display MPLS L2VPN PW state machine information.

Syntax

display l2vpn pw state-machine [ vsi vsi-name | xconnect-group group-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

vsi vsi-name: Specifies a VSI by its name, a case-sensitive string of 1 to 31characters. If you do not specify a VSI, this command displays L2VPN PW statemachine information for all VSIs.

xconnect-group group-name: Specifies a cross-connect group by its name, a case-sensitivestring of 1 to 31 characters. If you do not specify a group, this commanddisplays L2VPN PW state machine information for all cross-connect groups.

Examples

# Display MPLS L2VPN PW state machineinformation.

<Sysname> display l2vpn pwstate-machine

PW Group State:

Idle - Idle, N - Normal, UA - Unavailable,PA - Protecting administrative

PF - Protecting failure, WTR - Wait-to-Restore,DNR - Do-not-Revert

SWT - Switchover wait, SWTR - Switchoverwait Restore

M - Manual switch, P - ProtectionPW failure, W - Working PW failure

L - Local, R - Remote

Total number of PWs: 3

VSI Name: 1004

PW Group Link ID : 2

Main PW : Peer:3.3.3.3 PW ID: 1004

Backup PW : Peer:2.2.2.2 PW ID: 11004

Signaling Protocol : LDP

Main PW Defect State : Nodefect

Backup PW Defect State : Nodefect

Switch Flag : 0x01

Switch Result : None

Switch Reason : PWdown

SWT Expiry Count : 0

SWTR Expiry Count : 0

Remote Event : None

Local Event : None

Remaining Wait Time : 2s

PW Group Old State : Normal

PW Group State : SWT

PW Group Link ID : 3

Main PW : Peer: 4.4.4.4PW ID: 1005

Backup PW : Peer: 5.5.5.5PW ID: 11005

Signaling Protocol : LDP

Main PW Defect State : Nodefect

Backup PW Defect State : Nodefect

Switch Flag : 0x01

Switch Result : None

Switch Reason : PWdown

SWT Expiry Count : 0

SWTR Expiry Count : 0

Remote Event : None

Local Event : None

Remaining Wait Time : 2s

PW Group Old State : Normal

PW Group State : SWT

Xconnect-group Name: ldp

Connection Name: ldp

PW Group Link ID : 0

Main PW : Peer:192.3.3.3 PW ID: 500

Backup PW : -

Signaling Protocol : LDP

Main PW Defect State : Nodefect

Backup PW Defect State : -

Switch Flag : 0x01

Switch Result : None

Switch Reason : PWdown

SWT Expiry Count : 0

SWTR Expiry Count : 0

Remote Event : None

Local Event : None

PW Group Old State : Idle

PW Group State : Normal

Xconnect-group Name: vpnb

Connection of auto-discovery: Site 1

PW Group Link ID : 1

Main PW : Peer:192.3.3.3 Remote Site: 2

Backup PW : -

Signaling Protocol : BGP

Main PW Defect State : No defect

Backup PW Defect State : -

Switch Flag : 0x01

Switch Result : None

Switch Reason : PWdown

SWT Expiry Count : 0

SWTR Expiry Count : 0

Remote Event : None

Local Event : None

PW Group Old State : Idle

PW Group State : Idle

Table 16 Command output

Field

Description

Connection Name

Cross-connect name. This field is displayed for LDP PWs and static PWs.

Connection of auto-discovery

BGP PW.

Site

Local site ID.

Peer

IP address of the peer PE of the PW.

Backup PW

If no backup PWs exist, this field displays a hyphen (-).

Signaling Protocol

Protocol that established the PW: LDP, Static, or BGP.

Main PW Defect State

Primary PW defect state:

·No defect—The primary PW does not have defects.

·Signal defect—The signaling protocol detected a defect on the primary PW.

·VN defectThe virtual next hop (VN) detected a defect on the primary PW.

·OAM defect—OAM detected a defect on the primary PW.

·Remote defect—The remote end of the PW has defects.

Backup PW Defect State

Backup PW defect state. The options of this field are the same as those of the Main PW Defect State field.

If no backup PWs exist, this field displays a hyphen (-).

Switch Flag

Primary/backup PW switchover flag:

·Local manual switching—A manual primary/backup PW switchover was performed at the local end.

·Signaling switching—A primary/backup PW switchover was triggered by the signaling protocol.

·Remote manual switching—A manual primary/backup PW switchover was performed at the remote end.

Switch Result

Primary/backup PW switchover result:

·None—Neither the primary nor the backup PW is used to forward traffic.

·Main—The primary PW is used to forward traffic.

·Backup—The backup PW is used to forward traffic.

Switch Reason

Reason for the primary/backup PW switchover:

·Manual force switch—The l2vpn switchover command was executed.

·Config changed—A PW was added or removed in the set of redundant PWs.

·Fault detected—BFD or VCCV detected a PW failure.

·PW down—The PW went down.

·PW up—The PW came up.

·Receive notification message—A notification was received.

·Restore manual force switch—Restored to the PW state prior to the last manual switchover (triggered by the l2vpn switchover command).

·None—No primary/backup PW switchover occurred.

SWT Expiry Count

Number of times that the switchover wait timer expired. This value is used to determine whether to re-initiate a request switchover.

This counter is reset when a primary/backup PW switchover occurs.

SWTR Expiry Count

Number of times that the switchover wait to restore timer expired. This value is used to determine whether to re-initiate a request switchover.

This counter is reset when a primary/backup PW switchover occurs.

Remaining Wait Time

Remaining wait time for the request switchover acknowledgment, in seconds. This field is displayed after the switchover wait timer is started.

Remote Event

Event received from the remote state machine:

·SFW—The primary PW has defects.

·SFP—The backup PW has defects.

·SFCW—The primary PW came up.

·SFCP—The backup PW came up.

·MS—Traffic was manually switched from the primary PW to the backup PW.

·MR—Traffic was manually switched from the backup PW to the primary PW.

·None—No event was received.

Local Event

Event received from the local state machine:

·SFW—The primary PW has defects.

·SFP—The backup PW has defects.

·SFCW—The primary PW came up.

·SFCP—The backup PW came up.

·MS—Traffic was manually switched from the primary PW to the backup PW.

·MR—Traffic was manually switched from the backup PW to the primary PW.

·WTREXP—The wait to restore timer expired.

·WTR—The wait to restore timer was set to a non-zero value.

·DNR—The switchover mode was set to non-revertive, which indicates that traffic is not switched from the backup PW to the primary PW after the primary PW recovers.

·SWTEXP—The switchover wait timer expired.

·None—No event was received.

PW Group Old State

PW state before the primary/backup PW switchover:

·Idle—Neither the primary nor the backup PW is available.

·Normal—Both the primary and backup PWs are available. The primary PW is up.

·UA:P:L—The local end of the backup PW has defects. The primary PW is up.

·UA:P:R—The remote end of the backup PW has defects. The primary PW is up.

·PF:W:L—The local end of the primary PW has defects. The backup PW is up.

·PF:W:R—The remote end of the primary PW has defects. The backup PW is up.

·PA:M:LBoth the primary and backup PWs are available. A switchover command is executed at the local end to switch traffic from the primary PW to the backup PW.

·PA:M:R—Both the primary and backup PWs are available. A switchover command is executed at the remote end to switch traffic from the primary PW to the backup PW.

·WTR—Waiting for the expiration of the wait to restore timer.

·DNR—Non-revertive state. In this state, traffic is not switched back from the backup PW to the primary PW after the primary PW recovers.

·SWT—Waiting for acknowledgment for the primary-to-backup switchover request.

·SWTR—Waiting for acknowledgment for the backup-to-primary switchover request.

PW Group State

PW state after the primary/backup PW switchover. Options of this field are the same as those of the PW Group Old State field.

display l2vpn pw-class

Use display l2vpn pw-class to display PW class information.

Syntax

display l2vpn pw-class [ class-name ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

class-name: Displays informationabout the PW class specified by its name, a case-sensitive string of 1 to 19characters. If you do not specify a PW class, this command displays informationabout all PW classes.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief PW class information.

Examples

# Display information about all PW classes.

<Sysname> display l2vpnpw-class

Total number of PW classes: 2

PW Class Name PWType Control Word VCCV CC VCCV BFD

pw1Ethernet Disabled - -

pw2VLAN Disabled - -

Table 17 Command output

Field

Description

Control Word

Whether control word is enabled.

VCCV CC

VCCV CC type:

·Control-Word—Control word.

·Router-Alert—MPLS Router Alert Label.

This field displays a hyphen (-) if no VCCV CC type is specified.

VCCV BFD

VCCV BFD type:

BFD—BFD packets use IP/UDP encapsulation (with IP/UDP headers).

This field displays a hyphen (-) if BFD is not used to verify PW connectivity.

# Display detailed information about all PWclasses.

<Sysname> display l2vpnpw-class verbose

PW Class Name : pw1

PW Type : Ethernet

Control Word: Disabled

VCCV CC : -

VCCV BFD : -

Flow Label : -

PW Class Name : pw2

PW Type : VLAN

Control Word: Disabled

VCCV CC : -

VCCV BFD : -

Flow Label : -

Table 18 Command output

Field

Description

PW Type

PW data encapsulation type: Ethernet or VLAN.

Control Word

Whether control word is enabled.

VCCV CC

VCCV CC type:

·VCCV BFD—Displays a hyphen (-).

·Router-Alert—MPLS Router Alert Label.

This field displays a hyphen (-) if no VCCV CC type is specified.

VCCV BFD

This field is not supported in the current software version.

VCCV BFD type:

BFD—BFD packets use IP/UDP encapsulation (with IP/UDP headers).

This field displays a hyphen (-) if BFD is not used to verify PW connectivity.

Flow Label

This field is not supported in the current software version.

Flow label capability:

·Both—Flow label sending and receiving capabilities.

·Send—Flow label sending capability.

·Recv—Flow label receiving capability.

This field displays a hyphen (-) if the flow label feature is disabled.

Related commands

pw-class

display l2vpnservice-instance

Use display l2vpn service-instance to display Ethernet service instance information.

Syntax

display l2vpn service-instance [ interface interface-type interface-number [ service-instance instance-id ] ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Displays Ethernet service instance information for the specifiedLayer 2 Ethernet interface or Layer 2 aggregate interface. If you do notspecify an interface, this command displays Ethernet service instanceinformation for all Layer 2 Ethernet interfaces and Layer 2 aggregateinterfaces.

service-instance instance-id: Displays information about the Ethernet service instance specifiedby its ID. The instance ID is in the range of 1 to 4096. If you specify interfaceinterface-type interface-number without thisoption, the command displays information about all Ethernet service instanceson the specified Layer 2 Ethernet interface or Layer 2 aggregate interface.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Examples

# Display brief information about allEthernet service instances.

<Sysname> display l2vpnservice-instance

Total number of service-instances: 2,2 up, 0 down

Total number of ACs: 2, 2 up, 0 down

Interface ID OwnerLinkID State Type

XGE1/0/1 1 vpws11 Up VPWS

XGE1/0/1 2 vpws21 Up VPWS

Table 19 Command output

Field

Description

ID

Ethernet service instance ID.

Owner

Name of the cross-connect group bound to the Ethernet service instance. This field is empty if no cross-connect group is bound.

Link ID

Link ID of the AC.

State

State of the service instance: UP or Down.

Type

L2VPN type. The value can only be VPWS for an MPLS L2VPN network.

# Display detailed information about allEthernet service instances on Layer 2 Ethernet interface Ten-GigabitEthernet 1/0/1.

<Sysname> display l2vpn service-instanceinterface ten-gigabitethernet 1/0/1 verbose

Interface: XGE1/0/1

Service Instance: 1

Type : Manual

Encapsulation : s-vid 16

Bandwidth : Unlimited

Xconnect-group: vpws1

Connection : actopw

Link ID : 1

State : Up

Statistics : Disabled

Table 20 Command output

Field

Description

Interface

Layer 2 Ethernet interface or Layer 2 aggregate interface.

Type

Ethernet service instance type. This field can only be Manual, which indicates that the Ethernet service instance is manually created.

Encapsulation

Packet match criterion of the Ethernet service instance. This field is not displayed if no packet match criterion is configured.

Bandwidth

This field is not supported in the current software version.

Maximum bandwidth (in kbps) for traffic on the AC.

Xconnect-group

Name of the cross-connect group bound to the Ethernet service instance.

AD connection

Name of the auto-discovery cross-connect bound to the Ethernet service instance, identified by the local and remote site IDs.

Link ID

Link ID of the AC.

State

State of the Ethernet service instance: UP or Down.

Statistics

This field is not supported in the current software version.

Packet statistics state:

·Enabled—Packet statistics is enabled for the Ethernet service instance.

·Disabled—Packet statistics is disabled for the Ethernet service instance.

Related commands

service-instance

display l2vpnxconnect-group

Use display l2vpn xconnect-group to display cross-connect group information.

Syntax

display l2vpn xconnect-group [ name group-name ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

name group-name:Displays information about a cross-connect group. The group-name argument specifies the cross-connect group name, a case-sensitivesting of 1 to 31 characters. If you do not specify a group, this commanddisplays information about all cross-connect groups.

verbose: Displaysdetailed information. If you do not specify this keyword, the command displaysbrief information.

Examples

# Display brief information about allcross-connect groups.

<Sysname> display l2vpnxconnect-group

Total number of cross-connections: 3,0 up, 3 down, 0 admin down

Xconnect-group NameConnection ID MTU State

abc0 1500 Down

vpn12 1500 Down

vpn21 1500 Down

Table 21 Command output

Field

Description

Connection ID

Cross-connect ID.

State

Cross-connect group state: Up, Down, or Admin down. Admin down indicates that the cross-connect group has been shut down by using the shutdown command.

# Display detailed information about allcross-connect groups.

<Sysname> display l2vpnxconnect-group verbose

Xconnect-group Name: vpnb

Connection of auto-discovery: Site1, Remote Site 2

Connection ID : 0

State : Up

MTU : 1500

PW Redundancy : Slave

BGP PWs:

Peer RemoteSite Link ID State Flag

192.3.3.3 2 1Up Main

ACs:

AC LinkID State Type

XGE1/0/4 srv10 Up Manual

Xconnect-group Name: vpna

Connection Name : vpna

Connection ID : 0

State : Up

MTU : 1500

PW Redundancy : Slave

EVPN PWs:

Peer Remote ServiceID Link ID State Flag

3.3.3.32 0 Up Main

ACs:

AC LinkID State Type

GE0/0/1 srv21 Up Manual

Table 22 Command output

Field

Description

Xconnect-group Name

Cross-connect group name.

Description

Description for the cross-connect group. If no description is configured, this field is not displayed.

Connection Name

Cross-connect name.

Connection of auto-discovery

Auto-discovery cross-connect.

Site

Local site ID.

Remote site

Remote site ID.

Connection ID

Cross-connect ID.

State

Cross-connect group state: Up, Down, or Admin down. Admin down indicates that the cross-connect group has been shut down by using the shutdown command.

PW Redundancy

PW redundancy mode:

·Slave—Master/slave mode and the local PE operates as the slave node.

·Master—Master/slave mode and the local PE operates as the master node.

EVPN PWs

EVPN PW information.

State

PW state: Up, Down, Blocked, or Defect.

Type

PW type:

·Main—Primary PW.

·BackUp—Backup PW.

AC

AC type: Ethernet service instance on a Layer 2 interface.

Related commands

xconnect-group

encapsulation

Use encapsulation to configure a packet match criterion for an Ethernet serviceinstance.

Use undo encapsulation to restore the default.

Syntax

encapsulation s-vid vlan-id [ only-tagged ]

encapsulation s-vid vlan-id-list

encapsulation { default | tagged | untagged }

undo encapsulation

Default

No packet match criterion is configured foran Ethernet service instance.

Views

Ethernet service instance view

Predefined user roles

network-admin

Parameters

s-vid: Matches packetswith the specified outer VLAN IDs.

only-tagged: Matchestagged packets. If the outer VLAN is not the PVID, the matching result does notdiffer, whether or not you specify the only-taggedkeyword. If the outer VLAN is the PVID, the matching result depends on whetheror not the only-tagged keyword isspecified.

·To match only PVID-tagged packets, specify the only-tagged keyword.

·To match both untagged packets and PVID-taggedpackets, do not specify the only-taggedkeyword.

vlan-id: Specifies aVLAN ID in the range of 1 to 4094.

vlan-id-list: Specifiesa space-separated list of up to eight VLAN items. Each item specifies a VLAN IDor a range of VLAN IDs in the format of start-VLAN-ID to end-VLAN-ID. The valuerange for VLAN IDs is 1 to 4094.

default: Matchespackets that do not match any other Ethernet service instances on theinterface. On an interface, you can configure this criterion only in oneEthernet service instance. The Ethernet service instance matches all packets ifit is the only instance on the interface.

tagged: Matches any packetsthat have a VLAN tag.

untagged: Matches anypackets that do not have a VLAN tag.

Usage guidelines

When you configure the encapsulationdefault match criterion for an Ethernet serviceinstance on a Layer 2 Ethernet interface or Layer 2 aggregate interface, followthese restrictions and guidelines:

·If the access mode of the Ethernet serviceinstance is VLAN, you cannot create other Ethernet service instances on theinterface.

·If the access mode of the Ethernet serviceinstance is Ethernet, you can create other Ethernet service instances on theinterface. Packets received on the interface are matched against the encapsulationdefault match criterion only when they do notmatch any other Ethernet service instances.

The match criteria of different Ethernetservice instances cannot overlap on an interface.

An Ethernet service instance can containonly one match criterion. To change the match criterion, first execute the undo encapsulation command to remove the original criterion. When you remove the matchcriterion in an Ethernet service instance, the mapping between the serviceinstance and the cross-connect is removed automatically.

Examples

# Configure Ethernet service instance 1 on Ten-GigabitEthernet 1/0/1 to match packetsthat have an outer VLAN ID of 111.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] service-instance 1

[Sysname-Ten-GigabitEthernet1/0/1-srv1] encapsulations-vid 111

Related commands

display l2vpn service-instance

l2vpn enable

Use l2vpn enableto enable L2VPN.

Use undo l2vpn enable to disable L2VPN.

Syntax

l2vpn enable

undo l2vpn enable

Default

L2VPN is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

You must enable L2VPN before configuringother L2VPN settings.

Examples

# Enable L2VPN.

<Sysname> system-view

[Sysname] l2vpn enable

l2vpn switchover

Use l2vpn switchover to switch traffic from a PW to its backup or primary PW.

Syntax

l2vpn switchover peer ip-address pw-id pw-id

Views

User view

Predefined user roles

network-admin

Parameters

peer ip-address:Specifies the LSR ID of the peer PE.

pw-id pw-id: Specifies a PW by its ID in the range of 1 to 4294967295.

Usage guidelines

The specified LSR ID and PW ID uniquelyidentify a PW.

If a PW has a backup PW or primary PW, thiscommand switches traffic from the PW to the backup or primary PW. If the PWdoes not have a backup or primary PW, this command does not perform theswitchover.

Examples

# Switch traffic from PW 100 destined for3.3.3.3 to its backup PW.

<Sysname> l2vpn switchover peer3.3.3.3 pw-id 100

mtu

Use mtu to setan MTU for PWs established on a cross-connect or auto-discovery cross-connect.

Use undo mtu torestore the default.

Syntax

mtu size

undo mtu

Default

A PW has an MTU of 1500 bytes.

Views

Cross-connect view

Auto-discovery cross-connect group view

Predefined user roles

network-admin

Parameters

size: Specifies an MTUvalue. The value range is 300 to 65535.

Usage guidelines

The specified MTU applies to all PWsestablished in the cross-connect view or the auto-discovery cross-connect groupview.

The MTU specifies the maximum packetlength, including the control word, PW label, and network layer packet.

For an LDP PW to come up, the PEs at thetwo ends of the PW must have the same MTU.

Examples

# Set the MTU to 1400 bytes forcross-connect ac2pw in cross-connect group vpn1.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection ac2pw

[Sysname-xcg-vpn1-ac2pw] mtu 1400

# Set the MTU to 1400 bytes for theauto-discovery cross-connect in cross-connect group bbb.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] mtu 1400

Related commands

display l2vpn xconnect-group

peer

Use peer toconfigure a PW for a cross-connect and enter cross-connect PW view, or enterthe view of an existing cross-connect PW.

Use undo peer to delete a PW for a cross-connect.

Syntax

peer ip-address pw-id pw-id [ ignore-standby-state | in-label label-value out-label label-value ] [ pw-class class-name | tunnel-policytunnel-policy-name ] *

undo peer ip-address pw-id pw-id

Default

No PWs exist for a cross-connect.

Views

Cross-connect view

Predefined user roles

network-admin

Parameters

ip-address: Specifiesthe LSR ID of the peer PE.

pw-id pw-id: Specifies a PW ID for the PW, in the range of 1 to 4294967295.

ignore-standby-state:Ignores the PW active/standby status bit received from the remote PE. Thiskeyword is applicable only to LDP PWs.

in-label label-value: Specifies the incoming label of the PW. The value range is 16 to1023.

out-label label-value: Specifies the outgoing label of the PW. The value range is 16 to1048575.

pw-class class-name: Specifies a PW class by its name, a case-sensitive string of 1 to19 characters. You can specify a PW class to configure the PW dataencapsulation type and control word. If you do not specify a PW class, the PWdata encapsulation type is determined by the interface type. The control wordfeature is not supported for PW data encapsulation types that do not requireusing control word.

tunnel-policy tunnel-policy-name: Specifies a tunnel policy by its name, a case-sensitive string of1 to 19 characters. If you do not specify a tunnel policy, the default tunnelpolicy is used.

Usage guidelines

A PE uses the PW Preferential Forwarding Statusbit in LDP messages to advertise the local PWs' active/standby states. When thebit is set, it indicates that the local PW is in standby state. When the bit iscleared, it indicates that the local PW is in active state.

In master/slave mode of PW redundancy, theslave PE selects the forwarding PW among the set of redundant PWs based on the statusbit received from the master PE. If you specify the ignore-standby-state keyword, the PE ignores the status bit received from the master PEand uses the primary PW to forward packets as long as the primary PW is up.

The PW ID for a PW must be the same on thePEs at the two ends of the PW.

On a PE, the LSR ID of the peer PE and thePW ID uniquely identify a PW. The peer LSR ID and PW ID combination of a PWmust be unique among all VPLS PWs and cross-connect PWs.

To create a static PW, you must specify theincoming and outgoing labels. To enter the view of an existing static PW, youdo not need to specify the incoming and outgoing labels.

If you do not specify the incoming andoutgoing labels when you create a new PW, LDP is used to create the PW.

To create a multi-segment PW, execute the peer command twice to create two cross-connect PWs in the samecross-connect view. The two PWs form a multi-segment PW.

Multi-segment PW and backup PW are mutuallyexclusive with each other . If you have configured a multi-segment PW, youcannot configure a backup PW for the two PWs that form the multi-segment PW. Ifyou have configured a backup PW for a PW, the PW cannot form a multi-segmentPW. For information about configuring a backup PW, see the backup-peer command.

When you add a static PW, you must make surethat static PW uses a different incoming label than an existing static LSP orstatic CRLSP. If the incoming label is duplicated, you cannot make the staticPW take effect by changing the incoming label of the static LSP or CRLSP.Instead, you must delete the static PW and then reconfigure the static PW withan unused incoming label.

Examples

# Configure an LDP PW destined to 4.4.4.4for cross-connect pw2pw in cross-connect group vpn1 and enter cross-connect PW view. The PW ID is 200.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection pw2pw

[Sysname-xcg-vpn1-pw2pw] peer 4.4.4.4pw-id 200

[Sysname-xcg-vpn1-pw2pw-4.4.4.4-200]

# Configure a static PW destined to 5.5.5.5for cross-connect pw2pw in cross-connect group vpn1 and enter cross-connect PW view. The static PW hasan ID of 200, an incoming label of 100, and an outgoing label of 200.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection pw2pw

[Sysname-xcg-vpn1-pw2pw] peer 5.5.5.5pw-id 200 in-label 100 out-label 200

[Sysname-xcg-vpn1-pw2pw-5.5.5.5-200]

Related commands

display l2vpn ldp

display l2vpn pw

pw-class

tunnel-policy

peer signaling

Use peer signaling to enable BGP to exchange label block information with thespecified peer or peer group.

Use undo peer signaling to disableBGP to exchange label block information with the specified peer or peer group.

Syntax

peer { group-name | ip-address [ mask-length ] } signaling [ non-standard ]

undo peer { group-name | ip-address [ mask-length ] } signaling

Default

BGP can exchange label block informationwith an L2VPN peer or peer group through RFC 4761 MP_REACH_NLRI.

Views

BGP L2VPN address family view

Predefined user roles

network-admin

Parameters

group-name: Specifies apeer group by its name, a case-sensitive string of 1 to 47 characters. Thespecified peer group must have been created.

ip-address: Specifies apeer by its IP address. The specified peer must have been created.

mask-length: Specifies amask length in the range of 0 to 32. You can use the ip-address and mask-length argumentstogether to specify a subnet. If you specify a subnet, this command enables BGPto exchange label block information with all dynamic peers in the subnet.

non-standard: Uses draft-kompella-ppvpn-l2vpn-03MP_REACH_NLRI to exchange label block information. If you do not specify thiskeyword, RFC 4761 MP_REACH_NLRI is used to exchange label block information.

Usage guidelines

L2VPN uses MP-BGP to exchange label blockswhen creating a BGP PW.

To enable BGP to exchange label blocks withthe specified peers through RFC 4761 MP_REACH_NLRI, you can also use the peer enable command in BGP L2VPN address family view. To disable thecapability, use the undo peer signalingcommand.

Examples

# Enable BGP to exchange label blockinformation with the peer 3.3.3.9 through draft-kompella-ppvpn-l2vpn-03 MP_REACH_NLRI.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-familyl2vpn

[Sysname-bgp-default-l2vpn] peer 3.3.3.9signaling non-standard

Related commands

display bgp l2vpn signaling

policy vpn-target

Use policy vpn-target to enable route target-based filtering of incoming BGP L2VPNinformation.

Use undo policy vpn-target to disable route target-based filtering of incoming BGP L2VPNinformation.

Syntax

policy vpn-target

undo policy vpn-target

Default

Route target-based filtering of incomingBGP L2VPN information is enabled.

Views

BGP L2VPN address family view

Predefined user roles

network-admin

Usage guidelines

If route target-based filtering is enabled,L2VPN accepts only the incoming BGP L2VPN information whose export route targetattribute matches the local import route target attribute. If routetarget-based filtering is disabled, L2VPN accepts all incoming BGP L2VPNinformation.

To establish a BGP PW between two MP-IBGPpeers that use a route reflector, you must disable route target-based filteringof incoming BGP L2VPN information on the route reflector.

Examples

# Disable route target-based filtering ofincoming BGP L2VPN information.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-familyl2vpn

[Sysname-bgp-default-l2vpn] undopolicy vpn-target

pw-class (auto-discovery cross-connect group view)

Use pw-class tospecify a PW class for an auto-discovery cross-connect group.

Use undo pw-class to restore the default.

Syntax

pw-class class-name

undo pw-class

Default

No PW class is specified.

Views

Auto-discovery cross-connect group view

Predefined user roles

network-admin

Parameters

class-name: Specifies aPW class by its name, a case-sensitive string of 1 to 19 characters.

Usage guidelines

The specified PW class will be used toestablish all PWs in the auto-discovery cross-connect group.

Examples

# Specify a PW class named pw100 for auto-discovery cross-connect group bbb.

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100] quit

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] pw-class pw100

Related commands

control-word enable

display l2vpn pw-class

pw-class

pw-type

pw-class (system view)

Use pw-class tocreate a PW class and enter its view, or enter the view of an existing PWclass.

Use undo pw-class to delete a PW class.

Syntax

pw-class class-name

undo pw-class class-name

Default

No PW classes exist.

Views

System view

Predefined user roles

network-admin

Parameters

class-name: Specifies aname for the PW class, a case-sensitive string of 1 to 19 characters.

Usage guidelines

In PW class view, you can configure PWattributes such as the PW data encapsulation type and whether to enable controlword. You can configure PWs to use the same PW class to simplify PW attributeconfiguration.

Examples

# Create a PW class named pw100 and enter PW view.

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100]

Related commands

control-word enable

display l2vpn pw-class

pw-type

pw-redundancy

Use pw-redundancy to configure the PW redundancy mode.

Use undo pw-redundancy to restore the default.

Syntax

pw-redundancy { independent | master }

undo pw-redundancy

Default

The PW redundancy mode is master/slave andthe local PE operates as the slave node.

Views

Cross-connect view

Predefined user roles

network-admin

Parameters

independent: Uses theindependent PW redundancy operation mode.

master: Uses themaster/slave PW redundancy mode and configures the local PE as the master node.

Usage guidelines

This command is applicable only to LDP PWs.

LDP PWs support the independent andmaster/slave PW redundancy operation modes.

·Independent mode—The two PEs of a PW use LDP to advertise their respective PWactive/standby state to each other. A PW can forward traffic only when it is upand active at both ends of the PW. In this mode, make sure both PEs of a PW usethe independent PW redundancy operation mode.

·Master/slave mode—One PE of a PW operates as the master node and the other PEoperates as the slave node. The master PE determines the PW active/standbystate and then uses LDP to advertise the PW state to the slave PE. The slave PEuses the same PW state as the master PE based on the information received fromthe master PE. In this way, the master and slave PEs for the set of redundantPWs can use the same active PW to forward user packets.

A slave node does not advertise the PWactive/standby state to the master node, and the master node ignores the PWactive/standby state received from the slave nodes.

Do not configure the pw-redundancy master command on thelocal PE if the remote PE does not support the master/slave PW redundancy mode.

Examples

# Configure the master/slave PW redundancymode for cross-connect pw2pw of cross-connect group vpn1 and configure the local PE as the master node.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection pw2pw

[Sysname-xcg-vpn1-pw2pw] pw-redundancymaster

Related commands

backup-peer

display l2vpn ldp

display l2vpn pw

peer

pw-type

Use pw-type tospecify a PW data encapsulation type for a PW class.

Use undo pw-typeto restore the default.

Syntax

pw-type { ethernet | vlan }

undo pw-type

Default

The PW data encapsulation type is VLAN.

Views

PW class view

Predefined user roles

network-admin

Parameters

ethernet: Specifies thePW data encapsulation type as Ethernet.

vlan: Specifies the PWdata encapsulation type as VLAN.

Usage guidelines

This command takes effect only when the ACtype is Ethernet.

When the PW data encapsulation type isEthernet, P-tag is not transferred on a PW.

·For a packet from a CE:

¡If thepacket contains a P-tag, the PE removes the P-tag, and adds a PW label and anouter tag into the packet before forwarding it.

¡Ifthe packet contains no P-tag, the PE directly adds a PW label and an outer taginto the packet before forwarding it.

·For a packet to a CE:

¡Ifthe access mode is configured as VLAN by using the ac interface command, thePE adds a P-tag into the packet before sending it to the CE.

¡Ifthe access mode is configured as Ethernet by using the ac interface command, thePE directly sends the packet to the CE.

You cannot rewrite or remove existingtags.

When the PW data encapsulation type isVLAN, packets transmitted over a PW must carry a P-tag.

·For a packet from a CE:

¡Ifthe peer PE does not require the ingress to rewrite the P-tag, the PE keeps theP-tag unchanged for the packet, and then encapsulates the packet. If the packetcontains no P-tag, the PE adds a null label (the label value is 0) into thepacket, and then encapsulates the packet.

¡Ifthe peer PE requires the ingress to rewrite the P-tag, the PE changes the P-tagto the expected VLAN tag (the tag value might be 0), and then adds a PW labeland an outer tag into the packet. If the packet contains no P-tag, the PE addsa VLAN tag expected by the peer PE (the tag value might be 0), and then adds aPW label and an outer tag into the packet.

·For a packet to a CE:

¡Ifthe access mode is configured as VLAN by using the ac interface command, thePE rewrites or retains the P-tag before forwarding the packet.

¡Ifthe access mode is configured as Ethernet by using the ac interface command, thePE removes the P-tag before forwarding the packet.

Examples

# Configure the PW data encapsulation typeas Ethernet.

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100] pw-type ethernet

Related commands

ac-interface

display l2vpn pw-class

revertive

Use revertive tospecify the switchover mode and set the switchover wait time.

Use undo revertive to restore the default.

Syntax

revertive { wtr wtr-time | never }

undo revertive { wtr | never }

Default

The switchover mode is revertive and theswitchover wait time is 0 seconds. When the primary PW recovers, traffic isimmediately switched from the backup PW to the primary PW.

Views

Cross-connect view

Predefined user roles

network-admin

Parameters

wtr wtr-time:Specifies the switchover mode as revertive and specifies the wait time in therange of 0 to 3600 seconds. When the primary PW recovers, the PE waits for thespecified time before switching traffic from the backup PW to the primary PW.

never: Specifies theswitchover mode as non-revertive. After the primary PW recovers, traffic is notswitched from the backup PW to the primary PW.

Examples

# Specify the revertive mode and set theswitchover wait time to 120 seconds for cross-connect ac2pwin cross-connect group vpn1.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection ac2pw

[Sysname-xcg-vpn1-ac2pw] revertivewtr 120

Related commands

display l2vpn pw

route-distinguisher

Use route-distinguisher to configure a route distinguisher (RD) for a BGP cross-connectgroup.

Use undo route-distinguisher to restore the default.

Syntax

route-distinguisher route-distinguisher

undo route-distinguisher

Default

No RD is configured for a BGP cross-connectgroup.

Views

Auto-discovery cross-connect group view

Predefined user roles

network-admin

Parameters

route-distinguisher: Specifiesan RD, a string of 3 to 21 characters. An RD can be in one of the followingformats:

·16-bit AS number:32-bit user-defined number. Forexample, 101:3.

·32-bit IP address:16-bit user-defined number. Forexample, 192.168.122.15:1.

·32-bit AS number:16-bit user-defined number, where theAS number must be equal to or greater than 65536. For example, 65536:1.

Usage guidelines

MPLS L2VPN uses RDs to differentiate thesites with the same site ID but in different VPNs.

BGP adds the configured RD before the siteID. The RD and the site ID uniquely identify a VPN site.

You cannot configure the same RD fordifferent BGP cross-connect groups.

To modify an RD, execute the undoroute-distinguisher command to remove the RD,and then execute the route-distinguishercommand.

Examples

# Configure the RD 22:2for BGP cross-connect group bbb.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] route-distinguisher22:2

rr-filter

Use rr-filter tocreate a route reflector (RR) reflection policy.

Use undo rr-filter to restore the default.

Syntax

rr-filter ext-comm-list-number

undo rr-filter

Default

An RR does not filter reflected L2VPNinformation.

Views

BGP L2VPN address family view

Predefined user roles

network-admin

Parameters

ext-comm-list-number:Specifies an extended community list number in the range of 1 to 65535.

Usage guidelines

After this command is executed, only theL2VPN information that is permitted by the specified extended community list isreflected.

By configuring different RR reflectionpolicies on RRs in a cluster, you can implement load balancing among the RRs.

For more information about extendedcommunity lists, see Layer 3—IP Routing ConfigurationGuide.

Examples

# Configure the RR to reflect only the BGPL2VPN information that is permitted by extended community list 10.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-familyl2vpn

[Sysname-bgp-default-l2vpn] rr-filter10

Related commands

ip extcommunity-list (Layer 3—IP Routing Command Reference)

service-instance

Use service-instance to create an Ethernet service instance on an interface and enterits view, or enter the view of an existing Ethernet service instance.

Use undo service-instance to delete an Ethernet service instance on an interface.

Syntax

service-instance instance-id

undo service-instance instance-id

Default

No Ethernet service instances exist.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

Parameters

instance-id: Specifiesan ID for the Ethernet service instance, in the range of 1 to 4096.

Examples

# Create Ethernet service instance 1 onLayer 2 Ethernet interface Ten-GigabitEthernet 1/0/1, and enterEthernet service instance 1 view.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] service-instance 1

[Sysname-Ten-GigabitEthernet1/0/1-srv1]

Related commands

display l2vpn service-instance

shutdown(cross-connect group view)

Use shutdown todisable a cross-connect group.

Use undo shutdown to enable a cross-connect group.

Syntax

shutdown

undo shutdown

Default

A cross-connect group is enabled.

Views

Cross-connect group view

Predefined user roles

network-admin

Usage guidelines

After you disable a cross-connect group,all cross-connects in the group cannot provide L2VPN services.

Use the shutdowncommand when you want to temporarily disable L2VPN. When a cross-connect groupis disabled, you can still configure the cross-connect group. After theconfiguration, use the undo shutdown commandto enable the cross-connect group. The cross-connect group will provide L2VPNservices using the new settings.

Examples

# Disable cross-connect group vpn2.

<Sysname> system-view

[Sysname] xconnect-group vpn2

[Sysname-xcg-vpn2] shutdown

Related commands

display l2vpn xconnect-group

site

Use site tocreate a local site and enter its view, or enter the view of an existing localsite.

Use undo site todelete a local site.

Syntax

site site-id [ range range-value ] [ default-offset default-offset ]

undo site site-id

Default

No sites exist.

Views

Auto-discovery cross-connect group view

Predefined user roles

network-admin

Parameters

site-id: Specifies alocal site ID in the range of 0 to 256.

range range-value:Specifies the maximum number of sites in a VPN, in the range of 2 to 257. Thedefault value is 10.

default-offset default-offset: Specifies the start site ID, 0 or 1. The default value is 0.

Usage guidelines

The range range-value and default-offset default-offset options determine the label block of the site.

·If you execute the site command with the range-valueof range1, a label block with LR of range1 andLO of default-offset is assigned to the site.

·If you execute another site command with range-value of range2 (range2 is larger than range1), a second label block with LR of range2 to range1 and LO being range1 + default-offset is assigned to the site.

For example, if you execute the followingcommands, three label blocks LB1/0/10, LB2/10/12, and LB3/22/14 are assigned tosite 1. LB1, LB2, and LB3 are automatically selected.

site 1 range 10 default-offset 0

site 1 range 22

site 1 range 36

You can create multiple local sites for across-connect group.

You can use the site command to increase the range value for an existing site. Youcannot decrease the range value for an existing site with the site command. To decrease the range value, execute the undo site command to delete the site and then execute the site command.

Select a large range value to reduce futuremodifications for VPN expansion.

You cannot modify the default-offset for a site with the sitecommand. To modify it, execute the undo sitecommand to delete the site and then execute the site command.

Examples

# Create site 1, configure the VPN tocontain a maximum of 30 sites, set the start site ID to 0 for cross-connect groupbbb, and enter site view.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] site 1 range30 default-offset 0

[Sysname-xcg-bbb-auto-1]

Related commands

display l2vpn pw

display l2vpn xconnect-group

snmp-agenttrap enable l2vpn

Use snmp-agent trap enable l2vpn to enable SNMP notifications for L2VPN PW.

Use undo snmp-agent trap enable l2vpn todisable SNMP notifications for L2VPN PW.

Syntax

snmp-agent trap enable l2vpn [ ccc-up-down | flow-label-nonsupport| pw-delete | pw-switch | pw-up-down ] *

undo snmp-agent trap enable l2vpn [ ccc-up-down | flow-label-nonsupport | pw-delete | pw-switch | pw-up-down ] *

Default

SNMP notifications for L2VPN PW are disabled.

Views

System view

Predefined user roles

network-admin

Parameters

ccc-up-down: Enables CircuitCross Connect (CCC) notifications.

flow-label-nonsupport:Enables L2VPN flow label not supported notifications.

pw-delete: Enables PWdeletion notifications.

pw-switch: Enables PW primary/backupswitchover notifications.

pw-up-down: Enables PWup-down notifications.

Usage guidelines

This feature enables L2VPN to generate SNMPnotifications when the device does not support L2VPN flow labels, or CCC, PWdeletions, PW status changes, or PW switchovers occur. For L2VPN eventnotifications to be sent correctly, you must also configure SNMP on the device.For more information about SNMP configuration, see the network management and monitoringconfiguration guide for the device.

If you do not specify a notification type,this command enables all types of notifications for L2VPN PW.

Examples

# Enable PW up-down notifications.

<Sysname> system-view

[Sysname] snmp-agent trap enablel2vpn pw-up-down

Related commands

display snmp-agent trap-list (Network Management and Monitoring CommandReference)

tunnel-policy (auto-discoverycross-connect view)

Use tunnel-policy to specify a tunnel policy for an auto-discovery cross-connect.

Use undo tunnel-policy to restore the default.

Syntax

tunnel-policy tunnel-policy-name

undo tunnel-policy

Default

No tunnel policy is specified.

Views

Auto-discovery cross-connect view

Predefined user roles

network-admin

Parameters

tunnel-policy-name:Specifies a tunnel policy by its name, a case-sensitive string of 1 to 19characters.

Usage guidelines

The PWs on the auto-discovery cross-connectuse the specified tunnel policy to select public tunnels.

If you do not specify a tunnel policy or specifya nonexistent tunnel policy, the default tunnel policy applies. The defaulttunnel policy selects only one public tunnel for a PW in this order: LSPtunnel, CRLSP tunnel.

Examples

# Specify tunnel policy policy1 for the auto-discovery cross-connect incross-connect group bbb.

<Sysname> system-view

[Sysname] tunnel-policy policy1

[Sysname-tunnel-policy-policy1] quit

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] site 2 range10 default-offset 0

[Sysname-xcg-bbb-auto-2] connectionremote-site-id 3

[Sysname-xcg-bbb-auto-2-3] tunnel-policypolicy1

Related commands

tunnel-policy (systemview)

vpn-target

Use vpn-targetto configure route targets for a cross-connect group.

Use undo vpn-target to remove the specified or all route targets for a cross-connectgroup.

Syntax

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

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

Default

No route targets are configured for a cross-connectgroup.

Views

Auto-discovery cross-connect group view

Predefined user roles

network-admin

Parameters

vpn-target&<1-8>: Specifies a space-separated list of a maximum of eight routetargets.

A route target is a string of 3 to 21characters in one of the following formats:

·16-bit AS number:32-bit user-defined number. Forexample, 101:3.

·32-bit IP address:16-bit user-defined number. Forexample, 192.168.122.15:1.

·32-bit AS number:16-bit user-defined number, where theAS number must be equal to or greater than 65536. For example, 65536:1.

both: Uses thespecified route targets as both import targets and export targets. The both keyword is used when you do not specify any of both, export-extcommunity,and import-extcommunity.

export-extcommunity:Uses the specified route targets as export targets.

import-extcommunity:Uses the specified route targets as import targets.

all: Removes all routetargets.

Usage guidelines

A local PE sets the route targets as exporttargets in BGP update messages when it advertises L2VPN information through theupdate messages to a remote peer. The peer uses its import targets to match thereceived export targets. If a match is found, the peer accepts the L2VPNinformation.

If you repeat this command, all theconfigured route targets take effect.

Examples

# Configure import route targets as 10:1100:1 1000:1 and export route targets as 20:1 200:1 2000:1 for BGP cross-connectgroup bbb.

<Sysname> system-view

[Sysname] xconnect-group bbb

[Sysname-xcg-bbb] auto-discovery bgp

[Sysname-xcg-bbb-auto] vpn-target10:1 100:1 1000:1 import-extcommunity

[Sysname-xcg-bbb-auto] vpn-target20:1 200:1 2000:1 export-extcommunity

xconnect-group

Use xconnect-group to create a cross-connect group and enter its view, or enter theview of an existing cross-connect group.

Use undo xconnect-group to delete a cross-connect group.

Syntax

xconnect-group group-name

undo xconnect-group group-name

Default

No cross-connect groups exist.

Views

System view

Predefined user roles

network-admin

Parameters

group-name: Specifies aname for the cross-connect group, a case-sensitive string of 1 to 31 charactersexcluding hyphens.

Usage guidelines

L2VPN can create multiple LDP, BGP, andstatic PWs for a cross-connect group.

Examples

# Create a cross-connect group named vpn1 and enter cross-connect group view.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1]

Related commands

display l2vpn xconnect-group

Support - 10-MPLS L2VPN commands (2024)
Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 5898

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.