Technical/How-To VCF Platform

VCF 9.1 VPC Networking, Part 4: VLAN Extension Under the Hood

VLAN extension in VCF 9.1: one VPC subnet bridged to an existing VLAN
Series · Part 4 of 6
The VCF 9.1 VPC Networking Mental Model
4VCF 9.1 VPC Networking, Part 4: VLAN Extension Under the HoodYou are here
5VCF 9.1 VPC Networking, Part 5: Four Gates for VPC TrafficComing soon
6VCF 9.1 VPC Networking, Part 6: The VPC North-South Firewall and Its CoverageComing soon

This is Part 4 of the series The VCF 9.1 VPC Networking Mental Model. Part 3 showed how the Distributed Transit Gateway (DTGW) connects Virtual Private Clouds (VPCs) to the physical network with no NSX Edge and no routing protocol. The External IP block sits inside the external VLAN’s CIDR, so the physical router sees VPC addresses as directly connected.

This part answers the second question from Part 3. How can a VPC subnet share one broadcast domain with a VLAN that already has servers and a gateway on it? Section numbers carry on from Part 3, so this part starts at section 4.

Core idea

If the DTGW puts a till at the end of every aisle, VLAN extension knocks a doorway through to the old shop next door. Both share one floor while the stock moves across. A single VPC subnet is bridged to an existing VLAN. The subnet takes the same CIDR and uses the same physical gateway. VMs move across without renumbering.

4. VLAN extension: the problem it solves

Everything so far assumes the VPC owns its addresses. Real estates rarely start that way. You have a VLAN, a /24, a gateway on a core switch, a few bare-metal boxes, and a pile of VMs on a DVPG. Renumbering all of it to adopt VPCs is the reason most migrations stall.

VLAN extension removes renumbering from the plan. A single VPC subnet is bridged to an existing VLAN, so that VLAN and its CIDR become reachable through that one subnet. The VPC subnet takes the same CIDR as the VLAN and uses the same physical gateway. A VM moved from the DVPG to the VPC subnet keeps its IP, mask and gateway. It still sits in the same broadcast domain as everything left behind.

One subnet, one VLAN, one broadcast domain. The Distributed VLAN Connection (DLC) dedicated to the subnet is the glue, and in Layer 2 plus Layer 3 mode, the subnet's Layer 3 gateway runs on the VPC Gateway.
Figure 1. One subnet, one VLAN, one broadcast domain. The Distributed VLAN Connection (DLC) dedicated to the subnet is the glue, and in Layer 2 plus Layer 3 mode, the subnet’s Layer 3 gateway runs on the VPC Gateway.

5. Under the hood: the four objects and how they bind

VLAN extension is not a new object. It is a specific way of wiring four existing ones. The wiring is what makes it safe.

The reserved IP block

You create an IP block with exactly the VLAN’s CIDR, set its visibility to External, and turn on Reserved for Specific Subnet. Once reserved, the block can be assigned to one subnet only. No other subnet can share it. This is the guard rail that stops NSX from carving the VLAN’s addresses into some unrelated public subnet.

This block is separate from the External IP block the transit connection uses. The extended subnet is not carved out of the transit block. It brings its own, equal to the VLAN’s CIDR.

In the lab: the reserved block for VLAN 121 is exactly the VLAN's /24, External, and Reserved for Specific Subnet. Usage shows 100 percent because the whole block belongs to one subnet.
Figure 2. In the lab: the reserved block for VLAN 121 is exactly the VLAN’s /24, External, and Reserved for Specific Subnet. Usage shows 100 percent because the whole block belongs to one subnet.

The subnet-dedicated Distributed VLAN Connection

This is the same Distributed VLAN Connection (DLC) type a DTGW uses for north-south, with the Dedicated to Subnet toggle on. The fields change meaning:

  • VLAN ID is the VLAN being extended, not a transit VLAN.
  • Gateway CIDR is the VLAN’s existing physical gateway, for example 10.60.10.1/24.
  • VLAN/Subnet Block is the reserved block from the previous step.
  • Subnet Extension Connection is either Layer 2 or Layer 2 and Layer 3.

In a custom project, the provider creates the DLC in Default and shares it with the project like any other external connection.

