Back to Course
Practical

Practical 7: VLAN Configuration & IPv6 Subnetting

Create VLANs • Subnet IPv6 /48 into /64 networks • Inter-VLAN routing

🌐 Introduction to Networks 🛠️ Packet Tracer 👤 Reza Farashahi

A growing technology company, TechNova Ltd, has just moved to a new office building. Their ISP has allocated them the IPv6 prefix 2001:DB8:CAFE::/48. The company needs to segment its network into 4 departments using VLANs for security and performance, with each department on its own IPv6 subnet.

In this practical you will plan the IPv6 subnets from the /48 prefix, build the network in Packet Tracer, configure VLANs on a switch, set up inter-VLAN routing with IPv6 on a router, and verify that departments can communicate through the router. This builds on the IPv6 subnetting concepts from the lecture and the dual-stack configuration from Practical 6.

📝 Task 1 — IPv6 Subnet Planning

TechNova has been assigned the prefix:

Step 1 — Understand the /48 prefix

With a /48 prefix, the address is structured as:

Key rule: In IPv6, we never borrow from the 64-bit Interface ID. Each subnet is always a /64. Subnetting simply means changing the 4th hextet (Subnet ID) value.

Step 2 — How many subnets can we create?

Fill in the answers below:

QuestionYour Answer
Subnet ID bits (64 − 48)
Total possible /64 subnets (2?)
Hosts per /64 subnet (264)

Step 3 — Assign subnet IDs

We need 4 subnets — one for each department. Simply count up in the 4th hextet (0001, 0002, 0003, 0004). Fill in the network addresses:

VLAN Department Subnet ID IPv6 Network Address
10 Engineering 0001
20 Sales 0002
30 Finance 0003
40 IT Support 0004
Tip: Notice how simple IPv6 subnetting is compared to IPv4! No block sizes, no binary maths — just change the 4th hextet. With a /48 prefix, you have 65,536 possible subnets — far more than you will ever need.

IPv4 addressing plan

TechNova also uses IPv4 (dual-stack). For simplicity, each department gets a /24 subnet:

VLANDepartmentIPv4 NetworkSubnet Mask
10Engineering192.168.10.0255.255.255.0
20Sales192.168.20.0255.255.255.0
30Finance192.168.30.0255.255.255.0
40IT Support192.168.40.0255.255.255.0
Dual-stack: Each interface will have both an IPv4 and an IPv6 address, just like we did in Practical 6. This allows the network to communicate using either protocol.

📦 Task 2 — Build the Topology in Packet Tracer

Open Packet Tracer and build the following topology.

Equipment

Cabling

  1. Place the Router at the top of the workspace.
  2. Place the Switch below the router.
  3. Connect the router GigabitEthernet0/0 to the switch GigabitEthernet0/1 using a Copper Straight-Through cable.
  4. Arrange 8 PCs in 4 pairs below the switch. Label them PC1–PC8.
  5. Connect each PC (FastEthernet0) to the switch using Copper Straight-Through cables:
    • PC1 → Fa0/1  |  PC2 → Fa0/2   (Engineering — VLAN 10)
    • PC3 → Fa0/3  |  PC4 → Fa0/4   (Sales — VLAN 20)
    • PC5 → Fa0/5  |  PC6 → Fa0/6   (Finance — VLAN 30)
    • PC7 → Fa0/7  |  PC8 → Fa0/8   (IT Support — VLAN 40)
Tip: Label each pair of PCs with their department name (e.g. “Engineering: PC1, PC2”) to keep your topology organised.

🔧 Task 3 — Configure VLANs on the Switch

Click on the Switch, go to the CLI tab, and enter the following configuration. This creates 4 VLANs, assigns PC ports to the correct VLAN, and configures the trunk link to the router.

Part A — Create VLANs

enable
configure terminal
hostname TechNova-SW
!
vlan 10
 name Engineering
vlan 20
 name Sales
vlan 30
 name Finance
vlan 40
 name IT_Support

Part B — Assign access ports

