Back to Course
Practical

Practical 6: Subnetting a Class A Network & IPv6 Dual-Stack

Subnet 10.0.0.0/8 into 1024 networks • Configure IPv6 alongside IPv4

🌐 Introduction to Networks 🛠️ Packet Tracer 👤 Reza Farashahi

Imagine you are a network engineer at a large Internet Service Provider (ISP). Your company has been allocated the Class A network 10.0.0.0/8 and needs to divide it into 1024 subnets to serve different regions and customers. Each subnet must support thousands of hosts. Additionally, the company is rolling out IPv6 alongside IPv4 (dual-stack) to future-proof the infrastructure.

In this practical you will calculate the subnets, build a topology in Packet Tracer using the first 3 subnets, and configure both IPv4 and IPv6 addressing on the router, switch, and PCs. This builds on the Class B subnetting concepts from Practical 5 and introduces IPv6 dual-stack configuration.

📝 Task 1 — Subnet Calculation

You have been assigned the Class A network:

Step 1 — Determine bits to borrow

How many host bits must you borrow to create at least 1024 subnets?

Step 2 — New subnet mask

Why does the mask span into the 3rd octet? The original /8 mask covers only the first octet (8 bits). Borrowing 10 bits uses all 8 bits of the 2nd octet plus 2 bits of the 3rd octet, giving /18. The remaining 14 host bits are split across the 3rd octet (6 bits) and the entire 4th octet (8 bits).

Step 3 — Hosts per subnet

Work out the following from the /18 subnet mask:

QuestionYour Answer
Remaining host bits
Total addresses per subnet (2?)
Usable hosts per subnet (2? − 2)

Step 4 — Block size

Step 5 — Complete the subnet table

Fill in the details for the first 4 subnets and the last subnet (1024th). With 1024 subnets we cannot list them all — but the pattern is the same throughout.

Subnet Network Address First Usable Host Last Usable Host Broadcast Address
1
2
3
4
1024
Tip — Finding Subnet 1024: Each group of 4 subnets uses one value in the 2nd octet (e.g. 10.0.0/64/128/192, then 10.1.0/64/128/192, …). 1024 subnets ÷ 4 per 2nd-octet value = 256 groups (2nd octet goes from 0 to 255). The last subnet (1024th) starts at 10.255.192.0.

📦 Task 2 — Build the Topology in Packet Tracer

We will build a topology using the first 3 subnets only (subnets 1, 2, and 3). This keeps the lab manageable while demonstrating the same concepts. We use a Router-on-a-Stick design with VLANs, just like Practical 5.

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 6 PCs in 3 pairs below the switch (label them PC1–PC6).
  5. Connect each PC (FastEthernet0) to the switch using Copper Straight-Through cables:
    • PC1 → Switch Fa0/1  |  PC2 → Switch Fa0/2   (Subnet 1)
    • PC3 → Switch Fa0/3  |  PC4 → Switch Fa0/4   (Subnet 2)
    • PC5 → Switch Fa0/5  |  PC6 → Switch Fa0/6   (Subnet 3)
Tip: Label each pair of PCs with their subnet number (e.g. “Subnet 1: PC1, PC2”) to keep the diagram organised.

🔧 Task 3 — Configure the Switch

Click on the Switch, go to the CLI tab, and enter the following configuration. This creates 3 VLANs (one per subnet), assigns PC ports to the correct VLAN, and sets up a trunk link to the router.

Part A — Enter privileged mode & global configuration

enable
configure terminal
hostname ISP-Switch

Part B — Create VLANs

vlan 10
 name Subnet_1
vlan 20
 name Subnet_2
vlan 30
 name Subnet_3

Part C — Assign ports to VLANs

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

Part D — Configure the trunk link

interface GigabitEthernet0/1
 switchport mode trunk

Part E — Save the configuration

end
write memory
Reminder: The trunk port carries tagged frames for all 3 VLANs to the router over a single cable. Without it, the router would need a separate physical cable for each VLAN.

🖧 Task 4 — Configure the Router (IPv4)

Click on the Router, go to the CLI tab, and create 3 sub-interfaces — one per VLAN — with IPv4 addresses. Each sub-interface acts as the default gateway for its subnet.

Part A — Hostname & bring up physical interface

enable
configure terminal
hostname ISP-Router
!
interface GigabitEthernet0/0
 no shutdown

Part B — Create sub-interfaces (IPv4)

interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.0.0.1 255.255.192.0
!
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 10.0.64.1 255.255.192.0
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.0.128.1 255.255.192.0

Part C — Save the configuration

end
write memory
Why .1 for the gateway? It is a common convention to use the first usable host address (.1) in each subnet as the router’s gateway address. This makes it easy for administrators to remember.

🌐 Task 5 — Configure IPv6 (Dual-Stack)

Now we add IPv6 addresses to the same router sub-interfaces that already have IPv4 addresses. This is called dual-stack — both protocols run simultaneously on the same interfaces. Devices can communicate using either IPv4 or IPv6.

Why dual-stack? IPv4 addresses are running out. IPv6 provides a virtually unlimited address space (2128 addresses). During the transition period, networks run both protocols so that IPv4-only devices can still communicate while IPv6 is gradually adopted.

