Create VLANs • Subnet IPv6 /48 into /64 networks • Inter-VLAN routing
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.
TechNova has been assigned the prefix:
2001:DB8:CAFE::/48With a /48 prefix, the address is structured as:
2001:DB8:CAFE)Fill in the answers below:
| Question | Your Answer |
|---|---|
| Subnet ID bits (64 − 48) | |
| Total possible /64 subnets (2?) | |
| Hosts per /64 subnet (264) |
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 |
TechNova also uses IPv4 (dual-stack). For simplicity, each department gets a /24 subnet:
| VLAN | Department | IPv4 Network | Subnet Mask |
|---|---|---|---|
| 10 | Engineering | 192.168.10.0 | 255.255.255.0 |
| 20 | Sales | 192.168.20.0 | 255.255.255.0 |
| 30 | Finance | 192.168.30.0 | 255.255.255.0 |
| 40 | IT Support | 192.168.40.0 | 255.255.255.0 |
Open Packet Tracer and build the following topology.
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.
enable
configure terminal
hostname TechNova-SW
!
vlan 10
name Engineering
vlan 20
name Sales
vlan 30
name Finance
vlan 40
name IT_Support
vlan 10 — creates VLAN 10.name Engineering — gives the VLAN a descriptive label so administrators can easily identify its purpose.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
switchport mode access — sets the port as an access port. Access ports carry traffic for one VLAN only and connect to end devices like PCs.switchport access vlan 10 — assigns the port to VLAN 10. Any device connected to this port will be in the Engineering VLAN.interface GigabitEthernet0/1
switchport mode trunk
end
write memory
show vlan brief to confirm your VLAN setup. You should see VLANs 10, 20, 30, and 40 with the correct ports assigned to each.
Before configuring the router, let’s see how VLANs isolate traffic. Temporarily assign IPv4 addresses to two PCs in different VLANs to test.
Go to each PC → Desktop → IP Configuration:
192.168.10.2, Mask 255.255.255.0192.168.10.3, Mask 255.255.255.0192.168.20.2, Mask 255.255.255.0From PC1, open the Command Prompt and ping PC2:
ping 192.168.10.3
✅ This should succeed — both PCs are in VLAN 10.
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.
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.
enable
configure terminal
hostname TechNova-R1
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
no shutdown
ipv6 unicast-routing — enables the router to forward IPv6 packets between sub-interfaces. Without this, IPv6 traffic will not be routed.no shutdown — activates the physical interface. All sub-interfaces below depend on this being up.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
encapsulation dot1Q 10 — maps this sub-interface to VLAN 10. Frames tagged with VLAN 10 from the trunk are processed here.ip address 192.168.10.1 — the IPv4 default gateway for Engineering PCs.ipv6 address 2001:DB8:CAFE:1::1/64 — the IPv6 default gateway for Engineering PCs. Notice the Subnet ID is 1 (matching our plan from Task 1).end
write memory
::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.
Go to each PC → Desktop → IP Configuration and assign both IPv4 and IPv6 static addresses.
| PC | Department | IPv4 Address | Subnet Mask | Default Gateway |
|---|---|---|---|---|
| PC1 | Engineering | 192.168.10.2 | 255.255.255.0 | 192.168.10.1 |
| PC2 | Engineering | 192.168.10.3 | 255.255.255.0 | 192.168.10.1 |
| PC3 | Sales | 192.168.20.2 | 255.255.255.0 | 192.168.20.1 |
| PC4 | Sales | 192.168.20.3 | 255.255.255.0 | 192.168.20.1 |
| PC5 | Finance | 192.168.30.2 | 255.255.255.0 | 192.168.30.1 |
| PC6 | Finance | 192.168.30.3 | 255.255.255.0 | 192.168.30.1 |
| PC7 | IT Support | 192.168.40.2 | 255.255.255.0 | 192.168.40.1 |
| PC8 | IT Support | 192.168.40.3 | 255.255.255.0 | 192.168.40.1 |
On the same IP Configuration screen, scroll down to the IPv6 Configuration section. Select Static and enter:
| PC | IPv6 Address | Prefix | IPv6 Gateway |
|---|---|---|---|
| PC1 | 2001:DB8:CAFE:1::10 | /64 | 2001:DB8:CAFE:1::1 |
| PC2 | 2001:DB8:CAFE:1::11 | /64 | 2001:DB8:CAFE:1::1 |
| PC3 | 2001:DB8:CAFE:2::10 | /64 | 2001:DB8:CAFE:2::1 |
| PC4 | 2001:DB8:CAFE:2::11 | /64 | 2001:DB8:CAFE:2::1 |
| PC5 | 2001:DB8:CAFE:3::10 | /64 | 2001:DB8:CAFE:3::1 |
| PC6 | 2001:DB8:CAFE:3::11 | /64 | 2001:DB8:CAFE:3::1 |
| PC7 | 2001:DB8:CAFE:4::10 | /64 | 2001:DB8:CAFE:4::1 |
| PC8 | 2001:DB8:CAFE:4::11 | /64 | 2001:DB8:CAFE:4::1 |
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.
From PC1 (Engineering), ping PC2:
ping 192.168.10.3
✅ This should succeed — both PCs are in VLAN 10.
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.
ping 192.168.30.2 (Engineering → Finance)ping 192.168.40.2 (Sales → IT Support)ping 192.168.10.3 (IT Support → Engineering)From PC1, ping PC2 using IPv6:
ping 2001:DB8:CAFE:1::11
From PC1 (Engineering), ping PC3 (Sales) using IPv6:
ping 2001:DB8:CAFE:2::10
More IPv6 cross-VLAN tests:
ping 2001:DB8:CAFE:3::10 (Engineering → Finance)ping 2001:DB8:CAFE:4::10 (Sales → IT Support)ping 2001:DB8:CAFE:1::11 (IT Support → Engineering)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.
Run the following commands on the switch CLI:
show vlan brief
show interfaces trunk
show vlan brief — confirms which ports are assigned to which VLANs.show interfaces trunk — shows the trunk port and which VLANs it carries.show vlan brief to confirm port-to-VLAN mappingshow ip interface brief and show ipv6 interface briefipv6 unicast-routing is enabled: show running-config | include ipv6no shutdownIn this practical you have:
ping for both IPv4 and IPv6 across all VLANsshow vlan brief, show interfaces trunk, show ip interface brief, show ipv6 interface brief