205Creating and configuring an MPLS L2VPNStep Command Remarks1. Enter system view. system-view N/A2. Create an MPLS L2VPN andenter MPLS L2VPN view.mpls l2vpn vpn-name [ encapsulation{ ethernet | vlan } ]You must create an L2VPNname on the PE for each VPNwhere a directly connectedCE resides, and specify anencapsulation type matchingthat of the AC link.3. Configure an RD for the MPLSL2VPN. route-distinguisher route-distinguisherOnce configured, an RDcannot be changed, unlessyou delete the L2VPN andthen re-create it.4. Associate the MPLS L2VPNwith one or more VPN targets.vpn-target vpn-target&<1-16> [ both |export-extcommunity |import-extcommunity ]N/A5. Set the Layer 2 MTU for theMPLS L2VPN. mtu mtuThe mtu command affectsonly parameter negotiations,if any. It does not affect dataforwarding. H3C does notrecommend using thiscommand.Creating a CE connectionConfiguration 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 CEcan connect.You can configure a CE range greater than what is required based on your estimate of the futureVPN expansion. This can reduce the configuration modification required when CEs are added intothe VPN in future.• default-offset default-offset: Specifies the initial CE ID, 0 or 1. 0 indicates CEs in the VPN arenumbered 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 assignsthe first label block. The LR of the label block equals ce-range1. If the default-offset is 0, the LOof 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 labelblock = 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 thefollowing 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 selectedby the PE.