08-MPLS Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command References-Release7374-6W73108-MPLS Command Reference
08-MPLS L2VPN commands
Title Size Download
08-MPLS L2VPN commands 153.29 KB

MPLS L2VPN commands

ac interface

Use ac interface to bind an AC to a cross-connect.

Use undo ac interface to remove the binding.

Syntax

ac interface interface-type interface-number [ service-instance instance-id ] [ access-mode { ethernet | vlan } ]

undo ac interface interface-type interface-number [ service-instance instance-id ]

Default

No AC is bound to a cross-connect.

Views

Cross-connect view

Predefined user roles

network-admin

mdc-admin

Parameters

interface-type interface-number: Specifies an interface.

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

access-mode: Specifies the access mode. By default, the access mode is VLAN for a Layer 3 Ethernet subinterface, a VLAN interface, or an Ethernet service instance, and the access mode is Ethernet for other interfaces.

ethernet: Specifies the Ethernet access mode.

vlan: Specifies the VLAN access mode.

Usage guidelines

An AC can be a Layer 3 interface or an Ethernet service instance on a Layer 2 Ethernet interface.

After you bind a Layer 3 interface or an Ethernet service instance to a cross-connect, packets received from the interface or those matching the Ethernet service instance are forwarded to the bound PW or another AC.

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

·     VLAN access mode—Ethernet frames received from the AC must carry a VLAN tag in the Ethernet header. The PE treats the VLAN tag as a P-tag assigned by the service provider. 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, the PE treats it as a U-tag and ignores it. Ethernet frames sent to the AC do not carry the P-tag.

The Ethernet service instance specified in this command must have match criteria configured by encapsulation.

Examples

# Configure Ethernet service instance 200 on the Layer 2 interface GigabitEthernet 3/0/1 to match packets with an outer VLAN tag of 200, and bind the Ethernet service instance to the cross-connect actopw in the cross-connect group vpn1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] service-instance 200

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

[Sysname-GigabitEthernet3/0/1-srv200] quit

[Sysname-GigabitEthernet3/0/1] quit

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection actopw

[Sysname-xcg-vpn1-actopw] ac interface GigabitEthernet 3/0/1 service-instance 200

Related commands

·     connection

·     display l2vpn interface

·     display l2vpn service-instance

·     encapsulation

·     pw-type

connection

Use connection to create a cross-connect and enter cross-connect view. If the specified cross-connect has been created, this command places you into cross-connect view.

Use undo connection to remove a cross-connect.

Syntax

connection connection-name

undo connection connection-name

Default

No cross-connect is created.

Views

Cross-connect group view

Predefined user roles

network-admin

mdc-admin

Parameters

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

Usage guidelines

A cross-connect is a point-to-point connection. You can perform the following operations in cross-connect view:

·     Execute ac interface and peer to connect an AC to a PW, so the PE can forward packets between the AC and the PW.

·     Execute ac interface twice to connect two ACs, so the PE can forward packets between the two ACs.

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

Examples

# Create cross-connect ac2pw for cross-connect group vpn1 and enter cross-connect view.

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection ac2pw

[Sysname-xcg-vpn1-ac2pw]

description

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

Use undo description to remove the description of a cross-connect group.

Syntax

description text

undo description

Default

No description is configured for a cross-connect group.

Views

Cross-connect group view

Predefined user roles

network-admin

mdc-admin

Parameters

text: Configures a description, a case-sensitive string of 1 to 80 characters.

Examples

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

<Sysname> system-view

[Sysname] xconnect-group vpn2

[Sysname-xcg-vpn2] description vpws for vpn2

Related commands

display l2vpn xconnect-group

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

mdc-admin

mdc-operator

Parameters

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

pw-id pw-id: Displays LDP PW label information for the PW specified by its PW ID. The PW ID is in the range of 1 to 4294967295. If you specify peer ip-address without this option, the command displays all LDP PW label information advertised by the peer PE.

xconnect-group group-name: Displays LDP PW label information for the cross-connect group specified by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a cross-connect group, this command displays LDP PW label information for all cross-connect groups.

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Examples

# Display brief information about all LDP PW labels.

<Sysname> display l2vpn ldp

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

 

Peer            PW ID/VPLS ID         In/Out Label    State Owner

192.2.2.2       1000                  65563/65562     Up    vpn1

Table 1 Command output

Field

Description

PW ID/VPLS ID

This field displays the PW ID for FEC 128, and displays the VPLS ID of the PE for FEC 129. The device supports only FEC 128.

Owner

Cross-connect group of the PW.

 

# Display detailed information about all LDP PW labels.

<Sysname> display l2vpn ldp verbose

Peer: 192.2.2.2        PW ID: 1000

  Xconnect-group: vpn1

  Connection    : ldp

  PW State      : Up

  PW Status Communication: Notification method

  PW ID FEC (Local/Remote):

    PW Type     : VLAN/VLAN

    Group ID    : 0/0

    Label       : 65563/65562

    Control Word: Disabled/Disabled

    VCCV CC Type: -/-

    VCCV CV Type: -/-

    MTU         : 1500/1500

    PW Status   : PW forwarding/PW forwarding

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

VCCV CC Type

VCCV CC type:

·     Control-Word—PWE3 Control Word with 0001b as first nibble.

·     Router-AlertMPLS Router Alert Label.

·     TTL—MPLS PW Label with TTL=1.

For information about VCCV, see MPLS Configuration Guide.

VCCV CV Type

VCCV CV type:

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

·     BFD—Uses BFD to verify PW connectivity. BFD packets use IP/UDP encapsulation (with IP/UDP Headers).

·     Raw-BFD—Uses BFD to verify PW connectivity. BFD packets use PW-ACH encapsulation (without IP/UDP Headers).

 

display l2vpn forwarding

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

Syntax

In standalone mode:

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

In IRF mode:

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

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

ac: Displays AC forwarding information.

pw: Displays PW forwarding information.

xconnect-group group-name: Displays forwarding information for the cross-connect group specified by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a group, this command displays forwarding information for all cross-connect groups.

slot slot-number: Displays cross-connect forwarding information on the specified card. If you do not specify a card, this command displays cross-connect forwarding information on the active MPU. (In standalone mode.)

chassis chassis-number slot slot-number: Displays cross-connect forwarding information for a card on an IRF member device. The chassis-number argument specifies the ID of the IRF member device and the slot-number argument specifies the slot number of the card. If you do not specify this option, the command displays cross-connect forwarding information for the active MPU of the master device. (In IRF mode.)

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Examples

# Display brief AC forwarding information for all cross-connect groups.

<Sysname> display l2vpn forwarding ac

Total number of cross-connections: 3

Total number of ACs: 3

 

AC                               Xconnect-group                  Link ID

GE3/0/5 srv1                     vpn1                            0

GE3/0/5 srv2                     vpn2                            1

GE3/0/6                          vpn3                            0

Table 3 Command output

Field

Description

Total number of cross-connections

Total number of cross-connects, including cross-connects not bound with any AC.

AC

AC type:

·     Layer 3 interface such as GE3/0/6.

·     Ethernet service instance on a Layer 2 interface, such as GE3/0/5 srv1.

 

# Display detailed AC forwarding information for all cross-connect groups.

<Sysname> display l2vpn forwarding ac verbose

Xconnect-group: vpws1

 Connection: actopw

  Interface: GE3/0/3   Service Instance: 1

    Link ID      : 1

    Access Mode  : VLAN

    Encapsulation: s-vid 1 to 16

 Connection: actoac

  Interface: Vlan13

    Link ID      : 0

    Access Mode  : VLAN

  Interface: GE3/0/3   Service Instance: 4

    Link ID      : 1

    Access Mode  : VLAN

    Encapsulation: untagged

Table 4 Command output

Field

Description

Xconnect-group

Cross-connect group name.

Connection

Cross-connect name.

Service Instance

The field is available only when the AC is an Ethernet service instance on a Layer 2 Ethernet 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.

 

# Display brief PW forwarding information for all cross-connect groups.

<Sysname> display l2vpn forwarding pw

Total number of cross-connections: 1

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

 

Xconnect-group                  In/Out Label    NID        Link ID    State

