- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-MPLS L2VPN Commands | 233.43 KB |
Contents
MPLS L2VPN configuration commands
ccc interface in-label out-label
display l2vpn ccc-interface vc-type
display mpls l2vpn fib ac vpws
display mpls l2vpn fib pw vpws
display service-instance interface
route-distinguisher (MPLS L2VPN view)
|
NOTE: In this document, SPC cards refer to the cards prefixed with SPC, for example, SPC-GT48L, and SPE cards refer to the cards prefixed with SPE, for example, SPE-1020-E-II. |
ccc interface in-label out-label
Syntax
ccc ccc-connection-name interface interface-type interface-number in-label in-label-value out-label out-label-value { nexthop ip-address | out-interface interface-type interface-number } [ control-word | no-control-word ]
undo ccc ccc-connection-name
View
System view
Default level
2: System level
Parameters
ccc-connection-name: Name for the CCC connection, a string of 1 to 20 characters. It is used for uniquely identifying a CCC connection on a PE.
interface interface-type interface-number: Specifies the interface connecting the local CE by its type and number.
in-label in-label-value: Specifies the incoming label, in the range of 16 to 1023.
out-label out-label-value: Specifies the outgoing label, in the range of 16 to 1023.
nexthop ip-address: Specifies the IP address of the next hop.
out-interface interface-type interface-number: Specifies the outgoing interface by its type and number.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
Only L2VPNs using ATM, PPP, Frame Relay, or HDLC encapsulation support the control word option.
Description
Use the ccc interface in-label out-label command to create a remote CCC connection between CEs connected to different PEs.
Use the undo ccc command to delete a CCC connection.
This command must be configured on both of the PEs.
A PE uses connection names to identify different CCC connections. A CCC connection can have different names on different PEs.
If a P router is connected with a PE, you must configure a static LSP between them.
|
NOTE: Only when the link that the outgoing interface connects is a point-to-point link, can you use the out-interface keyword to specify the outgoing interface. If the link is not a point-to-point link but, for example, a link connecting to a Layer 3 Ethernet interface, VLAN interface, or Layer 3 aggregate interface, you must use the nexthop keyword to specify the IP address of the next hop. |
Examples
# Create a remote CCC connection from CE A to CE B, setting the incoming interface to that connecting CE A, namely GigabitEthernet 3/1/2; the next hop to 20.1.1.2; the incoming label to 100; and the outgoing label to 200.
<Sysname> system-view
[Sysname] ccc CEA-CEB interface GigabitEthernet 3/1/2 in-label 100 out-label 200 nexthop 20.1.1.2
ccc interface out-interface
Syntax
ccc ccc-connection-name interface interface-type interface-number out-interface interface-type interface-number
undo ccc ccc-connection-name
View
System view
Default level
2: System level
Parameters
ccc-connection-name: Name for the CCC connection, a string of 1 to 20 characters. It is used for uniquely identifying a CCC connection on a PE.
interface interface-type interface-number: Specifies the interface for connecting the first CE by its type and number.
out-interface interface-type interface-number: Specifies the interface for connecting the second CE by its type and number.
Description
Use the ccc interface out-interface command to create a local CCC connection between two CEs connected to the same PE.
Use the undo ccc command to delete a CCC connection.
Examples
# Create a local CCC connection between two CEs connected to the same PE.
<Sysname> system-view
[Sysname] ccc ccc-connect-1 interface GigabitEthernet3/1/2 out-interface GigabitEthernet 3/1/3
ce
Syntax
ce ce-name [ id ce-id [ range ce-range ] [ default-offset ce-offset ] ]
undo ce ce-name
View
MPLS L2VPN view, MPLS L2VPN CE view
Default level
2: System level
Parameters
ce-name: Unique name for a CE in the current VPN of the current PE, a string of 1 to 20 characters that cannot include the character of “-”.
id ce-id: Specifies a CE in the VPN by its ID. The value range of ce-id is from 0 to 249.
range ce-range: Specifies the maximum number of CEs to which the specified CE can connect. The ce-range argument ranges from 1 to 250 and defaults to 10.
default-offset ce-offset: Specifies the original CE offset. It can be either 0 or 1. The default is 0.
Description
Use the ce command in MPLS L2VPN view to create a CE and enter MPLS L2VPN CE view.
Use the undo ce command to delete a CE.
Examples
# Create a CE named ce1 for a VPN.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation ethernet
[Sysname-mpls-l2vpn-vpn1] route-distinguisher 100:1
[Sysname-mpls-l2vpn-vpn1] ce ce1 id 1
[Sysname-mpls-l2vpn-ce-vpn1-ce1]
connection
Syntax
connection [ ce-offset id ] interface interface-type interface-number [ tunnel-policy tunnel-policy-name ]
undo connection { ce-offset id | interface interface-type interface-number }
View
MPLS L2VPN CE view
Default level
2: System level
Parameters
ce-offset id: Specifies the ID of the peer CE of the L2VPN connection. The value of id ranges from 0 to 249.
interface interface-type interface-number: Specifies the interface connecting the CE by its type and number. The encapsulation type must be same as that of the VPN.
tunnel-policy tunnel-policy-name: Specifies a tunneling policy for the VC, a string of 1 to 19 characters.
Description
Use the connection command to create a Kompella connection.
Use the undo connection command to delete a Kompella connection on a CE interface.
When creating a Kompella connection, you must specify the ID of the peer CE and the local CE interface.
If you do not specify the tunneling policy, or 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.
Related commands: tunnel select-seq.
Examples
# Create a Kompella connection.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1
[Sysname-mpls-l2vpn-vpn1] ce ce1
[Sysname-mpls-l2vpn-ce-vpn1-ce1] connection ce-offset 1 interface GigabitEthernet 3/1/1
display bgp l2vpn
Syntax
display bgp l2vpn { all | group [ group-name ] | peer [ [ ip-address ] verbose ] | route-distinguisher route-distinguisher [ ce-id ce-id [ label-offset label-offset ] ] } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays all L2VPN information.
group group-name: Specifies the name of the peer group, a string of 1 to 47 characters.
ip-address: IP address of the peer.
verbose: Displays detailed information.
route-distinguisher route-distinguisher: Specifies the route distinguisher in the format of nn:nn or IP-address:nn. It can be a string of 3 to 21 characters.
ce-id ce-id: Specifies the CE ID of the VPN connected with the MPLS L2VPN connection, in the range of 0 to 249. A remote connection requires the remote CE ID.
label-offset label-offset: Specifies the label offset, which ranges from 0 to 65,535.
|: 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 the display bgp l2vpn command to display information about BGP L2VPN in the BGP routing table.
Related commands: route-distinguisher.
Examples
# Display all information about L2VPN in the BGP routing table.
<Sysname> display bgp l2vpn all
BGP Local router ID : 2.2.2.9, local AS number : 100
Origin codes:i - IGP, e - EGP, ? - incomplete
bgp.l2vpn: 1 destination
Route Distinguisher: 100:1
CE ID Label Offset Label Base nexthop pref as-path
1 0 8202 3.3.3.9 100
Table 1 Output description
Field |
Description |
Origin codes |
Route origin codes: · i – IGP—Indicates that the network layer reachability information is from within the AS · e – EGP—Indicates that the network layer reachability information is learned through EGP · ? – incomplete—Indicates that the network layer reachability information is learned through other ways |
bgp.l2vpn |
Number of BGP L2VPNs |
CE ID |
CE number in the VPN |
nexthop |
IP address of the next hop |
pref |
Local preference |
as-path |
AS-PATH of the route |
# Display brief information about L2VPN peers in the BGP routing table.
<Sysname> display bgp l2vpn peer
BGP local router ID : 4.4.4.9
Local AS number : 100
Total number of peers : 1 Peers in established state : 0
Peer V AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
3.3.3.9 4 100 0 0 0 0 00:01:07 Active
Table 2 Output description
Field |
Description |
BGP local router ID |
ID of the local BGP router |
Peers in established state |
Number of peers with BGP sessions in the state of established |
Peer |
IP address of the peer |
V |
BGP version that the peer is using |
AS |
AS number |
MsgRcvd |
Number of messages received |
MsgSent |
Number of messages sent |
OutQ |
Number of messages waiting to be sent to the peer |
PrefRcv |
Number of prefixes received |
Up/Down |
Duration that the BGP session is in the current status |
State |
Status of the peer |
# Display detailed information about L2VPN peer 3.3.3.9 in the BGP routing table.
<Sysname> display bgp l2vpn peer 3.3.3.9 verbose
Peer: 3.3.3.9 Local: 2.2.2.9
Type: IBGP link
BGP version 4, remote router ID 3.3.3.9
BGP current state: Established, Up for 00:21:15
BGP current event: KATimerExpired
BGP last state: OpenConfirm
Port: Local - 179 Remote - 1034
Configured: Active Hold Time: 180 sec Keep Alive Time:60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec
Peer optional capabilities:
Peer support bgp multi-protocol extended
Peer support bgp route refresh capability
Address family IPv4 Unicast: advertised and received
Address family L2VPN: advertised and received
Received: Total 26 messages, Update messages 2
Sent: Total 28 messages, Update messages 2
Maximum allowed prefix number: 150000
Threshold: 75%
Minimum time between advertisement runs is 15 seconds
Peer Preferred Value: 0
BFD: Enabled
Routing policy configured:
No routing policy is configured
Table 3 Output description
Field |
Description |
Peer |
IP address of the peer |
Local |
IP address of the local router |
Type |
BGP type |
BGP current state |
Current status of the BGP session |
BGP current event |
Current event of the BGP session |
BGP last state |
Last status of the BGP session |
Port |
Ports used by the BGP session, one is local or the other remote |
Configured |
Settings of the local timers |
Received |
Settings of the remote timers |
Negotiated |
Negotiated settings of the timers |
Peer optional capabilities: Peer support bgp multi-protocol extended Peer support bgp route refresh capability |
Optional peer capabilities, including the support for BGP multicast protocol extension and the support for BGP route refreshing |
Address family IPv4 Unicast |
IPv4 unicast address family capability |
Address family L2VPN |
L2VPN address family |
Received |
Total number of received messages and that of received update messages |
Sent |
Total number of sent messages and that of received update messages |
Maximum allowed prefix number |
Maximum number of routes allowed |
Threshold |
Threshold value |
BFD |
Whether BFD is enabled for the peer |
Routing policy configured |
Routing policy specified for the peer |
# Display L2VPN information with the RD being 100:1 in the BGP routing table.
<Sysname> display bgp l2vpn route-distinguisher 100:1
BGP Local router ID : 2.2.2.9, local AS number : 100
Origin codes:i - IGP, e - EGP, ? - incomplete
bgp.l2vpn: 1 destination
CE ID Label Offset Label Base nexthop pref as-path
4 0 132096 3.3.3.9 100
Table 4 Output description
Field |
Description |
Origin codes |
Route origin codes: · i – IGP—Indicates that the network layer reachability information is from within the AS · e – EGP—Indicates that the network layer reachability information is learned through EGP · ? – incomplete—Indicates that the network layer reachability information is learned through other ways |
bgp.l2vpn |
Number of BGP L2VPNs |
CE ID |
CE number in the VPN |
Label Base |
Size of the label block |
pref |
Preference |
as-path |
AS-PATH of the route |
# Display L2VPN information with the RD being 100:1 and the CE ID being 4 in the BGP routing table.
<Sysname> display bgp l2vpn route-distinguisher 100:1 ce-id 4
BGP Local router ID : 2.2.2.9, local AS number : 100
Origin codes:i - IGP, e - EGP, ? - incomplete
CE ID Label Offset Label Base nexthop pref as-path
1 0 8202 3.3.3.9 100
Table 5 Output description
Field |
Description |
Origin codes |
Route origin codes: · i – IGP—Indicates that the network layer reachability information is from within the AS · e – EGP—Indicates that the network layer reachability information is learned through EGP · ? – incomplete—Indicates that the network layer reachability information is learned through other ways |
CE ID |
CE number in the VPN |
Label Base |
Size of the label block |
pref |
Preference |
as-path |
AS-PATH of the route |
# Display L2VPN information with the RD being 100:1, the CE ID being 4, and the label offset being 0 in the BGP routing table.
<Sysname> display bgp l2vpn route-distinguisher 100:1 ce-id 4 label-offset 0
BGP Local router ID : 2.2.2.9, local AS number : 100
Origin codes:i - IGP, e - EGP, ? - incomplete
nexthop:3.3.3.9, pref :100, as-path :
label base:132096,label range:10,layer-2 mtu:1500,encap type:Ethernet
label state
132096 down
132097 up
132098 down
132099 down
132100 down
132101 down
132102 down
132103 down
132104 down
132105 down
Table 6 Output description
Field |
Description |
Origin codes |
Route origin codes: · i – IGP—Indicates that the network layer reachability information is from within the AS · e – EGP—Indicates that the network layer reachability information is learned through EGP · ? – incomplete—Indicates that the network layer reachability information is learned through other ways |
label base |
Size of the label block |
pref |
Preference |
as-path |
AS-PATH of the route |
encap type |
Encapsulation type |
display ccc
Syntax
display ccc [ ccc-name ccc-name | type { local | remote } ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ccc-name: CCC connection name, a string of 1 to 20 characters..
type: Specifies the type of the CCC connections.
local: Specifies local CCC connections.
remote: Specifies remote CCC connections.
|: 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 the display ccc command to display information about CCC connections.
If you do not specify the connection name or type, this command displays information about all CCC connections.
Examples
# Display information about CCC connection c1.
<Sysname> display ccc ccc-name c1
***Name : c1
Type : remote
State : up
Intf : GigabitEthernet3/1/1 (up)
In-label : 100
Out-label : 200
Nexthop : 20.1.1.1
# Display information about all local CCC connections.
<Sysname> display ccc type local
***Name : c2
Type : local
State : up
Intf1 : GigabitEthernet3/1/1 (up)
Intf2 : GigabitEthernet3/1/2 (up)
# Display information about all CCC connections.
<Sysname> display ccc
Total ccc vc : 1
Local ccc vc : 0, 0 up
Remote ccc vc : 1, 0 up
***Name : c1
Type : remote
State : down
Intf : GigabitEthernet3/1/1 (up)
In-label : 100
Out-label : 200
Nexthop : 20.1.1.1
Table 7 Output description
Field |
Description |
Total ccc vc |
Total number of CCC connections |
Local ccc vc |
Number of local CCC connections |
Remote ccc vc |
Number of remote CCC connections |
Name |
Name of the CCC connection |
Type |
Type of the CCC connection |
State |
Status of the CCC connection |
Intf |
Interface of the CCC connection |
In-label |
Incoming label |
Out-label |
Outgoing label |
Nexthop |
IP address of the next hop |
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.
Description
Use the display l2vpn ccc-interface vc-type command to display information about specified L2VPN VC interfaces.
You cannot use this command to view the interface information of the MPLS L2VPN connections created for service instances.
Examples
# Display information about interfaces of any encapsulation types.
<Sysname> display l2vpn ccc-interface vc-type all
Total ccc-interface of CCC VC: 1
up (1), down (0)
Interface Encap Type State VC Type
Vlan10 vlan up ccc
Table 8 Output description
Field |
Description |
Total ccc-interface of XXX VC |
Total interface number of L2VPN VCs of type xxx |
Interface |
Name of the interface |
Encap Type |
Encapsulation type of the interface |
State |
Status of the interface |
VC Type |
Encapsulation type of the L2VPN VC 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, which ranges from 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 the display mpls l2vc command to display information about Martini VCs configured on the router.
If you specify an interface, the command displays information about Martini VCs configured on the CE interface.
Examples
# Display information about all Martini VCs configured on the router.
<Sysname> display mpls l2vc
Total ldp vc : 3 0 up 3 down 0 blocked
Transport Client Service VC Local Remote
VC ID Intf ID State VC Label VC Label
5 GE3/1/1 100 down 61442 61452
6 GE3/1/2 101 down 61441 61453
7 GE3/1/3 102 down 61463 61455
Table 9 Output description
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 Martini VC configured using service instance 100 on interface GigabitEthernet 4/1/1.
<Sysname> display mpls l2vc interface GigabitEthernet 4/1/1 service-instance 100
***VC ID : 5
VC State : up
Destination : 1.1.1.1
Client Intf : GigabitEthernet4/1/1 is up
Service instance ID : 100
Local Group ID : 0
Remote Group ID : 0
Local VC Label : 61442
Remote VC Label : 61452
Tunnel Policy : default
Tunnel Type : lsp
Tunnel ID : 0x220020
Table 10 Output description
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 |
Tunnel policy configured |
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
100 0 3.3.3.9 vlan 61442 0 1500
Table 11 Output description
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
Syntax
display mpls l2vpn [ export-route-target-list | import-route-target-list | vpn-name vpn-name [ local-ce | remote-ce ] ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
export-route-target-list: Displays the export route target list.
import-route-target-list: Displays the import route target list.
vpn-name: VPN name, a case-insensitive string of 1 to 31 characters that cannot include the character of “-“.
local-ce: Displays the configurations and status of all local CEs of a specific VPN.
remote-ce: Displays the configurations and status of remote CEs learned from other PEs.
|: 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 the display mpls l2vpn command to display information about L2VPNs configured on a PE.
If you do not specify a VPN, the command displays information about all L2VPNs.
Examples
# Display the L2VPN export route target list.
<Sysname> display mpls l2vpn export-route-target-list
export vpn target list: 755:7 888:8
Table 12 Output description
Field |
Description |
export vpn target list |
BGP VPN export route target list |
# Display information about all L2VPNs configured on the PE.
<Sysname> display mpls l2vpn
VPN Number: 1
vpn-name encap-type route-distinguisher mtu ce(L) ce(R)
vpn2 vlan 500:1 888 0 0
Table 13 Output description
Field |
Description |
VPN Number |
Number of created VPNs |
vpn-name |
Name of the VPN |
encap-type |
Encapsulation type |
mtu |
Maximum transmission unit |
ce(L) |
Number of local CEs |
ce(R) |
Number of remote CEs |
# Display information about L2VPN vpn1.
<Sysname> display mpls l2vpn vpn-name vpn1
***VPN name : vpn1
Encap type : vlan
Local ce number(s) : 0
Remote ce number(s) : 0
Route distinguisher : 100:2
MTU : 1500
Import vpn target : 111:1
Export vpn target : 111:1
Table 14 Output description
Field |
Description |
VPN Name |
Name of the VPN |
Encap type |
Encapsulation type |
Local ce number(s) |
Number of local CEs |
Remote ce number(s) |
Number of remote CEs |
MTU |
Maximum transmission unit |
Import vpn target |
Incoming VPN target |
Export vpn target |
Outgoing VPN target |
# Display information about local CEs of L2VPN vpn1.
<Sysname> display mpls l2vpn vpn-name vpn1 local-ce
ce-name ce-id range conn-num LB
ce1 1 10 0 132096/0/10
LB stands for label block
Table 15 Output description
Field |
Description |
ce-name |
Name of the CE |
ce-id |
CE number |
range |
CE range |
conn-num |
Number of connections |
LB |
Label block |
# Display information about remote CEs of L2VPN vpn1.
<Sysname> display mpls l2vpn vpn-name vpn1 remote-ce
no. ce-id peer-id route-distinguisher LB
1 4 3.3.3.9 100:1 132096/0/10
Table 16 Output description
Field |
Description |
no |
Sequence number |
ce-id |
CE ID |
peer-id |
IP address of the peer |
LB |
Label block |
display mpls l2vpn connection
Syntax
display mpls l2vpn connection [ interface interface-type interface-number | summary | vpn-name vpn-name [ remote-ce ce-id | down | up | verbose ] ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
summary: Displays summary information about connections.
vpn-name: VPN name, a case-insensitive string of 1 to 31 characters that cannot include the character of “-“.
ce-id: ID of the remote CE for the L2VPN connection, in the range of 0 to 249.
down: Displays detailed information about the connections that are down.
up: Displays detailed information about the connections that are up. If you specify neither the down nor the up keyword, the command displays detailed information about connections that are either up or down.
verbose: Displays detailed information. This keyword is valid only when displaying information about all connections in a VPN.
|: 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 the display mpls l2vpn connection command to display information about Kompella L2VPN connections.
If you do not specify any argument, the command displays information about all Kompella L2VPN connections.
Examples
# Display information about all Kompella L2VPN connections.
<Sysname> display mpls l2vpn connection
1 total connections,
connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown
VPN name: vpn1,
1 total connections,
connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown
CE name: ce1, id: 1,
Rid type status peer-id route-distinguisher intf
4 rmt up 3.3.3.9 100:1 GigabitEthernet3/1/1
Field |
Description |
connections |
Statistics about connections, including the number of connections in the state of Up, the number of connections in the state of Down, the number of local connections, the number of remote connections, and the number of unknown connections |
VPN name |
Name of the VPN |
CE name |
Name of the CE |
id |
ID of the CE |
Rid |
ID of the remote CE |
type |
Type of the connection |
status |
Status of the connection |
peer-id |
IP address of the peer |
intf |
Interface for the connection |
# Display information about Kompella L2VPN connections for VPN vpn1.
<Sysname> display mpls l2vpn connection vpn-name vpn1
VPN name: vpn1,
1 total connections,
connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown
CE name: ce1, id: 1,
Rid type status peer-id route-distinguisher intf
4 rmt up 3.3.3.9 100:1 GigabitEthernet4/1/1
For descriptions of the output fields of the command, see Table 17.
# Display information about Kompella L2VPN connections on interface GigabitEthernet 4/1/1.
<Sysname> display mpls l2vpn connection interface GigabitEthernet4/1/1
***Conn-type : remote
Local vc state : up
Remote vc state : up
Local ce-id : 1
Local ce name : ce1
Remote ce-id : 4
Intf(state,encap) : GigabitEthernet4/1/1 (up,ethernet)
Peer id : 3.3.3.9
Route-distinguisher : 100:1
Local vc label : 61450
Remote vc label : 61447
Tunnel policy : policy1
C bit is set
Tunnel Type : lsp
Tunnel ID : 0x226013
Table 18 Output description
Field |
Description |
Conn-type |
Type of the connection. |
Local vc state |
Local VC status. |
Remote vc state |
Remote VC status. |
Local ce-id |
ID of the local CE. |
Local ce name |
Name of the local CE. |
Remote ce-id |
ID of the remote CE. |
Intf(state,encap) |
Interface name (interface status, interface encapsulation type). |
Peer id |
IP address of the peer. |
Local vc label |
Local VC label. |
Remote vc label |
Remote VC label. |
Tunnel policy |
Name of the tunneling policy. |
C bit is set |
Control word is enabled. If this function is not enabled, this field will not be displayed. |
Tunnel type |
Type of the tunnel. |
Tunnel ID |
ID of the tunnel. |
# Display summary information about all Kompella L2VPN connections.
<Sysname> display mpls l2vpn connection summary
1 total connections,
connections: 1 up, 0 down , 0 local, 1 remote, 0 unknown
No. vpn-name local-num remote-num unknown-num up-num total-num
1 vpn1 0 1 0 1 1
Table 19 Output description
Field |
Description |
connections |
Statistics about connections, including the number of connections in the state of Up, the number of connections in the state of Down, the number of local connections, the number of remote connections, and the number of unknown connections |
No. |
Sequence number |
vpn-name |
Name of the VPN |
local-num |
Number of local connections |
remote-num |
Number of remote connections |
unknown-num |
Number of unknown connections |
up-num |
Number of connections that are up |
total-num |
Total number of connections |
display mpls l2vpn fib ac vpws
Syntax
display mpls l2vpn fib ac vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ 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: Displays the AC information of a service instance. service-instanceid is the service instance ID, in the range of 1 to 4094. Currently, the router does not support this keyword.
slot slot-number: Displays the AC information of a card. slot-number indicates the slot number of the card.
|: 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 the display mpls l2vpn fib ac vpws command to display the AC information of MPLS L2VPN.
Examples
# Display the AC information of MPLS L2VPN.
<Sysname> display mpls l2vpn fib ac vpws
Total AC Entry:2
**In Interface : GE3/1/1
Service Instance ID : 1
Access Mode : Vlan
CE Type : PortVlan
AC Encapsulation : 100
**In Interface : GE3/1/1
Service Instance ID : 2
Access Mode : Vlan
CE Type : Independent
AC Encapsulation : s-vid 101 c-vid 400 to 500 600 700
Table 20 Output description
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. |
Access Mode |
Access mode at the AC side. |
CEType |
Interface encapsulation type at the AC side, which can be PortVlan or Independent. |
AC Encapsulation |
Encapsulation VLAN information at the AC side. |
display mpls l2vpn fib pw vpws
Syntax
display mpls l2vpn fib pw vpws [ interface interface-type interface-number [ service-instance service-instanceid ] ] [ 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: Displays the PW information of a service instance. service-instanceid is the service instance ID, in the range of 1 to 4094. Currently, the router does not support this keyword.
slot slot-number: Displays the PW information of a card. slot-number indicates the slot number of the card.
verbose: Displays the detailed information.
|: 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 the display mpls l2vpn fib pw vpws command to display the PW information of MPLS L2VPN.
Examples
# Display the PW information of MPLS L2VPN.
<Sysname> display mpls l2vpn fib pw vpws
Total PW Entry:1
In Interface ServiceID InVCLabel OutVCLabel TunnelID
--------------------------------------------------------------
GE3/1/1 0 1000 1002 0x878ad000
Table 21 Output description
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 mpls static-l2vc
Syntax
display mpls static-l2vc [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies a CE interface by its type and number.
|: 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 the display mpls static-l2vc command to display information about static VCs configured on the router.
If you specify an interface, the command displays only information about static VCs configured on the CE interface.
Examples
# Display information about all static VCs configured on the router.
<Sysname> display mpls static-l2vc
total connections: 1, 1 up, 0 down
ce-intf state destination tr-label rcv-label tnl-policy
GE3/1/1 up 3.3.3.9 100 200 policy1
Table 22 Output description
Field |
Description |
total connections |
Statistics about connection, including the total number of connections, number of connections that are up, and number of connections that are down |
ce-intfe |
CE interface |
State |
Status of the VC |
destination |
Destination IP address |
tr-label |
Outgoing label |
rcv-label |
Incoming label |
tnl-policy |
Name of the tunneling policy |
# Display information about static VCs configured on interface GigabitEthernet 4/1/1.
<Sysname> display mpls static-l2vc interface GigabitEthernet 4/1/1
***CE-interface : GigabitEthernet4/1/1 is up
VC State : up
Destination : 3.3.3.9
Transmit-vpn-label : 100
Receive-vpn-label : 400
Tunnel Policy : policy1
Tunnel Type : lsp
Tunnel ID : 0x226013
Table 23 Output description
Field |
Description |
CE-interface |
Name of the CE interface |
VC State |
Status of the VC |
Destination |
Destination IP address |
Transmit-vpn-label |
Outgoing label |
Receive-vpn-label |
Incoming label |
Tunnel Policy |
Name of the tunneling policy |
Tunnel Type |
Type of the tunnel |
Tunnel ID |
ID of the tunnel |
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: Displays information about the specified PW class template. pw-class-name is the name of the PW class template, 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 the display pw-class command to display the PW class template information.
If no PW class template is specified, the command displays information about all PW class templates.
Examples
# Display information about all PW class templates.
<Sysname> display pw-class
Total 1 PW-class(es)
PW-class name Transport mode Tunnel policy
1026 VLAN default
# Display information about the PW class template named 1026.
<Sysname> display pw-class 1026
PW-class name Transport mode Tunnel policy Reference count
1026 VLAN default 0
display service-instance interface
Syntax
display service-instance interface interface-type interface-number [ service-instance service-instance-id ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Displays information about service instances on a specific interface. interface-type and interface-number represent the type and number of the interface.
service-instance service-instance-id: Displays information about the specified service instance. The service-instance-id argument represents the ID of the instance, in the range of 1 to 4096. If this keyword-argument combination is not specified, information about all service instances on the specified interface will be displayed.
|: 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 the display service-instance interface command to display information about one or all service instances created on an interface.
Examples
# Display information about service instances created on GigabitEthernet 3/1/1.
<Sysname> display service-instance interface GigabitEthernet 3/1/1
Total 1 service instance(s)
Service instance : 1000
Encapsulation : s-vid 10
MTU : 1500
Access-mode : VLAN
Service type : VPWS
Table 24 Output description
Field |
Description |
Service instance |
ID of the service instance. |
Encapsulation |
Packet matching rule, which is based on VLAN tags. |
Service Type |
Service type associated with the service instance, which can be VPLS or VPWS. If no L2VPN connection is associated, -- is displayed for this field. |
encapsulation s-vid
Syntax
encapsulation s-vid vlan-id
undo encapsulation
View
Service instance view
Default level
2: System level
Parameters
s-vid vlan-id: Specifies a service VLAN ID (outer VLAN ID) in the range of 1 to 4094. When the system works in hybrid mode, the VLAN ID ranges from 1 to 4093.
Description
Use the encapsulation s-vid command to specify the VLAN ID to be used by the current service instance for packet matching.
Use the undo encapsulation command to remove the packet matching VLAN ID of the current service instance.
By default, no packet matching VLAN ID is specified for a service instance.
· A newly specified packet matching VLAN ID overwrites the previous configuration, if any.
· You must specify different packet matching VLAN IDs for different service instances of the same Layer 2 Ethernet port.
Examples
# Configure service instance 100 on GigabitEthernet 3/1/3 to match packets that carry outer VLAN ID 100.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/1/3
[Sysname-GigabitEthernet3/1/3] service-instance 100
[Sysname-GigabitEthernet3/1/3-srv100] encapsulation s-vid 100
l2vpn
Syntax
l2vpn
undo l2vpn
View
System view
Default level
2: System level
Parameters
None
Description
Use the l2vpn command to enable L2VPN and enter L2VPN view.
Use the undo l2vpn command to disable L2VPN.
By default, L2VPN is disabled.
Examples
# Enable L2VPN and enter L2VPN view.
<Sysname> system-view
[Sysname] l2vpn
[Sysname-l2vpn]
l2vpn-family
Syntax
l2vpn-family
undo l2vpn-family
View
BGP view
Default level
2: System level
Parameters
None
Description
Use the l2vpn-family command to enter BGP L2VPN address family view.
Use the undo l2vpn-family command to delete all configurations for the BGP L2VPN address family.
Examples
# Enter BGP L2VPN address family view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] l2vpn-family
[Sysname-bgp-af-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. If a packet from a CE contains the service delimiter, the PE removes the service delimiter and adds a PW label and tunnel label into the packet before sending the packet out. If a packet from a CE contains no delimiter, the PE directly adds a PW label and a tunnel label into the packet and then sends the packet out. For a packet to be sent downstream, you can configure the PE to add or not add the service delimiter into the packet, but 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 the mpls l2vc command to create a Martini L2VPN connection.
Use the undo mpls l2vc command to delete the Martini connection on the CE interface.
If you do not specify the tunneling policy, or 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.
Only L2VPNs that use ATM, PPP, FR, or HDLC encapsulation support the control word option.
The PW encapsulation type can be Ethernet or VLAN. The router allows you to specify the PW encapsulation type for only Layer 3 Ethernet interfaces and subinterfaces, Layer 3 virtual 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 Layer 3 virtual Ethernet interfaces, and VLAN on Layer 3 Ethernet subinterfaces, Layer 3 virtual Ethernet subinterfaces, and VLAN interfaces.
Related commands: tunnel select-seq.
|
CAUTION: You must configure the PVC and MAP for an ATM interface before using the mpls l2vc destination vcid [ tunnel-policy tunnel-policy-name ] [ control-word | no-control-word ] [ ethernet | vlan ] command on the ATM interface. For more information about PVC and MAP configuration, see Layer 2—WAN Configuration Guide. |
Examples
# Create a Martini MPLS L2VPN connection.
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/1/1
[Sysname-GigabitEthernet4/1/1] 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 the mpls l2vpn command to enable MPLS L2VPN.
Use the undo mpls l2vpn command 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
mpls l2vpn vpn-name
Syntax
mpls l2vpn vpn-name [ encapsulation { atm-aal5 | ethernet | fr | hdlc | ppp | vlan } [ control-word | no-control-word ] ]
undo mpls l2vpn vpn-name
View
System view, MPLS L2VPN view
Default level
2: System level
Parameters
vpn-name: Name for the VPN, a case-insensitive string of 1 to 31 characters that cannot include the character of “-“. It is used to identify a VPN uniquely on a PE.
encapsulation: Specifies the VPN encapsulation type.
atm-aal5: Uses ATM AAL5 encapsulation.
ethernet: Uses Ethernet encapsulation.
fr: Uses FR encapsulation.
hdlc: Uses HDLC encapsulation.
ppp: Uses PPP encapsulation.
vlan: Uses VLAN encapsulation.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
Description
Use the mpls l2vpn vpn-name command to create a Kompella VPN and enter MPLS L2VPN view.
Use the undo mpls l2vpn vpn-name command to delete a VPN.
The encapsulation type specified here must match that of the CE interface.
Only L2VPNs using ATM, PPP, FR, or HDLC encapsulation support the control word option.
Examples
# Create Kompella VPN named vpn1 and enter MPLS L2VPN view.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation vlan
[Sysname-mpls-l2vpn-vpn1]
# Create Kompella VPN vpn2 and enter MPLS L2VPN view.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation ethernet
[Sysname-mpls-l2vpn-vpn1] mpls l2vpn vpn2 encapsulation ethernet
[Sysname-mpls-l2vpn-vpn2]
mpls static-l2vc
Syntax
mpls static-l2vc destination destination-router-id transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ { control-word | ethernet | no-control-word | vlan } | tunnel-policy tunnel-policy-name ] *
undo mpls static-l2vc
View
Interface view
Default level
2: System level
Parameters
destination destination-router-id: Specifies a destination router ID.
transmit-vpn-label transmit-label-value: Specifies an outgoing label for the VPN, namely the outgoing label for the static level 2 VC. The value ranges from 16 to 1023.
receive-vpn-label receive-label-value: Specifies an incoming label for the VPN, namely the incoming label for the static level 2 VC. The value ranges from 16 to 1023.
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. If a packet from a CE contains the service delimiter, the PE removes the service delimiter and adds a PW label and tunnel label into the packet before sending the packet out. If a packet from a CE contains no delimiter, the PE directly adds a PW label and a tunnel label into the packet and then sends the packet out. For a packet to be sent downstream, you can configure the PE to add or not add the service delimiter into the packet, but 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 an tunneling policy for the VC, a string of 1 to 19 characters.
Description
Use the mpls static-l2vc command to create a static VC between CEs connected to different PEs.
Use the undo mpls static-l2vc command to delete the static VC.
· You must configure the command on both PEs. The destination address is the IP address of the peer PE. The outgoing label and incoming label are respectively the incoming label and outgoing label of the peer.
· If you do not specify the tunneling policy, or 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.
· Only L2VPNs using ATM, PPP, FR, or HDLC encapsulation support the control word option.
· The PW encapsulation type can be Ethernet or VLAN. The device allows you to specify the PW encapsulation type for only Layer 3 Ethernet interfaces and subinterfaces, Layer 3 virtual 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 Layer 3 virtual Ethernet interfaces, and VLAN on Layer 3 Ethernet subinterfaces, Layer 3 virtual Ethernet subinterfaces, and VLAN interfaces.
Examples
# Create a static VC between CEs connected to different PEs.
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/1/1
[Sysname-GigabitEthernet4/1/1] mpls static-l2vc destination 1.1.1.1 transmit-vpn-label 111 receive-vpn-label 222 tunnel-policy pol1
mtu (MPLS L2VPN view)
Syntax
mtu mtu
undo mtu
View
MPLS L2VPN view
Default level
2: System level
Parameters
mtu-value: MTU for the L2VPN. It ranges from 128 to 1,500 and defaults to 1,500.
Description
Use the mtu command to set the maximum transmission unit (MTU) for the Kompella connections.
Use the undo mtu command to restore the default.
|
NOTE: The mtu command affects only negotiation of protocol parameters that may take place and does not affects the forwarding. H3C does not recommend using this command. |
Examples
# Set the MTU for Kompella connections to 1000.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1
[Sysname-mpls-l2vpn-vpn1] mtu 1000
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 template, a case-insensitive string of 1 to 19 characters.
Description
Use the pw-class command to create a PW class template and enter PW class template view.
Use the undo pw-class command to delete an existing PW class template.
By default, no PW class template is created.
Examples
# Create PW class template 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 template 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 the pw-tunnel-policy command to specify the tunneling policy for a PW class template.
Use the undo pw-tunnel-policy command 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.
Related commands: tunnel select-seq.
Examples
# Specify tunneling policy tp100 for PW class template pw100.
<Sysname> system-view
[Sysname] pw-class pw100
[Sysname-pw-pw100] pw-tunnel-policy tp100
reset bgp l2vpn
Syntax
reset bgp l2vpn { as-number | ip-address | all | external | internal }
View
User view
Default level
1: Monitor level
Parameters
as-number: Resets L2VPN BGP connections with the peers in the AS with this number. The AS number must be in the range of 1 to 4294967295.
ip-address: Resets the L2VPN BGP connection to the peer with this IP address.
all: Resets all L2VPN BGP connections.
external: Resets L2VPN EBGP sessions.
internal: Resets L2VPN IBGP sessions.
Description
Use the reset bgp l2vpn command to reset L2VPN BGP connections.
Examples
# Reset all L2VPN BGP connections.
<Sysname> reset bgp l2vpn all
route-distinguisher (MPLS L2VPN view)
Syntax
route-distinguisher route-distinguisher
View
MPLS L2VPN view
Default level
2: System level
Parameters
route-distinguisher: Specifies the route distinguisher (RD) in the format of nn:nn or IP-address:nn. It can be a string of 3 to 21 characters.
An RD can be in any of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, where the AS number must be equal to or greater than 65536. For example, 65536:1.
Description
Use the route-distinguisher command to configure an RD for the VPN.
Different VPNs on a PE must have different RDs, while a VPN can have the same or different RDs on different PEs.
|
NOTE: · You cannot change an RD directly; you can only delete the VPN and then re-create the VPN using the new RD. · No RD is configured by default; you must configure an RD for each VPN. A VPN takes effect only when it is configured with an RD. · Once you configure an RD for a VPN, you cannot remove the association between the RD and the VPN. |
Examples
# Configure the RD of a VPN.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation vlan
[Sysname-mpls-l2vpn-vpn1] route-distinguisher 300:1
service-instance
Syntax
service-instance service-instance-id
undo service-instance service-instance-id
View
Layer 2 Ethernet port view
Default level
2: System level
Parameters
service-instance-id: Service instance ID in the range of 1 to 4096. A service instance ID uniquely identifies a service instance on a Layer 2 Ethernet port.
Description
Use the service-instance command to create a service instance on the current port and enter service instance view.
Use the undo service-instance command to delete a service instance on the current port.
By default, no service instances have been created on any port.
Service instance IDs of the service instances created on different Layer 2 Ethernet ports can be the same.
Examples
# Create service instance 100 on Layer 2 port GigabitEthernet 3/1/1 and enter service instance view.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/1/1
[Sysname-GigabitEthernet3/1/1] service-instance 100
[Sysname-GigabitEthernet3/1/1-srv100]
trans-mode
Syntax
trans-mode { ethernet | vlan }
undo trans-mode
View
PW class template view
Default level
2: System Level
Parameters
ethernet: Specifies the PW transport mode as Ethernet.
vlan: Specifies the PW transport mode as VLAN.
Description
Use the trans-mode command to specify the PW transport mode.
Use the undo trans-mode command to restore the default.
By default, the PW transport mode is VLAN.
In Ethernet mode, P-Tag is not transferred on the PW. If a packet from a CE contains the service delimiter, the PE removes the service delimiter and adds a PW label and a tunnel label into the packet before sending the packet out. If a packet from a CE contains no delimiter, the PE directly adds a PW label and a tunnel label into the packet and then sends the packet out. For a packet to be sent downstream, you can configure the PE to add or not add the service delimiter into the packet, but 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
vpn l2vpn mix
Syntax
vpn l2vpn mix
undo vpn l2vpn mix
View
System view
Default level
2: System level
Parameters
None
Description
When both the SPC card and the SPE card of a router are working:
· Use the vpn l2vpn mix command to enable a mix of the SPC card and the SPE card, so that they can work together to process the MPLS L2VPN traffic.
· Use the undo vpn l2vpn mix command to disable the MPLS L2VPN mix function.
With the MPLS L2VPN mix function enabled, the HoVPN function on the Ethernet interface card cannot take effect. With the HoVPN function enabled, the MPLS L2VPN mix function cannot take effect. For more information about HoVPN, see MPLS Configuration Guide.
When both the SPC card and the SPE card of a router are working, the MPLS L2VPN mix function is enabled by default.
|
CAUTION: When only the SPC card works, do not enable the MPLS L2VPN mix function. Otherwise, the HoVPN function on the SPC card cannot take effect. |
Examples
# Enable the MPLS L2VPN mix function when the SPC card and SPE card are both working.
<Sysname> system-view
[Sysname] vpn l2vpn mix
vpn-target (MPLS L2VPN view)
Syntax
vpn-target vpn-target&<1-16> [ both | export-extcommunity | import-extcommunity ]
undo vpn-target { all | { vpn-target&<1-16> [ both | export-extcommunity | import-extcommunity ] }
View
MPLS L2VPN view
Default level
2: System level
Parameters
vpn-target&<1-16>: Adds VPN target extended community attributes to the import or export VPN target extended community list. &<1-16> means that you can specify up to 16 VPN targets.
A VPN target can be a string of 3 to 21 characters in any of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number, where the AS number must be equal to or greater than 65536. For example, 65536:1.
both: Uses the specified VPN targets as both import targets and export targets. The both keyword is also used when you do not specify any of both, export-extcommunity, and import-extcommunity.
export-extcommunity: Uses the specified VPN targets as export targets.
import-extcommunity: Uses the specified VPN targets as import targets.
all: Removes all VPN targets.
Description
Use the vpn-target command to configure VPN targets for a VPN.
Use the undo vpn-target command to delete the VPN targets configured for a VPN.
By default, no VPN targets are configured for a VPN and you must configure them when creating the VPN.
Examples
# Configure VPN targets for the VPN vpn1.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation vlan
[Sysname-mpls-l2vpn-vpn1] route-distinguisher 300:1
[Sysname-mpls-l2vpn-vpn1] vpn-target 1:1 2:2 export-extcommunity
[Sysname-mpls-l2vpn-vpn1] vpn-target 1.2.3.4:11 import-extcommunity
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. pw-id ranges from 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, which ranges from 46 to 65535 and defaults to 1500.
pw-class class-name: Specifies a PW class template by its name. class-name is a case-insensitive string of 1 to 19 characters. If you do not specify a PW class template, or you specify a PW class template but the PW class template 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 (no load balancing) in this order: LSP tunnel, CR-LSP tunnel.
Description
Use the xconnect peer command to create a Martini MPLS L2VPN connection for a service instance.
Use the undo xconnect peer command to delete the MPLS L2VPN connection of a service instance.
The access mode of a service instance can be VLAN or Ethernet.
· VLAN: 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: 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.
|
NOTE: · The MTU specified by this command is advertised through LDP and used for PW negotiation. · The MTU specified by this command is only used for possible parameter negotiation. · The xconnect peer command is available for service instances with the ID in the range of 1 to 4094. |
Related commands: pw-class.
Examples
# For service instance 100, create a Martini MPLS L2VPN connection and specify the packet matching VLAN ID as 100.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/1/1
[Sysname-GigabitEthernet3/1/1] service-instance 100
[Sysname-GigabitEthernet3/1/1-srv100] encapsulation s-vid 100
[Sysname-GigabitEthernet3/1/1-srv100] xconnect peer 5.5.5.5 pw-id 100