VLANs for beginners: build a safe small-office network, step by step
No experience needed. Split one network into separate staff, guest and CCTV networks in Cisco Modeling Labs, with real screenshots of every step and a plain-English explanation of what each one means.

Picture a small office. Staff laptops, a guest Wi-Fi for visitors, and a few CCTV cameras, all plugged into the same network. That is how most small businesses start out, and it is a risk: a visitor's phone, or a cheap camera that never gets updates, can sit on the same network as the accounts computer.
The fix is to split one network into several separate ones. In networking this is called a VLAN. In this guide I build exactly that office in Cisco Modeling Labs (CML), Cisco's network simulator, and show you every step with screenshots from my own lab. You do not need any networking background. Each step starts with what it means in plain English, then the commands, then what the result should look like.
What you will build
By the end you will have:
- Two switches and three computers, connected together.
- Three separate networks: Staff, Guest and CCTV, plus a management network for the switches.
- Every computer getting its address automatically.
- Staff able to reach the CCTV network, while Guests are blocked from everything inside.
Time: about 90 minutes the first time. Cost: nothing beyond CML itself.
The jargon, translated
Networking has a lot of short words. Here are the ones you need today, in plain English. Come back to this table whenever a word loses you.
| Word | What it really means |
|---|---|
| Switch | A box with lots of sockets. It connects devices in the same building so they can talk to each other. |
| Router | The box that connects different networks together and decides where traffic goes. |
| Layer 3 switch | A switch that can also do a router's job between networks. Our CORE switch is one. |
| VLAN | A separate network created inside a switch with software. Devices in different VLANs cannot talk unless you allow it. |
| Trunk | One cable that carries traffic for several VLANs between two switches. |
| IP address | A device's address on the network, like 10.10.10.21. |
| Subnet | A group of addresses that belong together, like 10.10.10.0/24, which holds 254 devices. |
| Gateway | The address devices send traffic to when they want to leave their own network. Always the router or layer 3 switch. |
| DHCP | A service that hands out IP addresses automatically, so nobody types them in by hand. |
| ACL | Access control list. A short list of rules that says what is allowed and what is blocked. |
The plan
Before typing a single command, decide the design. This is the step beginners skip, and it causes most of the mess later. Every network gets its own VLAN number, name and address range, and the gateway always ends in .1.
| VLAN | Name | Subnet | Who lives here |
|---|---|---|---|
| 10 | STAFF | 10.10.10.0/24 | Staff computers and phones |
| 20 | GUEST | 10.10.20.0/24 | Visitors. Internet only. |
| 30 | CCTV-IOT | 10.10.30.0/24 | Cameras and smart devices |
| 99 | MGMT | 10.10.99.0/24 | Managing the switches themselves |
| 999 | NATIVE-UNUSED | none | An empty VLAN used on the trunk for safety |

The map shows how it connects. CORE is the layer 3 switch that does the routing. ACCESS is where devices plug in. Between them is one cable, Et0/0, which will be the trunk. The three computers are Linux nodes: STAFF-PC on Et0/1, GUEST-PC on Et0/2 and CCTV-CAM on Et0/3.
1Create the VLANs
In plain English: we tell both switches which networks exist and what to call them. Do this on both CORE and ACCESS, because each switch keeps its own list.
enable
configure terminal
vtp mode transparent
vlan 10
name STAFF
vlan 20
name GUEST
vlan 30
name CCTV-IOT
vlan 99
name MGMT
vlan 999
name NATIVE-UNUSED
end
show vlan brief
The line vtp mode transparent stops one switch from overwriting the other's VLAN list by accident. It is a safety habit.

What to look for (1): the four VLANs are listed as active. Notice that no ports are listed next to them on CORE. That is normal, because nothing is plugged into CORE except the trunk. Ports are only listed next to a VLAN when a device is assigned to it.
2Build the trunk
In plain English: the two switches are joined by one cable, and we want that cable to carry all the VLANs at once, each labelled with its VLAN number. That is a trunk. Configure the link between CORE and ACCESS on both switches:
configure terminal
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk native vlan 999
switchport trunk allowed vlan 10,20,30,99
switchport nonegotiate
end
show interfaces trunk
Three choices here are worth understanding, because they are what separates a tidy network from a risky one:
- allowed vlan 10,20,30,99 means the trunk only carries the VLANs we actually use. Nothing else gets through.
- native vlan 999 moves untagged traffic into a VLAN nothing lives in. By default it is VLAN 1, which is where attackers like to start.
- nonegotiate switches off automatic trunk setup, so a stranger plugging in a device cannot talk their way onto the trunk.

