- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
03-MPLS L2VPN Commands | 110.25 KB |
Table of Contents
1 MPLS L2VPN Configuration Commands
MPLS L2VPN Configuration Commands
ccc interface in-label out-label
display l2vpn ccc-interface vc-type
display mpls l2vpn forwarding-info
route-distinguisher (MPLS L2VPN view)
MPLS L2VPN Configuration Commands
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 [ 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-type interface-number: Specifies the interface connecting the local CE by its type and number.
in-label-value: Incoming label, in the range 16 to 1023.
out-label-value: Outgoing label, in the range 16 to 1023.
nexthop ip-address: Specifies the IP address of the next hop.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
At present, the S7500E series Ethernet switches do not 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 LSPs between them.
Examples
# Create a remote CCC connection from CEA to CEB, setting the incoming interface to that connecting CEA, namely VLAN-interface 10; 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 vlan-interface 10 in-label 100 out-label 200 nexthop 20.1.1.2
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 “-”.
ce-id: ID for the CE in the VPN, the range of valid values varies by device.
ce-range: Maximum number of CEs that the current PE can support. The default is 10. The value range varies by device.
ce-offset: 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.
To create a CE, you need to specify the id keyword in the command; to enter the view of an existing CE, you do not need to do so.
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]
# Create a CE named ce2 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] ce ce1 id 2
[Sysname-mpls-l2vpn-ce-vpn1-ce2]
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, in the range 0 to 199.
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, which is 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. The default tunneling policy uses LSP tunnels and the load balance number of one.
Related commands: tunnel select-seq load-balance-number in MPLS L3VPN Commands of the MPLS Volume.
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 vlan-interface 10
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 ] ] }
View
Any view
Default Level
1: Monitor level
Parameters
all: Displays all L2VPN information.
group-name: 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 in the format of nn:nn or IP-address:nn. It can be a string of 3 to 21 characters.
ce-id: VPN CE ID of the MPLS L2VPN connection, in the range 0 to 199. A remote connection requires the remote CE number.
label-offset: Label offset, in the range 0 to 65,535.
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-1 display bgp l2vpn all command output description
Field |
Description |
Origin codes |
Route origin codes, which can be: 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 1-2 display bgp l2vpn peer command 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 1-3 display bgp l2vpn peer verbose command 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 1-4 display bgp l2vpn route-distinguisher command output description
Field |
Description |
Origin codes |
Route origin codes, which can be: 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 |
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 1-5 display bgp l2vpn route-distinguisher ce-id command output description
Field |
Description |
Origin codes |
Route origin codes, which can be: 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 |
nexthop |
IP address of the next hop |
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:0,encap type:Unknown or Reserved
label state
132096 down
132097 up
132098 down
132099 down
132100 down
132101 down
132102 down
132103 down
132104 down
132105 down
The following table gives the description on the fields of the display bgp l2vpn route-distinguisher ce-id label-offset command.
Table 1-6 Output description
Field |
Description |
Origin codes |
Route origin codes, which can be: 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 |
nexthop |
IP address of the next hop |
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 } ]
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.
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 : down
Intf : Vlan-interface2 (up)
In-label : 100
Out-label : 200
Nexthop : 20.1.1.1
# 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 : Vlan-interface2 (up)
In-label : 100
Out-label : 200
Nexthop : 20.1.1.1
Table 1-7 display ccc command 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 ]
View
Any view
Default Level
1: Monitor level
Parameters
all: Specifies interfaces of any encapsulation types.
bgp-vc: Specifies interfaces of Kompella L2VPN VCs.
ccc: Specifies interfaces of CCC L2VPN VCs.
ldp-vc: Specifies interfaces of Martini L2VPN VCs.
static-vc: Specifies interfaces of SVC L2VPN VCs.
up: Specifies CCC interfaces in the state of UP.
down: Specifies CCC interfaces in the state of DOWN.
Description
Use the display l2vpn ccc-interface vc-type command to display information about specified L2VPN VC interfaces.
Examples
# Display information about interfaces of any encapsulation types.
<Sysname> display l2vpn ccc-interface vc-type all
Total ccc-interface of CCC VC: 3
up (3), down (0)
Interface Encap Type State VC Type
Vlan2 ethernet up CCC
Vlan3 ethernet up bgp-vc
Vlan4 ethernet up static-vc
# Display information about interfaces of Kompella L2VPN VCs.
<Sysname> display l2vpn ccc-interface vc-type bgp-vc
Total ccc-interface of BGP VC: 1
up (1), down (0)
Interface Encap Type State VC Type
Vlan3 ethernet up bgp-vc
# Display information about interfaces of SVC L2VPN VCs that are in the state of UP.
<Sysname> display l2vpn ccc-interface vc-type svc-vc up
Total ccc-interface of SVC VC: 1,
up (1), down (0)
Interface Encap Type State VC Type
Vlan4 VLAN up static-vc
Table 1-8 display l2vpn ccc-interface vc-type command 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 | remote-info ]
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.
remote-info: Specifies Martini VCs from the remote peer.
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
Transport Client VC Local Remote Tunnel
VC ID Intf State VC Label VC Label Policy
5 Vlan2 down 0 0 lsp3
6 Vlan3 down 0 0 lsp2
7 Vlan4 down 0 0 plcy3
Table 1-9 display mpls l2vc command 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 |
VC State |
Status of the VC |
Remote VC Label |
Remote VC label |
Tunnel Policy |
Tunnel policy configured |
# 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 ethernet 1025 0 1500
Table 1-10 display mpls l2vc remote-info command 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 |
Control word, which can be 0 or 1 |
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 ] ]
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 specified VPN.
remote-ce: Displays the configurations and status of remote CEs learned from other PEs.
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 1-11 display mpls l2vpn export-route-target-list command 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 ethernet 500:1 888 0 0
Table 1-12 display mpls l2vpn command 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) |
Local CE number |
ce(R) |
Remote CE number |
# 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 1-13 display mpls l2vpn vpn-name command output description
Field |
Description |
VPN Name |
Name of the VPN |
Encap type |
Encapsulation type |
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 1-14 display mpls l2vpn vpn-name local-ce command 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 1-15 display mpls l2vpn vpn-name remote-ce command 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 [ vpn-name vpn-name [ remote-ce ce-id | down | up | verbose ] ]
display mpls l2vpn connection [ interface interface-type interface-number | summary]
View
Any view
Default Level
1: Monitor level
Parameters
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 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.
interface interface-type interface-number: Specifies an interface by its type and number.
summary: Displays summary information about connections.
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 Vlan2
Table 1-16 display mpls l2vpn connection command 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 |
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 Vlan2
For descriptions of the output fields of the command, see Table 1-16.
# Display information about Kompella L2VPN connections on interface Vlan-interface 2.
<Sysname> display mpls l2vpn connection interface Vlan-interface 2
***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) : Vlan-interface2 (up,vlan)
Peer id : 3.3.3.9
Route-distinguisher : 100:1
Local vc label : 132100
Remote vc label : 132097
Tunnel policy : policy1
Tunnel Type : lsp
Tunnel ID : 0x226013
Table 1-17 display mpls l2vpn connection interface command 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 |
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 1-18 mpls l2vpn connection summary command 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 forwarding-info
Syntax
display mpls l2vpn forwarding-info [ vc-label ] interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]
View
Any view
Default Level
1: Monitor level
Parameters
vc-label: L2VPN VC label, in the range 16 to 4294967295.
interface-type interface-number: Specifies an interface by its type and number.
|: Uses a regular expression to filter the output information. For details about regular expression, refer to Basic System Configuration in the System Volume.
begin: Displays all lines starting with the line that matches the regular expression.
exclude: Displays all lines other than those matching the regular expression..
include: Displays all lines matching the regular expression.
regular-expression: Regular expression, a case-sensitive string of 1 to 80 characters.
Description
Use the display mpls l2vpn forwarding-info command to display MPLS L2VPN forwarding information.
Examples
# Display MPLS L2VPN forwarding information.
<Sysname> display mpls l2vpn forwarding-info interface Vlan-interface 2
In interface : Vlan-interface2
Encapsulation type: vlan
MTU : 1500
Control word : 1
Entry type : send
Out VC label : 8193
Tunnel ID : 0x110002
Table 1-19 display mpls l2vpn forwarding-info command output description
Field |
Description |
In interface |
Incoming interface, which is bound to L2VPN |
MTU |
Maximum transmission unit |
Control word |
Whether control word is enabled. 0 means disabled, and 1 means enabled. |
Out VC label |
Outgoing VC label |
Tunnel ID |
ID of the public tunnel |
display mpls static-l2vc
Syntax
display mpls static-l2vc [ interface interface-type interface-number ]
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies a CE interface by its type and number.
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
Vlan2 up 3.3.3.9 100 200 policy1
Table 1-20 display mpls static-l2vc command 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 Vlan-interface 2.
<Sysname> display mpls static-l2vc interface Vlan-interface 2
***CE-interface : Vlan-interface2 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 1-21 display mpls static-l2vc interface command 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 |
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 [ tunnel-policy tunnel-policy-name ] [ control-word | no-control-word ]
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 1 to 4294967295.
tunnel-policy-name: Tunneling policy for the VC, a string of 1 to 19 characters.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
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.
l 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. The default tunneling policy uses LSP tunnels and the load balance number of one.
l At present, the S7500E series Ethernet switches do not support the control word option.
Related commands: tunnel select-seq load-balance-number in MPLS L3VPN Commands of the MPLS Volume.
Examples
# Create a Martini MPLS L2VPN connection.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] mpls l2vc 2.2.2.9 999
mpls l2vpn
Syntax
mpls l2vpn
undo mpls l2vpn
View
System 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.
You must use the mpls l2vpn command to enable MPLS L2VPN before configuring the other L2VPN commands.
Examples
# Enable MPLS L2VPN.
<Sysname> system-view
[Sysname] mpls l2vpn
mpls l2vpn vpn-name
Syntax
mpls l2vpn vpn-name [ encapsulation { ethernet | 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.
ethernet: Uses Ethernet 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 command to create a Kompella VPN and enter MPLS L2VPN view.
Use the undo mpls l2vpn command to delete a VPN.
The encapsulation type specified here must match that of the CE interface.
At present, the S7500E series Ethernet switches do not support the control word option.
Examples
# Create Kompella VPN named vpn1 and enter MPLS L2VPN view.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1 encapsulation ethernet
[Sysname-mpls-l2vpn-vpn1]
# Create Kompella VPN named 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 destination
Syntax
mpls static-l2vc destination destination-router-id transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ tunnel-policy tunnel-policy-name ] [ control-word | no-control-word ]
undo mpls static-l2vc
View
Interface view
Default Level
2: System level
Parameters
dest-router-id: Destination router ID.
transmit-label-value: Outgoing label for the VPN, namely the outgoing label for the static level 2 VC. The value ranges from 16 to 1023.
receive-label-value: Incoming label for the VPN, namely the incoming label for the static level 2 VC. The value ranges from 16 to 1023.
tunnel-policy-name: Tunneling policy for the VC, a string of 1 to 19 characters.
control-word: Enables the control word option.
no-control-word: Disables the control word option.
Description
Use the mpls static-l2vc destination command to create a static VC between CEs connected to different PEs.
Use the undo mpls static-l2vc command to delete the static VC.
l 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.
l 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. The default tunneling policy uses LSP tunnels and the load balance number is one.
l At present, the S7500E series Ethernet switches do not support the control word option.
Examples
# Create a static VC between CEs connected to different PEs.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] 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.
The mtu command is not recommended because it affects only negotiation of protocol parameters that may take place and does not affects the forwarding.
Examples
# Set the MTU for Kompella connections to 1000.
<Sysname> system-view
[Sysname] mpls l2vpn vpn1
[Sysname-mpls-l2vpn-vpn1] mtu 1000
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 1 to 65535.
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 either of the following formats:
l 16-bit AS number:32-bit user-defined number. For example, 101:3.
l 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15: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.
l You cannot change an RD directly; you can only delete the VPN and then re-create the VPN using the new RD.
l 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.
l 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 ethernet
[Sysname-mpls-l2vpn-vpn1] route-distinguisher 300:1
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: VPN target extended community attributes to be added to the import or export VPN target extended community list, in the format of nn:nn or IP-address:nn. It can be a string of 3 to 21 characters. &<1-16> means that you can specify this argument for up to 16 times.
A VPN target can be in either of the following formats:
l 16-bit AS number:32-bit user-defined number. For example, 101:3.
l 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
both: Specifies both the export and import VPN extended communities. This is the default.
export-extcommunity: Specifies the export VPN extended community.
import-extcommunity: Specifies the import VPN extended community.
all: Specifies both the import and export VPN extended communities.
Description
Use the vpn-target command to associate a particular VPN with one or more VPN targets.
Use the undo vpn-target command to delete the VPN target(s) associated with a particular VPN.
There is no default value for a VPN target. You must configure it when creating the VPN.
Examples
# Associate VPN vpn1 with VPN targets.
<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