Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

DI 1.28; NC 1.27; DS 1.27: VLANs, subnets and VRF

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

55 minutes

One cable, three offices

A small business has one set of switches. Sales, Finance and Guests all plug in to them.

A guest laptop can see the Finance printer. Why? Because to the switch, all sockets are one big room.

The fix is not new cables. It is three virtual rooms on the same switch.

Key words

WordWhat it means
VLANVirtual LAN: a group of switch ports that act as their own separate network.
SwitchA device that connects computers in a building and passes data between them.
SubnetA smaller block of IP addresses, used for one group of devices.
IP addressA number that identifies a device on a network, such as 10.10.10.5.
Prefix lengthThe /24 after an address: it says how big the subnet is.
Routing tableA list a router uses to decide where to send traffic.
VRFVirtual routing and forwarding: several separate routing tables inside one router.
TrunkA link that carries the traffic of several VLANs, each marked with its VLAN number.
NetworkComputers and devices linked so they can share data.
FirewallA gate that lets some traffic in or out and blocks the rest.
EncryptionScrambling data so only a person with the right key can read it.
RouterA device that passes traffic between different networks.

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can explain how VLANs, subnets and VRF separate traffic, and set up two VLANs on a lab machine.

Starter: last lesson

Have a go

Starter: last lesson

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Cycle 1: VLANs

A VLAN splits one physical switch into several virtual networks. Each port is given a VLAN number. Ports in VLAN 10 can talk to each other. They cannot talk to VLAN 20 at all, unless a router lets them.

A trunk link between switches carries many VLANs. Each frame is tagged with its VLAN number, from 1 to 4094.

Result: Sales, Finance and Guests are separate, with no new cables.

Run: make two VLANs on a lab machine

Command
ip link del dummy0 2>/dev/null; ip link add dummy0 type dummy && ip link add link dummy0 name dummy0.10 type vlan id 10 && ip link add link dummy0 name dummy0.20 type vlan id 20 && ip -d link show type vlan | grep -E "^[0-9]+: dummy0\.|vlan protocol"

A command for the lesson’s lab terminal. It is shown here and not run.

What you should see

Note

Two lines for dummy0.10 and dummy0.20, each with a line that names 802.1Q and its id, 10 and 20. dummy0 is a pretend network card, so nothing real is changed. 802.1Q is the standard for VLAN tags.

Cycle 2: subnets

A subnet is a block of IP addresses. Usually each VLAN gets its own subnet, such as 10.10.10.0/24 for Sales. The /24 is the prefix length. It sets how big the block is.

Traffic between subnets must go through a router. That is the place to put a firewall rule: for example, Guests may reach the internet but not Finance.

The lesson goes on

13 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.