What to look for (2): the status says trunking, the native VLAN is 999, and the allowed list is exactly 10,20,30,99. If any of these are different, stop and fix it now. Everything later depends on this link.
3Plug devices into the right VLANs
In plain English: now we decide which socket belongs to which flat. This is done on ACCESS only, because that is where the computers plug in.
configure terminal
interface Ethernet0/1
switchport mode access
switchport access vlan 10
interface Ethernet0/2
switchport mode access
switchport access vlan 20
interface Ethernet0/3
switchport mode access
switchport access vlan 30
end
show vlan brief
An access port belongs to exactly one VLAN and talks to ordinary devices. A trunk port carries many VLANs between switches. Knowing which is which is half of the CCNA switching topic.

What to look for (3): each computer's port is now listed next to its own VLAN. STAFF has Et0/1, GUEST has Et0/2, CCTV-IOT has Et0/3.
4Give every network a gateway
In plain English: right now each VLAN is a sealed room. To let any traffic leave a room, it needs a door and a doorman, which is the gateway. On CORE we create a virtual interface for each VLAN. It is called an SVI (switch virtual interface). Each one gets the .1 address from our plan. Then ip routing turns CORE from a plain switch into something that can move traffic between the networks.
configure terminal
ip routing
interface Vlan10
ip address 10.10.10.1 255.255.255.0
no shutdown
interface Vlan20
ip address 10.10.20.1 255.255.255.0
no shutdown
interface Vlan30
ip address 10.10.30.1 255.255.255.0
no shutdown
interface Vlan99
ip address 10.10.99.1 255.255.255.0
no shutdown
end
show ip interface brief


What to look for (4): all four VLAN interfaces show up and up, with the addresses from the plan. If one says up/down, its VLAN has nothing active in it yet, so check Steps 1 to 3.
You can also give the ACCESS switch an address on the management network, so you can reach it later without plugging a cable into it:
configure terminal
interface Vlan99
ip address 10.10.99.2 255.255.255.0
no shutdown
ip default-gateway 10.10.99.1
end

endshow ip int br with no space after end, and the switch answered % Invalid input detected. It is a harmless typo, but it shows how strict the command line is. Press Enter after end, then type the next command.5Hand out addresses automatically with DHCP
In plain English: typing an address into every device by hand does not scale. DHCP is like a receptionist who gives each new arrival a numbered badge. We set CORE up as the DHCP server with one pool per VLAN.
configure terminal
ip dhcp excluded-address 10.10.10.1 10.10.10.20
ip dhcp excluded-address 10.10.20.1 10.10.20.20
ip dhcp excluded-address 10.10.30.1 10.10.30.20
ip dhcp pool STAFF
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 1.1.1.1
ip dhcp pool GUEST
network 10.10.20.0 255.255.255.0
default-router 10.10.20.1
dns-server 1.1.1.1
ip dhcp pool CCTV-IOT
network 10.10.30.0 255.255.255.0
default-router 10.10.30.1
dns-server 1.1.1.1
end
The three excluded-address lines keep the first twenty addresses of each network free, so we can give servers and printers fixed addresses later without clashes. Each pool tells devices their network, their gateway (default-router) and a DNS server, which turns website names into addresses. 1.1.1.1 is a public one.

Now go to each computer and ask for an address. In the Linux nodes the command is udhcpc -i eth0, then ip a to see the result:

What to look for (5): STAFF-PC receives 10.10.10.21, and the server it came from is 10.10.10.1, which is the gateway for its VLAN. That one line proves the access port, the trunk, the gateway and DHCP are all working together. Do the same for GUEST-PC and CCTV-CAM. Then check on CORE:
show ip dhcp binding

Three computers, three networks, each one at .21, the first address after the twenty we reserved. That is the design working exactly as planned.
6Prove the networks can talk
In plain English: a ping sends a tiny message and waits for an answer, like shouting "are you there?" down a corridor. From STAFF-PC, ping the gateway of the CCTV network:
ping 10.10.30.1

What to look for (6): replies with times of about 1 to 2 milliseconds and 0% packet loss. A staff computer on one network has just reached another network through CORE. That is inter-VLAN routing working.
7Keep guests out
In plain English: right now everything can reach everything, which is the problem we set out to fix. We want guests to get an address and the internet, but nothing inside the office. We do that with an ACL, a short list of rules that is read from the top, and the first rule that matches wins.
configure terminal
ip access-list extended GUEST-IN
permit udp any eq bootpc any eq bootps
deny ip 10.10.20.0 0.0.0.255 10.10.0.0 0.0.255.255
permit ip any any
interface Vlan20
ip access-group GUEST-IN in
end

