Building on the WAN and multicast design from Part 2, this phase connects headquarters and Branch 2 through a Metro Ethernet service. Customer switches at both sites attach to the provider network, creating one Layer 2 service across the Metro path.
Topology
Customer and provider VLAN spaces
Q-in-Q allows a provider to carry a customer's tagged Ethernet frames inside a second VLAN tag. Customer tag stays as inner C-tag, and provider adds an outer S-tag to identify the Metro service.
This solves VLAN overlap between customers. Different customers can use the same internal VLAN number because provider separates their traffic with different service tags. In this lab, customer VLAN 310 is carried inside provider service VLAN 3000.
Customer trunk: [destination][source][C-tag 310][EtherType][payload]Provider NNI: [destination][source][S-tag 3000][C-tag 310][EtherType][payload]For this service, tag stack changes at four points:
| Location | Outer tag | Inner tag |
|---|---|---|
| customer trunk at headquarters | none | 310 |
| provider NNI | 3000 | 310 |
| customer trunk at Branch 2 | none | 310 |
| access port toward either host | none | none |
Customer VLAN 310 identifies subnet 10.100.30.0/24. It reaches provider at UNI, or User Network Interface, which is customer-facing handoff on each PE. In this topology, METRO-PE01 xe-0/0/0 and METRO-PE02 xe-0/0/1 are UNIs. Each UNI matches customer VLAN 310 through vlan-id-list 310 and adds service VLAN 3000 as outer tag.
NNI, or Network to Network Interface, connects provider switches to each other. METRO-PE01 xe-0/0/1 and METRO-PE02 xe-0/0/0 form NNI in this design. Frames cross this link with outer service tag 3000 and inner customer tag 310. Only customer VLAN 310 uses this service. The provider adds tag 3000 when traffic enters and removes it when traffic leaves.
Customer-side VLAN configuration
An access port associates untagged host frames with VLAN 310 and removes tag on egress toward host. A trunk preserves tag 310 between customer switches, provider UNI, and routed logical interface. This is why METRO-HQ-HOST and METRO-BR2-HOST use access ports, while inter-device links use trunks.
HQ-DIST01 carries VLAN 310 toward headquarters Metro CE:
set vlans BR2-METRO vlan-id 310set interfaces xe-0/0/5 unit 0 family ethernet-switching interface-mode trunkset interfaces xe-0/0/5 unit 0 family ethernet-switching vlan members BR2-METROHQ-METRO-CE01 uses a trunk toward HQ-DIST01, an access port for local host, and a trunk toward provider UNI:
set vlans BR2-METRO vlan-id 310set interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunkset interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members BR2-METROset interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode accessset interfaces xe-0/0/1 unit 0 family ethernet-switching vlan members BR2-METROset interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode trunkset interfaces xe-0/0/0 unit 0 family ethernet-switching vlan members BR2-METROset interfaces xe-0/0/0 mtu 9216BR2-METRO-CE01 mirrors the service at Branch 2. Its router-facing xe-0/0/2 remains a trunk because router expects tag 310 on logical unit 310:
set vlans BR2-METRO vlan-id 310set interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode trunkset interfaces xe-0/0/0 unit 0 family ethernet-switching vlan members BR2-METROset interfaces xe-0/0/0 mtu 9216set interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode accessset interfaces xe-0/0/1 unit 0 family ethernet-switching vlan members BR2-METROset interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunkset interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members BR2-METROConfigure endpoints after access ports are members of VLAN 310:
METRO-HQ-HOST> ip 10.100.30.10/24 10.100.30.1METRO-HQ-HOST> saveMETRO-BR2-HOST> ip 10.100.30.20/24 10.100.30.1METRO-BR2-HOST> saveProvider VLAN mapping
On each UNI, unit 3000 accepts customer VLAN 310. It adds provider tag 3000 when a frame enters and removes that tag when the frame leaves. flexible-vlan-tagging and extended-vlan-bridge enable this VLAN mapping.
native-vlan-id 310 and input-native-vlan-push enable place untagged LLDP and spanning-tree frames into the same service.
METRO-PE01
xe-0/0/0 is headquarters UNI:
set interfaces xe-0/0/0 mtu 9216set interfaces xe-0/0/0 flexible-vlan-taggingset interfaces xe-0/0/0 native-vlan-id 310set interfaces xe-0/0/0 input-native-vlan-push enableset interfaces xe-0/0/0 encapsulation extended-vlan-bridgeset interfaces xe-0/0/0 unit 3000 vlan-id-list 310set interfaces xe-0/0/0 unit 3000 input-vlan-map pushset interfaces xe-0/0/0 unit 3000 input-vlan-map vlan-id 3000set interfaces xe-0/0/0 unit 3000 output-vlan-map popxe-0/0/1.3000 is NNI logical interface and matches outer VLAN 3000:
set interfaces xe-0/0/1 mtu 9216set interfaces xe-0/0/1 flexible-vlan-taggingset interfaces xe-0/0/1 encapsulation extended-vlan-bridgeset interfaces xe-0/0/1 unit 3000 vlan-id 3000set vlans METRO-SVC-3000 interface xe-0/0/0.3000set vlans METRO-SVC-3000 interface xe-0/0/1.3000METRO-PE02
Roles reverse at far provider edge. xe-0/0/0 is NNI and xe-0/0/1 is Branch 2 UNI:
set interfaces xe-0/0/0 mtu 9216set interfaces xe-0/0/0 flexible-vlan-taggingset interfaces xe-0/0/0 encapsulation extended-vlan-bridgeset interfaces xe-0/0/0 unit 3000 vlan-id 3000set interfaces xe-0/0/1 mtu 9216set interfaces xe-0/0/1 flexible-vlan-taggingset interfaces xe-0/0/1 native-vlan-id 310set interfaces xe-0/0/1 input-native-vlan-push enableset interfaces xe-0/0/1 encapsulation extended-vlan-bridgeset interfaces xe-0/0/1 unit 3000 vlan-id-list 310set interfaces xe-0/0/1 unit 3000 input-vlan-map pushset interfaces xe-0/0/1 unit 3000 input-vlan-map vlan-id 3000set interfaces xe-0/0/1 unit 3000 output-vlan-map popset vlans METRO-SVC-3000 interface xe-0/0/0.3000set vlans METRO-SVC-3000 interface xe-0/0/1.3000The mirrored configuration gives same operation in both directions. A frame entering either UNI with customer tag 310 receives outer tag 3000. A frame arriving from NNI with tag stack 3000/310 loses outer tag before delivery toward customer CE.
On vQFX, Q-in-Q forwarding does not work correctly. Both tags appear on NNI and are removed at far UNI, so end-to-end traffic fails.
Layer 2 protocol tunnelling
Ethernet control protocols use reserved multicast MAC addresses. A provider edge normally processes frames sent to those addresses instead of forwarding them through customer service. This behavior would divide customer Layer 2 control plane at Metro boundary.
Layer 2 protocol tunnelling, or L2PT, rewrites control-frame destination MAC when frame enters UNI. Provider bridge treats rewritten frame as service traffic and carries it across NNI. Far provider edge restores original destination before sending frame to customer CE.
In this lab we try to tunnel STP and LLDP. Customer CEs can form one RSTP topology and discover each other with LLDP across provider service. Provider switches must not run their own LLDP or RSTP on customer-facing UNIs, since local protocol processing would consume customer frames before rewrite.
Remove factory-wide protocol activation on both PEs if present:
delete protocols lldp interface alldelete protocols rstp interface allApply MAC rewrite on METRO-PE01 headquarters UNI:
set protocols layer2-control mac-rewrite interface xe-0/0/0 protocol stpset protocols layer2-control mac-rewrite interface xe-0/0/0 protocol lldpApply it on METRO-PE02 Branch 2 UNI:
set protocols layer2-control mac-rewrite interface xe-0/0/1 protocol stpset protocols layer2-control mac-rewrite interface xe-0/0/1 protocol lldpOn both customer edges, enable protocols only on service-facing xe-0/0/0:
delete protocols lldp interface alldelete protocols rstp interface allset protocols lldp interface xe-0/0/0set protocols rstp interface xe-0/0/0On vQFX, LLDP MAC rewrite does not work either, so LLDP frames are not tunnelled across the service.
Routed service termination
BR2-METRO-CE01 sends tagged VLAN 310 to BR2-EDGE01. The router uses logical interface ge-0/0/3.310 as the gateway for the Metro subnet:
set interfaces ge-0/0/3 vlan-taggingset interfaces ge-0/0/3 unit 310 vlan-id 310set interfaces ge-0/0/3 unit 310 family inet address 10.100.30.1/24set protocols ospf area 0.0.0.1 interface ge-0/0/3.310 passiveThe routed subinterface completes the service boundary at Branch 2. Hosts at both sites share one Ethernet segment across provider network, and BR2-EDGE01 routes traffic leaving that segment. The passive OSPF statement carries Metro subnet into the Phase 2 routing domain without forming an adjacency on customer network.
