VLSM - CNL

hardsweetlipsNetworking and Communications

Oct 28, 2013 (3 years and 11 months ago)

80 views

1

Variable Length


Subnet Masks

Luis Trejo



1a Reunión de Educación Continua

CATC ITESM CEM

Septiembre 2002

2

Internet Scaling Problems


Over the past years, the Internet has
experienced 2 major scaling issues as it
has struggled to provide continous and
interrupted growth


The eventual exhaustion of the IPv4
address space.


The ability to route traffic between the ever
increasing number of networks that
compromse the Internet.

3

Internet Scaling Problems


IPv4 defines a 32
-
bit address.


2
32

(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.

4

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).

5

Internet Scaling Problems


Alternatives:


IPv6


Subnetting


VLSM


CDIR


NAT


6

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.

7

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.

8

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.

9


130.5.32.0


130.5.64.0


130.5.96.0


130.5.128.0


130.5.160.0


130.5.192.0


130.5.224.0

Internet

130.5.0.0

Subnetting reduces the
routing requirements of
the Internet

Private Network

10

Subnetting


Benefits:


Route flapping (i.e. the rapid changes of
routes) within the private network does
not affect the Internet routing tables.

11

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.


12

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.


13

VLSM


Benefits


Efficient use of the organization’ s
assigned IP address space.


Route aggregation.


14

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!

15

VLSM. Efficient use of the organization’ s
assigned IP address space



Assume in previous example that
administrator is also allowed to configure
the 130.5.0.0/16 network with a /26
extended
-
network
-
prefix.


/26 permits 1024 subnets with 62 hosts
each.


The /26 prefix would be ideal for small
subnets with less than 60 hosts, while /22
prefix is well suited for larger subnets up
to 1000 hosts.

16

VLSM. Route aggregation


VLSM allows the recursive division of an
organization
´
s address space.


It can be aggregated to reduce the
amount of routing information at the top
level.





17

11.2.0.0/16

11.3.0.0/16

...

11.252.0.0/16

11.254.0.0/16

11.253.32.0/19

11.253.64.0/19

...

11.253.160.0/19

11.253.192.0/19

11.1.253.32/27

11.1.253.64/27

11.1.253.96/27

11.1.253.128/27

11.1.253.160/27

11.1.253.192/27

11.1.1.0/24

11.1.2.0/24

...

11.1.252.0/24

11.1.254.0/24

Router C

Router D

Router B

Router A

Internet

11.253.0.0/16

11.1.253.0/24

11.1.0.0/16

11.0.0.0/8

VLSM permits route aggregation

Reducing routing table size

18

VLSM operation


Conceptually, a network is divided into
subnets, some of the subnets are further
divided into sub
-
subnets, and some of the
sub
-
subnets are divided into sub
2
-
subnets.







19

11.0.0.0/8

11.1.0.0/16

11.252.0.0/16

11.3.0.0/16

11.2.0.0/16

11.253.0.0/16

11.254.0.0/16

11.253.32.0/19

11.253.64.0/19

11.253.160.0/19

11.253.192.0/19

11.1.1.0/24

11.1.2.0/24

11.1.253.0/24

11.1.254.0/24

11.1.253.32/27

11.1.253.64/27

11.1.253.160/27

11.1.253.192/27

VLSM permits the
recursive division of a
netrwork prefix

20

VLSM operation


The recursive process does not require
the same extended
-
network
-
prefix be
assigned at each level of recursion.


The recursive subdivision can be carried
out as far as the network administrator
needs to take it.





21

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
need in the future?


3) How many hosts are there on this
level
´
s largest subnet today?


4) How many hosts will there be on this
level
´
s largest subnet in the future?

22

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.

23

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.









24

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.









25

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.

26

Requierments for VLSM Deployment

Routing protocols


OSPF, IS
-
IS, RIP
-
2, EIGRP allow the
deployment of VLSM by providing the
extended
-
network
-
prefix length or mask
value along with each route advertisement.


This permits each subnetwork to be
advertised with its corresponding prefix
length or mask.

27

Requierments for VLSM Deployment

Forwarding algorithm based on longest match


A route with a longer e
-
n
-
p describes a smaller set of
destinations than the same route with a shorter e
-
n
-
p.


Then, a route with a longer e
-
n
-
p is said to be “more
specific”.


A route with a shorter e
-
n
-
p is said to be “less
specific”.


Routers must use the route with the longest
matching e
-
n
-
p (most specific matching route)
when forwarding traffic.

28

Requierments for VLSM Deployment

Example


If a packet destination IP address is 11.1.2.5
and there are 3 network prefixes in the routing
table (11.1.2.0/24, 11.1.0.0/16, and
11.0.0.0/8), the router would select the route
to 11.1.2.0/24 because it has the longest
match with the destination IP address.


29

Requierments for VLSM Deployment

Destination

11.1.2.5

= 00001011.0000001.00000010.00000101


* Route #1

11.1.2.0/24

=
00001011.0000001.00000010
.00000000


Route #2

11.1.0.0/16

=
00001011.0000001
.00000000.00000000


Route #3

11.0.0.0/8

=
00001011
.0000000.00000000.00000000



Best match is with the route having the longest prefix (most specific)

30

Requierments for VLSM Deployment

Topological significant address assignment


Hierarchical routing requires that addresses
be assigned to reflect the actual network
topology.


Routing information is reduced by taking the
set of addresses assigned to a particular
region of the topology, and aggregating them
into a single routing update for the entire set.


This can be done recursively at various points
within the hierarchy of the routing topology.

31

Requierments for VLSM Deployment

Topological significant address assignment


If addresses do not have a topological
significance, aggregation cannot be
performed and the size of routing tables would
not be reduced.


32

VLSM example and exercises