Experiment 8
Aim: To Implement Subnetting in Small networks using CISCO Packet Tracer.
Theory:
Subnetting
Subnetting is the process of dividing a large IP
network into smaller, more manageable sub-
networks (subnets). It helps improve network
performance, security, and efficient IP address
utilization. By borrowing bits from the host
portion of an IP address, subnetting allows
organizations to create multiple logical
networks within a single physical network,
reducing broadcast traffic and enhancing
routing efficiency.
Figure 1: Subnetting.
Figure 2: An example of Subnetting.
Key Concepts of Subnetting
1. IP Address Structure: An IP address consists of a network part and a host part.
Subnetting splits the host part further to create subnetworks.
2. Subnet Mask: Defines which portion of an IP address refers to the network and which
refers to the host. Example:
58
o Class C default mask: [Link]
o Subnet mask: [Link]
3. Network Efficiency: Subnetting reduces network congestion by limiting broadcast
domains.
4. Security and Management: Each subnet can be isolated, providing better security and
easier administration.
5. CIDR (Classless Inter-Domain Routing): Allows flexible subnetting by using prefix
notation (e.g., /24, /26) instead of class-based addressing.
6. Example:
For a Class C network ([Link]/24), subnetting with a /26 mask creates 4 subnets,
each with 64 addresses (62 usable).
Components Required:
1 Router
2 Switches
6 PCs (3 per switch)
Copper Straight-Through Cables
Cisco Packet Tracer Software
Stepwise Procedure:
Step 1: Create the Topology
Place one router, two switches, and eight PCs in Packet Tracer.
Connect:
o Router G0/0 → Switch 1
o Router G0/1 → Switch 2
o Four PCs to each switch using Straight-Through Cables.
Figure 3: Router1 Configuration.
59
Figure 4: Router2 Configuration.
Step 2: Assign IP Addresses to PCs
1. Subnet A (Switch 1)
o PC1
1. Click on PC1 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
o PC2
1. Click on PC2 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
o PC3
1. Click on PC3 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
Figure 5: IP Address Configuration for PC1 in Subnet A. Similarly, Provide Address for PC2
and PC3
60
1. Subnet B (Switch 2)
o PC4
1. Click on PC4 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
o PC5
1. Click on PC5 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
o PC6
1. Click on PC6 → Desktop Tab → IP Configuration.
2. Assign:
i. IP Address: [Link]
ii. Subnet Mask: [Link]
iii. Default Gateway: [Link]
Figure 6: IP Address Configuration for PC4 in Subnet B. Similarly, Provide Address for PC5
and PC6
Step 3: Configure Router
1. On Router:
Router> enable
Router# configure terminal
! Configure LAN 1
Router(config)# interface gig0/0
Router(config-if)# ip address [Link] [Link]
61
Router(config-if)# no shutdown
Router(config-if)# exit
! Configure LAN 2
Router(config)# interface gig0/1
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# end
Router# write
Step 4: Verification Using ping Command
After configurations are complete:
1. Test within the same subnet
o From PC0 → PC1:
o ping [Link]
o Reply received → Devices in same subnet are connected correctly.
2. Test between different subnets
o From PC0 (Subnet A) → PC3 (Subnet B):
o ping [Link]
o Reply received → Inter-subnet communication is working properly through the
router.
3. Test reverse communication
o From PC3 (Subnet B) → PC1 (Subnet A):
o ping [Link]
o Reply received → Both networks can communicate successfully.
Step 5: Simulation
1. Send messages between the same subnet and different subnets to check connectivity.
62
Figure 7: Messages Are Received Successfully between PCs in Same Subnet and Different
Subnets.
Observation:
1. All PCs in the same subnet can communicate without routing.
2. PCs in different subnets communicate via the router using gateway interfaces.
3. Pings were successful in all directions, confirming correct subnetting and routing setup.
Conclusion:
In this experiment, subnetting was successfully implemented in a small network using a single
router in Cisco Packet Tracer. The [Link]/24 network was divided into two equal subnets
(/25 each), and appropriate IP addresses were assigned to hosts and router interfaces. Ping tests
confirmed that devices within the same subnet communicated directly, while inter-subnet
communication was achieved through the router. Thus, the experiment effectively
demonstrated the concept of subnetting and verified successful routing between subnets in a
simulated network environment.
63