In the lab: a subnet-dedicated DLC for VLAN 121. It uses the VLAN's real gateway 192.168.121.1/24, the reserved block, and Layer 2 mode, so it is not attached to any transit gateway.
Figure 3. In the lab: a subnet-dedicated DLC for VLAN 121. It uses the VLAN’s real gateway 192.168.121.1/24, the reserved block, and Layer 2 mode, so it is not attached to any transit gateway.

The optional DTGW attachment

For Layer 3 connectivity, you attach the DLC to the extended subnet’s Transit Gateway as one of its external connections. Skip this for pure Layer 2.

In the lab: a DLC for VLAN 220 set to Layer 2 and Layer 3. The form's own diagram adds the Transit Gateway and VPC Gateway that a Layer 2 DLC leaves out. This DLC is then added to ip-man-dtgw as a second external connection.
Figure 4. In the lab: a DLC for VLAN 220 set to Layer 2 and Layer 3. The form’s own diagram adds the Transit Gateway and VPC Gateway that a Layer 2 DLC leaves out. This DLC is then added to ip-man-dtgw as a second external connection.

The VPC subnet

Finally, you create the subnet with VLAN Extension on, choose the access mode, and select the DLC as its VLAN Connection. Two details matter:

  • Access mode is Public. The form also offers L2 Only once VLAN Extension is on, but that mode belongs to the TEP-less VLAN-backed model in section 9, where the Transit Gateway’s connection is None. In the lab, with the VPC on a DTGW, L2 Only listed no VLAN connection at all, while Public listed the dedicated DLC.
  • DHCP is not available on a VLAN-extended subnet. Whatever served addresses on the VLAN before, static or an existing DHCP server, keeps doing so.

The result: the extended subnet is mapped directly to the VLAN, takes its gateway IP from the dedicated connection, and VMs on the subnet can bridge to VMs still connected to the DVPG.

6. Layer 2 versus Layer 2 plus Layer 3

The key setting is the Subnet Extension Connection, together with the subnet toggle VPC Gateway Connectivity.

First, where the choice lives. Layer 2 versus Layer 2 and Layer 3 is not a subnet option and not a DTGW option. It is a field on the dedicated Distributed VLAN connection. The DTGW and the subnet only react to it:

ObjectWhat you set thereSets the Layer 2 or Layer 2 and Layer 3 choice?
Dedicated Distributed VLAN connection (Default project, External Connections)Dedicated to Subnet, VLAN ID, Gateway CIDR, VLAN/Subnet Block, Subnet Extension ConnectionYes. This is the only place it is set
DTGW (Edit Transit Gateway)Network Span, Connection, External Connection list, VPC Transit SubnetsNo. For Layer 2 and Layer 3 you add the connection to its External Connection list, nothing more
VPC subnet (Add Subnet)VLAN Extension, Access Mode, VLAN Connection, VPC Gateway ConnectivityNo. VPC Gateway Connectivity only appears when the chosen VLAN connection is set to Layer 2 and Layer 3

All three forms were checked in the lab. The connection decides the mode, the DTGW carries it, and the subnet shows the gateway toggle only when the mode allows it.

Here is how the two modes combine with the gateway toggle:

Layer 2Layer 2 + Layer 3
DLC attached to the DTGWNoYes, as an external connection
VPC Gateway Connectivity toggleOffOn
Overlay VMs route viaThe physical gateway on the VLANThe VPC Gateway
VLAN-side VMs route viaThe physical gatewayThe physical gateway
Overlay traffic through VPC and DTGW to outsideNot possibleYes
Good forMigration waves, appliance adjacency, clustered appsMigrated VMs that must also reach other VPCs and VPC services

In Layer 2 mode, overlay VMs cannot reach the outside world through the VPC and the DTGW. In Layer 2 plus Layer 3 mode, the extended subnet is connected to the VPC Gateway, so traffic can leave through the VPC and the DTGW. With the gateway toggle on, overlay VMs route through the VPC Gateway while VMs on the VLAN side keep routing through the VLAN’s physical gateway. The toggle only exists for Layer 2 plus Layer 3. In the lab, the subnet form showed VPC Gateway Connectivity when the selected DLC was set to Layer 2 and Layer 3, and dropped the option entirely when it was set to Layer 2.