IPv6 addressing plan

VLANIPv6 NetworkRouter Gateway (::1)
10 (Subnet 1)2001:DB8:ACAD:1::/642001:DB8:ACAD:1::1
20 (Subnet 2)2001:DB8:ACAD:2::/642001:DB8:ACAD:2::1
30 (Subnet 3)2001:DB8:ACAD:3::/642001:DB8:ACAD:3::1

Part A — Enable IPv6 routing

By default, Cisco routers do not route IPv6 traffic. You must enable it first:

enable
configure terminal
ipv6 unicast-routing

Part B — Add IPv6 addresses to sub-interfaces

interface GigabitEthernet0/0.10
 ipv6 address 2001:DB8:ACAD:1::1/64
!
interface GigabitEthernet0/0.20
 ipv6 address 2001:DB8:ACAD:2::1/64
!
interface GigabitEthernet0/0.30
 ipv6 address 2001:DB8:ACAD:3::1/64

Part C — Save the configuration

end
write memory
Verify: Run show ipv6 interface brief on the router to confirm all three sub-interfaces show their IPv6 addresses and are in “up/up” status.

🔢 Task 6 — Configure PC IP Addresses

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

IPv4 addressing

PC Subnet IPv4 Address Subnet Mask Default Gateway Switch Port
PC1110.0.0.2255.255.192.010.0.0.1Fa0/1
PC2110.0.0.3255.255.192.010.0.0.1Fa0/2
PC3210.0.64.2255.255.192.010.0.64.1Fa0/3
PC4210.0.64.3255.255.192.010.0.64.1Fa0/4
PC5310.0.128.2255.255.192.010.0.128.1Fa0/5
PC6310.0.128.3255.255.192.010.0.128.1Fa0/6

IPv6 addressing

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

PC IPv6 Address Prefix Length IPv6 Gateway
PC12001:DB8:ACAD:1::10/642001:DB8:ACAD:1::1
PC22001:DB8:ACAD:1::11/642001:DB8:ACAD:1::1
PC32001:DB8:ACAD:2::10/642001:DB8:ACAD:2::1
PC42001:DB8:ACAD:2::11/642001:DB8:ACAD:2::1
PC52001:DB8:ACAD:3::10/642001:DB8:ACAD:3::1
PC62001:DB8:ACAD:3::11/642001:DB8:ACAD:3::1
Important: Make sure you set both the IPv4 default gateway and the IPv6 default gateway on every PC. Without gateways, PCs in different subnets will not be able to communicate through the router.
Why ::10 and ::11? We use ::10 and ::11 (hexadecimal 16 and 17 in decimal) for PCs to leave room for other infrastructure addresses like ::1 (router), ::2 (future server), etc. Any valid host address in the /64 subnet would work.

📡 Task 7 — Verify Connectivity

A — IPv4: Ping within the same subnet

Open the Command Prompt on PC1 and ping PC2 (same subnet):

ping 10.0.0.3

This should succeed immediately — both PCs are in the same VLAN.

B — IPv4: Ping across different subnets

From PC1 (Subnet 1), ping PC3 in Subnet 2:

ping 10.0.64.2

This traffic goes: PC1 → Switch (VLAN 10) → Router → Switch (VLAN 20) → PC3.

C — IPv4: More cross-subnet pings

  1. PC1 → PC5: ping 10.0.128.2 (Subnet 1 → Subnet 3)
  2. PC3 → PC6: ping 10.0.128.3 (Subnet 2 → Subnet 3)
  3. PC6 → PC1: ping 10.0.0.2 (Subnet 3 → Subnet 1)

D — IPv6: Ping within the same subnet

From PC1, ping PC2 using IPv6:

ping 2001:DB8:ACAD:1::11

E — IPv6: Ping across subnets

From PC1 (Subnet 1), ping PC3 in Subnet 2 using IPv6:

ping 2001:DB8:ACAD:2::10

More IPv6 cross-subnet tests:

  1. PC1 → PC5: ping 2001:DB8:ACAD:3::10 (Subnet 1 → Subnet 3)
  2. PC4 → PC6: ping 2001:DB8:ACAD:3::11 (Subnet 2 → Subnet 3)

F — Verify on the Router

On the router CLI, run both commands:

show ip interface brief
show ipv6 interface brief

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

Troubleshooting: If a ping fails:
  • Check the PC’s IP, mask/prefix, and gateway with ipconfig (IPv4) and ipconfig /all (IPv6)
  • 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 (run show running-config | include ipv6)

💬 Reflection Questions

  1. Why did we borrow 10 bits and not 8 or 12?
  2. How many usable hosts does each /18 subnet support? Is this more or fewer than the /19 subnets from Practical 5?
  3. If you only needed 512 subnets, how many bits would you borrow and what would the new mask be?
  4. What is the purpose of ipv6 unicast-routing? What happens if you forget it?
  5. Can a PC with only an IPv4 address ping a PC that only has an IPv6 address? Why or why not?
  6. What are two advantages of running dual-stack on a network?

📋 Summary

In this practical you have:

Tip: Save your Packet Tracer file — you may extend this network in future practicals to add more subnets, routing protocols, or security features.