2. Subnets and Subnet Mask
• What are subnets?
• Dividing the large address space into smaller blocks of IP Address
• Why do we go for subnets?
• If the blocks of IP address are used as such millions of IP address are
wasted.
• Managing the Large block of IP Address is also difficult
• What are the types of subnets?
• Fixed Length Subnetting
• Variable Length Subnetting
• Subnet Mask
• Will be discussed few slides later
Visit www.youtube.com/GURUKULA for Lecture Videos
3. Fixed Length Subnetting
• Lets consider an Organization and the entire organization has different
departments / Sections
I
II III
IVECE
EEE
CSE
MECH
Visit www.youtube.com/GURUKULA for Lecture Videos
4. Fixed Length – Example 1
Divide the address block 200.1.2.0 into 2 subnets
Given address block is Class C → 24 bits for NID and 8 bits for HID
200.1.2.00000000
200.1.2.11111111
200.1.2.0
200.1.2.255 200.1.2.X0000000
X = 0 X = 1
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.255
1 bit is required
to make 2 parts
Get Back
Visit www.youtube.com/GURUKULA for Lecture Videos
5. 200.1.2.X0000000
X = 0 X = 1
200.1.2.0_ _ _ _ _ _ _
Runs from
200.1.2.00000000
200.1.2.00000001
200.1.2.00000010
200.1.2.00000011
.
.
200.1.2.01111111
200.1.2.1_ _ _ _ _ _ _
Runs from
200.1.2.10000000
200.1.2.10000001
200.1.2.10000010
200.1.2.10000011
.
.
200.1.2.11111111
200.1.2.0
200.1.2.127
200.1.2.128
200.1.2.255
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.127
Network ID : 200.1.2.128
Broadcast ID: 200.1.2.255
27 = 128
Address in Each Subnet
Get Back
Visit www.youtube.com/GURUKULA for Lecture Videos
6. Fixed Length – Example 2
Divide the address block 200.1.2.0 into 4 subnets
Given address block is Class C → 24 bits for NID and 8 bits for HID
200.1.2.00000000
200.1.2.11111111
200.1.2.0
200.1.2.255 200.1.2.XX000000
XX = 00
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.255
XX = 01 XX = 10
XX = 11
2 bits are required
to make 4 parts
Visit www.youtube.com/GURUKULA for Lecture Videos
7. 200.1.2.XX000000
XX = 00
XX = 01 XX = 10
XX = 11
200.1.2.00 _ _ _ _ _ _
Runs from
200.1.2.00000000
to
200.1.2.00111111
200.1.2.01 _ _ _ _ _ _
Runs from
200.1.2.01000000
to
200.1.2.01111111
200.1.2.11 _ _ _ _ _ _
Runs from
200.1.2.11000000
to
200.1.2.11111111
200.1.2.10 _ _ _ _ _ _
Runs from
200.1.2.10000000
to
200.1.2.10111111
200.1.2.0 → Network ID
200.1.2.63 → Broadcast ID
200.1.2.128 → Network ID
200.1.2.191 → Broadcast ID
200.1.2.192 → Network ID
200.1.2.255 → Broadcast ID
200.1.2.64 → Network ID
200.1.2.127 → Broadcast ID
26 = 64
Address in Each Subnet
Visit www.youtube.com/GURUKULA for Lecture Videos
8. Fixed Length – Exercise 1
Divide the address block 192.168.9.0 into 5 networks
Given address block is Class C → 24 bits for NID and 8 bits for HID
192.168.9.00000000
192.168.9.11111111
192.168.9.0
192.168.9.255 192.168.9.XXX00000
Network ID : 192.168.9.0
Broadcast ID: 192.168.9.255
3 bits are required
to make 8 parts
000
001
010
011 100
101
110
111
Visit www.youtube.com/GURUKULA for Lecture Videos
9. NET 1
192.168.9.00000000 192.168.9.0
192.168.9.00011111 192.168.9.31
NET 2
192.168.9.00100000 192.168.9.32
192.168.9.00111111 192.168.9.63
NET 3
192.168.9.01000000 192.168.9.64
192.168.9.01011111 192.168.9.95
NET 4
192.168.9.01100000 192.168.9.96
192.168.9.01111111 192.168.9.127
NET 5
192.168.9.10000000 192.168.9.128
192.168.9.10011111 192.168.9.159
NET 6
192.168.9.10100000 192.168.9.160
192.168.9.10111111 192.168.9.191
NET 7
192.168.9.11000000 192.168.9.192
192.168.9.11011111 192.168.9.223
NET 8
192.168.9.11100000 192.168.9.224
192.168.9.11111111 192.168.9.255
10. Fixed Length – Exercise 2
Divide the address space 172.16.0.0 into 3 networks
Given address block is Class B → 16 bits for NID and 16 bits for HID
172.16.00000000.00000000
To
172.16.11111111.11111111
172.16.XX000000.00000000
XX = 00
Network ID : 172.16.0.0
Broadcast ID: 172.16.255.255
XX = 01 XX = 10
XX = 11
2 bits are required
to make 4 parts
Visit www.youtube.com/GURUKULA for Lecture Videos
11. NET 1
172.16.00000000.00000000 172.16.0.0
172.16.00111111.11111111 172.16.63.255
NET 2
172.16.01000000.00000000 172.16.64.0
172.16.01111111.11111111 172.16.127.255
NET 3
172.16.10000000.00000000 172.16.128.0
172.16.10111111.11111111 172.16.191.255
NET 4
172.16.11000000.00000000 172.16.192.0
172.16.11111111.11111111 172.16.255.255
Visit www.youtube.com/GURUKULA for Lecture Videos
12. Fixed Length – Exercise 3
• Divide the address space 192.168.9.0 into suitable number of
networks so that each network can handle at least 10 hosts
In each subnet 2 address are not usable
so total no of address required is 12
2? Gives 12 address → This is not possible
24 Gives 16 address → This is the nearest possible value
192.168.9.XXXX_ _ _ _
Visit www.youtube.com/GURUKULA for Lecture Videos
13. References:
• Behrouz A. Forouzan, ―Data communication and Networking, Fifth
Edition, Tata McGraw – Hill, 2013
• Larry L. Peterson, Bruce S. Davie, ―Computer Networks: A Systems
Approach, Fifth Edition, Morgan Kaufmann Publishers, 2011.
• Few online References (Will be Mentioned in the description Section)
Thank You…