In the lab: two extended subnets in the same VPC. ip-man-a-app-ext sits on a Layer 2 DLC and has no gateway connectivity setting. ip-man-a-web-ext sits on a Layer 2 and Layer 3 DLC and shows VPC Gateway Connectivity: Yes.
Figure 5. In the lab: two extended subnets in the same VPC. ip-man-a-app-ext sits on a Layer 2 DLC and has no gateway connectivity setting. ip-man-a-web-ext sits on a Layer 2 and Layer 3 DLC and shows VPC Gateway Connectivity: Yes.

That split is the thing to design around. In L2 plus L3 mode the same subnet has two routing exits. Overlay VMs exit through the VPC. VLAN-side hosts exit through the physical gateway. Make sure your firewall policy (the distributed firewall, the gateway firewall and any physical ACLs) is written for both paths.

7. Does every VLAN need its own external connection?

A common question once both models are on the table: with a DTGW, do I have to add every VLAN as an external connection? It depends on what the VLAN is for. A transit VLAN is a path out of the VPC domain. An extended VLAN is an existing workload network you want to keep. They scale in completely different ways.

Routed DTGW scales with exits. VLAN extension scales one VLAN at a time.
Figure 6. Routed DTGW scales with exits. VLAN extension scales one VLAN at a time.

Routed DTGW, no VLAN extension: no

In the routed model, workloads never sit on a VLAN of their own. Every VPC subnet is an overlay network. Public subnets, External IPs, and VIPs are carved from the External IP block, which lives inside the transit VLAN’s CIDR (section 2 of Part 3). One shared Distributed VLAN Connection therefore serves every VPC attached to that DTGW. A new application is a new subnet, not a new VLAN and not a new external connection.

You add another Distributed VLAN Connection only when you need another exit, not another network:

  • A separate path, such as Internet versus intranet. A Transit Gateway can carry more than one external connection to keep those paths apart, and a DTGW can have one or more distributed VLAN connections. All of them must be distributed.
  • A separate DTGW for a different tenant or span. Multiple DTGWs in a project can share a VLAN or use different ones, as long as public subnets and External IPs do not overlap between them.

So you end up with one transit VLAN or a few. The VLAN count tracks exits, not subnets.

VLAN extension: yes, one per VLAN

Here the answer flips. A subnet-dedicated DLC carries one VLAN ID, one gateway CIDR and one reserved IP block. A reserved block can be assigned to exactly one subnet. That makes the relationship strictly one to one to one: one extended VLAN, one dedicated DLC, one VPC subnet. Ten legacy VLANs to migrate means ten reserved blocks, ten dedicated DLCs and ten extended subnets.

Lab test: the VLAN 210 connection still shows up in another VPC's subnet form, but saving a second extended subnet fails because its reserved block is already in use (error 640524).
Figure 7. Lab test: the VLAN 210 connection still shows up in another VPC’s subnet form, but saving a second extended subnet fails because its reserved block is already in use (error 640524).

Whether those DLCs also show up on the DTGW depends on the mode. In Layer 2 mode they are never attached to the DTGW, so its external connection list does not change. In Layer 2 plus Layer 3 mode each one is attached to the DTGW as an external connection. That is allowed because it is the same distributed type as the transit connection.

Routed DTGWVLAN extension, Layer 2VLAN extension, Layer 2 + Layer 3
What the VLAN isTransit path to the fabricAn existing workload VLANAn existing workload VLAN
DLC flavourDistributed VLAN, sharedDistributed VLAN, Dedicated to SubnetDistributed VLAN, Dedicated to Subnet
How many DLCsOne per exitOne per extended VLANOne per extended VLAN
Attached to the DTGWYesNoYes
Address sourceExternal IP block inside the VLAN CIDR, shared by many VPCsReserved block equal to the VLAN CIDR, one subnetReserved block equal to the VLAN CIDR, one subnet

The practical rule: build new workloads on the routed model so your VLAN count stays flat. Use one dedicated DLC per legacy VLAN only while that VLAN is being migrated or genuinely needs Layer 2 adjacency.

8. The migration workflow

