You are on page 1of 21

PPT/2K804/04

CCNA
640-802
IP Subnetting and Variable Length
Subnet Masks (VLSM)
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Subnetting Basics
There are loads of reasons in favor of subnetting. Some of
the benefits include:
Reduced network traffic:- We all appreciate less traffic of any
kind. Networks are no different. Without trusty routers, packet
traffic could grind the entire network down to a near standstill.
Optimized network performance:- This is a result of reduced
network traffic.
Simplified management:- Its easier to identify and isolate
network problems in a group of smaller connected networks
than within one gigantic network.
Facilitated spanning of large geographical distances:- Because
WAN links are considerably slower and more expensive than
LAN links, a single large network that spans long distances can
create problems in every arena listed above.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
How to Create Subnets
To create subnetworks, you take bits from the host portion of the
IP address and reserve them to define the subnet address.
To determine your current requirements as well as plan for future
conditions. Follow these steps:
Determine the number of required network IDs:
One for each subnet
One for each wide area network connection
Determine the number of required host IDs per subnet:
One for each TCP/IP host
One for each router interface
Based on the above requirement, create the following:
One subnet mask for your entire network
A unique subnet ID for each physical segment
A range of host IDs for each subnet
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Subnet Masks
A subnet mask is a 32-bit value that allows the recipient of
IP packets to distinguish the network ID portion of the IP
address from the host ID portion of the IP address.
The default subnet masks for Classes A, B, and C. These
default masks cannot change.
Default Subnet Mask
255.255.255.0 network.network.network.node C
255.255.0.0 network.network.node.node B
255.0.0.0 network.node.node.node A
Default Subnet Mask Format Class
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Classless Inter-Domain Routing (CIDR)
Its basically the method that ISPs (Internet Service
Providers) use to allocate an amount of addresses to a
company, a homea customer.
They provide addresses in a certain block size which looks
something like this: 192.168.10.32/28. This tell you what is
your subnet mask.
For example a Class A default subnet mask is 255.0.0.0.
This means that the first byte of the subnet mask is all ones
(1s) or 11111111.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Classless Inter-Domain Routing (CIDR) (contd.)
When referring to a slash notation, The 255.0.0.0 is
considered a /8 because it has 8 bits that are 1sthat is, 8
bits that are turned on.
For class B default subnet mask is 255.255.0.0, slash
notation will be /16 and class C default subnet mask is
255.255.255.0 its slash notation will be /24.
Refer table 3.2 in Book
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Subnetting Class C Addresses
In a Class C address, only 8 bits are available for defining the
hosts. This means that the only Class C subnet masks can be the
following:
Binary Decimal Shorthand
---------------------------------------------------------
10000000 = 128 /25 (Not valid on the Cisco exams!)
11000000 = 192 /26
11100000 = 224 /27
11110000 = 240 /28
11111000 = 248 /29
11111100 = 252 /30
11111110 = 254 /31 (Not valid)
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
The Binary Method: Subnetting a Class C Address
For example, 255.255.255.192., 192 = 11000000
The 1s represent the subnet bits, and the 0s represent the host bits
available in each subnet. 192 provides 2 bits for subnetting and 6 bits for
defining the hosts in each subnet.
The subnet bits cant be both off or on at the same time, the only two
valid subnets are these:
01000000 = 64 (all host bits off)
10000000 = 128 (all host bits off)
The table show Subnet 64
The broadcast address (do this second) 111111 = 127 01
The last valid host 111110 = 126 01
The first valid host 000001 = 65 01
The network (do this first) 000000 = 64 01
Meaning Host Subnet
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
The Fast Way: Subnetting a Class C Address
How many subnets? 2
x
2 = number of subnets. x is the number
of masked bits, or the 1s.For example, in 11000000, the number
of ones gives us 22 2 subnets. In this example, there are 2
subnets.
How many hosts per subnet? 2
y
2 = number of hosts per
subnet. y is the number of unmasked bits, or the 0s. For example,
in 11000000, the number of zeros gives us 26 2 hosts. In this
example, there are 62 hosts per subnet.
What are the valid subnets? 256 subnet mask = block size, or
base number. For example,256 192 = 64. 64 is the first subnet.
The next subnet would be the base number plus itself, or 64 + 64
= 128, (the second subnet). You keep adding the base number to
itself until you reach the value of the subnet mask, which is not a
valid subnet because all subnet bits would be turned on (1s).
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
The Fast Way: Subnetting a Class C Address (contd.)
Whats the broadcast address for each subnet? The
broadcast address is all host bits turned on, which is the
number immediately preceding the next subnet.
What are the valid hosts? Valid hosts are the numbers
between the subnets, omitting all 0s and all 1s.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Subnetting Class B Addresses
The possible Class B subnet masks that we have are lot
more possible subnets than we do with a Class C network
address:
255.255.128.0 (/17) 255.255.255.0 (/24)
255.255.192.0 (/18) 255.255.255.128 (/25)
255.255.224.0 (/19) 255.255.255.192 (/26)
255.255.240.0 (/20) 255.255.255.224 (/27)
255.255.248.0 (/21) 255.255.255.240 (/28)
255.255.252.0 (/22) 255.255.255.248 (/29)
255.255.254.0 (/23) 255.255.255.252 (/30)
The Class B network address has 16 bits available for host
addressing. This means we can use up to 14 bits for
subnetting because we have to leave at least 2 bits for host
addressing.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Subnetting Class A Addresses
Class A subnetting is not performed any differently from Classes B
and C, but there are 24 bits to play with instead of the 16 in a
Class B address and the 8 bits in a Class C address.
255.128.0.0 (/9) 255.255.240.0 (/20)
255.192.0.0 (/10) 255.255.248.0 (/21)
255.224.0.0 (/11) 255.255.252.0 (/22)
255.240.0.0 (/12) 255.255.254.0 (/23)
255.248.0.0 (/13) 255.255.255.0 (/24)
255.252.0.0 (/14) 255.255.255.128 (/25)
255.254.0.0 (/15) 255.255.255.192 (/26)
255.255.0.0 (/16) 255.255.255.224 (/27)
255.255.128.0 (/17) 255.255.255.240 (/28)
255.255.192.0 (/18) 255.255.255.248 (/29)
255.255.224.0 (/19) 255.255.255.252 (/30)
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Variable Length Subnet Masks (VLSMs)
A router running RIP has a subnet
mask of a certain value, it assumes
that all interfaces within the
classful address space have the
same subnet mask. This is called
classful routing, and RIP and IGRP
are both considered classful routing
protocols.
Classless routing protocols,
however, do support the
advertisement of subnet
information.Therefore, you can use
VLSM with routing protocols such
as RIPv2, EIGRP, or OSPF.
A Typical Classful Network
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
VLSM Design
The mask of 255.255.255.240 (/28) provides 14 subnets,
each with 14 hosts.All hosts and router interfaces use the
same subnet mask.
The WAN links are point-to-point, and use only two IP
addresses. So were basically wasting 12 valid host
addresses per WAN link.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
VLSM Design (contd.)
We can use different size masks on each interface. If we do that, we get 2
hosts per WAN interface and 14 hosts per LAN interface.It makes a huge
difference, we get more hosts on a LAN, we still have room to add more
WANs and LANs on the same network.
By using a VSLM design, we save address space
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Implementing VLSM Networks
To create VLSMs quickly and efficiently, you need to
understand how block sizes and charts work together to
create the VLSM masks.
Block size for class C Network.
Prefix Mask Hosts Block Size
/26 192 62 64
/27 224 30 32
/28 240 14 16
/29 248 6 8
/30 252 2 4
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Implementing VLSM Networks (contd.)
Example of VLSM
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Troubleshooting IP Addressing
Here are the four troubleshooting steps Cisco recommends:
ping 127.0.0.1.
ping the IP address of the local host.
ping the default gateway (router).
ping the remote server.
If steps 1 through 4 were successful, then you know that
you have IP communication between the local host and the
remote server. You also know that the remote physical
network is working.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Troubleshooting IP Addressing (contd.)
If the user still cant communicate with the server after
steps 1 through 4 are successful, then you probably have
some type of name resolution problem, and need to check
your Domain Name Server (DNS) settings.
If the ping to the remote server fails, then you know you
have some type of remote physical network problem, and
need to go to the server and work through steps 1 through
3 until you find the snag.
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Determining IP Address Problems
Its common for a host,
router, or other network
device to be configured
with the wrong IP
address, subnet mask, or
default gateway.
The Fast Ethernet port of
Lab_B is using Broadcast
Address of network 64
which is invalid,change
the IP Address
192.168.1.97/27 192.168.1.100/27
Revision no.: PPT/2K804/04

C
M
S

I
N
S
T
I
T
U
T
E
,

2
0
0
4
.

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d
.

N
o

p
a
r
t

o
f

t
h
i
s

m
a
t
e
r
i
a
l

m
a
y

b
e

r
e
p
r
o
d
u
c
e
d
,

s
t
o
r
e
d

o
r

e
m
a
i
l
e
d

w
i
t
h
o
u
t

t
h
e

p
r
i
o
r

p
e
r
m
i
s
s
i
o
n
.
Design & Published by:
CMS Institute, Design & Development Centre, CMS House, Plot No. 91, Street No.7,
MIDC, Marol, Andheri (E), Mumbai 400093.

You might also like