Course contents

Unit 4: VPNs and segmentationLesson 4.4 (4 of 5 in this unit)24 of 62 in the Cisco SD-WAN course

VLAN interfaces, VRF routing and addressing

How LAN interfaces and VLAN subinterfaces are attached to service VPNs, how gateways are addressed, and why the same subnet can live in two VPNs.

Intermediate · 8 min read

You'll learn to place LAN interfaces and VLANs into service VPNs, give each segment a gateway address, and explain why overlapping subnets in different VPNs do not clash.

Technical definition

Service-side interface is an interface on the LAN side of a WAN Edge that belongs to a service VPN. It can be a physical routed port, a VLAN subinterface on a trunk, or a VLAN interface, depending on the platform. Its address is the default gateway for hosts in that segment.

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.

Diagram
LAN to VPN
LAN to VPN

A VLAN is attached to a VPN on the WAN Edge.

  1. Hostin VLAN 10
  2. Trunkto WAN Edge
  3. Subinterfaceassigned to VPN 10
  4. OMPadvertises prefix
The interface carries the segment into the fabric.
Diagram
Ways to attach a segment
Ways to attach a segment
MethodUsed whenNote
Routed physical interfaceOne segment per portSimplest; no VLAN tags
Subinterface with a VLAN IDSeveral VLANs on one trunk to the WAN EdgeEach subinterface can be in a different VPN
VLAN interface on a switching moduleThe WAN Edge has built-in switch portsAvailability depends on the platform
Platform support differs; check the data sheet for the model.

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.
Diagram
Overlapping subnets
Overlapping subnets

Two VPNs can hold the same prefix.

VPN 10192.168.10.0/24Staff
VPN 20192.168.10.0/24Guests
Safe until a route leak joins them.
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 shutdown

Fragment 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.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#show ip route vrf 10
C    192.168.10.0/24 is directly connected, ge0/1.10
The routing table of VPN 10 holds its own connected subnet. VPN 20 would show the same prefix on a different interface, and neither sees the other. The command form varies by platform.

Learn more: Service VPN ArchitectureVPN 0: Transport Interfaces

Test yourself

Predict · scenario 1

Two VLANs on one trunk need different segments. What do you configure on the WAN Edge?

Predict · scenario 2

VPN 10 and VPN 20 both use 192.168.10.0/24. What is the effect?

FAQ

Can two VPNs use the same subnet?
Yes. Each VPN has its own routing table, so 192.168.10.0/24 can exist in VPN 10 and in VPN 20 without conflict. It becomes a problem only if a policy leaks routes between them.
How do several VLANs share one physical port?
The port is a trunk. Each VLAN gets a subinterface or a VLAN interface, and each of those is assigned to a service VPN. Several VLANs can go to the same VPN or to different ones.
Where do hosts point their default gateway?
At the address of the WAN Edge interface in their service VPN, or at a first-hop redundancy address if two WAN Edges share the site.