Build order, then the migration as the network sees it.
Figure 8. Build order, then the migration as the network sees it.
  1. Create the reserved IP block with the VLAN’s CIDR (External visibility, Reserved for Specific Subnet).
  2. Create the Distributed VLAN Connection with Dedicated to Subnet on, the VLAN ID, the physical gateway CIDR, and the reserved block. Pick Layer 2 or Layer 2 and Layer 3.
  3. For Layer 3, attach the DLC to the subnet’s DTGW. For a custom project, share the DLC with the project.
  4. Create the VPC subnet with VLAN Extension on, access mode Public, and the DLC as its VLAN connection. With a Layer 2 and Layer 3 DLC, leave VPC Gateway Connectivity on. A Layer 2 DLC does not offer it.
  5. In vSphere, move VMs from the DVPG to the new subnet, one at a time. IP, mask and gateway do not change.

During the migration, half-moved applications keep working because both halves are in one broadcast domain. When the last VM moves, the DVPG can retire while the VLAN stays for any physical hosts or appliances that still need it.

One day-2 detail: you can move a VPC that has a VLAN-extended subnet to a different DTGW, but you must attach the related DLC to the destination DTGW first, then detach it from the source.

9. The TEP-less variant: VLAN-backed VPC

The VLAN Backed VPC model takes the idea one step further: VPC subnets with no overlay at all. The VCF 9.1 design guide lists it as introduced in 9.1.1. The cluster is prepared with a Transport Node Profile whose TEP IP Address Type is None. There is no GENEVE, and east-west traffic between workloads on different hosts is carried by the physical VLAN fabric.

Distributed VLAN (overlay)VLAN-backed VPC (TEP-less)
Host TEPsRequiredNone
East-west between hostsGENEVE overlayPhysical VLAN
TGW connection at creationDistributed VLAN ConnectionNone, on a span created for TEP-less mode
Subnet typesPrivate-VPC, Private-TGW, Public, VLAN-extendedL2 Only and Public (vCenter)
Typical useFull VPC model without EdgesAdopting the VPC consumption model with the least change to the fabric

The build sequence is: a TEP-less Transport Node Profile, a span, apply both to the cluster with Configure NSX (Advanced), a Transit Gateway on that span with Connection set to None, a VPC on that gateway’s connectivity profile, a DLC with Dedicated to Subnet on and Subnet Extension Connection set to Layer 2, and finally an L2 Only subnet bound to that DLC.

10. Design checks before production

  • Is the external VLAN trunked to every host in the Transit Gateway span, on the same uplinks as the TEPs?
  • Does every host have reachability to the external VLAN gateway? That part is on you, not on NSX.
  • Is every External IP block a subset of an external VLAN CIDR, with in-use addresses excluded?
  • Are servers kept off the transit VLAN to avoid the asymmetric path?
  • Do you need Auto-SNAT, custom NAT, the VNA load balancer or external DHCP relay? If so, plan a VNA cluster inside the VLAN span and enable N-S Services.
  • Are you adding DLCs for exits only? New subnets should not need new VLANs in the routed model.
  • For VLAN extension: is the reserved block exactly the VLAN CIDR, is the DLC gateway the real physical gateway, and is there one dedicated DLC per extended VLAN?
  • Layer 2 or Layer 2 plus Layer 3? If L3, is security policy written for both routing exits?
  • Is DHCP for the extended subnet still provided from the VLAN side?
  • Is the network span set so the extended subnet only appears on clusters that carry the VLAN?

Final mental model

  • DTGW: one logical gateway, built on every host, with the external VLAN as its uplink.
  • External IP block inside the VLAN CIDR: the reason no routing protocol is needed.
  • VNA: where state lives, and only for translated private traffic.
  • Dedicated DLC: the same connection object, pinned to one subnet.
  • Reserved IP block: the guard rail that ties the VLAN’s CIDR to that one subnet.
  • L2 versus L2 plus L3: whether migrated VMs keep the physical gateway or route through the VPC.

Routed connectivity is still the default answer. Reach for VLAN extension when the goal is to move workloads without renumbering, or to keep something that genuinely needs Layer 2 adjacency. Plan for the day the extension can be removed.

What’s next

Parts 1 to 4 were about making traffic reach its destination. Part 5, coming soon, is about deciding which of that traffic should. It puts the four gates a packet passes on one picture: subnet access mode, connectivity policies, the VPC north-south firewall and the distributed firewall.