- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-MPLS L2VPN Commands | 136.87 KB |
Contents
MPLS L2VPN configuration commands
display l2vpn ccc-interface vc-type
display mpls l2vpn fib ac vpws
display mpls l2vpn fib pw vpws
reset service-instance statistics
car
Syntax
car { inbound | outbound } name car-name
undo car { inbound | outbound }
View
Service instance view
Default level
2: System level
Parameters
inbound: Applies a global CAR action in the inbound direction.
outbound: Applies a global CAR action in the outbound direction.
name car-name: Specifies a global CAR action by name, a string of 1 to 31 characters.
Description
Use car to apply a global CAR action in the inbound or outbound traffic on an attachment circuit (AC).
Use undo car to restore the default.
By default, no global CAR action is applied to an AC.
Examples
# Apply global CAR action car1 to inbound traffic and car2 to outbound traffic of service instance 200 on the interface GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] service-instance 200
[Sysname-GigabitEthernet3/0/1-srv200] car inbound name car1
[Sysname-GigabitEthernet3/0/1-srv200] car outbound name car2
display l2vpn ccc-interface vc-type
Syntax
display l2vpn ccc-interface vc-type { all | bgp-vc | ccc | ldp-vc | static-vc } [ up | down ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Specifies all CCC interfaces, regardless of the VC type.
bgp-vc: Specifies CCC interfaces with the VC type of Kompella.
ccc: Specifies CCC interfaces with the VC type of CCC.
ldp-vc: Specifies CCC interfaces with the VC type of Martini.
static-vc: Specifies CCC interfaces with the VC type of SVC.
up: Specifies CCC interfaces in the state of UP.
down: Specifies CCC interfaces in the state of DOWN.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
|
NOTE: The switch does not support the bgp-vc, ccc, and static-vc keywords. |
Description
Use display l2vpn ccc-interface vc-type to display information about L2VPN VC interfaces.
This command does not display the interface information for the MPLS L2VPN connections created for service instances.
Examples
# Display information about all CCC interfaces.
<Sysname> display l2vpn ccc-interface vc-type all
Total ccc-interface of LDP VC: 1
up (0), down (1)
Interface Encap Type State VC Type
Vlan30 vlan down ldp-vc
Table 1 Command output
Field |
Description |
Total ccc-interface of XXX VC |
Total number of interfaces with VC type of xxx. |
Interface |
Name of the interface. |
Encap Type |
Encapsulation type of the interface. |
State |
Status of the interface. |
display mpls l2vc
Syntax
display mpls l2vc [ interface interface-type interface-number [ service-instance instance-id ] | remote-info ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies the interface connecting the CE by its type and number.
service-instance instance-id: Specifies a service instance by its ID in the range of 1 to 4094.
remote-info: Specifies Martini VCs from the remote peer.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display mpls l2vc to display information about Martini VCs configured on the router.
If you specify an interface, this command displays information about Martini VCs configured on the CE interface.
Examples
# Display information about all Martini VCs configured on the switch.
<Sysname> display mpls l2vc
Total ldp vc : 1 1 up 0 down 0 blocked
Transport Client Service VC Local Remote
VC ID Intf ID State VC Label VC Label
1000 GE4/0/2 1000 up 65536 65536
Table 2 Command output
Field |
Description |
Total ldp vc |
Total number of Martini VCs. |
Transport VC ID |
Remote VC ID. |
Client Intf |
Interface connected with the CE. |
# Display information about the Martini VC configured using service instance 100 on interface GigabitEthernet 3/0/5.
<Sysname> display mpls l2vc interface GigabitEthernet 3/0/5 service-instance 100
***VC ID : 1000
VC State : up
Destination : 2.2.2.2
Client Intf : GigabitEthernet3/0/5 is up
Service instance ID : 100
Local Group ID : 0
Remote Group ID : 0
Local VC Label : 65537
Remote VC Label : 65539
Tunnel Policy : -
Tunnel Type : lsp
Tunnel ID : 0x8780002
Table 3 Command output
Field |
Description |
VC ID |
Remote VC ID. |
VC State |
Status of the VC. |
Destination |
Destination IP address. |
Client Intf |
Interface connected with the CE. |
Local Group ID |
Local VC group ID, used for the L2VPN VC FEC TLV field of LDP messages. |
Remote Group ID |
Remote VC group ID, used for the L2VPN VC FEC TLV field of LDP messages. |
Tunnel Policy |
Name of the tunneling policy used by the VC. If no tunneling policy is specified for the VC, this field displays a hyphen (-). |
Tunnel Type |
Type of the tunnel. |
Tunnel ID |
ID of the tunnel. |
# Display information about Martini VCs received from the remote peer.
<Sysname> display mpls l2vc remote-info
total remote ldp vc : 1
Transport Group Peer Remote Remote C Remote
VC ID ID Addr Encap VC Label Bit MTU
1000 0 2.2.2.2 vlan 65539 0 1500
Table 4 Command output
Field |
Description |
total remote ldp vc |
Total number of remote LDP VCs. |
Transport VC ID |
Remote VC ID. |
Group ID |
Remote VC group ID, used for the L2VPN VC FEC TLV field of LDP messages. |
Peer Addr |
IP address of the peer. |
Remote Encap |
Encapsulation type of the remote interface. |
C Bit |
Whether the control word function is enabled or not. 0 means disabled and 1 means enabled. |
Remote MTU |
MTU of the remote interface. |
display mpls l2vpn fib ac vpws
Syntax
In standalone mode:
display mpls l2vpn fib ac vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display mpls l2vpn fib ac vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies the interface connecting a CE by its type and number.
service-instance service-instanceid: Specifies a service instance. service-instanceid is the service instance ID in the range of 1 to 4094.
slot slot-number: Displays the AC entries on a card. slot-number indicates the number of the slot that holds the card. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Displays the AC entries of a card on an IRF member switch. The chassis-number represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. You can display the chassis number and slot number with the display device command.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display mpls l2vpn fib ac vpws to display AC information for MPLS L2VPN.
When you use this command, follow these guidelines:
· If you specify an interface but do not specify a service instance, this command displays the AC entries of the MPLS L2VPN connection created on the Layer 3 interface.
· If you specify both an interface and a service instance, this command displays the AC entries of the MPLS L2VPN connection created for the service instance on the Layer 2 interface.
· If you do not specify any parameters, this command displays the AC entries of all MPLS L2VPN connections.
Examples
# Display AC information for MPLS L2VPN.
<Sysname> display mpls l2vpn fib ac vpws
Total AC Entry:1
**In Interface : GE2/0/9
Service Instance ID : 1
Access Mode : Vlan
CE Type : PortVlan
AC Encapsulation : 100
Table 5 Command output
Field |
Description |
Total AC Entry |
Total number of VPWS AC entries, which is displayed only when you display all VPWS AC entries. |
In Interface |
Incoming interface, which is bound to L2VPN. |
AccessMode |
Access mode at the AC side. |
CEType |
Interface encapsulation type at the AC side, PortVlan or Independent. |
AC Encapsulation |
Encapsulation VLAN information at the AC side. |
display mpls l2vpn fib pw vpws
Syntax
In standalone mode:
display mpls l2vpn fib pw vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ slot slot-number ] [ verbose ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display mpls l2vpn fib pw vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ chassis chassis-number slot slot-number ] [ verbose ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies the interface connecting a CE by its type and number.
service-instance service-instanceid: Specifies a service instance. service-instanceid is the service instance ID in the range of 1 to 4094.
verbose: Displays the detailed information.
slot slot-number: Displays the PW entries on a card. slot-number represents the number of the slot that holds the card. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Displays the PW entries of a card on an IRF member switch. The chassis-number represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. You can display the chassis number and slot number with the display device command.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display mpls l2vpn fib pw vpws to display MPLS L2VPN PW information.
When you use this command, follow these guidelines:
· If you specify an interface but do not specify a service instance, this command displays the PW entries of the MPLS L2VPN connection created on the Layer 3 interface.
· If you specify both an interface and a service instance, this command displays the PW entries of the MPLS L2VPN connection created for the service instance on the Layer 2 interface.
· If you do not specify any parameters, this command displays the PW entries of all MPLS L2VPN connections.
Examples
# Display MPLS L2VPN PW information.
<Sysname> display mpls l2vpn fib pw vpws
Total PW Entry:1
In Interface ServiceID InVCLabel OutVCLabel TunnelID
GE4/0/2 1000 65536 65536 0x340001
Table 6 Command output
Field |
Description |
Total PW Entry |
Total number of VPWS PW entries, which is displayed only when you display all VPWS PW entries. |
In Interface |
Incoming interface, which is bound to L2VPN. |
ServiceID |
Service instance ID. |
InVCLabel |
Incoming VC label. |
OutVCLabel |
Outgoing VC label. |
TunnelID |
ID of the public tunnel. |
# Display the detailed MPLS L2VPN PW information.
<Sysname> display mpls l2vpn fib pw vpws verbose
Total PW Entry:1
In Interface : GE3/0/5
Service Instance ID : 1005
In VC Label : 65538
Out VC Label : 65540
Out Interface : ----
Encapsulation Type : Vlan
Entry Type : Send
MTU : 1500
Control Word : NO
Packets received : 0
Receives discarded : 0
Packets sent : 0
Sends discarded : 0
Tunnel ID : 0x1ba0011(Done)
GRCount:1
Table 7 Command output
Field |
Description |
Total PW Entry |
Total number of VPWS PW entries, which is displayed only when you display all VPWS PW entries. |
In Interface |
Incoming interface, which is bound to L2VPN. |
Service Instance ID |
Service instance ID. |
In VC Label |
Incoming VC label of the data packets. |
Out VC Label |
Outgoing VC label of the data packets. |
Out Interface |
Outgoing interface, valid in local CCC mode. |
MTU |
Maximum transmission unit. |
Control Word |
Whether control word is used. |
Packets received |
Number of data packets received by the PW. |
Receives discarded |
Number of data packets dropped in the inbound direction of the PW. |
Packets sent |
Number of data packets sent by the PW. |
Sends discarded |
Number of data packets dropped in the outbound direction of the PW. |
Tunnel ID |
Public tunnel ID and entry state of data packets. The entry state can be Done or Waiting. GRCount—Count of graceful restarts. |
SIG In VC Label |
Incoming VC label of the signaling packets. |
SIG Out VC Label |
Outgoing VC label of the signaling packets. |
Packets received |
Number of signaling packets received by the PW. |
Receives discarded |
Number of incoming signaling packets dropped by the PW. |
Packets sent |
Number of signaling packets sent by the PW. |
Sends discarded |
Number of outgoing signaling packets dropped by the PW. |
Tunnel ID |
Public tunnel ID and entry state of signaling packets. The entry state can be Done or Waiting. GRCount—Count of graceful restarts. |
display pw-class
Syntax
display pw-class [ class-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
class-name: Name of the PW class, a case-insensitive string of 1 to 19 characters.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display pw-class to display PW class information.
If no PW class is specified, this command displays information about all PW classes.
If you specify a PW class, this command output includes an additional field to show the number of times the PW class has been referenced.
Examples
# Display information about all PW classes.
<Sysname> display pw-class
Total 3 PW-class(es)
PW-class name Transport mode Tunnel policy
1234 Ethernet abc
1025 VLAN abc
1026 VLAN -
# Display information about the PW class named 1234.
<Sysname> display pw-class 1234
PW-class name Transport mode Tunnel policy Reference count
1234 Ethernet abc 0
Table 8 Command output
Field |
Description |
Tunnel policy |
Name of the tunneling policy used by the PW class. If no tunneling policy is specified for the PW class, this field displays a hyphen (-). |
Reference count |
Number of times that the PW class are referenced. |
l2vpn
Syntax
l2vpn
undo l2vpn
View
System view
Default level
2: System level
Parameters
None
Description
Use l2vpn to enable L2VPN and enter L2VPN view.
Use undo l2vpn to disable L2VPN.
By default, L2VPN is disabled.
Examples
# Enable L2VPN and enter L2VPN view.
<Sysname> system-view
[Sysname] l2vpn
[Sysname-l2vpn]
mpls l2vc
Syntax
mpls l2vc destination vcid [ { control-word | ethernet | no-control-word | vlan } | tunnel-policy tunnel-policy-name ] *
undo mpls l2vc
View
Interface view
Default level
2: System level
Parameters
destination: IP address of the peer PE.
vc-id: VC ID of the L2VPN connection, in the range of 1 to 4294967295.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
ethernet: Specifies the PW encapsulation type of Ethernet. In Ethernet mode, P-Tag is not transferred on the PW. For a packet from a CE, if it contains the service delimiter, the PE removes the service delimiter and adds a PW label and a tunnel label into the packet before forwarding the packet. Otherwise, the PE adds a PW label and a tunnel label into the packet and then forwards the packet. For a packet to be sent downstream, whether the PE adds the service delimiter into the packet depends on your configuration. However, rewriting and removing of existing tags are not allowed.
vlan: Specifies the PW encapsulation type of VLAN. In VLAN mode, packets transmitted over the PW must carry a P-Tag. For a packet from a CE, if it contains the service delimiter, the PE keeps the P-TAG unchanged or changes the P-tag to the VLAN tag expected by the peer PE or to a null tag (the tag value is 0), and then adds a PW label and a tunnel label into the packet before sending the packet out. If the packet contains no service delimiter, the PE adds the VLAN tag expected by the peer PE or a null tag, and then a PW label and a tunnel label into the packet before sending the packet out. For a packet to be sent downstream, the PE rewrites, removes, or retains the service delimiter depending on your configuration.
tunnel-policy tunnel-policy-name: Specifies the tunneling policy for the VC. The tunneling policy name is a case-insensitive string of 1 to 19 characters.
Description
Use mpls l2vc to create a Martini L2VPN connection.
Use undo mpls l2vc to delete the Martini connection.
If you do not specify the tunneling policy, or if you specify the tunneling policy name but do not configure the policy, the default policy is used for the VC. The default tunneling policy selects only one tunnel (no load balancing) in this order: LSP tunnel CR-LSP tunnel. For information about configuring a tunneling policy, see MPLS Configuration Guide.
Only L2VPNs that use PPP, FR, or HDLC encapsulation support the control word option.
The PW encapsulation type can be Ethernet or VLAN. The switch allows you to specify the PW encapsulation type for only Layer 3 Ethernet interfaces and subinterfaces, and VLAN interfaces. When not specified, the PW encapsulation type depends on the interface type: it is Ethernet on Layer 3 Ethernet interfaces, and VLAN on Layer 3 Ethernet subinterfaces and VLAN interfaces.
Related commands: tunnel-policy.
Examples
# Create a Martini MPLS L2VPN connection.
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/5
[Sysname-GigabitEthernet4/0/5] mpls l2vc 2.2.2.9 999
mpls l2vpn
Syntax
mpls l2vpn
undo mpls l2vpn
View
L2VPN view
Default level
2: System level
Parameters
None
Description
Use mpls l2vpn to enable MPLS L2VPN.
Use undo mpls l2vpn to disable MPLS L2VPN and delete all L2VPN configurations.
By default, MPLS L2VPN is disabled.
You must use the mpls l2vpn command to enable MPLS L2VPN before configuring the other MPLS L2VPN commands.
Examples
# Enable MPLS L2VPN.
<Sysname> system-view
[Sysname] l2vpn
[Sysname-l2vpn] mpls l2vpn
ping lsp pw (for MPLS L2VPN)
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m wait-time | -r reply-mode | -s packet-size | -t time-out | -v ] * pw ip-address pw-id pw-id
View
Any view
Default level
0: Visit level
Parameters
-a source-ip: Specifies the source IP address of the Echo Request messages to be sent.
-c count: Specifies the number of request messages to be sent. The value range for the count argument is 1 to 4294967295, and the default is 5.
-exp exp-value: Specifies the EXP value for the Echo Request messages. The value range for the exp-value argument is 0 to 7, and the default is 0.
-h ttl-value: Specifies the TTL value for the Echo Request messages. The value range for the ttl-value argument is 1 to 255, and the default is 255.
-m wait-time: Specifies the interval for sending Echo Request messages. The value range for the wait-time argument is 1 to 10000 milliseconds, and the default is 200 milliseconds.
-r reply-mode: Specifies the reply mode of a receiver in response to an Echo Request message. The reply-mode argument can be 1 or 2 where 1 means "Do not respond" and 2 means "Respond using a UDP packet". The default is 2.
-s packet-size: Specifies the payload length of the Echo Request messages. The value range for the packet-size argument is 65 to 8100 bytes, and the default is 100 bytes.
-t time-out: Specifies the timeout interval for waiting for the response to an echo request message. The value range for the time-out argument is 0 to 65535 milliseconds, and the default is 2000 milliseconds.
-v: Displays detailed response information.
pw ip-address: Specifies the IP address of the peer PE.
pw-id pw-id: Specifies the ID of the PW to the peer PE. The value range for the pw-id argument is 1 to 4294967295.
Description
Use ping lsp pw to check the connectivity of a Martini VC.
To use an S12500 switch to check the reachability of the VC to a peer PE, make sure the peer PE supports VC inspection. The peer PE, however, cannot use this function to check the reachability of the VC to the S12500 switch.
Examples
# Check the connectivity of the VC that is with PW ID 301 and connected to peer PE 3.3.3.9.
<Sysname> ping lsp pw 3.3.3.9 pw-id 301
LSP Ping FEC: FEC 128 PSEUDOWIRE (NEW) 3.3.3.9 301 : 100 data bytes, press CTRL_C to break
Reply from 100.1.2.1: bytes=100 Sequence=0 time = 31 ms
Reply from 100.1.2.1: bytes=100 Sequence=1 time = 62 ms
Reply from 100.1.2.1: bytes=100 Sequence=2 time = 62 ms
Reply from 100.1.2.1: bytes=100 Sequence=3 time = 62 ms
Reply from 100.1.2.1: bytes=100 Sequence=4 time = 62 ms
--- FEC: FEC 128 PSEUDOWIRE (NEW) 3.3.3.9 301 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/55/62 ms
pw-class
Syntax
pw-class class-name
undo pw-class class-name
View
System view
Default level
2: System level
Parameters
class-name: Name of the PW class, a case-insensitive string of 1 to 19 characters.
Description
Use pw-class to create a PW class and enter PW class view.
Use undo pw-class to delete an existing PW class.
By default, no PW class is created.
Examples
# Create PW class pw100 and enter its view.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100]
pw-tunnel-policy
Syntax
pw-tunnel-policy policy-name
undo pw-tunnel-policy
View
PW class view
Default level
2: System level
Parameters
policy-name: Name of the tunneling policy, a case-insensitive string of 1 to 19 characters.
Description
Use pw-tunnel-policy to specify the tunneling policy for a PW class.
Use undo pw-tunnel-policy to restore the default.
By default, only one tunnel is selected (no load balancing) in this order: LSP tunnel, CR-LSP tunnel.
If you specify a nonexistent tunneling policy by using the pw-tunnel-policy command, the default tunneling policy will be used, which selects only one tunnel (no load balancing) in this order: LSP tunnel, CR-LSP tunnel. For information about configuring a tunneling policy, see MPLS Configuration Guide.
Related commands: tunnel-policy.
Examples
# Specify tunneling policy tp100 for PW class pw100.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100] pw-tunnel-policy tp100
reset service-instance statistics
Syntax
reset service-instance statistics [ interface interface-type interface-number [ service-instance instance-id [ inbound | outbound ] ] ]
View
User view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Clears traffic statistics for the specified service instance or all service instances on the specified interface. The interface-type interface-number arguments specify an interface by its type and number.
service-instance instance-id: Clears traffic statistics for the specified service instance on the interface. The instance-id argument represents the ID of a service instance, in the range of 1 to 4094.
inbound: Clears inbound traffic statistics.
outbound: Clears outbound traffic statistics.
Description
Use reset service-instance statistics to clear traffic statistics for one or all service instances on an interface.
Examples
# Clear traffic statistics for service instance 200 on interface GigabitEthernet 3/0/1.
<Sysname> reset service-instance statistics interface GigabitEthernet 3/0/1 service-instance 200
service-instance
Syntax
service-instance service-instance-id
undo service-instance service-instance-id
View
Layer 2 Ethernet interface view, Layer-2 aggregate interface view
Default level
2: System level
Parameters
service-instance-id: Service instance ID for uniquely identifying a service instance on a Layer 2 Ethernet interface, in the range of 1 to 4094.
Description
Use service-instance to create a service instance and enter service instance view.
Use undo service-instance to delete an existing service instance.
By default, no service instance is created.
The service instances created on different Layer 2 Ethernet interfaces can have the same service instance ID.
Examples
# On Layer 2 interface GigabitEthernet 3/0/1, create service instance 100 and enter its view.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] service-instance 100
[Sysname-GigabitEthernet3/0/1-srv100]
trans-mode
Syntax
trans-mode { ethernet | vlan }
undo trans-mode
View
PW class view
Default level
2: System Level
Parameters
ethernet: Specifies the PW transport mode as Ethernet mode.
vlan: Specifies the PW transport mode as VLAN mode.
Description
Use trans-mode to specify the PW transport mode.
Use undo trans-mode to restore the default.
By default, the PW transport mode is VLAN.
In Ethernet mode, P-Tag is not transferred on the PW. For a packet from a CE, if it contains the service delimiter, the PE removes the service delimiter and adds a PW label and a tunnel label into the packet before forwarding the packet. Otherwise, the PE adds a PW label and a tunnel label into the packet and then forwards the packet. For a packet to be sent downstream, whether the PE adds the service delimiter into the packet depends on your configuration. However, rewriting and removing of existing tags are not allowed.
In VLAN mode, packets transmitted over the PW must carry a P-Tag. For a packet from a CE, if it contains the service delimiter, the PE keeps the P-TAG unchanged or changes the P-tag to the VLAN tag expected by the peer PE or to a null tag (the tag value is 0), and then adds a PW label and a tunnel label into the packet before sending the packet out. If the packet contains no service delimiter, the PE adds the VLAN tag expected by the peer PE or a null tag, and then a PW label and a tunnel label into the packet before sending the packet out. For a packet to be sent downstream, the PE rewrites, removes, or retains the service delimiter depending on your configuration.
Examples
# Configure the PW transport mode as Ethernet.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100] trans-mode ethernet
xconnect peer
Syntax
xconnect peer peer-ip-address pw-id pw-id [ access-mode { ethernet | vlan } | mtu mtu-value | [ pw-class class-name ] ] *
undo xconnect peer
View
Service instance view
Default level
2: System level
Parameters
peer-ip-address: IP address of the remote peer.
pw-id pw-id: Specifies the PW ID of the Martini MPLS L2VPN connection, in the range of 1 to 4294967295.
access-mode: Specifies the access mode of the service instance as Ethernet or VLAN. The default access mode is VLAN.
ethernet: Specifies the access mode of Ethernet.
vlan: Specifies the access mode of VLAN.
mtu mtu-value: Specifies the MTU in the range of 46 to 65535. The default is 1500.
pw-class class-name: Specifies a PW class by its name. class-name is a case-insensitive string of 1 to 19 characters. If you do not specify a PW class, or you specify a PW class but the PW class does not specify a tunneling policy or the specified tunneling policy is not configured, the default tunneling policy will be used. The default tunneling policy selects only one tunnel in this order: LSP tunnel, CR-LSP tunnel. For information about configuring a tunneling policy, see MPLS Configuration Guide.
Description
Use xconnect peer to create a Martini MPLS L2VPN connection for a service instance.
Use undo xconnect peer to delete the MPLS L2VPN connection of a service instance.
The access mode of a service instance can be either of the following:
· VLAN mode—The Ethernet header of a packet sent from a CE to a PE or from a PE to a CE includes a VLAN tag that is added in the header as a service delimiter for the service provider network to identify the user. The tag is called a "P-Tag".
· Ethernet mode—The Ethernet header of a packet sent from a CE to a PE or from a PE to a CE does not contain any service delimiter. If the header contains a VLAN tag, it is the internal VLAN tag of the user and means nothing to the PE. Such an internal VLAN tag of a user is called a "U-Tag".
The MTU specified by this command is advertised through LDP and used for PW negotiation.
This command is available for service instances with the ID in the range of 1 to 4094.
Related commands: pw-class.
|
NOTE: The MTU specified is only used for possible parameter negotiation. |
Examples
# For service instance 100, create a Martini MPLS L2VPN connection and specify the matching external VLAN tag as 100.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] service-instance 100
[Sysname-GigabitEthernet3/0/1-srv100] encapsulation s-vid 100
[Sysname-GigabitEthernet3/0/1-srv100] xconnect peer 5.5.5.5 pw-id 100