11.07.2015 Views

Chapter 6 Variable Length Subnet Masking (VLSM) Classless Inter ...

Chapter 6 Variable Length Subnet Masking (VLSM) Classless Inter ...

Chapter 6 Variable Length Subnet Masking (VLSM) Classless Inter ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Chapter</strong> 6<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong>(<strong>VLSM</strong>)<strong>Classless</strong> <strong>Inter</strong>-Domain Routing(CIDR)CCNA2-1 <strong>Chapter</strong> 6Note for Instructors• These presentations are the result of a collaboration amongthe instructors at St. Clair College in Windsor, Ontario.• Thanks must go out to Rick Graziani of Cabrillo College. Hismaterial and additional information was used as a referencein their creation.• If anyone finds any errors or omissions, please let me knowat:• tdame@stclaircollege.ca.CCNA2-2 <strong>Chapter</strong> 6


<strong>VLSM</strong> and CIDRClassful and <strong>Classless</strong> AddressingCCNA2-3 <strong>Chapter</strong> 6Classful and <strong>Classless</strong> Routing Protocols• One of the ways to characterize routing protocols is either asclassful or classless.• As networks evolved and began to use classless addressing,classless routing protocols had to be modified or developedto include the subnet mask in the routing update.CCNA2-4 <strong>Chapter</strong> 6


Classful IP Addressing• ARPANET – 1969• By 1989, it wastransformed intowhat we now callthe <strong>Inter</strong>net.• 1989 – 159,000• By 2000, it grewto over 72million hosts.• As of January 2008,there were over 541 million hosts on the <strong>Inter</strong>net.• Without <strong>VLSM</strong> and CIDR, the IPv4 address space wouldhave been exhausted long ago.CCNA2-5 <strong>Chapter</strong> 6High-Order Bits• In the original specification of IPv4 (RFC 791), released in1981, the authors established the classes to provide threedifferent sizes of networks for large, medium, and smallorganizations.• As a result, Class A, B, and C addresses were defined with aspecific format for the high-order bits.CCNA2-6 <strong>Chapter</strong> 6


IPv4 Classful Addressing Structure• <strong>Subnet</strong> masks were determined based on class.• The only choices were networks with very large number ofhosts, large number of hosts, or few number of hosts.CCNA2-7 <strong>Chapter</strong> 6Classful Routing Protocol• Using classful IP addresses:• <strong>Subnet</strong> mask of a network address could be determinedby the value of the first octet.• The router receiving the routing update could determine thesubnet mask simply by examining the value of the first octet.• RIPv1:• Only needed to propagate the network address of knownroutes and did not need to include the subnet mask in therouting update.• The subnet mask was directly related to the network address.CCNA2-8 <strong>Chapter</strong> 6


Classful Routing ProtocolR2 applies s0/0/0’s/24 subnet mask(same major network)R2 sends a summarizedroute out s0/0/1(different major network)R1 sends a subnetaddress out s0/0/0(same major network).R3 applies the default/16 subnet mask(different major network)CCNA2-9 <strong>Chapter</strong> 6<strong>Classless</strong> IP Addressing• Moving Toward <strong>Classless</strong> Addressing:• By 1992, members of the IETF had serious concernsabout the exponential growth of the <strong>Inter</strong>net.• Limited scalability of <strong>Inter</strong>net routing tables.• Eventual exhaustion of 32-bit IPv4 address space.• In 1993, the IETF introduced <strong>Classless</strong> <strong>Inter</strong>-DomainRouting (CIDR).• More efficient use of IPv4 address space.• Prefix aggregation, , which reduced the size of routingtables.CCNA2-10 <strong>Chapter</strong> 6


<strong>Classless</strong> IP Addressing• To CIDR-compliant routers, address class is meaningless.• The network portion of the address is determined by thenetwork subnet mask, , also known as the network prefix,or prefix length (/8, /19, etc.).• The network address is no longer determined by the class ofthe address.CCNA2-11 <strong>Chapter</strong> 6CIDR and Route Summarization• The capability for routes to be summarized as a single routehelped reduce the size of <strong>Inter</strong>net routing tables.• A Supernet summarizes multiple network addresses with amask that is less than (or a summary of) the classful mask.CCNA2-12 <strong>Chapter</strong> 6


CIDR and Route SummarizationNetworks to be summarizedMUST be contiguous.Summary192.168.0.0/23 11000000.10101000.00000000.000000000000.00000000192.168.2.0/23 11000000.10101000.00000010.000000000010.00000000192.168.4.0/22 11000000.10101000.00000100.000000000100.00000000192.168.8.0/21 11000000.10101000.00001000.000000001000.00000000192.168.0.0/20 11000000.10101000.00000000.000000000000.00000000• Networks are converted to binary.• The summary route is comprised of the least number of bitsthat are common to all subnets.CCNA2-13 <strong>Chapter</strong> 6CIDR and Route SummarizationSummary192.168.0.0/23 11000000.10101000.00000000.000000000000.00000000192.168.2.0/23 11000000.10101000.00000010.000000000010.00000000192.168.4.0/22 11000000.10101000.00000100.000000000100.00000000192.168.8.0/21 11000000.10101000.00001000.000000001000.00000000192.168.0.0/20 11000000.10101000.00000000.000000000000.00000000• Requires a classless routing protocol (RIPv2, EIGRP, OSPF).• The subnet mask of the network MUST be included with therouting update.CCNA2-14 <strong>Chapter</strong> 6


