Variable-Length Subnet Masking (VLSM)

Slides:



Advertisements
Similar presentations
Introduction to Classless Routing
Advertisements

TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_b Subnetting,Supernetting, CIDR IPv6 Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 VLSM and CIDR Routing Protocols and Concepts – Chapter 6.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
IPv4 Addresses. Internet Protocol: Which version? There are currently two versions of the Internet Protocol in use for the Internet IPv4 (IP Version 4)
Chapter 18. IP: Internet Protocol Addresses
An Engineering Approach to Computer Networking
IP Addressing IP Subnetting Static Subnet Variable Length Subnet Masks(VLSMs)
1 CCNA 3 v3.1 Module 1. 2 CCNA 3 Module 1 Introduction to Classless Routing.
Integrated Network Services Network Design Almerindo Graziano.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Understanding IP Addressing Chuck Semeria Presented by Benyuan Liu for Internet Routing Seminar Sep 19, 2000.
CSE5803 Advanced Internet Protocols and Applications (7) Introduction The IP addressing scheme discussed in Chapter 2 are classful and can be summarised.
TDC365 Spring 2001John Kristoff - DePaul University1 Interconnection Technologies Routing I.
Subnetting the subnet RD-CSY /09.  Company with 200 hosts  Assigned class C network /24  Want 6 different LANs  Subnet class C network.
Chapter 21 IP Addressing “If we all did the things we are capable of doing, we would literally astound ourselves” - Thomas Alva Edison,
Introduction to TCPIP IPV4. Contents  What are Network Layers?  Understanding IPV4 Addresses  What are Subnet Masks?  IP Conversion  Understanding.
Introduction to Networking
© 2000, Cisco Systems, Inc. 3-1 Network Address Conservation Subnetting, VLSM, NAT & RFC1918.
From Subnetting to VLSM
IP Addressing. Dotted Decimal Notation IP addresses are written in a so-called dotted decimal notation Each byte is identified by a decimal number in.
Types of Addresses in IPv4 Network Range
1 26-Aug-15 Addressing the network using IPv4 Lecture # 2 Engr. Orland G. Basas Prepared by: Engr. Orland G. Basas IT Lecturer.
4: Addressing Working At A Small-to-Medium Business or ISP.
ECE 4110 – Internetwork Programming Subnetting, Supernetting, and Classless Addressing.
1 Internet Addresses (You should read Chapter 4 in Forouzan) IP Address is 32 Bits Long Conceptually the address is the pair ( NETID, HOSTID ) Addresses.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 VLSM and CIDR Routing Protocols and Concepts – Chapter 6 Modified by.
Chapter 8 Advanced TCP/IP Network Design. Classful IP Addressing There are three basic classes of addresses known as class A, B, or C networks.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—3-1 Determining IP Routes Implementing Variable-Length Subnet Masks.
© 2007 Cisco Systems, Inc. All rights reserved.ICND2 v1.0—3-1 Medium-Sized Routed Network Construction Implementing VLSM.
IP Addressing Introductory material. An entire module devoted to IP addresses.
IPv4 Addresses. Internet Protocol: Which version? There are currently two versions of the Internet Protocol in use for the Internet IPv4 (IP Version 4)
IP ADDRESSES. C ONTENTS Objectives Introduction IP Versions IPv4 Addressing Classful Addressing Class A Class B Class C Other Classes Dotted Decimal Notation.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
111 What Is VLSM and Why Is It Used?. 222 Classful and Classless Routing Classful (basic subnetting) Classful routing protocols require that a single.
Chapter 6 VLSM and CIDR.
CCNA2-1 Chapter 6 Variable Length Subnet Masking (VLSM) Classless Inter-Domain Routing (CIDR)
Chapter 6 VLSM and CIDR CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College Last Updated: 3/30/2008.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 VLSM and CIDR Routing Protocols and Concepts – Chapter 6 05/07/2009.
VLSM and RIPv2 Warren Toomey GCIT. Introduction Switches deliver frames to stations. Routers deliver packets to networks. Only the final router has to.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 6: Static Routing Routing and Switching Essentials.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 VLSM and CIDR Routing Protocols and Concepts – Chapter 6.
© 2002, Cisco Systems, Inc. All rights reserved..
IP Internet Protocol Fundamental packet format that computers use to exchange information. Is a set of technical rules that defines how computers communicate.
CS470 Computer Networking Protocols
1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Classless Routing.
CCNA Discovery Semester 3 Addressing in an Enterprise Network Chapter 4 K. Martin.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Subnetting IP Networks.
1 Variable Length Subnet Masks ( VLSM ) “ Classful Route” Means if a route to a network starting with is received, it is a class A => mask length.
Lecture#7: Subnetting IP Networks
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 9: Subnetting IP Networks Introduction to Networks.
TCP/IP Addressing and Subnetting. IP Addressing Roadmap Format of IP Addresses Traditional Class Networks Network Masks Subnetting Supernetting Special.
IP Addressing, Sub-netting & VLSM
IP – Subnetting and CIDR
IP Addressing Introductory material.
CS4470 Computer Networking Protocols
IP Addressing Introductory material.
Chapter 8: Subnetting IP Networks
IP Addressing Introductory material.
IPv4 Addresses.
Routing Protocols and Concepts – Chapter 6 Modified by Tony Chen
IP Addressing Introductory material
Ct1304 Lecture#4 IPV4 Addressing Asma AlOsaimi.
Routing Protocols and Concepts – Chapter 6
Routing Protocols and Concepts – Chapter 6
Routing Protocols and Concepts – Chapter 6
An Engineering Approach to Computer Networking
Presentation transcript:

Variable-Length Subnet Masking (VLSM) By R. Benjamin Kessler, CCIE #8762

Session Overview A Brief History of IPv4 Addressing How to subnet a network Why VLSM? What problem are we trying to solve? Typical uses of VLSM How to do VLSM Math Questions © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 2

Obligatory OSI Model Reference IP Addressing functions “live” at layer 3 of the OSI model © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 3

IPv4 Addressing History Original Specifications (RFCs 790 & 791 – Sept., 1981) Fixed Length of four octets (32 bits) Up to 4,294,967,296 unique hosts Each address begins with the “network” portion followed by the “host” portion Three “Classes” (A, B, & C) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 4

IP Address Classes Network “Class” determined by the high order address bits © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 5

IP Address Classes (cont’d) Class “A” Networks – 128 networks (7 bits) Up to 16,777,214 hosts per network Class “B” Networks – 16,384 networks (14 bits) Up to 65,534 hosts per network Class “C” Networks – 2,097,152 networks (21 bits) Up to 254 hosts per network © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 6

Problems with IPv4 Addresses How to Scale… Class “C” networks were too small Class “B” networks were too big © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 7

Subnetting Internet Standard Subnetting Procedure – RFC 950 (Aug., 1985) Defined a method to split a network into smaller (equal-size) pieces Increased flexibility for local admins Reduced Internet routing table size Increased stability of global routing table © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 8

Subnetting Single advertisement to the Internet; Multiple segments/subnets internally © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 9

Subnet Masking Separates IP address into network and host portions in a “classless” manner Used to determine if the destination host is “local” or “remote.” – ARP or Route? A bitwise AND is performed to determine how datagrams are to be sent: IF bitwise_and(dest_ip_addr, my_ip_mask) = bitwise_and(my_ip_addr, my_ip_mask) THEN send dg locally (ARP) ELSE send dg to gateway (Route) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 10

Subnet Masking IP Address: Subnet Mask: 179.11.35.22 10110011.00001011.00100011.00010110 Subnet Mask: 255.255.240.0 11111111.11111111.11110000.00000000 Subnet Address (all zeros in host bits): 179.11.32.0 10110011.00001011.00100000.00000000 Broadcast Address (all ones in host bits): 179.11.47.255 10110011.00001011.00101111.11111111 Host address written as 179.11.35.22/255.255.240.0 Subnet Mask = 20 bits; also known as “Prefix Length” “CIDR Notation” for the address would be: 179.11.35.22/20 © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 11

Subnet Example Host A needs to communicate with Servers 1 & 2. Must make “ARP or Route” decision © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 12

Subnet Example Subnet Mask: Host A: Server 1: Gateway – intf 1: 255.255.240.0 11111111.11111111.11110000.00000000 Host A: 179.11.35.22 10110011.00001011.00100011.00010110 Server 1: 179.11.46.89 10110011.00001011.00101110.01011001 Gateway – intf 1: 179.11.47.254 10110011.00001011.00101111.11111110 Server 2: 179.11.50.1 10110011.00001011.00110010.00000001 Gateway – intf 2: 179.11.63.254 10110011.00001011.00111111.11111110 © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 13

Problems with Subnetting Once designated, the size and number of subnets remains static. Making changes requires an organization to completely re-address all network subnets A lot of IP addresses are wasted on networks with only a few hosts © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 14

Example Network Each Subnet can support up-to 1022 hosts Network A: wastes 722 addresses (70%) Network B: wastes 972 addresses (95%) Network C: wastes 1020 addresses (99%) Network D: wastes 1002 addresses (98%) Network E: wastes 522 addresses (51%) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 15

Variable Length Subnet Masking (VLSM) Concept introduced in RFC 1009 (Requirements for Internet Gateways – June, 1987) “Flexible use of the available address space will be increasingly important in coping with the anticipated growth of the Internet. Thus, we allow a particular subnetted network to use more than one subnet mask.” © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 16

Variable Length Subnet Masking (VLSM) VLSM goes “Hand-in-hand” with Classless Inter-Domain Routing (CIDR) Legacy routing protocols are considered “classful” and don’t support VLSM – e.g. RIPv1, IGRP, EGP, etc. More recent protocols support VLSM by including the subnet mask (or prefix length) of a network in the route advertisement and are said to be “classless” – e.g. OSPF, EIGRP, IS-IS, BGPv4, etc. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 17