Read the numbered rules in the screenshot like a bouncer's list:
- Allow the DHCP request. A brand-new guest has no address yet, so this lets it ask for one.
- Block anything from the guest network going to the inside.
10.10.0.0covers all our office networks. - Allow everything else. This is the internet.
- Apply the list to the guest network's door, in the incoming direction.
Now test it from GUEST-PC. It should still get an address, but a ping to a staff address should fail:

What to look for (7): 10 packets transmitted, 0 packets received, 100% packet loss is the success you want here. A failing ping proves the guest network is locked out. The ACL even counts how many times it stepped in:

Ten pings sent, 10 matches on the deny rule. The lab does not have an internet link, so the counters are how we prove the block is working.
8Make CORE the boss of the switching
In plain English: when switches are joined together, they use a protocol called spanning tree to avoid loops, which can bring a whole network down. One switch is elected "root bridge", the boss that the others measure from. We want CORE to be the boss, not whichever switch happens to start first.
configure terminal
spanning-tree mode rapid-pvst
spanning-tree vlan 1,10,20,30,99 root primary
end
show spanning-tree vlan 10

What to look for (8): the line This bridge is the root. Rapid PVST+ also means that if a link fails, the network recovers in a couple of seconds, not half a minute.
9Save your work
Everything so far lives only in memory. If the switch restarts, it is gone. Save it on both switches:
copy running-config startup-config

What to look for (9): [OK] at the end. It is the most skipped step in networking, and the one people regret most.
The finished lab
Here is the whole workbench at the end: five devices running with green ticks, the root bridge confirmed, the configuration saved, and the guest computer locked out.

What went wrong along the way
Nothing about a real lab goes perfectly the first time, and the mistakes are where the learning is. These are the ones my own screenshots caught.
A native VLAN mismatch
While building the trunk, CORE started printing this warning again and again:

%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on Ethernet0/0 (999), with ACCESS Ethernet0/0 (1)
In plain English: CORE's end of the cable was set to native VLAN 999, but ACCESS still had the default, VLAN 1. The two ends of a trunk disagree about which VLAN is untagged, so the switches flag it. The fix is to apply the same trunk settings on both switches, so both ends of the cable agree on native VLAN 999. The lower half of the same screenshot shows show interfaces trunk with native VLAN 999 on the link.
Small typing slips
Two more things happened, and both are normal:
endshow ip int bris a typo, and the switch rejects it with% Invalid input detected.show i dhcp bis too short to be clear, and the switch answers% Ambiguous command, because several commands start that way. Type a little more of the command and it works.
Both are free lessons in reading what the switch tells you, instead of guessing.
Cheat sheet
Keep this section. It is every check from the lab in one place.
| What you want to know | Command | What good looks like |
|---|---|---|
| Do the VLANs exist, and which ports are in them? | show vlan brief | Right VLANs, right ports |
| Is the trunk working? | show interfaces trunk | trunking, native 999, allowed 10,20,30,99 |
| Are the gateways up? | show ip interface brief | Every VLAN interface up / up |
| Who has been given an address? | show ip dhcp binding | One lease per VLAN |
| Is the guest block working? | show access-lists | Matches rising on the deny rule |
| Who is the root bridge? | show spanning-tree vlan 10 | This bridge is the root on CORE |
| Is it saved? | copy running-config startup-config | [OK] |
Check you understood
Try answering these without scrolling up. The answers are all in the steps above.
- What decides which VLAN a computer belongs to?
- Why does the trunk list the VLANs it is allowed to carry?
- What does the gateway do, and which switch holds it in this lab?
- Why is the DHCP request allowed through the guest block?
- Why is a failed ping a good result in Step 7?
Where this matters in the real world
Splitting a network into VLANs is one of the most common jobs in small-business IT. It means guests cannot see your computers, a compromised camera cannot reach your accounts, and a fault in one area does not take everything down. It also helps with the security questions customers and insurers increasingly ask.
This lab is the beginner version. The full technical write-up, with hardening and troubleshooting tables, is a companion to this guide and is on its way.
Want this done properly for your business?
If you would like your network split into safe, separate parts, with the rules written down and the settings backed up, that is what I do. See my services, or message me for a quote. Prices are shown up front and agreed before any work starts.
Need a hand with your network?
Message me with the problem and some times that suit you. You get the price in writing before I start.

