l2vpn on Juniper using logical-systems

Fri 07 February 2014 by someone

Here is a snippet.

set logical-systems C1 interfaces ge-7/2/0 unit 512 encapsulation vlan-ccc
set logical-systems C1 interfaces ge-7/2/0 unit 512 vlan-id 512
set logical-systems C1 interfaces lt-7/3/0 unit 12 description C1->C2
set logical-systems C1 interfaces lt-7/3/0 unit 12 encapsulation ethernet
set logical-systems C1 interfaces lt-7/3/0 unit 12 peer-unit 21
set logical-systems C1 interfaces lt-7/3/0 unit 12 family inet address 10.0.12.1/30
set logical-systems C1 interfaces lt-7/3/0 unit 12 family mpls
set logical-systems C1 interfaces lo0 unit 1 family inet address 172.31.255.1/32
set logical-systems C1 protocols rsvp interface all
set logical-systems C1 protocols mpls label-switched-path vpn-CUST1-to-C2 to 172.31.255.2
set logical-systems C1 protocols mpls label-switched-path vpn-CUST1-to-C2 no-cspf
set logical-systems C1 protocols mpls interface all
set logical-systems C1 protocols bgp group iMBGP type internal
set logical-systems C1 protocols bgp group iMBGP family l2vpn signaling
set logical-systems C1 protocols bgp group iMBGP neighbor 172.31.255.2 multihop
set logical-systems C1 protocols bgp group iMBGP neighbor 172.31.255.2 local-address 172.31.255.1
set logical-systems C1 protocols ospf traffic-engineering
set logical-systems C1 protocols ospf area 0.0.0.0 interface lt-7/3/0.12
set logical-systems C1 protocols ospf area 0.0.0.0 interface lo0.1
set logical-systems C1 routing-instances CUST1 instance-type l2vpn
set logical-systems C1 routing-instances CUST1 interface ge-7/2/0.512
set logical-systems C1 routing-instances CUST1 route-distinguisher 172.31.255.1:1
set logical-systems C1 routing-instances CUST1 vrf-target target:420000000L:100
set logical-systems C1 routing-instances CUST1 protocols l2vpn encapsulation-type ethernet-vlan
set logical-systems C1 routing-instances CUST1 protocols l2vpn interface ge-7/2/0.512
set logical-systems C1 routing-instances CUST1 protocols l2vpn site PE-C1 site-identifier 1
set logical-systems C1 routing-instances CUST1 protocols l2vpn site PE-C1 interface ge-7/2/0.512
set logical-systems C1 routing-options autonomous-system 420000000
set logical-systems C2 interfaces ge-7/2/1 unit 512 encapsulation vlan-ccc
set logical-systems C2 interfaces ge-7/2/1 unit 512 vlan-id 512
set logical-systems C2 interfaces lt-7/3/0 unit 21 description C2->C1
set logical-systems C2 interfaces lt-7/3/0 unit 21 encapsulation ethernet
set logical-systems C2 interfaces lt-7/3/0 unit 21 peer-unit 12
set logical-systems C2 interfaces lt-7/3/0 unit 21 family inet address 10.0.12.2/30
set logical-systems C2 interfaces lt-7/3/0 unit 21 family mpls
set logical-systems C2 interfaces lo0 unit 2 family inet address 172.31.255.2/32
set logical-systems C2 protocols rsvp interface all
set logical-systems C2 protocols mpls label-switched-path vpn-CUST1-to-C1 to 172.31.255.1
set logical-systems C2 protocols mpls label-switched-path vpn-CUST1-to-C1 no-cspf
set logical-systems C2 protocols mpls interface all
set logical-systems C2 protocols bgp group iMBGP type internal
set logical-systems C2 protocols bgp group iMBGP family l2vpn signaling
set logical-systems C2 protocols bgp group iMBGP neighbor 172.31.255.1 multihop
set logical-systems C2 protocols bgp group iMBGP neighbor 172.31.255.1 local-address 172.31.255.2
set logical-systems C2 protocols ospf traffic-engineering
set logical-systems C2 protocols ospf area 0.0.0.0 interface lt-7/3/0.21
set logical-systems C2 protocols ospf area 0.0.0.0 interface lo0.2
set logical-systems C2 routing-instances CUST1 instance-type l2vpn
set logical-systems C2 routing-instances CUST1 interface ge-7/2/1.512
set logical-systems C2 routing-instances CUST1 route-distinguisher 172.31.255.2:1
set logical-systems C2 routing-instances CUST1 vrf-target target:420000000L:100
set logical-systems C2 routing-instances CUST1 protocols l2vpn encapsulation-type ethernet-vlan
set logical-systems C2 routing-instances CUST1 protocols l2vpn interface ge-7/2/1.512
set logical-systems C2 routing-instances CUST1 protocols l2vpn site PE-C2 site-identifier 2
set logical-systems C2 routing-instances CUST1 protocols l2vpn site PE-C2 interface ge-7/2/1.512
set logical-systems C2 routing-options autonomous-system 420000000
set chassis redundancy failover on-loss-of-keepalives
set chassis redundancy failover on-disk-failure
set chassis redundancy graceful-switchover
set chassis fpc 7 pic 3 tunnel-services
set chassis alarm management-ethernet link-down ignore
set chassis network-services enhanced-ip
set chassis fabric redundancy-mode increased-bandwidth
set interfaces ge-7/2/0 vlan-tagging
set interfaces ge-7/2/0 encapsulation vlan-ccc
set interfaces ge-7/2/1 vlan-tagging
set interfaces ge-7/2/1 encapsulation vlan-ccc

Customer A is on the ge-7/2/0 vlan 512, customer B is on the ge-7/2/1 vlan 512i.

  • Interface has to have vlan-tagging and encapsulation vlan-ccc under interface itself, and encapsulation vlan-ccc under the unit.

  • BGP must have family l2vpn signaling

  • routing-instances configure instance-type l2vpn, include interface pointing to the customer interface ge-N/N/N, route-distinguisher, vrf-target, protocols l2vpn encapsulation-type ethernet-vlan, interface unit as protocols l2vpn interface ge-N/N/N.UNIT, site identifier, and interface unit again under the site stanza.