vpn1                            1279/1151       1025       0          Up

vpn1                            1278/1151       1027       1          Up

Table 5 Command output

Field

Description

Total number of cross-connections

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

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, Blocked, or BFD Defect.

Blocked indicates that the PW is a backup PW. BFD Defect indicates BFD has detected a defect on the PW.

 

# Display detailed PW forwarding information for all cross-connect groups.

<Sysname> display l2vpn forwarding pw verbose

Xconnect-group: vpn1

 Connection: ldp

  Link ID: 0

    PW Type         : VLAN                  PW State : Up

    In Label        : 1279                  Out Label: 1151

    MTU             : 1500

    PW Attributes   : Main

    VCCV CC         : Router-Alert

    VCCV BFD        : Fault Detection with BFD

    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        : Fault Detection with BFD

    Tunnel Group ID : 0x160000001

    Tunnel NHLFE IDs: 1027

Table 6 Command output

Field

Description

PW State

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

Blocked indicates that the PW is a backup PW. BFD Defect indicates BFD has detected a defect on the PW.

PW Attributes

PW attribute:

·     Main—The PW is the primary PW.

·     Backup—The PW is the backup PW.

VCCV CC

VCCV CC type:

·     Control word.

·     Route alert.

·     TTL.

VCCV BFD

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

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 interface

Use display l2vpn interface to display L2VPN information for Layer 3 interfaces bound to cross-connects.

Syntax

