Transcript vlsm

Introduction to Networking
(Yarnfield)
Variable Length Subnet Masking (VLSM)
Objectives




Define VLSM
Describe the difference between classful subnetting
Describe the advantages of VLSM
Be able to perform VLSM operations on give IP addresses
Classful subnetting exercise


172.80.0.0 255.255.248.0
Find





The first five subnet addresses
First host, last host and broadcast of each subnet
Default gateway
How many subnets can be made?
How many hosts per subnet?
VLSM defined



More than one subnet mask
Using classful subnetting wastes IP addresses
172.80.40.0
Why?
172.80.40.1 – 47.254
172.80.32.0
172.80.32.1 – 39.254
172.80.16.0
172.80.16.1 – 23.254
172.80.24.0
172.80.24.1 – 31.254
172.80.8.0
172.80.8.1 – 15.254
We need


An IP address to perform VLSM on
The number of hosts involved in each part of the
network
We will...

Create a number of subnet masks that suit our needs
more efficiently than a classful subnetting scheme could
Example using a Class C network address
192.168.1.0
60 hosts
120 hosts
30 hosts
Process
1.
2.
3.
4.
5.
6.
Find the segment with the largest number of hosts
connected to it
Find an appropriate subnet mask for the largest
segment
Write down the subnet addresses to fit the subnet
mask
Take one of the newly created subnet addresses and
apply a new subnet mask to it that is more appropriate
Write down the subnet addresses to fit the new subnet
mask
Repeat from step 4 for smaller segments
Example continued
1.


Find the segment with the largest number of hosts
connected to it
In the example the largest segment has 120 hosts
connected so we must start with this segment
To accomodate120 hosts we need to use 7 bits from
the host portion of the address (27 - 2 = 126)
Example continued
2.


Find an appropriate subnet mask for the largest
segment
If we have borrowed 7 bits for our hosts the subnet
mask (in binary) will be
11111111.1111111.1111111.1000000
Convert this to decimal and we get 255.255.255.128
Example continued
3.




Write down the subnet addresses to fit the subnet
mask
Now we need to find the subnet addresses that this
subnet mask will create
256 – 128 = 128
Therefore the subnets would be 192.168.1.0 and
192.168.1.128 (remember we can now use subnet zero!)
We can now assign 192.168.1.0/25 to accommodate the
120 segment and have 192.168.1.128 to use for the other
two segments
60 hosts (62 in total)
120 hosts (126 in total)
192.168.1.0/25
30 hosts (30 in total)
Example continued
4.





Take one of the newly created subnet addresses and apply a
new subnet mask to it that is more appropriate
We still have two segments to deal with and we have a new
subnet address to work with of 192.168.1.128
We must start with the larger segment, which has 60 hosts
To accommodate 60 hosts we need to borrow 6 bits from the
host portion of the given IP address
26 – 2 = 62 hosts
This will give us a subnet mask of
1111111.1111111.1111111.11000000 which is the same as
255.255.255.192
Example continued
5.




Write down the subnet addresses to fit the new subnet
mask
Now we need to find the subnet addresses that this
subnet mask will create
256 – 192 = 64
Therefore the new subnet addresses would be
192.168.1.128 and 192.168.1.192
We can now use 192.168.1.128/26 for the segment with
60 hosts
60 hosts (62 in total)
192.168.1.128/26
120 hosts (126 in total)
192.168.1.0/25
30 hosts (30 in total)
Example continued
4.





Take one of the newly created subnet addresses and
apply a new subnet mask to it that is more appropriate
We still have the segment with 30 hosts to deal with
We work this out in the same way as before
To accommodate 30 hosts we need to borrow 5 bits
from the host portion of the IP address
25 – 2 = 30 hosts
This will give us a subnet mask of
1111111.1111111.1111111.11100000 which is
255.255.255.224
Example continued
5.





Write down the subnet addresses to fit the new subnet
mask
Now we need to find the subnet addresses that this
subnet mask will create
256 – 224 = 32
Therefore the new subnet addresses would be
192.168.1.192 and 192.168.1.224
We can now use 192.168.1.192/27 for the segment with
30 hosts
We still have the new 192.168.1.224 subnet which could
be used for future growth
Result
192.168.1.0
60 hosts (62 in total)
192.168.1.128/26
120 hosts (126 in total)
192.168.1.0/25
30 hosts (30 in total)
192.168.1.192/27
Summary



To determine the number of hosts a subnet can support
use the formula 2n – 2
Always start the process with the segment with the
largest amount of hosts to accommodate
Classless subnetting deals with the hosts as opposed to
classful subnetting which deals more with subnets
Exercise



192.168.2.0/24
7 remote sites, 30 hosts
each
P to P links
between routers
Remote A 30 hosts
Remote B 30 hosts
Remote C 30 hosts
Remote D 30 hosts
Central
Remote E 30 hosts
Remote F 30 hosts
Remote G 30 hosts
Exercise

192.168.3.0
30 hosts
6 hosts
Backbone
126 hosts
6 hosts
30 hosts
6 hosts
30 hosts
Questions...

...are there any?