8/2/2019 6 cidr ja vlsm
1/31
2007 Cisco Systems, Inc. All rights reserved. Cisco PublicITE PC v4.0Chapter 1 1
CIDR and VLSM
Erkki Kukk
8/2/2019 6 cidr ja vlsm
2/31
ITE PC v4.0Chapter 1 2 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classful IP Addressing
original specification of IPv4 (RFC 791), released in 1981
8/2/2019 6 cidr ja vlsm
3/31
ITE PC v4.0Chapter 1 3 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Subnet Mask
Why does a host need to know what network it belongs to? So, it knows whether to encapsulate the IP packet into an Ethernet
frame with:
The Destination MAC Address of the default gatewayMust know the default gateways IP address
The Destination MAC Address of the host with the Destination IPaddress of the packet
Host: Im a host on the 192.168.1.0/24 network.
8/2/2019 6 cidr ja vlsm
4/31
ITE PC v4.0Chapter 1 4 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
When the ARPANET was founded in 1969, no one anticipated that theInternet would explode out of the humble beginnings of this researchproject
Over the next decade, the number of hosts on the Internet grewexponentially, from 159,000 in October 1989 to over 72 million by the end
of the millennium Without the introduction ofVLSM and CIDR notation in 1993 (RFC 1519),
Network Address Translation (NAT) in 1994 (RFC 1631), andprivateaddressingin 1996 (RFC 1918), the IPv4 32-bit address space wouldnow be exhausted
8/2/2019 6 cidr ja vlsm
5/31
ITE PC v4.0Chapter 1 5 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classful and Classless Routing Protocols
Routing protocols:classful or classless.
As networks began to use classless addressing, classless routingprotocols had to be modified or developed to include the subnet maskin the routing update.
8/2/2019 6 cidr ja vlsm
6/31
ITE PC v4.0Chapter 1 6 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classful IP Addressing
Classful Routing Updates- classful routing protocols (i.e. RIPv1) do not send
subnet masks in their routing updates
The reason is that the Subnet mask is directly related to thenetwork address
8/2/2019 6 cidr ja vlsm
7/31
ITE PC v4.0Chapter 1 7 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Moving Toward Classless Addressing
By 1992, members of the IETF had serious concerns about theexponential growth of the Internet and the limited scalability of Internetrouting tables.
They were also concerned with the eventual exhaustion of 32-bit IPv4address space.
1993, IETF introduced classless interdomain routing (CIDR) (RFC 1517).CIDR allowed the following:
More efficient use of IPv4 address space
Prefix aggregation, which reduced the size of routing tables
8/2/2019 6 cidr ja vlsm
8/31
ITE PC v4.0Chapter 1 8 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
CIDR
Classless interdomain routing (CIDR) is a prefix-basedstandard for the interpretation of IP addresses.
CIDR allows routing protocols to summarize multiplenetworks, a block of addresses, as a single route.
With CIDR, IP addresses and their subnet masks arewritten as four octets, separated by periods, andfollowed by a forward slash and a number thatrepresents the subnet mask (slash notation).
An example is 172.16.1.0/24.
8/2/2019 6 cidr ja vlsm
9/31
ITE PC v4.0Chapter 1 9 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
11111111.00000000.00000000.00000000 /8 (255.0.0.0) 16,777,216 host addresses
11111111.10000000.00000000.00000000 /9 (255.128.0.0) 8,388,608 host addresses
11111111.11000000.00000000.00000000 /10 (255.192.0.0) 4,194,304 host addresses
11111111.11100000.00000000.00000000 /11 (255.224.0.0) 2,097,152 host addresses
11111111.11110000.00000000.00000000 /12 (255.240.0.0) 1,048,576 host addresses
11111111.11111000.00000000.00000000 /13 (255.248.0.0) 524,288 host addresses
11111111.11111100.00000000.00000000 /14 (255.252.0.0) 262,144 host addresses
11111111.11111110.00000000.00000000 /15 (255.254.0.0) 131,072 host addresses
11111111.11111111.00000000.00000000 /16 (255.255.0.0) 65,536 host addresses
11111111.11111111.10000000.00000000 /17 (255.255.128.0) 32,768 host addresses
11111111.11111111.11000000.00000000 /18 (255.255.192.0) 16,384 host addresses
11111111.11111111.11100000.00000000 /19 (255.255.224.0) 8,192 host addresses
11111111.11111111.11110000.00000000 /20 (255.255.240.0) 4,096 host addresses
11111111.11111111.11111000.00000000 /21 (255.255.248.0) 2,048 host addresses
11111111.11111111.11111100.00000000 /22 (255.255.252.0) 1,024 host addresses
11111111.11111111.11111110.00000000 /23 (255.255.254.0) 512 host addresses
11111111.11111111.11111111.00000000 /24 (255.255.255.0) 256 host addresses
11111111.11111111.11111111.10000000 /25 (255.255.255.128) 128 host addresses
11111111.11111111.11111111.11000000 /26 (255.255.255.192) 64 host addresses
11111111.11111111.11111111.11100000 /27 (255.255.255.224) 32 host addresses
11111111.11111111.11111111.11110000 /28 (255.255.255.240) 16 host addresses
11111111.11111111.11111111.11111000 /29 (255.255.255.248) 8 host addresses
11111111.11111111.11111111.11111100 /30 (255.255.255.252) 4 host addresses
11111111.11111111.11111111.11111110 /31 (255.255.255.254) 2 host addresses
11111111.11111111.11111111.11111111 /32 (255.255.255.255) Host Route
ISPs no longer restricted to
three classes. Can nowallocate a large range of
network addresses basedon customer requirements
8/2/2019 6 cidr ja vlsm
10/31
ITE PC v4.0Chapter 1 10 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classless Routing Protocol
With a classless routing protocol:The /14 (255.252.0.0) subnet mask is included in the routing update
With a classful routing protocol:If R2 sends the 172.16.0.0 summary route without the /14 mask, R3 only knows to apply thedefault classful mask of /16.
Classful routing protocols cannot send supernet routes because the receiving router willapply the default classful mask to the network address in the routing update.
8/2/2019 6 cidr ja vlsm
11/31
ITE PC v4.0Chapter 1 11 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classful and Classless IP Addressing
Routing
ProtocolRouting
updates
Includesubnet
Mask
Supports
VLSMAbility to send
Supernet routes
Classful No No No
Classless Yes Yes Yes
Classless Routing Protocol
8/2/2019 6 cidr ja vlsm
12/31
ITE PC v4.0Chapter 1 12 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Subnetting and Subnet Masks
Formalized in 1985, the subnet mask breaks a
single network in to smaller pieces.
By subnetting we borrow bits from the host part Allows network administrators to divide their network into small networks
orsubnets
8/2/2019 6 cidr ja vlsm
13/31
ITE PC v4.0Chapter 1 13 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Calculating the number of subnets/hosts needed
Network 172.16.1.0/24 Need:
As many subnets as possible, 60 hosts per subnet
172.16.1.0
Network Host
255.255.255.0
8/2/2019 6 cidr ja vlsm
14/31
ITE PC v4.0Chapter 1 14 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Calculating the number of subnets/hosts needed
Network 172.16.1.0/24 Need:
As many subnets as possible, 60 hosts per subnet New Subnet Mask: 255.255.255.192 (/26)
Number of Hosts per subnet: 6 bits, 64-2 hosts, 62 hosts
Number of Subnets: 2 bits or4 subnets
172.16.1. 0 0 0 0 0 0 0 0
Network Host 6 host bits
255.255.255. 1 1 0 0 0 0 0 0255.255.255.192
Number of subnets
8/2/2019 6 cidr ja vlsm
15/31
ITE PC v4.0Chapter 1 15 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
SubnetNo
Subnet BitsBorrowedBinary Value
SubnetBitsDecimalValue
Host BitsPossible BinaryValues
Subnet/HostDecimalRange
Useable?
0. Subnet 00 0 000000-111111 0-63 No
1. Subnet 01 64 000000-111111 64-127 Yes
2. Subnet 10 128 000000-111111 128-191 Yes
3. Subnet 11 192 000000-111111 192-254 No
172.16.1.0 network172.16.1.64 network172.16.1.128 network172.16.1.192 network
Calculating the number of subnets/hosts needed
8/2/2019 6 cidr ja vlsm
16/31
ITE PC v4.0Chapter 1 16 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Calculating the number of subnets/hosts needed
Network 172.16.1.0/24 Need:
As many subnets as possible, 12 hosts per subnet
172.16.1.0
Network Host
255.255.255.0
8/2/2019 6 cidr ja vlsm
17/31
2007 Cisco Systems, Inc. All rights reserved. Cisco PublicITE PC v4.0Chapter 1 17
VLSM
VLSM in ActionVLSM and IP Addresses
8/2/2019 6 cidr ja vlsm
18/31
ITE PC v4.0Chapter 1 18 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM
VLSM the process ofsub-netting a subnet to fit yourneeds
-Example:
Subnet 10.1.0.0/16, 8 morebits are borrowed again, tocreate 256 subnets with a/24mask.
-Mask allows for 254 hostaddresses per subnet
-Subnets range from:10.1.0.0 / 24 to 10.1.255.0 / 24
8/2/2019 6 cidr ja vlsm
19/31
ITE PC v4.0Chapter 1 19 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM The network 10.0.0.0/8 has been subnetted using the subnet mask
of /16, which gives the potential of 256 subnets:10.0.0.0/16
10.1.0.0/16
10.2.0.0/16
.
.10.255.0.0/16
8/2/2019 6 cidr ja vlsm
20/31
ITE PC v4.0Chapter 1 20 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Any of these /16 subnets can be subnetted further. For example the 10.1.0.0/16 subnet is subnetted again using the /
24 mask.
VLSM
8/2/2019 6 cidr ja vlsm
21/31
ITE PC v4.0Chapter 1 21 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
The 10.2.0.0/16 subnet is also subnetted again with a /24 mask. The 10.3.0.0/16 subnet is subnetted again with the /28 mask. The 10.4.0.0/16 subnet is subnetted again with the /20 mask.
VLSM
8/2/2019 6 cidr ja vlsm
22/31
ITE PC v4.0Chapter 1 22 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM 1
8/2/2019 6 cidr ja vlsm
23/31
ITE PC v4.0Chapter 1 23 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM 1
255.255.255.240 or /28
8/2/2019 6 cidr ja vlsm
24/31
ITE PC v4.0Chapter 1 24 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM 2
8/2/2019 6 cidr ja vlsm
25/31
ITE PC v4.0Chapter 1 25 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
VLSM 2
8/2/2019 6 cidr ja vlsm
26/31
ITE PC v4.0Chapter 1 26 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
CIDR and Route Summarization
The 192.168.0.0/20, summarized or aggregated route includes allthe networks belonging to customers A, B, C, and D.
8/2/2019 6 cidr ja vlsm
27/31
ITE PC v4.0Chapter 1 27 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Route Summarization
Steps to calculate a routesummary
-List networks in binaryformat
-Count number of leftmost matching bits todetermine summaryroutes mask
-Copy the matching
bits and add zero bitsto determine thesummarizednetwork address
8/2/2019 6 cidr ja vlsm
28/31
ITE PC v4.0Chapter 1 28 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Route Summarization (Example 2)
-Routes are summarized with masks that are less than
that of the default classful mask
-172.16.0.0/13is the summarized route for the172.16.0.0/16 to 172.23.0.0 /16 classful networks
8/2/2019 6 cidr ja vlsm
29/31
2007 Cisco Systems, Inc. All rights reserved. Cisco PublicITE PC v4.0Chapter 1 29
Lab exercises
Subnetting scenario 1
8/2/2019 6 cidr ja vlsm
30/31
ITE PC v4.0Chapter 1 30 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
SubnettingScenario 1
You have been given the network address 192.168.9.0/24 to subnet and
The network has the following addressing requirements: The BRANCH1 LAN 1 will require 10 host IP addresses. The BRANCH1 LAN 2 will require 10 host IP addresses. The BRANCH2 LAN 1 will require 10 host IP addresses. The BRANCH2 LAN 2 will require 10 host IP addresses. The HQ LAN will require 20 host IP addresses. The link from HQ to BRANCH1 will require an IP address for each end of
the link.
The link from HQ to BRANCH2 will require an IP address for each end ofthe link.
8/2/2019 6 cidr ja vlsm
31/31
ITE PC v4.0Chapter 1 31 2007 Cisco Systems Inc All rights reserved Cisco Public
Top Related