Variable Length Subnet Masks
Variable Length Subnet Masks
Subnet
Masks
Luis Trejo
2
Internet Scaling
Problems
■ IPv4 defines a 32-bit address.
■ 232 (4,294,967,296) adresses available.
■ The address shortage problem is
aggravated by the fact that portions of the
IP address space have not been efficiently
allocated.
■ IP was first standarized in September
1981.
■ 5 classes: A, B, C, D and E.
3
Internet Scaling
Problems
Disign problem:
■ Class C networks are too small (254
hosts).
■ Next option is class B, which is too big
(65,534 hosts).
4
Internet Scaling
Problems
■ Alternatives:
◆ IPv6
◆ Subnetting
◆ VLSM
◆ CDIR
◆ NAT
5
Classful vs Classless
Addressing
■ Classful:
◆ Size defined by the class (A, B, C, D, E).
◆ Fixed network portion.
◆ RIP & IGRP are classful routing protocols.
■ Classless:
◆ Network portion can be any size.
◆ Protocol sends subnetting (prefix) information with
routes.
✦ 192.168.64.0/18
◆ RIP2, EIGRP, OSPF, BGP & IS-IS.
6
Subnetting
■ In 1985, RFC 950 defined a standard
procedure to support subnetting, or division,
of a single class A, B, or C network number
into smaller pieces.
■ Subnetting was introduced to overcome
some of the following problems Internet
was experiencing:
◆ Internet routing tables started to grow
◆ Local administrators had to request another
network number from the Internet before a
new network could be installed at their site.
7
Subnetting
■ Benefits:
◆ The size of the global Internet routing table
does not grow because the site administrator
does not need to obtain additional adress
space and the routing advertisments for all of
the subnets are combined into a single routing
table entry.
◆ The local administrator has the flexibility to
deploy additional subnets without obtaining a
new network form the Internet.
8
Subnetting reduces the
routing requirements
Private Network
of the Internet
130.5.32.0
130.5.0.0 130.5.64.0
Internet 130.5.96.0
130.5.128.0
130.5.160.0
130.5.192.0
130.5.224.0
9
Subnetting
■ Benefits:
◆ Route flapping (i.e. the rapid changes of
routes) within the private network does
not affect the Internet routing tables.
10
Subnetting
■ Drawbacks
◆ Once the desinged has been established, it
remains static. It locks the organization into a
fixed-number of fixed-sized subnets.
◆ A lot IP addresses are wasted for subnets
with small number of hosts.
11
Variable Length
Subnet Masks
(VLSM)
■ In 1987, RFC 1009 specified that a subnetted
network could use more than one subnet
mask.
■ When an IP network is assigned more than
one subnet mask, it is considered a network
with variable length subnet masks.
■ RIP-1 permits only a single subnet mask
◆ It does not provide subnet mask information as
part of its routing table update messages.
12
VLSM
■ Benefits
◆ Efficient use of the organization’ s
assigned IP address space.
◆ Route aggregation.
13
VLSM. Efficient use of the
organization’ s assigned IP
address space
■ Assume that a network administrator has decided
to configure the 130.5.0.0/16 network with a /22
extended-network prefix.
■ This disign allows for 64 subnets with 1,022 hosts
each.
■ Fine if the organization plans to deploy a number
of large subnets.
■ What about the occasional small subnet
containing only 20 or 30 hosts?
■ About 1,000 IP host addresses wasted for every
small occasional subnet!
14
VLSM. Efficient use of the
organization’ s assigned IP
address space
16
VLSM permits route aggregation
Reducing routing table size
11.253.0.0/16 11.1.253.0/24
Internet Router D
Router C
11.253.32.0/19 11.1.253.32/27
11.253.64.0/19 11.1.253.64/27
... 11.1.253.96/27
11.253.160.0/19 11.1.253.128/27
11.253.192.0/19 11.1.253.160/27
11.1.253.192/27
17
VLSM operation
18
VLSM permits the
recursive division of a 11.1.1.0/24
netrwork prefix
11.1.2.0/24
11.1.0.0/16 11.1.253.32/27
11.2.0.0/16 11.1.253.64/27
11.1.253.0/24
11.3.0.0/16
11.1.254.0/24
11.1.253.160/27
11.0.0.0/8
11.253.32.0/19 11.1.253.192/27
11.252.0.0/16
11.253.64.0/19
11.253.0.0/16
11.254.0.0/16
11.253.160.0/19
11.253.192.0/19
19
VLSM operation
20
VLSM Design
Considerations
At each level of the hierarchy:
■ 1) How many total subnets does this level
need today?
■ 2) How many total subnets does this level
21
VLSM Design
Considerations (example)
■ Assume a network is spread out over a number
of sites.
■ An organization has 3 campuses today.
■ It will need 3 bits of subnetting to allow growth (8
subnets).
■ Within each campus a second level of subnetting
will identify a building.
■ Within each building a third level of subnetting will
identify an individual workgroup.
22
VLSM Design
Considerations (example)
■ From this hierarchical model, the top level is determined by the
number of campuses.
■ The mid-level by the number of buildings at each site.
■ The lowest level by the number of workgroups.
23
VLSM Design
Considerations (example)
■ The deployment of a hierarchical subnetting scheme requires careful
planning.
■ At the bottom level, the designer must be sure that the leaf subnets are large
enough to support the required number of hosts.
■ The addresses from each site will be aggregable into a single address block
that keeps the backbone routing tables from becoming too large.
24
Requierments for VLSM
Deployment
■ Three prerequisites:
◆ The routing protocols must carry extended-
network-prefix information with each routing
update.
◆ All routers must implement a consistent
forwarding algorithm based on the longest
match.
◆ For route aggregation to occur, addresses
must be assigned so that they have
topological significance.
25
Requierments for VLSM
Deployment
Routing protocols
■ OSPF, IS-IS, RIP-2, EIGRP allow the
26
Requierments for VLSM
Deployment
Forwarding algorithm based on longest match
■ A route with a longer e-n-p describes a smaller set of
specific”.
■ A route with a shorter e-n-p is said to be “less
specific”.
■ Routers must use the route with the longest
27
Requierments for VLSM
Deployment
Example
■ If a packet destination IP address is 11.1.2.5
28
Requierments for VLSM
Deployment
Destination 11.1.2.5 = 00001011.0000001.00000010.00000101
Best match is with the route having the longest prefix (most specific)
29
Requierments for VLSM
Deployment
Topological significant address assignment
■ Hierarchical routing requires that addresses
30
Requierments for VLSM
Deployment
Topological significant address assignment
■ If addresses do not have a topological
31
VLSM example and
exercises
32