<strong>Classless</strong> Routing ProtocolClassful UpdateR2 sends a summarizedroute out s0/0/1(different major network)R3 applies the default/16 subnet mask(different major network)CCNA2-15 <strong>Chapter</strong> 6<strong>Classless</strong> Routing ProtocolCIDR<strong>Classless</strong> UpdateNetworks 172.16.0.0/16,172.17.0.0/16, 172.18.0.0/16,and 172.19.0.0/16 can besummarized into theSupernet 172.16.0.0/14.The /14 (255.252.0.0)subnet mask is includedin the routing update.CCNA2-16 <strong>Chapter</strong> 6


<strong>VLSM</strong> and CIDR<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong>(<strong>VLSM</strong>)CCNA2-17 <strong>Chapter</strong> 6Review - Creating a <strong>Subnet</strong>• To subnet a network, the IP address host portion of thesubnet mask is divided into two parts.• Bits are borrowed from the host portion and assigned tothe network portion to create a new network address.• The new network address covers a smaller portion of theoriginal network number.• It is a sub-network of the original or a subnet.CCNA2-18 <strong>Chapter</strong> 6


Review - Creating a <strong>Subnet</strong>• The borrowed bitsbecome part of thenetwork portion of theIP Address and formthe network number.• The remaining host bitsbecome the host portionand are used to identifyindividual network hostsand create broadcasts forthe new subnet.CCNA2-19 <strong>Chapter</strong> 6Review - Creating a <strong>Subnet</strong>• The subnet mask changes to reflect the new network/host bitassignment.• The same subnet mask applies to ALL networks derivedfrom the subnetting process.• Original <strong>Subnet</strong> Mask: 255.255.0.011111111.11111111.00000000.00000000• Borrow 8 bits:11111111.11111111.1111111111111111.00000000• New <strong>Subnet</strong> Mask: 255.255.255.0CCNA2-20 <strong>Chapter</strong> 6


Review - Creating a <strong>Subnet</strong> – The Rules• Host bits must be borrowed in descending order, , starting withthe left-most bit position and working to the right.• A minimum of two bits must remain for host addresses.• A remaining host mask of all 0's or all 1's cannot be assignedas a host address.• To determine the number of subnets or hosts:• <strong>Subnet</strong>s:2 number_of_borrowed_hostborrowed_host_bits_bits• Usable Hosts Per <strong>Subnet</strong>:2 number_of_remaining_hostremaining_host_bits_bits - 2CCNA2-21 <strong>Chapter</strong> 6Review - Creating a <strong>Subnet</strong> – The Rules• To determine the number of hosts:• Hosts:2 number_of_remianing_hostremianing_host_bits_bits• Usable Hosts Per <strong>Subnet</strong>:2 number_of_remaining_hostremaining_host_bits_bits - 2• To determine the number of subnets:• <strong>Subnet</strong>s:2 number_of_borrowed_hostborrowed_host_bits_bits• NOTE: It is now possible to use the zero subnet.Previous to allowing its use, subnetting resulted in theloss of the first and last subnets (host bits all 0’s 0 s and all1’s). That is no longer the case.CCNA2-22 <strong>Chapter</strong> 6


Review - Magic Numbers• To make the job of subnetting easier,there is a method that allows you tocalculate a "magic" number.• The magic number we're looking foris the number of addresses in eachnetwork, including the network,broadcast and host range.• The calculation 2 number_ of_ host_ bits yields the "magic"number.• We have 5 host bits remaining so…..• 2 5 = 32 - our "magic" number.CCNA2-23 <strong>Chapter</strong> 6Review - <strong>Subnet</strong>ting - Class C• Network: 192.168.80.0 <strong>Subnet</strong> Mask: 255.255.255.224• Network: 27 bits Host: 5 bits Magic Number: 2 5 = 32ID01234567NetworkAddress192.168.80.0192.168.80.32192.168.80.64192.168.80.96192.168.80.128192.168.80.160192.168.80.192192.168.80.224<strong>Subnet</strong> AddressRange192.168.80.1 – 192.168.80.30192.168.80.33 – 192.168.80.62192.168.80.65 – 192.168.80.94192.168.80.97 – 192.168.80.126192.168.80.129 – 192.168.80.158192.168.80.161 – 192.168.80.190192.168.80.193 – 192.168.80.222192.168.80.225 – 192.168.80.254BroadcastAddress192.168.80.31192.168.80.63192.168.80.95192.168.80.127192.168.80.159192.168.80.191192.168.80.223192.168.80.255CCNA2-24 <strong>Chapter</strong> 6


