Professional Documents
Culture Documents
i
1 MPLS L2VPN Configuration Commands
Syntax
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.
1-1
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
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
1-2
[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
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
Examples
1-3
<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
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
Description
Use the display bgp l2vpn command to display information about BGP L2VPN in the BGP routing
table.
Related commands: route-distinguisher.
Examples
1-4
Table 1-1 display bgp l2vpn all command output description
Field Description
Route origin codes, which can be:
i – IGP: Indicates that the network layer reachability information is from
within the AS
Origin codes 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
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
1-5
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
1-6
Field Description
Total number of received messages and that of
Received
received update messages
Total number of sent messages and that of
Sent
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
Field Description
Route origin codes, which can be:
i – IGP: Indicates that the network layer reachability information is from
within the AS
Origin codes 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
1-7
Table 1-5 display bgp l2vpn route-distinguisher ce-id command output description
Field Description
Route origin codes, which can be:
i – IGP: Indicates that the network layer reachability information is from
within the AS
Origin codes 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.
Field Description
Route origin codes, which can be:
i – IGP: Indicates that the network layer reachability information is from
within the AS
Origin codes 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
1-8
Field Description
pref Preference
as-path AS-PATH of the route
encap type Encapsulation type
display ccc
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
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
1-9
State : down
Intf : Vlan-interface2 (up)
In-label : 100
Out-label : 200
Nexthop : 20.1.1.1
Field Description
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
Description
Use the display l2vpn ccc-interface vc-type command to display information about specified L2VPN
VC interfaces.
1-10
Examples
# 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
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
Syntax
View
Any view
Default Level
1: Monitor level
1-11
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
Field Description
total ldp vc Total number of Martini VCs
Transport VC ID Remote VC ID
# 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
Field Description
total remote ldp vc Total number of remote LDP VCs
Transport VC ID Remote VC ID
Remote VC group ID, used for the L2VPN VC FEC TLV field of
Group ID
LDP messages
Peer Addr IP address of the peer
1-12
Field Description
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
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
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
Field Description
export vpn target list BGP VPN export route target list
1-13
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
Field Description
VPN Name Name of the VPN
Encap type Encapsulation type
MTU Maximum transmission unit
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
1-14
Field Description
LB Label block
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
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.
1-15
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
Field Description
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
connections
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
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
1-16
***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
1-17
Table 1-18 mpls l2vpn connection summary command output description
Field Description
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
connections
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
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display mpls l2vpn forwarding-info command to display MPLS L2VPN forwarding
information.
Examples
1-18
In interface : Vlan-interface2
Encapsulation type: vlan
MTU : 1500
Control word : 1
Entry type : send
Out VC label : 8193
Tunnel ID : 0x110002
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
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
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
1-19
Table 1-20 display mpls static-l2vc command output description
Field Description
Statistics about connection, including the total number of
total connections 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
Field Description
CE-interface Name of the CE interface
l2vpn-family
Syntax
l2vpn-family
undo l2vpn-family
1-20
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
mpls l2vc
Syntax
View
Interface view
Default Level
2: System level
Parameters
Description
1-21
z 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
mpls l2vpn
Syntax
mpls l2vpn
undo mpls l2vpn
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
Syntax
View
1-22
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]
Syntax
View
Interface view
Default Level
2: System level
1-23
Parameters
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.
z 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.
z 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.
z At present, the S7500E series Ethernet switches do not support the control word option.
Examples
Syntax
mtu mtu
undo mtu
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.
1-24
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
Syntax
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
1-25
route-distinguisher (MPLS L2VPN view)
Syntax
route-distinguisher route-distinguisher
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:
z 16-bit AS number:32-bit user-defined number. For example, 101:3.
z 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
Description
z You cannot change an RD directly; you can only delete the VPN and then re-create the VPN using
the new RD.
z 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.
z Once you configure an RD for a VPN, you cannot remove the association between the RD and the
VPN.
Examples
Syntax
1-26
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:
z 16-bit AS number:32-bit user-defined number. For example, 101:3.
z 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
1-27