interface range FastEthernet0/1-2
 switchport mode access
 switchport access vlan 10
!
interface range FastEthernet0/3-4
 switchport mode access
 switchport access vlan 20
!
interface range FastEthernet0/5-6
 switchport mode access
 switchport access vlan 30
!
interface range FastEthernet0/7-8
 switchport mode access
 switchport access vlan 40
Access vs Trunk: An access port connects to an end device and carries traffic for a single VLAN. A trunk port connects to another switch or a router and carries traffic for multiple VLANs simultaneously using 802.1Q tags.

Part C — Configure the trunk link

interface GigabitEthernet0/1
 switchport mode trunk

Part D — Save the configuration

end
write memory
Verify: Run show vlan brief to confirm your VLAN setup. You should see VLANs 10, 20, 30, and 40 with the correct ports assigned to each.

🔍 Task 4 — Test VLAN Isolation

Before configuring the router, let’s see how VLANs isolate traffic. Temporarily assign IPv4 addresses to two PCs in different VLANs to test.

Step 1 — Assign temporary IPs

Go to each PC → DesktopIP Configuration:

Step 2 — Test within the same VLAN

From PC1, open the Command Prompt and ping PC2:

ping 192.168.10.3

This should succeed — both PCs are in VLAN 10.

Step 3 — Test across VLANs

From PC1 (VLAN 10), ping PC3 (VLAN 20):

ping 192.168.20.2

This should fail! Even though both PCs are connected to the same switch, VLANs keep them completely isolated. Without a router, there is no way for traffic to cross between VLANs.

This is the whole point of VLANs: Devices in different VLANs cannot communicate directly, even on the same physical switch. To allow communication between VLANs, you need a router (inter-VLAN routing). This provides security and reduces unnecessary broadcast traffic.

🖧 Task 5 — Configure the Router (Inter-VLAN Routing)

Now configure the router with sub-interfaces — one per VLAN — using both IPv4 and IPv6 addresses. This is called Router-on-a-Stick because a single physical cable (the trunk) carries all VLAN traffic.

Part A — Hostname, enable IPv6, bring up physical interface

enable
configure terminal
hostname TechNova-R1
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
 no shutdown

Part B — Create sub-interfaces (IPv4 + IPv6)

interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
 ipv6 address 2001:DB8:CAFE:1::1/64
!
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ipv6 address 2001:DB8:CAFE:2::1/64
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 192.168.30.1 255.255.255.0
 ipv6 address 2001:DB8:CAFE:3::1/64
!
interface GigabitEthernet0/0.40
 encapsulation dot1Q 40
 ip address 192.168.40.1 255.255.255.0
 ipv6 address 2001:DB8:CAFE:4::1/64

Part C — Save the configuration

end
write memory
Why ::1? By convention, the router gateway uses ::1 as the Interface ID, just like we use .1 in IPv4. This makes it easy for everyone to remember the gateway address.

🔢 Task 6 — Configure PC IP Addresses

Go to each PC → DesktopIP Configuration and assign both IPv4 and IPv6 static addresses.

IPv4 addressing

PC Department IPv4 Address Subnet Mask Default Gateway
PC1Engineering192.168.10.2255.255.255.0192.168.10.1
PC2Engineering192.168.10.3255.255.255.0192.168.10.1
PC3Sales192.168.20.2255.255.255.0192.168.20.1
PC4Sales192.168.20.3255.255.255.0192.168.20.1
PC5Finance192.168.30.2255.255.255.0192.168.30.1
PC6Finance192.168.30.3255.255.255.0192.168.30.1
PC7IT Support192.168.40.2255.255.255.0192.168.40.1
PC8IT Support192.168.40.3255.255.255.0192.168.40.1

IPv6 addressing

On the same IP Configuration screen, scroll down to the IPv6 Configuration section. Select Static and enter:

PC IPv6 Address Prefix IPv6 Gateway
PC12001:DB8:CAFE:1::10/642001:DB8:CAFE:1::1
PC22001:DB8:CAFE:1::11/642001:DB8:CAFE:1::1
PC32001:DB8:CAFE:2::10/642001:DB8:CAFE:2::1
PC42001:DB8:CAFE:2::11/642001:DB8:CAFE:2::1
PC52001:DB8:CAFE:3::10/642001:DB8:CAFE:3::1
PC62001:DB8:CAFE:3::11/642001:DB8:CAFE:3::1
PC72001:DB8:CAFE:4::10/642001:DB8:CAFE:4::1
PC82001:DB8:CAFE:4::11/642001:DB8:CAFE:4::1
Important: Set both the IPv4 and IPv6 default gateways on every PC. Without gateways, PCs in different VLANs cannot communicate through the router.
Notice the pattern: Each department’s IPv6 addresses share the same first 4 hextets (2001:DB8:CAFE:N). The 4th hextet (1, 2, 3, or 4) is the Subnet ID you planned in Task 1. The Interface ID (::10, ::11) identifies individual hosts within the subnet.

📡 Task 7 — Verify Connectivity

A — IPv4: Ping within the same VLAN

From PC1 (Engineering), ping PC2:

ping 192.168.10.3

✅ This should succeed — both PCs are in VLAN 10.

B — IPv4: Ping across VLANs

Now that the router is configured, test cross-VLAN communication. From PC1 (Engineering), ping PC3 (Sales):

ping 192.168.20.2

✅ This should now succeed! Traffic flows: PC1 → Switch (VLAN 10 tag) → Router (routes to VLAN 20) → Switch (VLAN 20) → PC3.

C — IPv4: More cross-VLAN tests

  1. PC1 → PC5: ping 192.168.30.2 (Engineering → Finance)
  2. PC3 → PC7: ping 192.168.40.2 (Sales → IT Support)
  3. PC8 → PC2: ping 192.168.10.3 (IT Support → Engineering)

D — IPv6: Ping within the same VLAN

From PC1, ping PC2 using IPv6:

ping 2001:DB8:CAFE:1::11

E — IPv6: Ping across VLANs

From PC1 (Engineering), ping PC3 (Sales) using IPv6:

ping 2001:DB8:CAFE:2::10

More IPv6 cross-VLAN tests:

  1. PC1 → PC5: ping 2001:DB8:CAFE:3::10 (Engineering → Finance)
  2. PC3 → PC7: ping 2001:DB8:CAFE:4::10 (Sales → IT Support)
  3. PC8 → PC2: ping 2001:DB8:CAFE:1::11 (IT Support → Engineering)

F — Verification commands on the Router

Run the following commands on the router CLI to verify the configuration:

show ip interface brief
show ipv6 interface brief
show vlans

You should see all 4 sub-interfaces with status up/up and their correct IPv4 and IPv6 addresses.

G — Verification commands on the Switch

Run the following commands on the switch CLI:

show vlan brief
show interfaces trunk
Troubleshooting: If a ping fails:
  • Check the PC’s IPv4/IPv6 address, mask/prefix, and gateway
  • Verify the PC is connected to the correct switch port
  • On the switch, run show vlan brief to confirm port-to-VLAN mapping
  • On the router, run show ip interface brief and show ipv6 interface brief
  • Confirm ipv6 unicast-routing is enabled: show running-config | include ipv6
  • Make sure the physical interface GigabitEthernet0/0 is no shutdown

💬 Reflection Questions

  1. What happened when you tried to ping across VLANs before configuring the router (Task 4)? Why?
  2. What is the difference between an access port and a trunk port?
  3. Why do we use sub-interfaces on the router instead of separate physical interfaces?
  4. How many /64 subnets could TechNova create from their /48 prefix? Will they ever run out?
  5. If TechNova opens a 5th department (Marketing), what VLAN number and IPv6 subnet would you assign?
  6. What are two benefits of using VLANs to segment a network?

📋 Summary

In this practical you have:

Save your Packet Tracer file! You may extend this network in future practicals to add routing protocols, DHCP, or additional sites.