- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-MPLS L2VPN Commands | 140.23 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 a service instance by its ID in the range of 1 to 4096.
access-mode: Specifies the access mode. By default, the access mode for a Layer 3 Ethernet subinterface, a VLAN interface, or a service instance is VLAN, and the access mode for other interfaces is Ethernet.
ethernet: Specifies the Ethernet access mode.
vlan: Specifies the VLAN access mode.
Usage guidelines
An AC can be a Layer 3 interface or a service instance on a Layer 2 interface.
After you bind a Layer 3 interface or a service instance on a Layer 2 interface to a cross-connect, the cross-connect forwards packets received from the Layer 3 interface or matching the service instance on the Layer 2 interface to the bound PW or another AC.
The access mode determines how the PE considers the VLAN tag in Ethernet frames received from the AC and 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 considers 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 considers it as a U-tag and ignores it. Ethernet frames sent to the AC do not carry the P-tag.
The service instance specified in this command must have match criteria configured by encapsulation.
Examples
# Configure 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 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
connection
Use connection to create a cross-connect for a cross-connect group and enter cross-connect view. If the specified cross-connect has been created, the command places you to 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 execute ac interface and peer to connect an AC to a PW, so the PE can forward packets between the AC and the 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]
control-word enable
Use control-word enable to enable the control word function.
Use undo control-word enable to restore the default.
Syntax
control-word enable
undo control-word enable
Default
The control word function is disabled.
Views
PW template view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
The control word field is between the MPLS label stack and the Layer 2 data. It carries control information for the Layer 2 packet, such as the sequence number.
When the PW type is Ethernet or VLAN, the control word field is optional, and you can configure whether to carry the control word field in packets sent on the PW.
If the remote PE supports control word and requires the control word in packets, you must execute the control-word command on the local PE, so the a PW can be established between the PEs.
Examples
# Enable the control word function for the PW template pw100.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100] control-word enable
Related commands
display l2vpn pw-class
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 no peer PE is specified, the 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 in the range of 1 to 4294967295. If peer ip-address is specified 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 no cross-connect group is specified, the command displays LDP PW label information for all cross-connect groups.
verbose: Displays detailed information. Without 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: 4, 3 up, 1 down
Peer PW ID In/Out Label State Owner
192.3.3.3 1000 65563/65562 Up vpn1
Table 1 Command output
Field |
Description |
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 CV Type: -/-
VCCV CC Type: -/-
MTU : 1500/1500
PW Status : PW forwarding/PW forwarding
Table 2 Output description
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 state. · 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 CV Type |
VCCV CV type: · LSPV—Uses MPLS LSP ping to verify PW connectivity. · BFD—Uses BFD to verify PW connectivity. A PW can support multiple CV types. For more information about VCCV, see MPLS Configuration Guide. |
VCCV CC Type |
VCCV CC type: · Control word · Route alert label A PW can support multiple CC types. |
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 no group is specified, the command displays forwarding information for all cross-connect groups.
slot slot-number: Displays cross-connect forwarding information on the specified card. If no card is specified, the command displays cross-connect forwarding information on the 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. (In IRF mode.)
verbose: Displays detailed information. Without 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
XGE6/2/5 srv1 vpn1 0
XGE6/2/5 srv2 vpn2 1
GE6/1/4 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 GE6/1/4. · Layer 2 interface and service instance such as XGE6/2/5 srv1. |
# Display detailed AC forwarding information for all cross-connect groups.
<Sysname> display l2vpn forwarding ac verbose
Xconnect-group: 1
Connection: 1
Interface: XGE3/2/0/3 Service Instance: 1
Link ID : 0
Access Mode : VLAN
Encapsulation: s-vid 1
Xconnect-group: 10
Connection: 1
Interface: XGE3/2/0/3 Service Instance: 10
Link ID : 1
Access Mode : VLAN
Encapsulation: s-vid 10
Table 4 Command output
Field |
Description |
Xconnect-group |
Cross-connect group name |
Connection |
Cross-connect name |
Access Mode |
AC access mode: · VLAN · Ethernet |
Encapsulation |
Match criterion of the service instance. This field is displayed only when the AC type is Layer 2 interface and service instance. |
# 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 65663/65662 1025 0 Up
vpn1 65661/65660 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, or Blocked. Blocked indicates that the PW is a backup 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: 65663
MTU : 1500
PW Attributes : Main
Tunnel Group ID : 0x60000000
Tunnel NHLFE IDs: 1025
Link ID: 1
PW Type : VLAN PW State : Up
In Label : 1278 Out Label: 65663
MTU : 1500
PW Attributes : Main
Tunnel Group ID : 0x160000001
Tunnel NHLFE IDs: 1027
Table 6 Command output
Field |
Description |
PW State |
PW state: Up, Down, or Blocked. Blocked indicates that the PW is the backup PW for redundancy. |
PW Attributes |
PW attribute: · Main—The PW is the primary PW. · Backup—The PW is the backup PW. |
Tunnel Group ID |
ID of the tunnel group for the PW. |
Tunnel NHLFE IDs |
Tunnel NHLFE IDs. 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 name, a case-sensitive string of 1 to 31 characters.
interface-type interface-number: Displays L2VPN information for the specified interface.
Usage guidelines
If no parameters are specified, this command displays L2VPN information for all Layer 3 interfaces bound to cross-connects.
This command does not display L2VPN information for service instances. To view such 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 corresponding to the interface. |
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 ] [ 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 no group is specified, the command displays L2VPN PW information for all cross-connect groups.
ldp: Displays LDP PW information.
static: Displays static PW information.
verbose: Displays detailed information. Without this keyword, the command displays brief information.
Usage guidelines
Without ldp and 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
Xconnect-group Name: vpn1
Peer PW ID In/Out Label Proto Flag Link ID State
192.1.1.1 1000 65663/65662 LDP M 0 Up
192.3.3.3 1000 65661/65660 LDP M 1 Up
Table 8 Command output
Field |
Description |
Flag |
PW flag: · M—Primary PW. · B—Backup PW. |
Link ID |
Link ID of the PW. |
State |
PW state: Up, Down, or Blocked. Blocked indicates the PW is a backup PW. |
# Display detailed information about all PWs.
<Sysname> display l2vpn pw verbose
Xconnect-group Name: vpna
Connection: ldp
Peer: 2.2.2.2 PW ID: 20
Signaling Protocol : LDP
Link ID : 1 PW State : Up
In Label : 1151 Out Label: 65663
Wait to Restore Time: 0 sec
MTU : 1500
PW Attributes : Main
Tunnel Group ID : 0x260000002
Tunnel NHLFE IDs : 1025
Peer: 3.3.3.3 PW ID: 30
Signaling Protocol : LDP
Link ID : 1 PW State : Blocked
In Label : 1150 Out Label: 65663
MTU : 1500
PW Attributes : Backup
Tunnel Group ID : 0x360000003
Tunnel NHLFE IDs : 1027
Table 9 Command output
Field |
Description |
Xconnect-group Name |
Cross-connect group name. |
Connection |
Cross-connect name. |
Peer |
IP address of the peer PE to which the PW is destined. |
PW State |
PW state: Up, Down, or Blocked. Blocked indicates the PW is a backup 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: · Main—Primary PW. · Backup—Backup PW. |
Tunnel Group ID |
ID of the tunnel group for the PW. |
Tunnel NHLFE IDs |
Tunnel NHLFE IDs. 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 template 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 template specified by its name, a case-sensitive string of 1 to 19 characters. If no PW template is specified, the command displays information about all PW templates.
Examples
# Display information about all PW templates.
<Sysname> display l2vpn pw-class
Total number of PW classes: 2
PW Class Name PW Type Control Word
pw1 Ethernet Enabled
pw2 VLAN Disabled
Related commands
pw-class
display l2vpn service-instance
Use display l2vpn service-instance to display 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 service instance information for the specified Layer 2 Ethernet interface. If no interface is specified, the command displays service instance information for all Layer 2 Ethernet interfaces.
service-instance instance-id: Displays information about the service instance specified by its ID in the range of 1 to 4096. If interface interface-type interface-number is specified without this option, the command displays information about all service instances on the specified Layer 2 Ethernet interface.
verbose: Displays detailed information. Without this keyword, the command displays brief information.
Examples
# Display brief information about all service instances.
<Sysname> display l2vpn service-instance
Total number of service-instances: 8, 8 up, 0 down
Total number of ACs: 5, 5 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 10 Command output
Field |
Description |
SrvID |
Service instance ID. |
Owner |
Name of the cross-connect group bound to the service instance. If no cross-connect group is bound, this field displays nothing. |
Type |
L2VPN type: VPLS or VPWS. |
# Display detailed information about all service instances on GigabitEthernet 3/0/3.
<Sysname> display l2vpn service-instance interface gigabitethernet 3/0/3 verbose
Interface: GE3/0/3
Service Instance: 1
Encapsulation : s-vid 1
Xconnect-group: v1
Connection : 1
Link ID : 1
State : Up
Service Instance: 2
Encapsulation : s-vid 2
Xconnect-group: v2
Connection : 2
Link ID : 1
State : Up
Service Instance: 3
Encapsulation : s-vid 3
Xconnect-group: v3
Connection : 3
Link ID : 1
State : Up
Service Instance: 4
Encapsulation : s-vid 4
Xconnect-group: v4
Connection : 4
Link ID : 1
State : Up
Table 11 Command output
Field |
Description |
Interface |
Layer 2 Ethernet interface. |
Encapsulation |
Match criteria of the service instance. If no match criteria are configured, the field displays nothing. |
Xconnect-group |
Name of the cross-connect group to which the service instance belongs. |
Connection |
Name of the cross-connect bound to the 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 no group is specified, the command displays information about all cross-connect groups.
verbose: Displays detailed information. Without 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 12 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 the shutdown command. |
# Display detailed information about all cross-connect groups.
<Sysname> display l2vpn xconnect-group verbose
Xconnect-group: vpn1
Description : xconnect-group for vpn1
Connection : actopw
Connection ID : 0
State : Up
MTU : 1500
Interworking IPv4: Enabled
LDP PWs:
Peer PW ID Link ID State
192.3.3.3 1 1 Up
ACs:
AC Link ID State
Vlan10 0 Up
Table 13 Command output
Field |
Description |
Xconnect-group |
Cross-connect group name. |
Description |
Description for the cross-connect group. If no description is configured, this field is not displayed. |
Connection |
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 the shutdown command. |
Interworking IPv4 |
IPv4 interworking state: Enabled or Disabled. |
AC |
AC type: · Layer 3 interface such as GE3/1/4. · Layer 2 interface and service instance such as GE3/1/3 srv1. |
Related commands
xconnect-group
encapsulation
Use encapsulation to configure match criteria for a service instance.
Use undo encapsulation to remove match criteria for a service instance.
Syntax
encapsulation s-vid vlan-id [ only-tagged ]
encapsulation { default | tagged | untagged }
undo encapsulation
Default
No match criteria are configured for a service instance.
Views
Service instance view
Predefined user roles
network-admin
mdc-admin
Parameters
s-vid vlan-id: Matches packets with a specified outer VLAN ID. The value range for the vlan-id argument is 1 to 4094.
only-tagged: Matches only tagged packets. If this keyword is not specified when the matching VLAN is the default VLAN, packets with the default VLAN ID or without any VLAN ID are all matched. If this keyword is specified when the matching VLAN is the default VLAN, only packets with the default VLAN ID are matched.
default: Specifies the default match criteria.
tagged: Matches tagged packets.
untagged: Matches untagged packets.
Usage guidelines
If service instances configured on an interface have identical match criteria, the service instances match packets with the specified VLAN IDs.
You can create multiple service instances on a Layer 2 Ethernet interface, but only one service instance can use the default match criteria (encapsulation default) to match packets that do not match any other service instance. If only one service instance using the default match criteria is configured on an interface, all packets received on the interface can match the service instance.
Removing the match criteria for a service instance also removes the cross-connect bound to the service instance.
Examples
# Configure service instance 1 on GigabitEthernet 5/0/1 to match packets that have an outer VLAN ID of 111 and an inner VLAN ID of 20 or from 30 to 40.
<Sysname> system-view
[Sysname] interface GigabitEthernet5/0/1
[Sysname-GigabitEthernet5/0/1] service-instance 1
[Sysname-GigabitEthernet5/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 configure an MTU for a cross-connect.
Use undo mtu to restore the default.
Syntax
mtu mtu
undo mtu
Default
A cross-connect 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
When LDP is used to create a PW, the PEs at the two ends of the PW must have the same MTU configured for the cross-connect. Otherwise, the PW cannot come up.
The MTU specifies the maximum packet length, including the control word, PW label, and network layer packet.
Examples
# Configure an MTU of 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 PW view. If the specified PW has been created, the command places you to PW view.
Use undo peer to delete a PW.
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. This option is not supported in the current software version. It is reserved for future support.
out-label label-value: Specifies the outgoing label of the PW, in the range of 16 to 1023. This option is not supported in the current software version. It is reserved for future support.
pw-class class-name: Specifies a PW template by its name, a case-sensitive string of 1 to 19 characters. If no PW template is specified, the PW type is determined by the interface type. The control word function 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 no tunnel policy is specified, 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.
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 be both the same as those of any VPLS PW or cross-connect PW.
Examples
# Configure an LDP PW destined to 4.4.4.4 for the cross-connect pw2pw in the cross-connect group vpn1 and enter 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]
Related commands
· display l2vpn ldp
· display l2vpn pw
· pw-class
· tunnel-policy (Tunnel policy commands)
pw-class
Use pw-class to create a PW template and enter PW template view.
Use undo pw-class to delete a PW template.
Syntax
pw-class class-name
undo pw-class class-name
Default
No PW template is created.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
class-name: Specifies the name of the PW template, a case-sensitive string of 1 to 19 characters.
Usage guidelines
In PW template view, you can configure PW attributes such as the PW type and whether to enable control word. PWs with the same attributes can use the same PW template to simplify configuration.
Examples
# Create a PW template 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-type
Use pw-type to specify a PW type for a PW template.
Use undo pw-type to restore the default.
Syntax
pw-type { ethernet | vlan }
undo pw-type
Default
The PW type is VLAN.
Views
PW template 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
When the PW type is Ethernet, the PE encapsulates packets forwarded between the AC and PW as follows:
· Traffic from the AC to the PW cannot carry the P-Tag assigned by the service provider. If traffic from the AC has the P-Tag, the PE removes the P-Tag, adds the PW label and public tunnel encapsulation, and forwards the traffic through the PW. If traffic from the AC does not have the P-Tag, the PE adds the PW label and public tunnel encapsulation and forwards the traffic through the PW.
· For traffic received from the PW, if the AC access mode (configured by as interface) is VLAN, the PE adds the P-Tag and forwards the traffic through the AC. If the AC access mode is Ethernet, the PE directly forwards the traffic through the AC. The PE cannot modify or delete the P-Tag for the traffic from the PW.
When the PW type is VLAN, the PE encapsulates packets forwarded between the AC and PW as follows:
· Traffic from the AC to the PW must carry the P-Tag. If traffic from the AC has the P-Tag, the PE keeps the P-Tag when the peer PE does not require the ingress to modify the P-Tag or changes the P-Tag to the expected value (which can be zero) when the peer PE requires the ingress to modify the P-Tag, then adds the PW label and public tunnel encapsulation, and forwards the traffic through the PW. If traffic from the AC does not have the P-Tag, the PE adds a P-Tag of 0 when the peer PE does not require the ingress to modify the P-Tag or adds the expected P-Tag (which can be zero) when the peer PE requires the ingress to modify the P-Tag, then adds the PW label and public tunnel encapsulation, and forwards the traffic through the PW.
· For traffic received from the PW, if the AC access mode (configured by as interface) is VLAN, the PE modifies or keeps the P-Tag and forwards the traffic through the AC. If the AC access mode is Ethernet, the PE removes the P-Tag and forwards the traffic through the AC.
This command takes effect only when the AC type is Ethernet.
Examples
# Configure the PW type as Ethernet.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100] pw-type ethernet
Related commands
display l2vpn pw-class
service-instance
Use service-instance to create a service instance on a Layer 2 Ethernet interface and enter service instance view.
Use undo service-instance to delete a service instance.
Syntax
service-instance instance-id
undo service-instance instance-id
Default
No service instance is created on a Layer 2 Ethernet interface.
Views
Interface view
Predefined user roles
network-admin
mdc-admin
Parameters
instance-id: Specifies the ID of the service instance, in the range of 1 to 4096.
Examples
# Create service instance 1 on the Layer 2 Ethernet interface GigabitEthernet 5/0/1 and enter service instance 1 view.
<Sysname> system-view
[Sysname] interface GigabitEthernet 5/0/1
[Sysname-GigabitEthernet5/0/1] service-instance 1
[Sysname-GigabitEthernet5/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.
To avoid modifications to a cross-connect group from affecting the network, you can disable the group, modify it, and then enable it.
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, the command places you to 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.
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