Classful vs Classless Classful: Classless: Size defined by the class (A, B, C, etc.) Fixed Network portion RIP & IGRP are classful routing protocols Classless: Network portion can be any size Protocol sends subnet (prefix) information with routes – e.g. 192.168.64.0/18 RIPv2, EIGRP, OSPF, BGPv4 and IS-IS © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 18

Why VLSM? Benefits – Allows an organization to more efficiently assign IP address space Provides for route summarization/aggregation on non-classfull boundaries Reduces the size of a routing table Increases stability (reduces route flapping) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 19

Efficient Address Assignment In our previous example, we had our network (179.11.0.0/16) subnetted to with a 22-bit mask – a vast majority of the addresses were wasted using this mask on all subnets. By using VLSM, we can more efficiently assign addresses; this frees the wasted addresses for re-use in other parts of the network. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 20

Example Network w/VLSM Network A: Using 300 of 512 hosts (59% efficiency) Network B: Using 50 of 62 hosts (80% efficiency) Network C: Using 2 of 2 hosts (100% efficiency) Network D: Using 20 of 30 hosts (67% efficiency) Network E: Using 500 of 512 hosts (98% efficiency) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 21

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 sub2-subnets. VLSM permits the recursive division of a network prefix. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 22

BIG Corp Network © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 23

Widget Mfg Division © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 24

Muncie Plant © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 25

VLSM Operation The recursive process does not require the same prefix-length at each level of recursion. The recursive subdivision can be carried out as far as required…until you run out of bits © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 26

VLSM Design Considerations At each level of the hierarchy: How many total subnets does this level require today? How many hosts are there on this level’s largest subnet today? How much growth do we anticipate in the near future for each of the above? OK, at least double it! © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 27

VLSM Design and RFC 1918 Address allocation used to be much “harder” because of the need to justify your addressing requirements to some regional addressing authority (e.g. ARIN). For nearly all enterprises, the advent of RFC 1918 and NAT/PAT has made this much “easier” © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 28

VLSM Design and RFC 1918 Companies can use “private” addresses internally: 10.0.0.0 – 10.255.255.255.255 (10/8) 172.16.0.0 – 172.31.255.255 (172.16/12) 192.168.0.0 – 192.168.255.255 (192.168/16) Address allocations can be much more “liberal” than before. Private Addressing and NAT have extended the life of IPv4 addresses for the last 24 years and will continue to do so for several years down the road. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 29

Requirements for VLSM The routing protocols must carry prefix-length (subnet mask) information for each route advertisement. All routers must consistently forward IP datagrams based on the longest match rule For route aggregation to occur, the addresses must be assigned in contiguous blocks so that there is topological significance. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 30

Requirements for VLSM Routing Protocols – OSPF, IS-IS, RIPv2, EIGRP, BGPv4 allow the deployment of VLSM by including the prefix length value along with each route advertisement. RIPv1 and IGRP only send the network information (no subnet mask) in each route advertisement and thus are not capable of supporting VLSM. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 31

Requirements for VLSM Longest Match Rule When forwarding a packet, a router will always prefer the route with the longest matching prefix over other, less-specific routes. router# show ip route .... S 192.168.32.0/26 [90/25789217] via 10.1.1.1 S 192.168.32.0/24 [120/4] via 10.1.1.2 S 192.168.32.0/19 [110/229840] via 10.1.1.3 A route with a longer prefix describes a subnet that has fewer possible destination hosts and thus is “more specific.” Routers must forward datagrams using the route with the “longest match” A packet destined toward 192.168.32.1 will be directed toward 10.1.1.1 because it is the most-specific matching route. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 32

Requirements for VLSM Contiguous Assignments Hierarchical routing requires that addresses be assigned to reflect the actual network topology. Routing information is reduced by taking a block of addresses assigned to a particular region of the network (or topology) and aggregating them into a single routing update for the entire set. This can be done recursively at various points within the hierarchy. If addresses do not have topological significance, aggregation cannot be performed and the size of the routing tables would not be reduced. © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 33

Typical Subnet Masks Used LAN Segments – various masks (/30 or larger) Router Loopback Interfaces (/32) for management and routing protocol purposes Point-to-Point (P2P) Wide-Area-Network (WAN) Interfaces (/30 or /31) Multi-point WAN interfaces (/30 or larger) © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 34

VLSM Math Essentially the same as “regular” subnetting, except that subnets can be re-subnetted as needed. How many hosts per subnet? 2n – 2 hosts per subnet Where ‘n’ is the number of “host” bits in the subnet How many “sub” subnets? 2x subnets Where ‘x’ is the number of subnet bits “borrowed” from the parent network © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 35

Questions? © Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 36