Professional Documents
Culture Documents
IP Addressing,
Subnetting & VLSM
Tariq Bader
CCIE # 35627
Security/VPN team
Cisco TAC
Presentation_ID © 2010 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Agenda
Introduction
IPv4 Classes
IP Subnetting
VLSM
IP Summarization
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
IP
Addressing
Introduction
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
IP Addressing
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Subnet Masks & CIDR Values
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
Determining Available Host Addresses
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
Broadcast Addresses
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
IP
Addressing
IPv4 Classes
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
IPv4 Classes
IPv4 Classes
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
IPv4 Classes – Class A
Class A:
o Used for large networks.
o Format: Network.Host.Host.Host
o Netmask is 255.0.0.0 == /8
o Provides about 16.000.000 IP addresses.
o IP range for the first octet is (1-127).
o Note: 127 is not used since it is used for testing purposes.
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
IPv4 Classes – Class B
Class B:
o Used for intermediate networks.
o Format: Network.Network.Host.Host
o Netmask is 255.255.0.0 == /16
o Provides about 64.000 IP addresses.
o IP range for the first octet is (128-191).
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
IPv4 Classes – Class C
Class C:
o Used for small networks.
o Format: Network.Network.Network.Host
o Netmask is 255.255.255.0 == /24
o Provides 256 IP addresses (Only 254 can be used for hosts because
two IP addresses are excluded as one is used as a network address
and the other as a broadcast address)
o IP range for the first octet is (192-223).
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
IPv4 Classes – Class D
Class D:
o Used for multicasting purposes.
o The multicast addresses are in the range 224.0.0.0 through
239.255.255.255.
o Multicasting: sending data to hosts that belong to a multicast
group.
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
IPv4 Classes – Class E
Class E:
o Used for research purposes & future use.
o Class E range is 240.0.0.0 through 255.255.255.255
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
Private Addressing
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
IP
Addressing
IP Subnetting
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
IP Subnetting
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
IP Subnetting
Example:
o 192.168.10.0/24: provides 254 IP addresses.
o In your network you have 20 hosts.
o Without subnetting you will waste 234 IP addresses (254 – 20).
Why wasting ??
o The last octet of 192.168.10.0/24 consists of 8 bits.
o We have 20 hosts so we need to use only the last 5 bits of that
octet since ((25) – 2) = 30 which covers the 20 hosts.
o The remaining 3 bits will be added to the network part so that we
have a /27 address.
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
IP Subnetting – Formula
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
IP Subnetting – Subnet Mask
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20
IP Subnetting – Subnet Mask
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21
IP Subnetting – Subnet Mask
CIDR Mask
/24 0
/25 128
/26 192
/27 224
/28 240
/29 248
/30 252
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22
IP Subnetting – Example
Question: What are the subnet and broadcast addresses for the
subnet which the IP 172.16.10.10 255.255.255.192 is a member
of?
Answer:
1) Find the block size
256 – 192 (last octet of the subnet mask) = 64.
Block size = 64.
2) Subnets are : 0, 64, 128, etc.
The last octet of the IP is 10 and 10 is in the 0 subnet.
3) Then the subnet address is 172.16.10.0/26
4) The broadcast address is always (the next subnet – 1)
Current subnet = 0, next subnet = 64
broadcast address = 172.16.10.63
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
IP Subnetting – Example
Question: What are the subnet and broadcast addresses for the
subnet which the IP 172.16.88.20 255.255.240.0 is a member
of?
Answer:
o 256 – 240 = 16, so the block size is 16.0.
o Valid subnets are 16.0, 32.0, 48.0, …, 80.0, 96.0, etc.
o 88.20 is within 80.0 subnet, so the subnet address is 172.16.80.0/20
o Next subnet is 172.16.96.0, (broadcast address = next subnet – 1) =
172.16.95.255
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
IP Subnetting – Exercise
10.0.0.0 /18
Subnets ?
Hosts ?
Block Size ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
IP Subnetting – Exercise
172.16.0.0 /27
Subnets ?
Hosts ?
Block Size ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
IP Subnetting – Exercise
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27
IP Subnetting – Exercise
Find out the mask which gives 100 subnets for class B
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28
IP Subnetting – Exercise
Find out the Mask which gives 100 hosts for Class B
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29
IP Subnetting – Exercise
192.168.10.54 /29
Mask ?
Subnet ?
Broadcast ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30
IP Subnetting – Exercise
192.168.10.130 /28
Mask ?
Subnet ?
Broadcast ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31
IP Subnetting – Exercise
192.168.10.193 /30
Mask ?
Subnet ?
Broadcast ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32
IP Subnetting – Exercise
192.168.1.100 /26
Mask ?
Subnet ?
Broadcast ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33
IP Subnetting – Exercise
192.168.20.158 /27
Mask ?
Subnet ?
Broadcast ?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34
IP
Addressing
VLSM
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35
VLSM
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 36
VLSM
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 37
VLSM
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 38
VLSM Example
VLSM allows us to use one class C (192.168.10.0/24) address to design a networking
scheme to meet the following requirements:
Bangalore 60 Hosts
Mumbai 28 Hosts
Sydney 12 Hosts
Singapore 12 Hosts
WAN 1 2 Hosts
WAN 2 2 Hosts
WAN 3 2 Hosts
With normal subnetting a /26 mask was used to provide the 60 addresses for Bangalore
and the other LANs. There are no addresses left for WAN links
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 39
VLSM Example
With VLSM
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 40
VLSM Exercise
192.168.1.0/24
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 41
Subnetting & VLSM Exercise
Find out the subnet and the broadcast addresses for each
subnet.
Network address: 200.10.10.0/24
You have 3 networks:
Network 1 with 50 hosts.
Network 2 with 20 hosts.
Network 3 with 10 hosts.
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 42
IP
Addressing
IP Summarization
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43
IP Summarization
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 45
IP Summarization
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 46
IP Summarization Exercise
What is the most efficient summarization that R1 can use to
advertise its networks to R2?
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 47
Q&A
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 48
Presentation_ID © 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential 49