Free Ebook cover CCNA-Level Networking for Cloud and Web Hosting: The Essentials You Actually Use

CCNA-Level Networking for Cloud and Web Hosting: The Essentials You Actually Use

New course

13 pages

VLAN Concepts and Segmentation: Separating Traffic in Hosting Environments

Capítulo 5

Estimated reading time: 9 minutes

+ Exercise

VLAN Purpose in Hosting Environments

A VLAN (Virtual LAN) is a way to split one physical switching fabric into multiple isolated Layer 2 networks. In hosting and data center environments, VLANs are used to separate traffic types and tenants while keeping cabling and switch hardware manageable.

What VLANs give you operationally

  • Segmentation between groups: Keep customer A’s servers separate from customer B’s servers, or keep production separate from management.
  • Reduced broadcast scope: Broadcast and unknown-destination frames stay inside the VLAN, so “noisy” segments don’t spill into unrelated segments.
  • Clear boundaries for policy: VLANs create clean places to apply controls (ACLs/firewalling at the Layer 3 boundary, or port-level controls at the edge).
  • Repeatable patterns: A hosting provider can standardize “VLAN 10 = management, VLAN 20–200 = customers, VLAN 300 = storage” (numbers vary) and automate provisioning.

Important: VLANs separate Layer 2 domains. If two VLANs need to communicate, that happens through a Layer 3 boundary (a router, firewall, or L3 switch interface), where you typically enforce policy.

Access vs Trunk: How VLAN Membership Is Carried

Access ports: one VLAN, untagged frames

An access port is used for endpoints that don’t understand VLAN tags (most servers by default, many appliances). The switch assigns all untagged incoming frames to a single VLAN, and sends frames out untagged.

  • Typical use: server NIC connected to a top-of-rack switch port.
  • Operational expectation: “This server lives in VLAN X, gets an IP from subnet X, and uses gateway X.”

Trunk ports: multiple VLANs, tagged frames

A trunk port carries traffic for multiple VLANs over one physical link by adding a VLAN identifier to frames (802.1Q tagging). Trunks are used between switches, and also to devices that intentionally carry multiple VLANs (hypervisors, firewalls, routers).

  • Typical use: switch-to-switch uplinks, switch-to-firewall, switch-to-hypervisor when VMs are in multiple VLANs.
  • Operational expectation: “This link carries VLANs A, B, C; each VLAN remains isolated even though they share the same cable.”

How tagging works conceptually (without deep protocol detail)

Think of a trunk as a highway with lanes. The frame is the car; the VLAN tag is the lane marker. Switches use the tag to keep traffic in the correct VLAN as it crosses shared links. When traffic exits a trunk onto an access port, the switch removes the tag and delivers a normal Ethernet frame to the endpoint.

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

Two practical implications matter daily:

  • Both sides must agree on whether the link is access or trunk. A trunk plugged into an access port behaves like “some VLAN works, others fail” depending on which VLAN is treated as untagged/native on each side.
  • Trunks must allow the VLAN. Even if both sides are trunks, a VLAN not permitted on the trunk will be silently dropped.

Common Operational VLAN Patterns in Hosting

1) Management VLAN

The management VLAN is for device administration and out-of-band-ish workflows: switch management IPs, hypervisor management interfaces, IPMI/iDRAC/iLO networks, monitoring collectors, backup controllers.

  • Goal: limit who can reach management interfaces and reduce exposure.
  • Typical design: management VLAN is routed only to a small set of admin jump hosts/VPN endpoints; blocked from customer VLANs by default.

2) Customer/tenant VLANs

Customer VLANs are where hosted workloads live. In colocation or managed hosting, a customer may get one VLAN for all servers, or multiple VLANs (web/app/db tiers) depending on security needs.

  • Goal: tenant isolation and clean handoff points for firewalling.
  • Typical design: each customer VLAN maps to a specific IP subnet and default gateway on a firewall/L3 boundary; inter-VLAN traffic is policy-controlled.

3) Storage VLAN (or storage network)

