From VLAN to VPN
A site switch carries VLANs. The WAN Edge decides which service VPN each VLAN belongs to. The assignment is made on the WAN Edge interface that terminates the VLAN, so a change of VPN is a change of interface configuration, not of the switch.
A VLAN is attached to a VPN on the WAN Edge.
- Hostin VLAN 10
- Trunkto WAN Edge
- Subinterfaceassigned to VPN 10
- OMPadvertises prefix
| Method | Used when | Note |
|---|---|---|
| Routed physical interface | One segment per port | Simplest; no VLAN tags |
| Subinterface with a VLAN ID | Several VLANs on one trunk to the WAN Edge | Each subinterface can be in a different VPN |
| VLAN interface on a switching module | The WAN Edge has built-in switch ports | Availability depends on the platform |
Addressing rules
- Each interface address must be unique inside its own VPN, not across the device.
- The same subnet may appear in two VPNs, which is common after company mergers.
- Pick one VPN number per segment and use it at every site, so OMP joins the sites into one segment.
- Document which VLAN maps to which VPN, since the switch alone does not show it.
Two VPNs can hold the same prefix.
vpn 10
interface ge0/1.10
vlan-id 10
ip address 192.168.10.1/24
no shutdown
vpn 20
interface ge0/1.20
vlan-id 20
ip address 192.168.10.1/24
no shutdownFragment of an example vEdge-style configuration for BR-01, shortened. Two VLANs on one trunk go to different VPNs and use the same example subnet. IOS XE syntax differs, using VRFs and encapsulation dot1Q.
BR-01#show ip route vrf 10 C 192.168.10.0/24 is directly connected, ge0/1.10
Learn more: Service VPN ArchitectureVPN 0: Transport Interfaces
Test yourself
Two VLANs on one trunk need different segments. What do you configure on the WAN Edge?
VPN 10 and VPN 20 both use 192.168.10.0/24. What is the effect?