205
Creating and configuring an MPLS L2VPN
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Create an MPLS L2VPN and
enter MPLS L2VPN view.
mpls l2vpn
vpn-name
[
encapsulation
{
ethernet
|
vlan
}
]
You must create an L2VPN
name on the PE for each VPN
where a directly connected
CE resides, and specify an
encapsulation type matching
that of the AC link.
3.
Configure an RD for the MPLS
L2VPN.
route-distinguisher
route-distinguisher
Once configured, an RD
cannot be changed, unless
you delete the L2VPN and
then re-create it.
4.
Associate the MPLS L2VPN
with one or more VPN targets.
vpn-target
vpn-target
&<1-16>
[
both
|
export-extcommunity
|
import-extcommunity
]
N/A
5.
Set the Layer 2 MTU for the
MPLS L2VPN.
mtu
mtu
The
mtu
command affects
only parameter negotiations,
if any. It does not affect data
forwarding. H3C does not
recommend using this
command.
Creating a CE connection
Configuration parameters and guidelines
•
id
ce-id
: Specifies the CE ID of a local CE connected to the PE.
•
range
ce-range
: Specifies the CE range—the maximum number of CEs to which the specified CE
can connect.
You can configure a CE range greater than what is required based on your estimate of the future
VPN expansion. This can reduce the configuration modification required when CEs are added into
the VPN in future.
•
default-offset
default-offset
: Specifies the initial CE ID, 0 or 1. 0 indicates CEs in the VPN are
numbered from 0. 1 indicates CEs in the VPN are numbered from 1.
This parameter and the CE range together determine the label blocks that the PE assigns to CEs:
{
When you first execute the
ce
command and specify the CE range as
ce-range1
, the PE assigns
the first label block. The LR of the label block equals
ce-range1
. If the
default-offset
is 0, the LO
of the label block is 0. Otherwise, the LO is 1.
{
When you execute the
ce
command for the second time and specify the CE range as
ce-range2
(greater than
ce-range1
), the PE assigns the second label block. The LR of the second label
block =
ce-range2
–
ce-range1
. If the
default-offset
is 0, the LO of the label block is
ce-range1
.
Otherwise, the LO is
ce-range1
+1.
The subsequent label blocks are calculated in the same way. For example, if you execute the
following commands on the PE in order, the PE assigns three label blocks. They are LB1/0/10,
LB2/10/12, and LB3/22/14, where LB1, LB2, and LB3 are label values automatically selected
by the PE.