Storage traffic (NFS, iSCSI, Ceph replication, backup transport) is often separated to protect performance and reduce risk of accidental exposure.

  • Goal: predictable throughput/latency and limiting access to storage endpoints.
  • Typical design: storage VLAN is non-routed or tightly routed; only hypervisors/storage nodes participate; often uses jumbo frames and dedicated uplinks (depending on environment).

Step-by-Step: Mapping a Hosting Requirement to VLAN/Port Choices

Scenario A: Single server in one customer network

Requirement: A new customer server must be placed into customer VLAN 120 and receive an IP from the VLAN 120 subnet.

  1. Identify the VLAN and subnet pairing used in your environment (example: VLAN 120 = 10.120.0.0/24).

  2. Set the switch port to access mode in VLAN 120 (server-facing port).

  3. Verify the server NIC is untagged (default) unless you intentionally configure VLAN tagging on the server.

  4. Confirm DHCP/static settings match the expected subnet and gateway for VLAN 120.

  5. Test reachability: ping the default gateway for VLAN 120, then a known host in the same VLAN, then permitted upstream services (DNS, monitoring, etc.).

Scenario B: Hypervisor hosting VMs in multiple VLANs

Requirement: One hypervisor runs VMs for multiple customers; each VM must land in its own VLAN.

  1. Make the switch port a trunk toward the hypervisor.

  2. Allow only the needed VLANs on that trunk (principle of least privilege).

  3. Configure the hypervisor vSwitch/bridge so each VM port group maps to the correct VLAN ID.

  4. Validate per-VM: each VM should obtain an IP from the correct scope and reach only what policy allows.

Scenario C: Firewall/router-on-a-stick for multiple VLAN gateways

Requirement: A firewall provides default gateways and policy between management, customer, and storage VLANs using a single physical interface.

  1. Make the switch-to-firewall link a trunk.

  2. Allow the VLANs that need gateways on that trunk.

  3. Create subinterfaces (or VLAN interfaces) on the firewall, one per VLAN, each with the correct gateway IP.

  4. Apply policy: explicitly permit required flows (e.g., customer VLAN to DNS, management jump host to device management IPs) and deny the rest.

  5. Test from each VLAN: confirm correct gateway, correct DNS, and expected isolation.

Troubleshooting: When You’re in the Wrong VLAN (or the VLAN Isn’t Passing)

Common symptoms

  • Wrong DHCP scope: the host gets an IP that “looks valid” but belongs to a different subnet/VLAN than intended.
  • Can reach some hosts but not others: for example, you can reach a few devices (often those in the same accidental VLAN) but not the expected gateway or peers.
  • Gateway unreachable: link is up, but ARP/neighboring to the gateway fails because you’re not actually in that VLAN.
  • Intermittent connectivity: sometimes caused by mismatched trunk/access settings, native/untagged VLAN mismatches, or VLAN not consistently allowed across the path.
  • One VM works, another doesn’t on the same hypervisor: often a VM port group VLAN ID mismatch or trunk allowed VLAN list missing that VLAN.

Verification structure (what to check, in order)

1) Confirm the expected network identity

  • Expected VLAN ID (from ticket/design/CMDB).
  • Expected subnet and default gateway for that VLAN.
  • Expected DHCP scope (if DHCP is used) or expected static IP plan.

2) Check the switch port mode and VLAN assignment

On the access switch where the host connects:

  • Is the port access or trunk? A server port accidentally left as trunk can cause the server to land in an unexpected untagged/native VLAN.
  • If access: is it assigned to the correct VLAN?
  • If trunk: is the VLAN allowed, and is the endpoint actually tagging?

3) Validate VLAN continuity across the path

If the VLAN must traverse uplinks (top-of-rack to aggregation, aggregation to firewall):

  • Is the VLAN allowed on every trunk along the path? One missing allowed-VLAN entry breaks the VLAN beyond that point.
  • Is there a consistent expectation for untagged/native traffic? Mismatches can place untagged frames into different VLANs on each side.

