Lecture 16 Ip Addressing and Subnetting by Rab Nawaz Jadoon
Lecture 16 Ip Addressing and Subnetting by Rab Nawaz Jadoon
H H
H
H
Physical Network
R (Subnet 3)
Physical Network
H (Subnet 1)
H
R R
H
R
Physical Network
Physical Network R (Subnet 4)
H (Subnet 2)
H H
H H
Network 138.10.1.0
Subnet 1
H1 H2
Internet R 138.10.1.1 138.10.1.2
Network 138.10.2.0
Subnet 2
H3 H4
138.10.2.1 138.10.2.2
10001100.10110011.11011100.11001000
128 64 32 16 8 4 2 1
1 0 0 0 1 1 0 0
Class A: NNNNNNNN.HHHHHHH.HHHHHHHH.HHHHHHHH
Class B: NNNNNNNN.NNNNNNNN.HHHHHHH.HHHHHHHH
Class C: NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
*Note:
The network part of the address is also known as
the Network Address
140.179.0.0
If all the bits in the Host portion are set to “1”s, then
this specifies the broadcast address that is sent to all
hosts on the network:
140.179.255.255
SUBNETTING
Efficiency
Non-subnetted networks are wasteful
Division of networks not optimal
Smaller Network
Easier to manage
Smaller broadcast domains
Class A - 255.0.0.0
11111111.00000000.00000000.00000000
Class B - 255.255.0.0
11111111.11111111.00000000.00000000
Class C - 255.255.255.0
11111111.11111111.11111111.00000000
In Binary:
10001100.10110011.11110000.11001000
11111111.11111111.00000000.00000000
10001100.10110011.00000000.00000000
This will work, because we can steal the first 3 bits from
the host’s portion of the address to give to the network
portion and still have 5 (8-3) left for the host portion:
255.255.255.224 128+64+32=224
000 001
010 011
100 101
110 111
0 0 1 h h h h h 32
0 1 0 h h h h h 64
0 1 1 h h h h h 96
1 0 0 h h h h h 128
1 0 1 h h h h h 160
1 1 0 h h h h h 192
206.15.143.32
206.15.143.64
206.15.143.96
206.15.143.128
206.15.143.160
206.15.143.192
206.15.143.33 or 32+1
0 0 1 0 0 0 0 1
And the last address in the Network will look like this:
206.15.143.62
0 0 1 1 1 1 1 0
*Remember, we cannot use all “1”s, that is the broadcast
address (206.15.143.63)
Department of Computer Science 46
Host Addresses
The next network will start at 206.15.143.64
When the computer does the Logical Bitwise AND Operation it will come
up with the following Network Address (or Subnet Address):
11001000.00001111.10001111.01011001 = 200.15.143.89
11111111.11111111.11111111.11100000 = 255.255.255.224
11001000.00001111.10001111.01000000 = 200.15.143.64
24-2=14
24-2=14
Number of networks
Expected growth
Ease of maintenance
What are the valid subnets that you can obtain from
the given subnet mask?
What is the broadcast address of each subnet?
What are the valid hosts in each of the subnets?
What subnet mask should you use if you need x
subnets and y hosts?
Subnet
address
32 64 96 128 160 192
First
Valid
33 65 97 129 161 193
Host
Last Valid
Host
62 94 126 158 190 222
Broadcas
t address
63 95 127 159 191 223