vlan batch 20 30
#
mpls lsr-id 2.2.2.2
 mpls
#
 mpls l2vpn
#
mpls ldp
#
interface Vlanif20
 ip address 20.1.1.2 255.255.255.0
 mpls
 mpls ldp
#
interface Vlanif30
#
interface GigabitEthernet1/0/0
 port link-type trunk
 port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
 port trunk allow-pass vlan 30
#
 mpls l2vpn vpn1 encapsulation vlan
  route-distinguisher 100:2
  vpn-target 1:1 import-extcommunity
  vpn-target 1:1 export-extcommunity
  ce ce2 id 2 range 10 default-offset 0
   connection ce-offset 1 interface Vlanif30
 #
#
interface LoopBack1
 ip address 2.2.2.2 255.255.255.255
#
bgp 100
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 connect-interface LoopBack1
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
 #
 l2vpn-family
  policy vpn-target
  peer 1.1.1.1 enable
#
ospf 1
 area 0.0.0.0
  network 2.2.2.2 0.0.0.0
  network 20.1.1.0 0.0.0.3
#
return
l Configuration file of ASBR-PE2
#
 sysname ASBR-PE2
#
 vlan batch 30 40
#
 mpls lsr-id 3.3.3.3
 mpls
#
 mpls l2vpn
#
mpls ldp
#
interface Vlanif30
#
interface Vlanif40
 ip address 40.1.1.1 255.255.255.0
Quidway S7700 Smart Routing Switch
Configuration Guide - VPN 5 VLL Configuration
Issue 01 (2011-07-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
536