display l2vpn interface [ xconnect-group group-name | interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

xconnect-group group-name: Displays L2VPN information for Layer 3 interfaces bound to cross-connects in the cross-connect group specified by its name, a case-sensitive string of 1 to 31 characters.

interface-type interface-number: Displays L2VPN information for the specified interface.

Usage guidelines

If you do not specify any parameters, this command displays L2VPN information for all Layer 3 interfaces bound to cross-connects.

The command does not display L2VPN information for Ethernet service instances. To display this information, execute the display l2vpn service-instance command.

Examples

# Display L2VPN information for all Layer 3 interfaces bound to cross-connects.

<Sysname> display l2vpn interface

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

 

Interface                Owner                           Link ID   State    Type

Vlan10                   vpws1                           0         Up       VPWS

Vlan11                   vpws2                           0         Up       VPWS

Table 7 Command output

Field

Description

Owner

Cross-connect group name.

Link ID

Link ID of the AC.

Type

L2VPN type: VPLS or VPWS.

 

Related commands

display l2vpn service-instance

display l2vpn pw

Use display l2vpn pw to display 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

mdc-admin

mdc-operator

Parameters

xconnect-group group-name: Displays PW information for the cross-connect group specified by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a group, this command displays L2VPN PW information for all cross-connect groups.

protocol: Displays L2VPN PW information established by a protocol. If you do not specify a protocol, this command displays L2VPN PW information established by all protocols.

bgp: Displays BGP PW information. This keyword is not supported in the current software version, and is reserved for future support.

ldp: Displays LDP PW information.

static: Displays static PW information.

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Usage guidelines

If you do not specify ldp or static, this command displays both LDP PW and static PW information.

Examples

# Display all PW information.

<Sysname> display l2vpn pw

Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon

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

 

Xconnect-group Name: ldp

Peer            PW ID/Rmt Site    In/Out Label    Proto   Flag  Link ID  State

192.3.3.3       1000              65663/65662     LDP     M     0        Up

Table 8 Command output

Field

Description

Flag

PW flag:

·     MPrimary PW.

·     BBackup PW.

PW ID/Rmt Site

PW ID.

Proto

Protocol that established the PW, LDP or Static.

Link ID

Link ID of the PW.

State

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

Blocked indicates that the PW is a backup PW. Defect indicates BFD has detected a defect on the PW.

 

# Display detailed information about all PWs.

<Sysname> display l2vpn pw verbose

Xconnect-group Name: ldp

 Connection Name: ldp

  Peer: 192.3.3.3        PW ID: 500

    Signaling Protocol  : LDP

    Link ID             : 0          PW State : Up

    In Label            : 65663      Out Label: 65662

    MTU                 : 1500

    PW Attributes       : Main

    VCCV CC             : -

    VCCV BFD            : -

    Tunnel Group ID     : 0x800000160000000

    Tunnel NHLFE IDs    : 1026

Table 9 Command output

Field

Description

Xconnect-group Name

Cross-connect group name.

Connection

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

Peer

IP address of the peer PE of the PW.

PW State

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

Blocked indicates that the PW is a backup PW. Defect indicates BFD has detected a defect on the PW.

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:

·     MainPrimary PW.

·     Backup—Backup PW.

VCCV CC

VCCV CC type:

·     Control word.

·     Route alert.

·     TTL.

VCCV BFD

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

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

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

Syntax

display l2vpn pw-class [ class-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

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

Examples

# Display information about all PW classes.

<Sysname> display l2vpn pw-class

Total number of PW classes: 2

 

PW Class Name       PW Type              Control Word   VCCV CC        VCCV BFD

pw1                 Ethernet             Disabled       Control-Word   Raw-BFD

pw2                 VLAN                 Disabled       Router-Alert   BFD

Table 10 Command output

Field

Description

VCCV CC

VCCV CC type: Control-Word, Route-Alert, or TTL.

VCCV BFD

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

 

Related commands

pw-class

display l2vpn service-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

mdc-admin

mdc-operator

Parameters

interface interface-type interface-number: Displays Ethernet service instance information for the specified Layer 2 Ethernet interface. If you do not specify an interface, this command displays Ethernet service instance information for all Layer 2 Ethernet interfaces.

service-instance instance-id: Displays information about the Ethernet service instance specified by its ID. The instance ID is in the range of 1 to 4096. If you specify interface interface-type interface-number without this option, the command displays information about all Ethernet service instances on the specified Layer 2 Ethernet interface.

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Examples

# Display brief information about all Ethernet service instances.

<Sysname> display l2vpn service-instance

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

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

 

Interface                SrvID Owner                           LinkID State Type

GE3/0/3                  1     vpws1                           1      Up    VPWS

GE3/0/3                  2     vpws2                           1      Up    VPWS

GE3/0/3                  3     vpws3                           1      Up    VPWS

GE3/0/3                  4     vpws4                           1      Up    VPWS

GE3/0/3                  5                                            Up

Table 11 Command output

Field

Description

SrvID

Ethernet service instance ID.

Owner

Name of the cross-connect group bound to the Ethernet service instance. If no cross-connect group is bound, this field is blank.

Type

L2VPN type: VPLS or VPWS.

 

# Display detailed information about all Ethernet service instances on the Layer 2 Ethernet interface GigabitEthernet 3/0/1.

<Sysname> display l2vpn service-instance interface GigabitEthernet 3/0/1 verbose

Interface: GE3/0/1

  Service Instance: 1

    Encapsulation : s-vid 1 to 16

    Xconnect-group: vpws1

    Connection    : actopw

    Link ID       : 1

    State         : Up

  Service Instance: 2

    Encapsulation : s-vid 1001 to 1002 1015 to 1016

                    only-tagged

    Xconnect-group: vpws2

    Connection    : pwtopw

    Link ID       : 1

    State         : Up

Table 12 Command output

Field

Description

Interface

Layer 2 Ethernet interface.

Encapsulation

Match criteria of the Ethernet service instance. If no match criteria are configured, the field is blank.

Xconnect-group

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

Connection

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

 

Related commands

service-instance

display l2vpn xconnect-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

mdc-admin

mdc-operator

Parameters

name group-name: Displays information about the cross-connect group specified by its name, a case-sensitive sting of 1 to 31 characters. If you do not specify a group, this command displays information about all cross-connect groups.

verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.

Examples

# Display brief information about all cross-connect groups.

<Sysname> display l2vpn xconnect-group

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

 

Xconnect-group Name             Connection ID   MTU    State

abc                             0               1500   Down

vpn1                            2               1500   Down

vpn2                            1               1500   Down

Table 13 Command output

Field

Description

Connection ID

Cross-connect ID.

State

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

 

# Display detailed information about all cross-connect groups.

<Sysname> display l2vpn xconnect-group verbose

Xconnect-group Name: ldp

 Description   : ldp-pw

 Connection Name   : ldp

  Connection ID    : 1

  State            : Down

  MTU              : 1500

  LDP PWs:

    Peer            PW ID            Link ID    State

    192.3.3.3       200              1          Down

  ACs:

    AC                               Link ID    State

    GE5/0/24 srv100                  0          Up

Table 14 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 ID

Cross-connect ID.

State

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

AC

AC type:

·     Layer 3 interface such as GE3/0/4.

·     Ethernet service instance on a Layer 2 interface, such as GE3/0/3 srv1.

 

Related commands

xconnect-group

encapsulation

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

Use undo encapsulation to remove a packet match criterion from an Ethernet service instance.

Syntax

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

encapsulation { default | tagged | untagged }

undo encapsulation

Default

No packet match criterion is configured for an Ethernet service instance.

Views

Ethernet service instance view

Predefined user roles

network-admin

mdc-admin

Parameters

s-vid vlan-id: Matches packets with a specific outer VLAN ID. The vlan-id argument specifies a VLAN ID in the range of 1 to 4094.

only-tagged: Matches tagged packets. If the outer VLAN is not the PVID, the matching result does not differ, whether or not you specify the only-tagged keyword. If the outer VLAN is the PVID, the matching result depends on whether or not the only-tagged keyword is specified.

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

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

default: Matches packets that do not match any other Ethernet service instances on the interface. On an interface, you can configure this criterion only in one Ethernet service instance. The Ethernet service instance matches any packets if it is the only instance on the interface.

tagged: Matches any packets that have a VLAN tag.

untagged: Matches any packets that do not have a VLAN tag.

Usage guidelines

An Ethernet service instance can contain only one match criterion. To change the match criterion, you must remove the original criterion first. When you remove the match criterion in an Ethernet service instance, the mapping between the Ethernet service instance and the cross-connect is removed automatically.

The encapsulation { default | tagged | untagged } command is not available for MPLS L2VPN.

Examples

# Configure Ethernet service instance 1 on GigabitEthernet 3/0/1 to match packets that have an outer VLAN ID of 111.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] service-instance 1

[Sysname-GigabitEthernet3/0/1-srv1] encapsulation s-vid 111

Related commands

display l2vpn service-instance

l2vpn enable

Use l2vpn enable to 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

mdc-admin

Usage guidelines

You must enable L2VPN before configuring other L2VPN settings.

Examples

# Enable L2VPN.

<Sysname> system-view

[Sysname] l2vpn enable

mtu

Use mtu to set an MTU for PWs established on a cross-connect.

Use undo mtu to restore the default.

Syntax

mtu mtu

undo mtu

Default

A PW has an MTU of 1500 bytes.

Views

Cross-connect view

Predefined user roles

network-admin

mdc-admin

Parameters

mtu: Specifies an MTU value in the range of 328 to 65535.

Usage guidelines

The PEs at the two ends of an LDP PW must have the same MTU. Otherwise, the PW cannot come up.

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

For an MTU setting to take effect on an interface, you must execute the shutdown command and then the undo shutdown command on the interface.

Examples

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

<Sysname> system-view

[Sysname] xconnect-group vpn1

[Sysname-xcg-vpn1] connection ac2pw

[Sysname-xcg-vpn1-ac2pw] mtu 1400

Related commands

display l2vpn xconnect-group

peer

Use peer to configure a PW for a cross-connect and enter cross-connect PW view. If the specified PW has been created, this command places you into cross-connect PW view.

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

Syntax

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 peer ip-address pw-id pw-id

Default

No PW is configured for a cross-connect.

Views

Cross-connect view

Predefined user roles

network-admin

mdc-admin

Parameters

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

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

in-label label-value: Specifies the incoming label of the PW, in the range of 16 to 1023.

out-label label-value: Specifies the outgoing label of the PW, in the range of 16 to 1023.

pw-class class-name: Specifies a PW class by its name, a case-sensitive string of 1 to 19 characters. You can specify a PW class to configure the PW type and control word. If you do not specify a PW class, the PW type is determined by the interface type. The control word feature is not supported for PW types that do not require using control word.

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

Usage guidelines

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

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

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

The LSR ID of the peer PE and the PW ID uniquely identify a PW, and must not both be the same as those of any VPLS PW or PW bound to a cross-connect.

A static PW must have a different incoming label than an existing static LSP or static CRLSP. If they are the same, the static PW is not available, even if you change the incoming label of the static LSP or the static CRLSP. To make the static PW available, delete the static PW, and reconfigure it with an unused incoming label.

Examples

# Configure an LDP PW destined to 4.4.4.4 for the cross-connect pw2pw in the 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.4 pw-id 200

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

# Configure a static PW destined to 5.5.5.5 for the cross-connect pw2pw in the cross-connect group vpn1 and enter cross-connect PW view. The static PW has an 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.5 pw-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

pw-class

Use pw-class to create a PW class and enter PW class view.

Use undo pw-class to delete a PW class.

Syntax

pw-class class-name

undo pw-class class-name

Default

No PW class is created.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

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

Usage guidelines

In PW class view, you can configure PW attributes such as the PW type and control word. PWs with the same attributes can use the same PW class to simplify configuration.

Examples

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

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100]

Related commands

·     display l2vpn pw-class

·     pw-type

pw-type

Use pw-type to specify a PW type for a PW class.

Use undo pw-type to restore the default.

Syntax

pw-type { ethernet | vlan }

undo pw-type

Default

The PW type is VLAN.

Views

PW class view

Predefined user roles

network-admin

mdc-admin

Parameters

ethernet: Specifies the PW type as Ethernet.

vlan: Specifies the PW type as VLAN.

Usage guidelines

This command takes effect only when the AC type is Ethernet.

Packets are forwarded between the AC and PW as follows according to the PW type:

·     Ethernet—P-tag is not transferred on a PW.

¡     For a packet from a CE:

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

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

¡     For a packet to a CE:

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

-     If the access mode is configured as Ethernet by using the ac interface command, the PE directly sends the packet to the CE.

You cannot rewrite or remove existing tags.

·     VLAN—Packets transmitted over a PW must carry a P-tag.

¡     For a packet from a CE:

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

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

¡     For a packet to a CE:

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

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

Examples

# Configure the PW type as Ethernet.

<Sysname> system-view

[Sysname] pw-class pw100

[Sysname-pw-pw100] pw-type ethernet

Related commands

·     ac-interface

·     display l2vpn pw-class

service-instance

Use service-instance to create an Ethernet service instance on a Layer 2 Ethernet interface and enter Ethernet service instance view.

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

Syntax

service-instance instance-id

undo service-instance instance-id

Default

No Ethernet service instance is created on a Layer 2 Ethernet interface.

Views

Layer 2 Ethernet interface view

Predefined user roles

network-admin

mdc-admin

Parameters

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

Examples

# Create Ethernet service instance 1 on the Layer 2 Ethernet interface GigabitEthernet 3/0/1 and enter Ethernet service instance 1 view.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] service-instance 1

[Sysname-GigabitEthernet3/0/1-srv1]

Related commands

display l2vpn service-instance

shutdown

Use shutdown to disable a cross-connect group.

Use undo shutdown to restore the default.

Syntax

shutdown

undo shutdown

Default

A cross-connect group is enabled.

Views

Cross-connect group view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

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

Use the shutdown command when you want to temporarily disable L2VPN (for example, to modify a cross-connect group). After the modification, use the undo shutdown command to enable the cross-connect group. This will provide L2VPN services using the new settings.

Examples

# Disable the cross-connect group vpn2.

<Sysname> system-view

[Sysname] xconnect-group vpn2

[Sysname-xcg-vpn2] shutdown

Related commands

display l2vpn xconnect-group

xconnect-group

Use xconnect-group to create a cross-connect group and enter cross-connect group view. If the specified group has been created, this command places you into cross-connect group view.

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

Syntax

xconnect-group group-name

undo xconnect-group group-name

Default

No cross-connect group is created.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

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

Usage guidelines

L2VPN can create multiple LDP and static 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

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网