4) Confirm the Layer 3 boundary for that VLAN

  • Where is the gateway? (L3 switch SVI, firewall subinterface, router interface)
  • Is the gateway interface up and in the correct VLAN?
  • Is policy blocking traffic? If same-VLAN traffic works but cross-VLAN doesn’t, look at firewall/ACL rules at the gateway.

5) Validate from the host perspective

  • IP configuration: does the host have an IP/mask/gateway that matches the expected subnet?
  • DHCP details: if DHCP is used, does the lease show the expected scope/options (gateway, DNS)?
  • Tagging configuration: if the host/hypervisor is supposed to tag VLANs, confirm the VLAN ID matches the switch configuration.

Example troubleshooting workflow: “Wrong DHCP scope”

  1. Host receives IP 10.10.5.23, but expected subnet is 10.120.0.0/24.

  2. Check switchport: it’s in access VLAN 10 (or it’s a trunk and untagged traffic lands in VLAN 10).

  3. Fix: set port to access VLAN 120 (or correct trunk/native/tagging design).

  4. Renew DHCP lease; verify new IP is in 10.120.0.0/24 and gateway matches VLAN 120.

Cloud Translation: VLAN Thinking as “Subnet + Route + Policy”

In most public cloud networks you don’t configure VLAN tags on switchports, but the mental model is still useful. Replace “VLAN” with a combination of:

  • Subnet: the IP range where instances live (similar to “VLAN + subnet pairing” in a data center).
  • Route table: where traffic goes (default route to internet/NAT, to firewall appliance, to VPN/peering, etc.).
  • Policy: security groups, NACLs, firewall rules, microsegmentation (who is allowed to talk to whom).

What is similar

  • Segmentation goal is the same: isolate tenants, tiers, and sensitive planes (management/storage).
  • Boundaries are intentional: you still design “this group can reach that group” through explicit routing and policy.
  • Operational patterns map well: management subnet, workload/customer subnets, storage/private subnets.

What is different

  • No trunk/access ports to configure: you don’t manage 802.1Q tagging on physical switchports; the platform handles the underlay.
  • Broadcast behavior is not the same: many clouds don’t expose traditional Layer 2 broadcast domains to tenants; you rely on platform services and routing.
  • Segmentation is enforced by control plane constructs: subnet association, route tables, and policy objects replace “allowed VLANs on trunks” and “port VLAN membership.”

Cloud troubleshooting using VLAN-style questions

When an instance “can reach some things but not others,” ask the cloud equivalent of VLAN checks:

  • Am I in the right subnet? (equivalent to “right VLAN”) Check the instance’s subnet attachment.
  • Do I have the expected routes? (equivalent to “VLAN continuity and correct gateway”) Check the subnet’s route table and next hops.
  • Do policies allow it? (equivalent to “ACL/firewall at the L3 boundary”) Check security groups/NACLs/firewall appliances.
  • Is the destination in the same segment? If same-subnet traffic fails, suspect local policy or host firewall; if cross-subnet fails, suspect routes/policy.

Practical mapping table

Data center concept            Cloud equivalent mental model  What you check when broken--------------------------  -----------------------------  ----------------------------VLAN membership (access port) Subnet attachment              Instance subnet, IP, DHCP optionsTrunk allowed VLANs            Route/attachment availability  Peering/VPN/TGW/attachment, route propagationGateway for VLAN (SVI/firewall) Default route/next hop         Route table targets, firewall appliance healthInter-VLAN ACL/firewall        Security policy                SG/NACL rules, firewall policy, service endpoints

Now answer the exercise about the content:

A host connected to a switchport keeps receiving an IP address from the wrong DHCP scope. Which situation best explains this symptom in a VLAN-based hosting network?

You are right! Congratulations, now go to the next page

You missed! Try again.

Getting an IP from the wrong scope usually means the host is landing in the wrong VLAN. Common causes include an access port assigned to the wrong VLAN or a trunk/access (native/untagged) mismatch that puts untagged traffic into an unexpected VLAN.

Next chapter

DHCP in Server and Cloud Deployments: Getting the Right Address and Gateway

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.