Professional Documents
Culture Documents
Subnetting
Surasak Sanguanpong
nguan@ku.ac.th
http://www.cpe.ku.ac.th/~nguan
2/37
Topics
172.16.0.0
4/37
172.16.1.0 172.16.2.0
172.16.3.0 172.16.4.0
Subnetwork benefits
Smaller networks
are easier to manage Increase the network
Overall traffic is
and troubleshoot manager's control over
reduced, performance
may improve the address space
Subnetwork
6/37
Subnet Address
Before Subnetting
Network ID Host ID
After Subnetting
Network ID Subnet ID Host ID
choose
appropriate size
Class A : Class C :
2 to 22 bits Class B : 2 to 6 bits
2 to 14 bits
8/37
Subnet Example
z Class B address such as 172.16.0.0 might
use its third byte to identify subnet
Subnet mask
z subnet mask is a 32 bit number, use to identify a subnet
Set the bit 1111 1111 1111 1111 1111 1111 0000 0000
covering the
network and
subnet ID to 1
255. 255. 255. 0.
10/37
Masking
1 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
172.16.4.0
255.0.0.0
1111 1111 0000 0000 0000 0000 0000 0000 /8
255.255.192.0
1111 1111 1111 1111 1100 0000 0000 0000 /18
255.255.255.0
1111 1111 1111 1111 1111 1111 0000 0000 /24
255.255.255.240
1111 1111 1111 1111 1111 1111 1111 0000 /28
12/37
Subnet routing
z Traffic is routed to a host by looking bit-wise and
results
Routing
z Hosts and routers perform logical AND to send packets
172.16.1.2 172.16.1.3 172.16.2.2 172.16.2.3
To 172.16.4.2
1
172.16.1.0/24 172.16.2.0/24
2
172.16.4.2 172.16.4.3
172.16.3.2 172.16.3.3
172.16.3.0/24 172.16.4.0/24
14/37
Subnet interpretation
Class A 255.0.0.0
1111 1111 0000 0000 0000 0000 0000 0000
Class B 255.255.0.0
1111 1111 1111 1111 0000 0000 0000 0000
Class C 255.255.255.0
1111 1111 1111 1111 1111 1111 0000 0000
16/37
Range of bit
z A default subnet mask : a subnet mask with no
subnetting
IP
172 16 0 0
Default subnet
255 255 0 0
New subnet
255 255 255 0
1 0 0 0 0 0 0 0 128
1 1 0 0 0 0 0 0 192
1 1 1 0 0 0 0 0 224
1 1 1 1 0 0 0 0 240
1 1 1 1 1 0 0 0 248
1 1 1 1 1 1 0 0 252
1 1 1 1 1 1 1 0 254
1 1 1 1 1 1 1 1 255
18/37
20/37
z Block diagram
subnetting class C
3 bits 4 bits
22/37
intermedite 0 gaps
Noncontiguous subnet mask in the subnet mask
24/37
SubnetID all 0s
10.0.0.0 10.0.0.1 10.0.255.254 10.0.255.255
#3 10.3.0.0 10.3.0.1 to
10.3.255.254
26/37
SubnetID all 0s
172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255
Broadcast Address
Network Address
SubnetID all 1s
28/37
#3 172.16.3.0 172.16.3.1 to
172.16.3.254
30/37
SubnetID all 0s
192.68.0.0 192.68.0.1 192.68.0.30 192.68.0.31
SubnetID all 1s
#3 192.68.0.96 192.68.0.97 to
192.68.0.126
#6 192.68.0.192 192.68.0.193 to
192.68.0.222
32/37
z net mask= ??
z start net id =??
z end net id=??
z #of subnet =??
z net mask= ??
z start net id =??
z end net id=??
z #of subnet =??
34/37
Type of Subnetting
Static Subnetting
192.68.0.64/27
used 20 hosts,
waste 10 hosts
192.68.0.96/27
used 25 hosts,
waste 5 hosts
z Inefficient allocation of
192.68.0.128/27
used 25 hosts, the address space
waste 5 hosts
192.68.0.192/27
used 10 hosts,
waste 20 hosts
192.68.0.224/27
used 10 hosts,
waste 20 hosts
36/37
Variable-Length Subnetting
192.68.0.32/27 General
used 20 hosts,
z
z General Idea
Idea of
of VLSM
VLSM
waste 10 hosts z
z A
A small
small subnet
subnet with
with only
only aa
few
few hosts
hosts needs
needs aa subnet
subnet
192.68.0.64/27
used 20 hosts, mask
mask that
that accommodate
accommodate
waste 10 hosts only
only few
few hosts
hosts
192.68.0.96/27 z
z A
A subnet
subnet with
with many
many hosts
hosts
used 25 hosts, need
need aa subnet
subnet mask
mask to to
waste 5 hosts accommodate
accommodate
the
the large
large number
number of of hosts
hosts
192.68.0.128/27
used 25 hosts,
waste 5 hosts
192.68.0.192/28 192.68.0.208/28
used 10 hosts, unused subnet
waste 4 hosts Available 14 hosts
192.68.0.224/28 192.68.0.240/28
used 10 hosts, unused subnet
waste 4 hosts Available 14 hosts
VLSM - An Example
z three different VLSM of 172.16.0.0
CPC RDI
255.255.255.0 255.255.255.0
255.255.255.252
255.255.255.252 255.255.255.252
point-to-point link
CPE
255.255.255.252
255.255.255.192