Dividing Networks Into the Right Size192.168.80.0/27192.168.80.160/27192.168.80.192/27192.168.80.32/27192.168.80.128/27192.168.80.64/27 192.168.80.96/27CCNA2-25 <strong>Chapter</strong> 6Dividing Networks Into the Right SizeAvailable: 30Required: 5Wasted: 25192.168.80.0/27Network 4 30 5 25Network 5 30 2 192.168.80.128/2728Available: 30TotalRequired: 4Wasted: 26Assigned Required WastedNetwork 1 30 5 25Network 2 30 5 25Network 3 30 4 26Network 6 30 2 28Network 7 30 5 25Total 210 28 182Available: 30Required: 2Wasted: 28192.168.80.96/27CCNA2-26 <strong>Chapter</strong> 6


<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)• A serious limitation of using only a single subnet mask acrossa given network-prefix(the number of network or 1 bits in themask) was that an organization is locked into a fixed-numberof fixed-sized subnets.• <strong>VLSM</strong> enables a network number to be configured withdifferent subnet masks on different interfaces.• <strong>Subnet</strong> an already subnetted network address.• Conserves IP addresses.• More efficient use of available address space.• Allows for more hierarchical levels within an addressing plan.CCNA2-27 <strong>Chapter</strong> 6<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)10.0.0.0/8 <strong>Subnet</strong> using /16<strong>Subnet</strong>1 st HostLast HostBroadcast10.0.0.0/16 10.0.0.1 10.0.255.254 10.0.255.25510.1.0.0/16 10.1.0.1 10.1.255.254 10.1.255.25510.2.0.0/16 10.2.0.1 <strong>Subnet</strong>10.2.255.254 1 Host10.2.255.255Last HostBroadcast10.3.0.0/16 10.2.0.0/24 10.3.0.1 10.3.255.254 10.2.0.1 10.3.255.25510.2.0.254 10.2.0.255Sub-subnetEtc.10.2.1.0/24 10.2.1.1 10.2.1.254 10.2.1.25510.255.0.0/16 Using /24 10.2.2.0/24 10.255.0.1 10.255.255.254 10.2.2.1 10.255.255.25510.2.2.254 10.2.2.255Etc.10.2.255.0/24 10.2.255.1 10.2.255.254 10.2.255.255CCNA2-28 <strong>Chapter</strong> 6


<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)192.168.20.64/27192.168.20.128/27192.168.20.0/27192.168.20.128/27192.168.20.32/27 192.168.20.96/27 192.168.20.64/277 Networks with 30usable addresses foreach networkWasted 28 addresseson each WAN linkCCNA2-29 <strong>Chapter</strong> 6<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)192.168.20.32/27192.168.20.96/27192.168.20.0/27192.168.20.64/27CCNA2-30 <strong>Chapter</strong> 6


<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)Original<strong>Subnet</strong> MaskMagic Number= 32255.255.255.2241 1 1 0 0 0 0 0192.168.20.0 0 0 0 0 0 0 0 0192.168.20.32 0 0 1 0 0 0 0 0192.168.20.64 0 1 0 0 0 0 0 0192.168.20.96 0 1 1 0 0 0 0 0192.168.20.128 1 0 0 0 0 0 0 0192.168.20.160 1 0 1 0 0 0 0 0192.168.20.192 1 1 0 0 0 0 0 0192.168.20.224 1 1 1 0 0 0 0 0255.255.255.252 Sub-<strong>Subnet</strong><strong>Subnet</strong>MaskMagic Number1 1 1 1 1 1 0 0= 41 1 0 0 0 0 0 0 192.168.20.1921 1 0 0 0 1 0 0 192.168.20.1961 1 0 0 1 0 0 0 192.168.20.2001 1 0 0 1 1 0 0 192.168.20.2041 1 0 1 0 0 0 0 192.168.20.2081 1 0 1 0 1 0 0 192.168.20.2121 1 0 1 1 0 0 0 192.168.20.2161 1 0 1 1 1 0 0 192.168.20.220CCNA2-31 <strong>Chapter</strong> 6<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)“If you know how to subnet, you can do <strong>VLSM</strong>.”What’s s the trick?Always satisfy the requirements of yourbiggest LAN and then work your waydown ….CCNA2-32 <strong>Chapter</strong> 6


<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)• Steps for <strong>VLSM</strong>:1. List the number of hosts required per network beginningwith the largest to the smallest.2. Convert the subnet mask to binary.3. Draw a line where the network portion ends.4. Ask yourself the question… How many bits do I need tosupport the required number of hosts?5. Move the line to show your new network portion.6. Determine your new magic number.7. Finish subnetting using the new magic number.• The starting address is always the first network.• You cannot go past the next network of the previous level.CCNA2-33 <strong>Chapter</strong> 6<strong>Variable</strong> <strong>Length</strong> <strong>Subnet</strong> <strong>Masking</strong> (<strong>VLSM</strong>)CCNA2-34 <strong>Chapter</strong> 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!