VPLS Flat Auto Discovery

Note before: If using "address-family l2vpn vpls" between IOS and IOS-XR or IOS and Junos, on the IOS side "neighbor x.x.x.x prefix-length-size 2" must be configured because IOS-XR and Junos interpret the NLRI prefix length field as 2 bytes but IOS by default encodes the NLRI length in the fist byte in bits format in the BGP Update message.

ME3800 and ASR1002

! ME3800
l2 vfi VPLS-200 autodiscovery
 vpn id 200
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/2
 switchport trunk allowed vlan none
 switchport mode trunk
 service instance 2 ethernet
  encapsulation dot1q 200
  bridge-domain 200
!
interface Vlan200
 no ip address
 xconnect vfi VPLS-200
!
mpls ldp router-id Loopback0 force
!
interface GigabitEthernet0/18
 no switchport
 ip address 100.1.0.2 255.255.0.0
 mpls ip
 mpls label protocol ldp
!
router ospf 100
 network 4.4.4.4 0.0.0.0 area 0
 network 100.1.0.0 0.0.255.255 area 0
!
router bgp 1000
 bgp log-neighbor-changes
 bgp update-delay 30
 no bgp default ipv4-unicast
 neighbor 5.5.5.5 remote-as 1000
 neighbor 5.5.5.5 update-source Loopback0
 !
 address-family l2vpn vpls
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community extended


! ASR1002
l2 vfi VPLS-200 autodiscovery
 vpn id 200
 bridge-domain 200
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/0/1
 no ip address
 negotiation auto
 service instance 1 ethernet
  encapsulation dot1q 100
  bridge-domain 100
!
mpls ldp router-id Loopback0 force
!
interface GigabitEthernet0/0/0
 ip address 100.1.0.1 255.255.0.0
 negotiation auto
 mpls ip
 mpls label protocol ldp
!
router ospf 100
 network 5.5.5.5 0.0.0.0 area 0
 network 100.1.0.0 0.0.255.255 area 0
!
router bgp 1000
 bgp log-neighbor-changes
 bgp update-delay 30
 no bgp default ipv4-unicast
 neighbor 4.4.4.4 remote-as 1000
 neighbor 4.4.4.4 update-source Loopback0
 !
 address-family l2vpn vpls
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended