Ultimate Guide to Subnetting

March 25, 2018 | Author: mragsilverman | Category: Ip Address, Computer Network, Internet Standards, Computer Networking, Wide Area Network


Comments



Description

The UltimateGuide to Subnetting! Master the Art of Subnetting a Network Complete coverage of Subnetting, Supernetting, CIDR and VLSM V 3.0 The Ultimate Guide to Subnetting! is part of the e-Guide training series published by 5142 Hollister Ave. #3 Santa Barbara, CA 93111 E-Mail: [email protected] Website: HotTrainingMaterials.com Other e-Guides in this series: NAT Primer Unique CCNA Study Guide Copyright © 2001-06 by New Frontier Training All rights reserved No portion of this document may be extracted, resold, copied, distributed or otherwise disseminated without prior written permission from the author Table of Contents Introduction ........................................................................................................................................4 Chapter 1 – A Review Of IP Addressing ..........................................................................................6 Overview......................................................................................................................................7 IP Addressing Basics ...................................................................................................................7 Working With Binary Numbers ..................................................................................................8 Classful Addressing ....................................................................................................................9 Public Vs. Private IP Addressing ................................................................................................12 Classless Addressing ...................................................................................................................13 The Manifestations of Classless Addressing: Subnetting, Supernetting, CIDR, VLSM .............16 Chapter 2 – Why Classless Addressing Works .................................................................................19 Overview......................................................................................................................................20 It’s All About Determining Where To Forward Packets ............................................................20 Determining The Network Number of A Destination IP Address ..............................................21 Chapter Summary ........................................................................................................................26 Chapter 3 – Subnetting Explained .....................................................................................................27 Overview......................................................................................................................................28 How To Subnet ............................................................................................................................28 Subnetting a Class C Network Address .......................................................................................28 The Proof Is In The “Anding” .....................................................................................................33 Subnetting Summed Up ...............................................................................................................33 Chapter Summary ........................................................................................................................35 Chapter 4 – Supernetting Explained ..................................................................................................36 Overview......................................................................................................................................37 Why Supernetting Is ‘Dead’ ........................................................................................................37 How To Supernet ........................................................................................................................37 Chapter Summary .......................................................................................................................40 Chapter 5 – CIDR And VLSMs Explained .......................................................................................41 Overview......................................................................................................................................42 CIDR............................................................................................................................................42 Problems Solved By CIDR .........................................................................................................43 VLSMs ........................................................................................................................................46 VLSMs Applied Before Allocating A CIDR Address ................................................................46 VLSMs Applied After Allocating A CIDR Address ..................................................................48 Summing up CIDR and VLSMs .................................................................................................51 Riding The Hierarchical Highway ..............................................................................................51 Ipv6 To The Rescue? ..................................................................................................................52 Chapter Summary ........................................................................................................................53 Appendixes ........................................................................................................................................54 Appendix A – Subnetting Exercises ..................................................................................................55 Appendix B – Quick And Dirty Subnetting .......................................................................................76 Appendix C – Real Life Classlful Subnetting Examples ...................................................................79 Appendix D – Real Life Classless Subnetting Examples...................................................................84 Appendix E – Subnetting Tables........................................................................................................88 Appendix F – A Note About Cisco Routers .......................................................................................90 Introduction . . because students time after time tell me they really truly get classless addressing when this approach is used! That is gratifying. and lots of examples. This book was written so that you too. once-and-for-all. supernetting. When teaching TCP/IP classes I have watched students fly through core TCP/IP concepts. and understand the existing IP numbering scheme on any network you come into contact with. this book will help with clear explanations. Copyright © 2001-06 by New Frontier Training 5 . on with the show . organized. or simply need to understand the IP address space assigned by your ISP. only to stumble when classless addressing was introduced. After reflecting on this dilemma for a while. Whether you are in a position where you need to understand classless addressing to pass a certification test. So. hierarchical numbering scheme. As a group. You will be able to address your own network with a logical. design an addressing scheme at your place of work. . can understand all aspects of classless addressing. I worked with a few advanced students to fashion a way to make the topic of classless addressing easily understandable. all these technologies can generally be referred to as classless addressing. Variable Length Subnets Masks (VLSMs) and Classless Inter-Domain Routing (CIDR). We apparently were successful.Introduction It is generally agreed that one the most difficult aspect of TCP/IP to master is subnetting and its closely related cousins. Chapter 1 – A Review of IP Addressing . subnetting. but important introduction to classless addressing and its various manifestations. The networking layer handles network (logical) addressing and routing of packets. whereas a node may or may not be configured with an IP address (it might be accessed only by its MAC address or it may also have a differing type of network address such as an IPX address). IP addresses relate to the networking layer of the OSI model (layer 3). a host is specifically related to a device with an IP address. Copyright © 2001-06 by New Frontier Training 7 . the following topics will be covered: • • • • IP addressing basics Classful IP addressing Public and private addresses Introduction to classless IP addressing IP Addressing Basics An IP address is the number assigned to a host that uniquely identifies the host on both the local network and all IP networks. In the latter case. printers. Subsequent chapters will examine classless addressing in depth. The two terms are very similar in that they both point to addressable devices connected to a network. IPv4. For ease of readability it is often expressed in decimal format. which mostly deal with physical (MAC) addresses. The only exception to this rule is when one network is isolated from other networks either because it is a stand-alone network. it is usually represented in dotted decimal format. We often think of a device with an IP address as a workstation or a server but a number of devices –firewalls. may have an IP address assigned to an interface for management purposes. meaning a period is inserted every 8 bits (1 byte). The term node therefore is a more generic than the term host. No two hosts on any public IP network can have the same address. Here. DEFINING A HOST A host is any device with a network interface assigned an IP address. To make it even easier to discern an IP address. In the first part of the chapter traditional “classful” addressing is explained. A term sometimes used interchangeably with host is node. or proxy server. variable subnetting. Even layer 2 switches. gateway. followed by a brief. However. an IP address is a 32 bit binary number. or because the network is hidden from other connected networks via a NAT box. supernetting. In the current widely deployed version of IP.Chapter 1 – A Review of IP Addressing Overview In this chapter the basics of IP addressing are explored. and especially routers– have interfaces with an IP address assigned to each interface. and Classless Inter-Domain Routing. a globally unique IP address is substituted for the host addresses sourcing packets bound for another network (see the subsequent section on public and private addressing). NAT devices. IP addresses must be globally unique. This results in a 4-part number expressed in decimal form as shown in the table below. or 2 raised to the 8th power. 110.296 Yep. click the Dec button. . type in the number. 01. 100. 0011. for a total of 256 possibilities (28 = 256). Any calculator that can convert between decimal and binary numbers. . 00000010. For example. will handle it for you. The result should be 8 Copyright © 2001-06 by New Frontier Training .294. . . To convert a binary number to decimal. . but also the network the host is a part of. It is not necessary to perform any math by hand when working with IP addresses expressed in binary format. type in the number.200.1 to binary. we get the following: 256*256*256*256 = 4. 0000001. This term is derived from the fact that each octet is 8 bits in size. That is why many of the examples in this section will have the address expressed in both decimal and binary forms. such as subnetting. All that is necessary is to switch the calculator to scientific mode. 111111 0000000. to convert the address 200. . click the Bin button. 101. then click on View / Scientific. 000010. are more easily understood if the address is expressed in binary form.200. 00000010.200. 0 or 1. . However. 111 0000. 00010.200. . Therefore each additional bit doubles the number of possibilities: 1 2 3 4 5 6 7 8 bit bits bits bits bits bits bits bits = = = = = = = = 2 possibilities 4 possibilities 8 possibilities 16 possibilities 32 possibilities 64 possibilities 128 possibilities 256 possibilities 0. that’s over 4 billion possibilities. . . An IP address represents not only a particular host. 2*2*2*2*2*2*2*2 = 256. . whereas the network portion of the address must be globally unique among all possible connected networks. 11111 000000.967. 1 00. the next thing to understand about an IP address is that it represents not one. 11 000. 010. The host portion of the address must be unique within a given network. Paradoxically.860. but two elements.1 A 32 bit IP address expressed in 3 different formats Each of the four portions of the decimal number is known as an octet. A way to express the same thing in less space is 28. 00000001. 10. .Chapter 1 – A Review of IP Addressing Binary Decimal Dotted Decimal 11001000 11001000 11001000 00000001 336. and then click the Dec button. 11111111 That is why an octet (8 bits) represents 256 possible numbers (0-255). 00001. To convert a decimal number to binary. . 000011. many nuances of IP addressing. enter each octet one at a time with the calculator set for Dec and convert to binary. 011.601 200. Simply start the calculator program (Start / Programs / Accessories / Calculator). 001. 0010. . This means that each octet can vary in value from 0-255. 1111111 00000000. 0001. 1111 00000. and then click the Bin button. . like the Windows calculator. Which brings us to the next logical question: How many unique addresses can an IP address represent? Calculating the answer in decimal. Working with Binary Numbers Not all of us are necessarily comfortable with binary numbers. 000001. Binary numbers are actually quite easy to understand because each bit represents only 2 possibilities. 00011. Chapter 1 – A Review of IP Addressing 11001000. Click the x^y button once 3.Network.Network. How does this all work out? Have a look at the following table. You will see shortly why the system is no longer used for allocating addresses. 00000001. Type “8” and press Enter The result should be 256.host. and now mostly obsolete system for denoting the network/host represented by an IP address was the classful system.host.host.host 10.0 C Network.host Classful addressing chart 190. and convert to Dec. Classful Addressing The original.50. 11001000. Just be sure to enter the binary numbers 8 bits (1 byte) at a time with the calculator set for Bin.0. a class A network reserves the first octet for network numbering. while leaving the remaining three octets for host numbering.0 B Network. A class B address reserves the first two octets for network numbering and the remaining two octets for host numbering. whereby entire octets are tasked with representing either the network portion or the host portion of the address. ADDRESS CLASS DIVISION BETWEEN NETWORK AND HOST PORTION OF ADDRESS EXAMPLES A Network. Keep in mind that most calculators won’t display the leading zeros though.0. Type “2” 2. do the following: 1. 11001000.0. You can also easily calculate powers of 2.host 128.10. The classful system mandates three different types (classes) of IP addresses.Network. Be sure calculator is in Dec mode. This is illustrated in the below table. A class C address reserves the first three octets for network numbers and only one octet for host numbering.0 Network Numbering In a classful addressing system. Converting from binary to decimal is the same process in reverse. Copyright © 2001-06 by New Frontier Training 9 . For example to prove that 28 indeed equates to 256.10. Since the first two octets of a class B address form the range of network IDs.0 214 or 16. as shown in the table below. That’s not very many networks.0.255. Since the first three octets of a class C address form the range of network IDs. 21 bits are available.0.255.0 to 223.0 221 or 2.384 C 11000000 to 11011111 192 to 223 192.0.0.0.0.1 is for loopback testing 128.0. but with three remaining octets tasked to host numbers. NETWORK ID COMMENT 0.0. each network had a huge number of potential host addresses.0 Last potential class A network address Used for testing.0.152 D 11100000 to 11101111 224 to 239 Multicast addresses E 11110000 to 11111111 240 to 255 Experimental Number of networks for each class In the classful system. Not used for host addressing Reserved / invalid network addresses Copyright © 2001-06 by New Frontier Training .0.0 to 191. 14 bits are therefore available. Class B networks have the first two bits of the first octet frozen at 10. 214 equates to 16. Host 127.0.097.0 Last potential class B network address 192.0 First potential class C network address 223.0.384 potential class B networks. In point of fact.255. that leaves 7 bits that can be manipulated to create network IDs.0.0.0.0 to 127.152 potential class C networks.0. 221 equates to 2.255.Chapter 1 – A Review of IP Addressing CLASS FIRST OCTET IN BINARY DECIMAL EQUIVALENT RANGE OF ADDRESSEES # OF POTENTIAL NETWORKS A 00000000 to 01111111 0 to 127 0. usable network address. certain bits in the first octet are “frozen” –they form a set pattern and are never altered.0. Since the network portion of a class A network ID is confined to the first octet.0. 27 equates to 128 potential class A networks.0 and above 10 Multicast and experimental.0 Last potential class C network address 224.0 First potential class A network address 127.0 First potential class B network address 191.0.0.0.255. A class A address is defined by the first bit being frozen at 0.0 27 or 128 B 10000000 to 10111111 128 to 191 128.255.0. not every potential network address translates into a valid. Certain addresses are considered reserved for other uses. Class C networks have the first three bits of the first octet frozen at 110.097. The following table shows the actual number of usable networks. Class A networks leave a whopping three full octets for the range of host IDs for each network. 1. The following table illustrates the number of hosts per network for each network class.777.254.11111110 224 -2 or 16. Enumerating an IP Address The following table illustrates the range of host addresses and the broadcast address for each of the three network classes.11111111.x.11111110 Hosts per network 28 -2 or 254 As with network addresses.x.255.0 Number of useable network IDs 221 -2 or 2.1.x. CLASS HOST ADDRESS RANGE IN DECIMAL BINARY EQUIVALENT # OF HOSTS PER NETWORK A x. for host addresses.254 x.x.x.0).534 C x. A host address of all binary zeros represents the network number itself (i.0 to 223.255.1 to x.0.x.254 x.e.254.0 214 . not all potential host addresses are valid.382 C 192 to 223 192.x. That’s well over 16 million hosts per network! Class B and C networks leave two octets and one octet.097. respectively. and a host address of all binary ones represents the broadcast address for the network.1.x.0. Copyright © 2001-06 by New Frontier Training 11 .1 to x.00000001 to x.0.00000000.0 to 191.00000000.0. all network bits set to either “0” or “1” (not including frozen bits) create invalid network addresses and explain why most of the above addresses are reserved.150 Host Numbering The number of hosts per network varies according to the network class.x.0.0.255.0 to 126.0 27 .00000001 to x.0. CLASS FIRST OCTET IN DECIMAL RANGE OF ADDRESSEES # OF USABLE NETWORKS A 1 to 126 1.11111111.2 or 126 B 128 to 191 128.x.x.x.2 or 16. The rule is that a host address of all binary zeros or binary ones cannot be assigned.00000000.254 x.11111110 216 -2 or 65.0.00000001 to x.255. The above table accounts for that rule with the formula 2n – 2.0.0.Chapter 1 – A Review of IP Addressing As a general rule.0. where n = number of host bits.0.11111111.214 B x.1 to x. So many addresses had been wasted that a crisis was inevitable as the Internet took off in the early 90’s.254 Enumerating the host IDs for an example network 192. Private IP Addressing As previously discussed.0. routable. internal.1 128.0. This newer classless system has become the ubiquitous way of assigning addresses. nonreusable. The classful system does not allow organizations to easily share unused host addresses with other organizations.255 Comments on the Classful Addressing Scheme Obviously the choice of which class IP address to choose is paramount when designing a network under this system. This action was taken in the mid 1990’s to conserve the rapidly depleting number of globally unique IP addresses.255.0. Synonymous terms for public addresses are registered.0. legal.255 B 128.0.255. and unregistered. Such addresses are considered public. which have become rare and expensive. IP addresses used on the Internet must be unique.254 128.0.0.0. and is discussed in detail in this book.0. These IP addresses can never be used on the Internet. If a privately addressed network ever needs to connect to another network across the Internet. particularly in private networks. This is simply a range of the IP address space reserved for public use. 12 Copyright © 2001-06 by New Frontier Training . Synonymous terms for private addresses are non-routable.1 1. global.0.0. illegal. Isolated networks can make use of an area of the IP address range reserved as private.0. The classful system is still used in certain circumstances however. WHAT’S AN RFC? An RFC. An RFC starts life as a public document in draft form that is circulated in the Internet community.254 1. and globally unique addresses.Chapter 1 – A Review of IP Addressing CLASS EXAMPLE NETWORK BEGINNING HOST ADDRESS ENDING HOST ADDRESS BROADCAST ADDRESS A 1. Private Addressing RFC 1918 allocates a range of the IP address space for use by private networks. Public vs.0 192.255. Private IP addresses are free of charge and they can be reused over and over on any number of private networks. over 16 million addresses are wasted.255.255.0 128. is the method used to define standards for the Internet. any number of companies can use the same private addresses. As a matter of fact the industry got itself in a jam a few years ago over this exact issue. reserved.255.0.0 1. Public Addressing A central assigning authority allocates all addresses that will be used on the Internet.0.0.0.255 C 192. This has given rise to a new system for allocating IP addresses on the Internet.1 192. local. external. If a class A network is assigned to an organization with only 500 hosts. Since network packets with private addresses will never be routed from one domain to another.0. or Request For Comment. the host initiating the communication must have its private address translated to a public address (usually through NAT). reusable. See the table below.0. Not so with the venerable public range of addresses. 0.168. This allows for a highly flexible addressing scheme that does not unnecessarily waste IP addresses. as you will see.0.0 PRIVATE IP ADDRESS RANGE Class A 10. NAT boxes.0.0.0 (256 networks.0 and 172. the RFC retains the same number and is still called a Request For Comment. Once accepted as a standard. 16 million+ host addresses) Class B 172.0.0.0.0 (1 network.0 – 192.0 – 9.0 (16 networks.15. That is why the industry has shifted to using something known as a subnet mask or prefix number to identify the network portion of an IP address.0.255.16. Distinguishing the Network ID The first step in understanding classless addressing is to understand how the IP stack running on a host determines the network portion of an IP address. The First Octet Rule The first octet rule was the original mechanism a host employed to determine the address class of an IP address.0.0 Class B 128.0.0.0. like doctors “practicing” medicine. This is a critical step in determining which network a destination address belongs to. 254 hosts per network ) Public / private address ranges (Network portion of address is in BOLD) Classless Addressing With classless addressing the traditional dividing line between the network and host portion of the address is blurred. not in this modern world of classless addressing.0.255.255.0.168.0 and 11.0. However. 65K+ hosts per network ) Class C 192. The implementation of privately addressed networks is what caused the proliferation of proxy servers.32. just one of those little oddities.255.255.0 – 191. and gateways.Chapter 1 – A Review of IP Addressing Each RFC has an assigned number. These devices substitute a public address for a private address when access to the Internet is required.31.0 – 223. While classful addressing draws the dividing line only at octet borders. It was noted earlier that the value of the first few high order bits (starting left to Copyright © 2001-06 by New Frontier Training 13 .0 – 192. Both methods are explained below.0 – 126.167.0. PUBLIC IP ADDRESS RANGE Class A 1.0.0 – 172.0 Class C 192.0 and 192. the First Octet Rule only works in a classful environment.0.0. A small pool of public addresses can serve the needs of dozens or even hundreds of privately addressed hosts.0 – 172. How does a host determine which network it is a part of? How does a source host determine the network number of a destination IP address? The traditional method for making that determination has been via a technique known as the First Octet Rule. classless addressing draws the network/host line at any bit boundary.169.0.0. as opposed to between octets. The address 10.1. But with classless addressing.0 Subnet mask used for each network class 14 Copyright © 2001-06 by New Frontier Training .0 .1 may need to be routed to a different network. is a 32 bit number expressed in dotted decimal format.1 on network 10.1 typically represented host address 4.1.1. thereby revealing just the network number.0.255.255.0. ADDRESS CLASS BIT PATTERN OF FIRST OCTET A 00000000 = 0 B 10000000 = 128 C 11000000 = 192 D (multi-casting) 11100000 = 224 E (Experimental) 11110000 = 240 High order bits determine the class Human beings usually recognize address class by memorizing the decimal number 128.4. on network 10. and the decimal numbers 192 and 223. The subnet mask. that assumption is no longer true.0 (you will see why later).0. Why is it called a “subnet” mask and not a “network” mask? Actually. sometimes it is.1 on network 10.1. with classless addressing re-drawing the network/host dividing line within an octet. or host .255. or simply the mask. the address 10. This is why no modern networking devices use the First Octet Rule for determining the network portion of an address. A subnet mask does just what it implies. it masks (blocks out) out the host portion of the address. The Subnet Mask The contemporary method for determining the network address is the subnet mask.4.Chapter 1 – A Review of IP Addressing right) define the address class. which demarcate the beginning of the class B address range (anything under 128 is therefore class A). It’s also referred to as the net mask. It is exactly those bits that the First Octet Rule uses to discern the address class of the source and destination addresses of a packet.0.4.0.1 could represent host 1.4. it takes the form shown below. 10.0.1.1.0 C 255.4. Unfortunately. is a built-in assumption that the value of the first octet will always dictate the network number. which demarcate the class C range. The First Octet Rule fails in a classless environment because IP will fail to understand that a packet with a destination address of say. like an IP address. ADDRESS CLASS DEFAULT SUBNET MASK A 255. the subnet address.0. The problem with either system however.0 B 255. For classful networks. a single number preceded by a “/” is used instead in the usual dotted decimal format. The first three octets of 255 each represent all binary bits turned on. to avoid getting into trouble with their mate. Prefix Notation Prefix notation is simply an alternate method of expressing a network’s mask. Prefixes are cool because they express the address mask in less space.Chapter 1 – A Review of IP Addressing Typical IP configuration on a Windows workstation IP uses a simple mathematical process called ANDing in conjunction with the subnet mask to actually derive the network number from an IP address. It is explained in detail in the chapter 2. ANDing is a Boolean logic process that says that at least two things must be true before an action is taken. EXPRESSED IN DECIMAL 255. As you may deduce from Table 1. 24 bits turned on. Notice the default mask in the table expressed in binary form. stop by the store for groceries on your way home”. “If you take the car to work and you have time.00000000 /24 EXPRESSED IN PREFIX NOTATION Three ways to express the same a network mask Copyright © 2001-06 by New Frontier Training 15 .11111111.0 EXPRESSED IN BINARY 11111111. Thus the prefix of “/24”. but that’s a different branch of logic). The ANDing process is performed on the IP address and the subnet mask to extract the network. prefix notation simply reflects the number of bits turned on in the mask. People actually use this type of logic in everyday life.255.11111111. In prefix notation.255. The recipient of the message will only bring home groceries if he/she has both time and a vehicle (or get groceries regardless.13. It’s called Boolean logic because a mathematician named George Boole popularized it in the 19th century. which is simply the process of drawing the network/host dividing line at bit boundaries as opposed to octet boundaries. just to name a few synonyms. VLSMs.0. However. subnetting can also be performed on private addresses.Chapter 1 – A Review of IP Addressing By the same token. with a fewer number of hosts per network. prefix address and prefix routing. like Windows XP for example. In this final section of the chapter we wish to briefly define the difference between the various classless addressing techniques in order to give you a point of reference as you learn all about classless routing throughout the balance of the book. the mask will usually be notated in prefix format. prefix masking. Subnetting is performed whenever there is a need to split an existing network number into multiple subnets. A custom mask (prefix) is how IP discerns the subnets that were created by the bit borrowing process. As the line moves to the right. additional network IDs are created. This borrowing of host bits is accomplished by altering the original subnet mask of the network ID. a class A mask would be represented as “/8” in prefix notation (255. rest easy.0) and a class B mask would be “/16” (255.255. supernetting or CIDR have daunted you in the past. All this stuff is basically the same thing! They are each just slightly different manifestations of the basic concept of classless IP addressing. Drawing the network/host line between any two bits breaks all the old rules –something that is always fun to do. That’s the trade off. VLSM If the concepts of subnetting.0). Supernetting. The Manifestations of Classless Addressing: Subnetting.0. since such addresses are rare and expensive. More and more networking equipment and operating systems allows you to enter the network mask as a prefix number in lieu of a subnet mask. CIDR. RFCs related to subnetting: 950 16 Copyright © 2001-06 by New Frontier Training . A very simple system. Subnetting is accomplished by relocating the net-work/host dividing line to the right from its originally assigned position –into the portion of the address representing the host IDs.0. Subnetting in brief Subnetting is the act of taking a single IP network ID and sub-dividing it to create two or more network IDs. Prefix notation is also commonly used by public WAN carriers. bit by bit. If you are assigned a network number by your ISP. Prefix notation is also known as slash notation. particularly when it is desired to maintain the hierarchical addressing scheme of a network. Subnetting has often been used to extend the life of a public IP address. as host IDs are sacrificed. The further the line is moved to the right. the more networks (subnets) are created. A standard subnetted class C address may yield say. what were class A. Instead of moving the network/host dividing line to the right –creating additional networks with fewer hosts per network. but VLSMs are referred to in the RFC for CIDR. only 2 host IDs? In that case one of the subnets could itself be subnetted further. no more. no less. This technique is applied to contiguous blocks of network IDs to create a single network number with the combined total of all host IDs that were originally spread out among several addresses. creating any combination of subnets and hosts per subnet that it wished (within the confines of the total addressable space of the ID)? Absolutely. You could make a whole bunch of 2-host subnets.Chapter 1 – A Review of IP Addressing VLSMs in Brief In standard subnetting. to combine them into a single network ID and thus avoid the need to route traffic between networks. A pleasant side effect of allocating addresses in this manner allows the minimization of the number of route table entries on Internet routers. because then a single entry in the ISP’s route tables was sufficient to route packets properly for the organization. This results in each subnet containing the same number of potential host addresses. Bear in mind however that supernetting at the assignment level has been replaced by the more efficient CIDR system. Blocks of CIDR assigned addresses can be summarized into a single route table entry. It was smarter to supernet the four addresses into a single ID before making the assignment. But what if one subnet requires 62 hosts and another requires say. the alteration made to the subnet mask to create additional subnets is applied to all hosts residing on all subnets. or reserve some of the address space for other sized subnets as the need arose. Instead. See the subsequent section on CIDR. Could the organization receiving the block of supernetted addresses then subnet the network ID back into multiple subnets? Sure. The reason for this apparent insanity is the same as it always is when submerged in the world of classless addressing – that is to provide the utmost in addressing utilization. In effect this is sub-subnetting. four public class C networks. regardless of its previous class distinction. But with Variable Length Subnet Masks (VLSMs). At the assignment level where public addresses are allocated. the subnet mask can be altered (varied) again for one or more of the subnets. RFCs related to VLSMS: No specific RFC. Take an organization requiring 1. Could it even variably subnet the ID. Every public network ID is treated the same. the line is moved to the left –creating fewer networks with a greater number of hosts per network. A CIDR address “block” is assigned with the network/host dividing line set to match the requirements of the organization receiving the address. Organizations receive very close to the exact number of addresses they need.000+ host IDs. two subnets with 62 hosts per subnet. Supernetting in Brief Supernetting is simply the reverse of standard subnetting. B or C addresses are now simply treated as 32 bit numbers whose network/host dividing line can be drawn at any point. There is no limit to the amount of times a network can be summarization up until the entire address space is exhausted. supernetting at one time was used to allocate addresses more efficiently. creating additional subnets with the specified number of hosts per subnet. The assigning authority no longer wastes entire classful addresses by handing out say. RFCs related to supernetting: 1338 CIDR in Brief Classless Inter-Domain Routing is the contemporary method address allocation occurs on the Internet today.000 addresses. a class B address with 65. regardless of the number of networks actually Copyright © 2001-06 by New Frontier Training 17 . Supernetting allows an organization that was assigned say. Chapter 1 – A Review of IP Addressing represented. RFCs relating to CIDR: 1517. 1518. 1519. The concept of route summarization goes hand-in-hand with classless addressing techniques. 1520 18 Copyright © 2001-06 by New Frontier Training . Chapter 2 – Why Classless Addressing Works . You don’t need to remember what you read here in order to subnet a network.1. well . routers. Host B receives the BROADCAST packet and responds to Host A with its MAC address. . host A sends the packet to host B. servers. host is just a short hand way of saying “workstations or servers”. the hosts are on two different networks. In the second scenario. Using the MAC address. 20 Destination Host (B) 190. The use of the term “host” in this book is mostly in the context of workstations and servers. Copyright © 2001-06 by New Frontier Training . Understanding the mechanism that allows the IP stack running on a host to forward packets correctly is the key to feeling comfortable with all aspects of classless addressing. printers.1. NAT devices and more. firewalls. It’s All About Determining Where To Forward Packets Whenever you are dealing with hosts communicating across networks. So in this case. It’s just that classless addressing is . It doesn’t look like it should work – yet it does.1. Take a look at the following two simplified scenarios. communications are taking place between two hosts on the same network. 4. . The generic term host is used to refer to any such device. weird. In the first scenario. Host A checks to see if host B is on the same network and determines that it is. and each interface must be assigned an IP address. . . 2. the first question that must be asked about an outbound packet is: What network are you bound for? TCP/IP handles packets very differently depending upon whether the destination host is on the same network or another one. 5.1 1. Scenario 1 Both hosts on the same network Source host (A) 190. Host A sends a BROADCAST packet asking for the MAC address of Host B. Every device on an IP network must have at least one interface connecting it to the network. 3.Chapter 2 – Why Classless Addressing Works Overview This short but important chapter helps you understanding just why classless addressing works. Such devices include workstations.2 Host A wants to send a packet to host B. WHAT IS A HOST? A host is any device with an interface that requires a TCP/IP address.1. It will also help you understand why certain legacy networking equipment and routing protocols don’t support classless addressing. Notice the difference in the two scenarios. 3. Communications can only take place between two hosts via their MAC addresses. Contemporary IP stacks therefore use a subnet mask. which fix the network/host dividing at any bit boundary. The First Octet Rule fails in a classlessly addressed environment however because the rule assumes that the network/host dividing line occurs at only three points in the 32 bit address. the router specified in the route table is queried for its MAC address. 2. MAC addresses are known as physical addresses because they are permanently associated with the NIC.1. and queries the address specified for a MAC address (if there is neither a route table entry or a configured default gateway. If however the destination host is not on the same network. depends on accurate determination of the destination packet’s network ID.1. In that case the packet must be forwarded to a router. WHAT IS A MAC ADDRESS? MAC (Media Access Control) addresses are the unique identifying numbers burned into every network interface card (NIC). A broadcast packet satisfies this need by sending an announcement to ALL hosts on the network asking for their MAC addresses.1 Destination Host (B) 200. WHAT IS A BROADCAST PACKET? Broadcast packets are a way of shouting to everyone on the network. host A sends the packet to the router.1. Only the host with an IP address matching the one in the broadcast packet responds with its MAC address. But how exactly does Copyright © 2001-06 by New Frontier Training 21 . A sending host needs the MAC address of the destination host in order to deliver its payload. the packet is dropped and an error message is generated). though. If so.Chapter 2 – Why Classless Addressing Works Scenario 2 Each host on a different network Source host (A) 190. Depending on the location of the target network. In was previously noted that in the legacy days of a classfully addressed world. The router responds to Host A with its MAC address. whereas IP addresses are known as logical addresses because they can be reassigned from one host to another. it is only necessary to learn its MAC address and then communications can commence. this may involve other routers as well. Host A wants to send a packet to host B.1. If not. the First Octet Rule was used by the IP stack to determine how destination packets should be forwarded. Determining the Network Number of a Destination IP Address. things are different. All of this. Host A checks to see if host B is on the same network and determines that it is not. If the destination host is on the same network. 4. Packets can’t be forwarded unless the network ID can be properly derived. The packet includes the destination host’s IP address. Host A examines its local route table to see if the target network is listed. the host checks for a configured default gateway. 5. Using the MAC address. The router then handles the job of getting the packet to its destination.1 1. 1 .1.0 _________________________________________________________________ Destination Address: 190.2 10111110 00000001 00000001 00000010 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .255 .Chapter 2 – Why Classless Addressing Works this mask work? That’s where the ANDing process comes in.1 /24 Address Binary equivalent Subnet mask Binary equivalent ANDing 190 .1 .255 .1 . Understanding ANDing translates to understanding classless addressing.1 . the packet is routed to another network. Example 1 .1 10111110 00000001 00000001 00000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 . The derived network IDs of the two addresses are then compared.1 . Source Address: 190.255 .2 Address Binary equivalent Subnet mask Binary equivalent ANDing 190 .0 11111111 11111111 11111111 00000000 ============================================== 10111110 00000001 00000001 00000000 Network address 190 .1 . This process occurs for both the source and destination addresses.1 . The ANDing process The IP stack uses the ANDing process to perform a simple bit by bit comparison of an address and its mask to derive the network ID of the address.1.1.1 . If they don’t match.0 11111111 11111111 11111111 00000000 ============================================== 10111110 00000001 00000001 00000000 Network address 190 22 .0 Copyright © 2001-06 by New Frontier Training .255 .Source/destination on Same Network Let’s convert the source and destination class C addresses from Scenario 1 into binary and examine the ANDing process IP goes through to determine if the two IP addresses are on the same network.1. the very first bit in the source address 190 octet is “1”. Example 2 – Source/destination on Different Networks To complete our treatment of the ANDing process let’s perform it on the addresses from scenario 2.1 10111110 00000001 00000001 00000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .1 /24 Source address Binary equivalent Subnet mask Binary equivalent ANDing 190 .0 _________________________________________________________________ Copyright © 2001-06 by New Frontier Training 23 . More specifically. This will be matched with the very first bit in the first 255 octet. IP compares each bit in each network octet with the corresponding bit in the subnet mask.1 .2 compared to . If not. The second bit for the source address is set to “0”. To illustrate. and IP goes about the business of determining the target’s MAC address so that the two hosts can communicate. Since the network numbers match. In this case the target host is on a different network. In other words both bits must be set to “1” in order to pass a “1”. It’s actually a very simple rule. An example of this is the second bit over. pass a 0”. Any other combination renders a “0”. the results are compared to see if the source network and the destination network are the same. The test fails and IP passes through a “0”. then pass a “1” through.1) had no impact on the result because host addresses are always filtered out since the host portion of the mask is set to “0”.1 . Note that the different host address (. which also happens to be “1”.1.Chapter 2 – Why Classless Addressing Works What ANDing basically does is pass through network bits where that mask is set to “1” and block network bits where the mask is set to “0”. For each bit compared. The corresponding bit in the subnet mask is set to “1”.0 11111111 11111111 11111111 00000000 ============================================== 10111110 00000001 00000001 00000000 Network address 190 .1. If either bit had been set “0” the test would have failed and IP would then pass a “0”. In this case they are.1 .1 .255 . the destination address is known to be on the same network as the source address. IP says: “If the source address bit is set to “1” AND the corresponding subnet bit is set “1”. Source Address: 190. for each of the two addresses. After both addresses have been AND’ed.255 . 255 . Exactly which network the address in fact belongs to will be left to the routing process.1 /17 Source address Binary equivalent Subnet mask Binary equivalent ANDing 42 . Source Address: 42.1 is on a different network than 190. the process can be trusted. Example 3 – Classless Addressing in Use Now let’s try a classless example. We expect ANDing will work exactly the same because it takes no measure of traditional classful boundaries.255 .1.0 _________________________________________________________________ 24 Copyright © 2001-06 by New Frontier Training . because ANDing tells enough to know whether the target address belongs to the current network or not.1.2 .1 Target address Binary equivalent Subnet mask Binary equivalent ANDing 200 11001000 .1 00101010 00000010 00000000 00000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .255 . IP applies the source’s subnet mask to the target IP address when ANDing.0.1 .1. Let’s see.1 .1.Chapter 2 – Why Classless Addressing Works Destination Address: 200.2. Note: TCP/IP in fact does not know the subnet mask value of the destination address.2 . It only knows the mask of the source address.0 IP performs a comparison of the ANDing results and determines that address 200. Even though IP does not know if the target address uses a differing mask.1.1 .1.0 11111111 11111111 10000000 00000000 ============================================== 00101010 00000010 00000000 00000000 Network address 42 . The packet is therefore forwarded to another network.1 .0 .1 00000001 00000001 00000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .0 11111111 11111111 11111111 00000000 ============================================== 11001000 00000001 00000001 00000000 Network address 200 .1.0 .0 . Chapter 2 – Why Classless Addressing Works Destination Address: 42.1 00101010 00000010 10000000 00000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .0.128. With an understanding of the contemporary process for determining the network portion of an address.0 11111111 11111111 10000000 00000000 ============================================== 00101010 00000010 10000000 00000000 Network address 42 .128 .0.2.0 Indeed. ANDing will always extract the correct network ID. If the 42. the source and destination addresses would have considered part of the same network. Regardless of where the network/host dividing line is set for an address. variable subnetting. you are now prepared to step into the world of subnetting.255 .0 had been assigned a traditional class A prefix of /8. supernetting. it is determined that the addresses belong to differing networks.3 . and CIDR in the following chapters. Copyright © 2001-06 by New Frontier Training 25 . ANDing gave no regard to classful boundaries.0 .1 Source address Binary equivalent Subnet mask Binary equivalent ANDing 42 .0 .3 . prefix). Copyright © 2001-06 by New Frontier Training . IP then knows whether to deliver the packet locally or route it.e. the first thing it must check is whether the target host is on the same network as the source. Although humans tend to use the value of the first octet to determine the network portion of an IP address. TCP/IP uses the subnet mask (i. The subnet mask marks the dividing line between the network and host portion of an IP address.Chapter 2 – Why Classless Addressing Works Chapter 2 Summary • • • 26 When a host starts a communication session with another host. The ANDing process uses the subnet mask of the source and destination addresses of a packet to extract the network number. Chapter 3 – Subnetting Explained . . The concept of subnetting is far more easily illustrated by looking at the subnet mask in its binary form.50.Chapter 3 – Subnetting Explained Overview This chapter explains subnetting A-Z. A custom subnet mask creates additional networks (subnets) within an organization by “borrowing” bits from the host portion of the address to create additional network ID’s. 1st octet IP address Default Subnet mask Binary equivalent of subnet mask 2nd octet 3rd octet 4th octet 192 . This includes planning for future networks Determine the total number of hosts that each subnet must support now and in the future Define a custom subnet mask that will support the required number of hosts for that subnet Derive the subnet IDs Derive the host IDs for each subnet • Derive the broadcast address for each subnet This process is accomplished in the three steps noted below.255 . the examples will show the mask in both decimal and binary formats. The organization now wishes to create two smaller networks connected by a router to reduce broadcast traffic.Create additional network numbers by using a custom subnet mask. This example assumes an organization has configured the private address 192. The following items must be taken into consideration when subnetting: • • • • • Determine the total number of subnets needed.168.255 . How to Subnet Subnetting is accomplished by altering the originally assigned subnet mask for the network ID.0 255. Classful examples are used for clarity. 28 Copyright © 2001-06 by New Frontier Training . Subnetting a Class C Network Address Step 1 . but the drill is the same for classless network IDs that will be subnetted. This is the default dividing point for a class C address. Therefore. Recall that the basic purpose of subnetting is to derive additional networks from a single network address. The result is that you end up with fewer host addresses.0 /24 on its network.50 .168 . subnetting techniques are the same for private or public addresses. Furthermore.0 11111111 11111111 11111111 00000000 NETWORK Default network/host dividing line for a class C address HOST Note the dividing line separating the network portion of the address from the host portion of the address. Now you know why it’s easier to understand this in binary. It’s hard to draw a dividing line on the decimal number 192! But in fact .192 11 NETWORK ID Subnet ID Altered subnet mask converted back to a decimal number 000000 HOST ID Note the above table. In the third row the borrowed bits have been turned on (set to “1”). We’ll figure out how many networks the subnet ID represents in a moment.255 11111111 . Keep in mind however that the more bits you borrow. Copyright © 2001-06 by New Frontier Training 29 . Altered Subnet mask 1st octet Decimal From 3rd row of previous table 255 11111111 2nd octet 3rd octet . regardless of their purpose. This is how IP knows the dividing line has been moved to the right. The new mask will be used by ALL hosts on ALL newly formed subnets. In the fourth octet.255. It’s weird. the bits have been borrowed from the 4th octet.255 11111111 4th octet . The following example borrows 2 bits. the fewer bits there are for host IDs. which is always comprised of 8 bits. but it works. moving them into a new field called the Subnet ID. because the new subnet IDs are formed strictly from the various combinations of the borrowed bits.192 now partially represents the network ID and partially represents the host IDs. but first let’s derive the new mask. Nothing has changed in the first three octets.Chapter 3 – Subnetting Explained Borrowing Bits Creating additional network IDs involves moving the dividing line to the right –into the host portion of the address. the binary number 11000000 converts to 192.192 is the new subnet mask for this network. This last step is critical. Default mask Borrowing Turn bits on 1st octet 11111111 11111111 2nd octet 11111111 11111111 3rd octet 11111111 11111111 4th octet 00 00000000 000000 11111111 11111111 11111111 11 000000 NETWORK ID Subnet ID Borrowing bits causes the network/host dividing line to be redrawn HOST ID The first row shows the original dividing line of the address. Let’s see how many networks we can create from two bits. Subnetting bits are always borrowed starting from the left end (high order) of the host portion of the address. In effect you are removing bits from the host portion of the address and supplying them to the network ID side. In the second row.255. replacing the default mask. Determining the custom subnet mask The custom subnet mask is determined by simply converting the modified fourth octet back to decimal. The more bits you borrow. the more network IDs you create. Note that the new subnet ID field is made up solely of borrowed bits. Thus 255. IP always identifies ON bits in the mask (“1”) as network bits and OFF bits (“0”) as host bits. Therefore. two binary bits can form a maximum of four combinations. Instead. The only place the 192. 192.Chapter 3 – Subnetting Explained Note: We strongly suggest that you perform the binary to decimal conversion yourself. Any combination of all binary 0’s or all binary 1’s is an illegal network number1. both bits can be turned ON (11). Step 2 . Just remember that you always borrow from the host portion of the address.0/24 – is rendered invalid when subnetting. in scientific mode (click on View / Scientific). However. Therefore in this example we are left with two valid network numbers to work with (now you know why we started by borrowing two bits). which allows a host to send a message to everyone on the network. The number 0 is an invalid network ID. It’s very easy. Binary numbering only allows for two possible values for each digit.50. Both bits can be turned OFF (00). and vice-versa (10).0/24 ever be seen again is possibly in the routing tables of a router.50. Append the result to the original network address. add 1. or one bit can be OFF and one ON (01).50.0/24? The first thing to remember when determining subnet IDs is that the original network number – in this case 192. and continuously add 1 to the result (just remember that the calculator won’t display leading zeros). 1 See appendix F for an exception to this rule for Cisco routers 30 Copyright © 2001-06 by New Frontier Training . as well as each subnet’s ID.50. 00 01 10 11 Enumerating the subnet IDs To enumerate or list the dubnet IDs. The total number of subnets created is based on the possible combinations of the borrowed bits. the mechanics of creating a custom subnet mask are relatively easy. there are four possible combinations.100. 00 01 10 11 As shown above. start with 00.Determine the subnet IDs Now that the new subnet mask has been determined it’s time to derive the subnet IDs. WHAT HAPPENS TO THE 192. simply combine each valid bit combination back with the remainder of the host ID the bits were borrowed from and convert the number back to decimal. Note: You can also do the math with the calculator by setting it to binary mode. That is the maximum number of subnets in this example. This is known as network summarization or route aggregation. if the subnets all happen to be downstream of the router.0/24 in fact refers to the entire group of subnets as a whole and could be entered on certain routers to point the way to all those subnets.100. all network IDs (we can start calling them subnet IDs) are based on the borrowed bits. and all binary 1’s represent a broadcast address. In our example with 2 borrowed bits. As you can see. you always lose two potential network IDs when you subnet (and all the host addresses associated with them!).100. Just use the Windows Calculator program. We are interested in how many subnets have been created. and is a powerful way to reduce the number of routing entries in a bloated route table.100. 0 or 1. there is a catch. It’s the first “gotcha”. The . You can quickly calculate the total number of hosts per subnet with the formula 2n – 2 (where n = the number of remaining bits) Note: This is the same formula used to determine the number of valid network numbers for a given subnet mask.1 – 190. However many host addresses are rendered invalid once subnetting occurs.0 network. like a network address. In this example 6 bits remain. The . If you were not familiar with subnetting you could easily mistake those subnet numbers for host addresses.100. For instance. so it’s important to understand which host addresses remain and which subnet they belong to. To the “naked eye” those addresses looks like a reference to host 64 and host 128 on the 192.254).100.64 network. Even if bits have been borrowed from an octet to create subnet IDs.50.128 marks the beginning of the 192. they are NOT host addresses anymore.100.0 192. the ID of this subnet. a host address of all binary 0’s or all binary 1’s is invalid.100. It takes longer to explain than to do it.50.Determine the Host IDs The last step of the process is to determine the host IDs belonging to each subnet.50.128 will never again be host addresses on this subnetted network. The fourth column reflects the newly created subnet IDs.128 /26 192.100.50. They are subnet addresses.50. The second column simply lists the remaining bits of the Host ID. The reason that two is subtracted from the total is because. However.128 network.100. The .64 and .50.100. all bits set to “0” equate to . In this case the formula plays out like this: 2*2*2*2*2*2 . Note: Remember the cardinal rule of subnetting when converting binary numbers to decimal: Always convert the entire octet. you ALWAYS treat the octet as a whole when converting to decimal! Step 3 .192 Determining the new subnet IDs The first column of this table reflects the possible combinations of the 2 bits borrowed from the host portion of the address.64 marks the beginning of the 192.64 /26 192. The range of host addresses available is derived from the remaining bits in the host portion of the address.Chapter 3 – Subnetting Explained 4th octet Borrowed bits Remainder of host ID Combine and Convert to Decimal 00 01 10 11 000000 000000 000000 000000 Invalid 01000000 = 64 10000000 = 128 Invalid Subnets Resulting network numbers 192.50. All host bits set to “1” represent the broadcast address for the subnet. Copyright © 2001-06 by New Frontier Training 31 .100. The third column of the table combines the borrowed bits back with the remaining host bits. All host bits set to “0” always represent the Subnet itself.50.100.64. Originally this class C network number was capable of supporting 254 hosts (190. and converts the resulting number to decimal.50.2 = 62. 100. 192.192 (invalid because the subnet ID is all binary “1”s). and the last host ID is just two shy of the next subnet.50. They are rendered useless because they are now owned by invalid network IDs 192. The “new” 192.100.Chapter 3 – Subnetting Explained It’s quite easy to calculate the host addresses for each subnet.129 192.50.100.68 Subnet ID Host ID 01 01 01 01 000001 000010 000011 000100 And so on .191 is the broadcast address for the subnet (all host bits turned on) Enumerating the host IDs for the .193-.190 62 192. .0 (invalid because the subnet ID is all binary “0”s).50. Now let’s calculate the host IDs for the .100.100. .50.50.190 192. .63 and .50.100.100.100. All host bit ON except the low order bit equates to the first host ID.127 SUBNET 2 Original Network Address Custom subnet mask Derived Network Address 2 Begin host address Ending Host address Total valid hosts Broadcast address 192.0 32 Copyright © 2001-06 by New Frontier Training .131 .100.100.50.100.67 192.0 255.100.50.100. SUBNET 1 Original Network Address Custom subnet mask Derived Network Address 1 Begin host address Ending Host address Total valid hosts Broadcast address 192.192 192.68 192.66 192.100. The first host ID is just one number higher than the network number.128 subnet: 192.192 192.190 Note: 192.100.66 .255.100.100.50.100.50.189 10 111110 .50.100.189 192.50.128 192.67 .50.65 .130 .128 /26 subnet Host ID 1st host ID 2nd host ID 3rd host ID 4th host ID Binary format Covert to decimal Complete host address 10 000001 10 000010 10 000011 10 000100 .127 is the broadcast address for the subnet (all host bits turned on) Enumerating the host IDs for the .168.100.128.64 subnet The first host ID is just the subnet number plus one.100.255.50.100. the .50.100.100. and 192.0 255.129 192.132 192.65 192.100.255. Begin by calculating the first valid host ID for the first network ID.1-.132 And so on .50.50.50.129 .191 The host IDs .64 /26 subnet Host ID 1st host ID 2nd host ID 3rd host ID 4th host ID Binary format Covert to decimal Complete host address .64 192.100.50.254 are gone.65 192.50.50.125 192.100.100.128 subnet The table below summarizes the newly subnetted network.100. .100.100.50.130 192.126 62 192.100. More specifically.50.255.131 192.126 Note: 192.126 192.100. 61st host ID 62nd host ID 01 111101 . all host bit OFF except the low order bit equates to the first host ID.125 01 111110 .100. 61st host ID 62nd host ID 10 111101 . 50 .50 . leaving just the network portion.100 . Derive the host IDs for each subnet.65 11000000 01100100 00110010 01000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 . After subnetting. • Derive the broadcast address for each subnet. Define a custom subnet mask that will support the required number of hosts for that subnet.100.50.50 .129 11000000 01100100 00110010 10000001 ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ ↕↕↕↕↕↕↕↕ 255 .255 . This includes planning for future networks. ANDing would have determined that the target host was on the same network.64 _________________________________________________________________ Target address Binary equivalent Subnet mask Binary equivalent ANDing 190 .128 Remember that the ANDing process masks out the host portion of the address.192 11111111 11111111 11111111 11000000 ============================================== 11000000 01100100 00110010 10000000 Network address 190 . the ANDing process shows the target address as being part of a different network and forwards the packet to a router.Chapter 3 – Subnetting Explained The Proof is in the “Anding” If you have any doubts about how the convoluted process of subnetting works (we’re worried if you don’t) you can prove to yourself that it works beyond the shadow of a doubt by performing the ANDing process.50 . Determine the total number of hosts that each subnet must support now and in the future.129. Which subnet will IP determine the destination host is a part of? Source address Binary equivalent Subnet mask Binary equivalent ANDing 190 . Before subnetting.255 .100.100 . Copyright © 2001-06 by New Frontier Training 33 . Example: Host 190.255 . Derive the subnet IDs. Subnetting Summed Up • • • • • Determine the total number of subnets needed.50.192 11111111 11111111 11111111 11000000 ============================================== 11000000 01100100 00110010 01000000 Network address 190 .100 .65 sends a packet to host 190.255 .100 . which is 6. (where n= the number of bits borrowed) For example if you borrowed 3 bits.Chapter 3 – Subnetting Explained DETERMINING HOW MANY HOST BITS TO BORROW In the current example we arbitrarily borrowed 2 bits and happened to end up with two networks. and when you feel ready you can move on to the subnetting exercise in the next chapter. In reality you will be trying to create a specific number of subnets. the formula would be (2*2*2) – 2. Unless you are a hotshot brainy type it might take a couple of passes for all this subnetting stuff to sink in. Don’t hesitate to go through this chapter more than once. Although you can learn a Quick and Dirty way to do this in the appendix. 34 Copyright © 2001-06 by New Frontier Training . That means borrowing three bits would yield six subnets. the formula normally used is: 2n – 2. When subnetting a network. All “1”s represents the broadcast ID for all hosts on that subnet. A subnet ID can never be all binary “1”s. turn all host bits OFF except the low order bit. Subnets are created by borrowing bits from the first host portion of an IP address. A host ID can never be all binary “0”s. the original network number becomes invalid. A host ID can never be all binary “1”s. Copyright © 2001-06 by New Frontier Training 35 . To calculate the first host ID for a subnet. combine with the subnet ID bits and convert to decimal. many host addresses become invalid. All “0”s represents the subnet ID. It is much easier to understand subnetting if the subnet mask is temporarily converted to binary. Calculate the last host ID by turning all host bits ON except the low order bit. one at a time combine each valid combination of the borrowed bits with the remainder of the octet they were borrowed from and convert to decimal. combine with the subnet ID bits and convert to decimal. When subnetting a network. A subnet ID can never be all binary “0”s. New subnet IDs are derived solely from the borrowed bits. All “1”s represents the broadcast address for all hosts on all subnets. All “0”s is an invalid network ID.Chapter 3 – Subnetting Explained Chapter 3 Summary • • • • • • • • • • A single network is subdivided into multiple networks by relocating the network/host dividing line. To calculate the subnet IDs. Chapter 4 – Supernetting Explained . .Chapter 4 – Supernetting Explained Overview Supernetting is the reverse of subnetting. So what’s the difference between supernetting and CIDR? The distinction will be made clear in this chapter and the next. That’s fine. For example. To illustrate.00110101. supernetting and CIDR both use the same core process that makes all classless addressing work –the placing of the network/host dividing line at bit boundaries as opposed to octet boundaries. you instead borrow bits from the network portion of the address to reduce the number of networks.0 11000110. Bear in mind however that many texts. How to Supernet Supernetting is far easier than subnetting. at the assignment level. using the terms almost interchangeably.00000000 Note that when the addresses are converted to binary. but the result is that by aggregating several networks into one. You can’t just renumber the network.11010100. For another. since public addresses are in use. but in brief.11010110. It’s only a one step process.53. And. an organization with modest host requirements could be assigned an allocation of addresses closer to its actual needs.215.53. rather than burning an entire class B address and waste thousands of IP addresses. you instead combine several network numbers into one larger network –hence negating the need for a router between subnets.53. and some folks in the industry still refer to classless addressing and CIDR notation as “supernetting”. For one thing. websites.00110101. What would be the effect of creating a custom subnet mask mask by donating those last two bits to the host ID portion of the address? Copyright © 2001-06 by New Frontier Training 37 .11010111. However.214. CIDR on the other hand takes a more “top-down” approach.53.00110101. look at the following table showing four contiguous network IDs and their binary equivalent: Network ID 198. With supernetting. it’s interesting and educational to see how traditional supernetting is applied. In this case supernetting would solve the problem nicely. instead of borrowing bits from the host portion of the address to create additional network IDs. say an organization has several legacy public class C network IDs. class based addresses. Why Supernetting is ‘Dead’ Supernetting. We include this chapter of the book for two reasons. How that is done will be demonstrated shortly. supernetting is sometimes still used at the organizational level. . Such addresses are valuable. because CIDR works with raw 32 bit addresses having no class distinction of any sort. In supernetting. rather than dividing one network number into multiple routed subnets. and the organization may not wish to relinquish them. This results in a more flexible was of assigning address space. the organization wants to aggregate two or more of the class C networks in order to eliminate a router.0 Network ID 198.00000000 11000110. the only difference is in the last two digits of the 3rd octet – in other words at the end of the network portion of the address.11010101. supernetting and CIDR both refer to the concept of aggregating a number of subnets into a single network ID. is dead as a doornail. Why? It’s been replaced by a superior solution –CIDR.0 Network ID 198. a traditional definition of supernetting refers to taking a number of class C addresses and manipulating the prefix such that a single network ID is created.00000000 11000110. CIDR therefore has no need to aggregate pre-existing.00000000 11000110. Supernetting was a sort of “bottom-up” approach.00110101.0 Network ID 198.212.213. 11111111| 255. 00000000 0 Following standard conventions for creating custom subnet masks.Chapter 4 – Supernetting Explained Original mask 11111111 255.53 .53.53 . Network addresses to supernet: Default subnet mask: # of networks required: # of hosts per network: # of bits lent to network octet: Custom subnet mask: 190. 190. 190.0 Network portion of address is shown in bold Supernet ID 11000000.00110101. 190.53 .00110101.215.11111110 198 .0 1st Host ID: 11000000. No subnetting of the network is required! The table below enumerates how altering the subnet mask in this manner pans out. 111111 | 00 252.0 255. The result of this is that the entire range of the four class C addresses can now be addressed as a single network address! The resulting range of host IDs from the original four addresses are grouped together in one big pool and can be allocated as needed.215 .110101 11.00000001 198 . You always donate whatever number of bits create unique addresses.213.53.1 Last Host ID: 11000000. the two bits in question are turned off to represent that they are now part of the host ID.255.255.212 .215 .00000000 198 . Supernetting four class C addresses 38 Copyright © 2001-06 by New Frontier Training .254 Broadcast Address 11000000.214. 11111111 255.110101 00.0.0 1 Maximum 2 255. The bits left on are considered part of the network ID. 11111111 255.00110101.0.00110101.110101 11. Why were two bits donated? That is how many digits were unique in the network portion of the address. 00000000 0 Custom mask 11111111 255.252.0.212.255 Note that the new network ID is simply the first class C address in the range.53.110101 00.53 .53.212 .255.11111110 198 . 212. 11010100 212.53.53. Let’s assume the sending computer has the IP address 198.0 network. 11010100 212. IP address binary equiv. 252. ANDing shows the story. 252. 213.53. 0 11111111 11111111 11111100 00000000 11000000 190. What happens when TCP/IP performs the ANDing process? Sending computer 190. 00000000 0 Receiving computer IP address 190. Copyright © 2001-06 by New Frontier Training 39 .213. 11000000 Subnet mask binary equiv. 00110101 53. 00110101 53. 0 11111111 11111111 11111100 00000000 11000000 190.212.Chapter 4 – Supernetting Explained As always. 00000000 0 53. 98 00110101 11010101 1100010 255.98. 255. Let’s say a computer on the 198. binary equiv. 212.53. 255. Both IP addresses appear to TCP/IP that they are on the same network.25 and the receiving computer has the IP address 198.0 network wants to send a message to the 198. 25 00110101 11010100 00011001 255. ANDing Subnet ID 53. ANDing Subnet ID Viola! The ANDing process always has the last word.213. 11000000 Subnet mask binary equiv. When supernetting. a classless routing protocol) ƒ Unlike in subnetting. all 0’s and all 1’s are valid network IDs (see appendix F for exceptions) Copyright © 2001-06 by New Frontier Training .e.Chapter 4 – Supernetting Explained Chapter 4 Summary ƒ ƒ ƒ ƒ 40 Supernetting is the opposite of subnetting. At the address assignment level. When supernetting you borrow bits from the network portion of the address. Caveats for subnetting: ƒ Supernetting must be performed on contiguous network numbers. ƒ Any routers used to forward traffic to connected networks must run a routing protocol that supports supernetted addresses (i. smaller networks are combined into larger ones. the first network’s third octet must be divisible by 4. The right most network octet of the beginning address must be equally divisible by the number of networks numbers you are combining. supernetting has been replaced by CIDR. For example if you wish to combine 4 class C networks. Chapter 5 – CIDR and VLSMs Explained . or more accurately. it is expected that such ISPs will break up the address space into various sized “chunks” according to the needs of its customers. which was enhanced to support classless addressing in version 4. thus you have varying masks applied to the same 32 bit address at the assignment level. CIDR allows organization A and organization B to be assigned classless IP addresses and successfully route packets between the two organizations (domains). CIDR CIDR is the contemporary standard for assigning network numbers on the Internet. since initial allocation of address space is usually to very large ISPs. CIDR allows for setting different prefixes for different portions of the same address. in order to squeeze out the largest number of useable addresses. Moreover. For example. To begin. so they are dealt with together in a single chapter. 42 Copyright © 2001-06 by New Frontier Training . By carefully setting both the prefix (subnet mask). The ISP will therefore apply varying prefixes to the allocated address as well. address aggregation. This is made possible by setting the prefix of a 32 bit IP address at a specific bit boundary. various portions of the entire 32 bit address space can be allocated to different customers. Ok. the mask is varied. A domain is defined as a network or networks under a single administrative control. private regional entities have taken on the responsibility of assigning addresses. between routing domains – thus the moniker Inter-Domain Routing. This chapter shows exactly how all this wonderfulness happens. handles the routing of such traffic. The Border Gateway Protocol (BGP). and the starting point of the address range being assigned. let’s walk through some details about how CIDR and VLSMs work. then go through an example of a sample IP address being initially allocated –then track how the address is continually broken up all the way down the ladder until it an address is allocated to an end user. CIDR supports the concept of classless networking between networks. The “Classless” in Classless Inter-Domain Routing means that the traditional class A B or C distinctions of the network/host boundaries of a network address are cast aside in favor of a system with far more granular control over address assignment. IANA (Internet Assigned Numbers Authority) to administer the addresses. Since different customers require differing amounts of address space. hierarchical addressing. and it’s where all the concepts of variable masks. In other words. B and C distinctions. CIDR is a standard defined in RFC’s 1517-1520 that allow an assigning authority to allocate an address space closely matching the number of addresses required by a customer. This is where the rubber meets the road in real world classless addressing.Chapter 5 – CIDR and VLSMs Explained Overview Classless Inter-Domain Routing (CIDR) and Variable Length Subnet Masks (VLSMs) are closely related manifestations of classless addressing. and route summarization come to life. ignoring any sense of class A. is that confusing enough? We will mostly use the generic term assigning authority when referring to the agency that assigns network addresses. In America the local agency allocating network addresses is ARIN (American Registry for Internet Numbers). As the Internet has grown larger and larger. Traditionally the NIC worked through it subsidy. The Internet agency responsible for assigning network addresses is called the NIC (Network Information Center) or InterNIC. In fact. The assigning authority chooses to allocate the 155. which the ISP will rework into various sized subnets based on its needs. and (2) the routing tables on the Internet’s backbone routers were growing frightfully large as entries for every allocated network were continually being added.0 address space. but the remaining 12 bits are completely controlled by the ISP.0. Since it takes 12 bits to allocate 4. The process. CIDR solves the first problem. It’s the same with route tables. Traditionally. No more class A.0/20.0. This inhibits performance. less specific. the powerful routers that form the core of the Internet needed to know the route to every possible network. think of an analogy to a housing sub-division that is accessed from only one main road. reduces the size and complexity of the routing tables. However. B or C network addresses. This is known as a CIDR “block”.0. CIDR deals with this issue by aggregating multiple network addresses into a single entry in the routing table.0.Chapter 5 – CIDR and VLSMs Explained Problems Solved by CIDR CIDR was created to solve two problems.000 addresses. To illustrate an example of a CIDR assigned address.000 addresses (212-2 = 4. the RFC specifying CIDR notation throws out the entire classful addressing architecture. so has the size of the routing tables. This means that the assigning authority “owns” the first 20 bits of the address. B or C public addresses! Note: In fact there are many organizations still in possession of classful (wasteful) address assignments.094). The challenge is to allocate as close as possible to 4. let’s assume a large ISP has a requirement for 4.0. Therefore. There are dozens of streets (routes) within the subdivision. As the Internet has grown. wasteful manner. to get to the subdivision one needs only to know the location of the access road. known as route aggregation or route summarization. Routers “upstream” of those subnets only require a single. (1) IP addresses were being handed out in an inefficient.0 with a /20 means the ISP will start off with a single network ID of 155. The initial allocation of the 155. wasted address allocation. CIDR addresses the problem of bloated route tables as well.000 addresses. supporting 4.094 hosts. AN ANALOGY FOR AGGREGATED ROUTES To understand the concept of aggregation. Only upon arriving at the entrance to the sub-division is a more specific map required. but only one way (route) to get to the sub-division itself. See the following table. CIDR allocates an address or group of addresses sized to fit the actual needs of the requesting organization. by employing the same classful rulebreaking method that has been used to subnet networks for years –namely the manipulation of the traditional network/host dividing line of an address. Copyright © 2001-06 by New Frontier Training 43 .0. Rather than continue to hand out inefficiently sized class A. Only routers connected to the actual subnets of the assigned address need list the more specific routes. many of these addresses have been reclaimed and then reallocated as efficient CIDR addresses. the prefix of the address is set to /20. summary route to properly forward any traffic bound for those subnets. 0.0.0.0 4. For CIDR notation to live up to its reputation for efficiency. They will. it is that converting an address to binary will always help understand what’s going on! The above example should clearly illustrate this point.000 addresses have been allocated.32.00010000. We will get back to what the ISP will ultimately do with this assignment.00000000. . 155 . and continuing until all the space of the 155. The following table illustrates one way allocation of the 155.254 10011011.0.31 . That is why it’s expressed in binary.0 /20 Large ISP through .0.0.0. are treated exactly the same as the 155. Recall from the chapter on subnetting that the first host ID of any address is always all host bits OFF except the low order bit.16.11111110 ARIN Allocation of the 155.0. It’s easy to figure the first possible host ID is for the assignment.094 . but in the meantime what about the remaining address space in the 155.0.0 might be completed.00000001 155. although formerly class A and Class C network IDs respectfully.0.0.00000000.0. There is no difference.1 10011011. and the last host ID is all host bits ON except the low order bit.0.16 . Now it’s not so hard to see.0 – network bits are in bold The above table enumerates the range of host addresses for this assignment as 155.0. 44 Copyright © 2001-06 by New Frontier Training . starting at 155. For example 12. . With CIDR notation. but it’s a little tricky to calculate the last address.0 has been exhausted.Chapter 5 – CIDR and VLSMs Explained ASSIGNMENT CUSTOMER ADDRESS RANGE 155 .254.0.0 under CIDR.0.00011111. leaving millions of unused addresses.0.0. those addresses must be allocated.15.0.0 or 196.0? Only 4. because the default network / host dividing line is no longer used.0.0. any allocated address would have worked out the same way. is it? Note: If there is one single thing we want you remember after reading this book.0 TOTAL ADDRESSES .1 through 155. 094 10011011. .11110000.1 – start 4.0.0.255. 2 See appendix F Copyright © 2001-06 by New Frontier Training 45 .0.00100000.094 10011011.00011111.00000001 155.254 – end 10011011.0.0.240.00100000.0.00000000.32.00000000. All zeros in subnet field 155.11111111. Subnet bits are incremented one at a time until all bits are on.11111110 155.0.00010000. and the entire address space has been allocated.00000000.00000000.00000000 Customer 2 155.16.00000000.11100000. . .1 – start 4.00000000 155.00000000.0 /20 Customer 4094 10011011.239.Chapter 5 – CIDR and VLSMs Explained ASSIGNMENT CUSTOMER HOST ADDRESS RANGE TOTAL ADDRESSES 10011011.255.224.00000001 155.00000000.0.094 10011011. As always.32.0 /20 10011011.255.11111110 155.0.254 – end Etc.00101111.0 /20 155.11111111.11100000.0 /20 10011011.00000000 Large ISP 155.16.00000000 Broadcast address for the 155.11101111.0 /20 10011011. rendering the addresses in binary makes visualizing the allocation a snap.00000000.00000000.224.0 /20 One possible way to allocate the 155.63.0.0.0.254 – end 10011011.00010000. 10011011.255.00000000.11111110 155.00000000 2 Invalid.0 /20 Ho hum.00000001 155.31.1 – start 4. differing masks can be applied to differing portion of the assigned address space. The assigning authority however is not limited to allocating the address space proportionally. Rather than apply the same mask to all subnets.0. To maximize efficiency.0. VLSMs are an extension to standard subnetting.0.000 host networks out of one of the 4K networks. And the mask can be varied again when the organization wishes to reallocate already assigned address space. VLSMs can also be applied by an organization when first allocating an assigned CIDR address. the above example shows one way to allocate the 155. there is no end to how many times the mask of a given scope of address space can be varied –that is until the space is exhausted. 46 Copyright © 2001-06 by New Frontier Training . As long as the networking equipment supports variable masks (mainly the routing protocol in use). allowing granular control over the assignment of public addresses.Chapter 5 – CIDR and VLSMs Explained VLSMs Like we said.0. Variable Length Subnet Masks are used frequently when allocating the space.0.0 /20 by varying the original mask to create two 2. VLSMs can be applied to CIDR addresses before they are ever allocated. VLSMs Applied Before Allocating a CIDR Address Let’s reallocate the 155. 11111110 155.32.0.00010000.254 10011011.00000000.094 10011011.00000000 Large ISP 10011011.00000000.0 /20 155.094 10011011.00000001 155.01111111.00000001 4.00000000.00111000.254 10011011.00000000 Customer 3 155.255.00000000. a single subnet ID has been created allowing only two subnets.0.1 10011011.0 /21 10011011.224.11111110 155.00000001 155.47.254 – end Applying a VLSM to a portion of the 155.00000000.00000000.0 /20 By varying the mask to include one more bit.1 – start TOTAL ADDRESSES 4.00000000.1 – start 10011011. Notice that this procedure mimics the one used in standard subnetting in that a new subnet field is created.00000000 Customer 4 155. Also notice that both created subnets are valid.0 /20 Customer x 10011011.00100000.64.00000000.00000000 155.0 /20 10011011.11111110 155.0.01000000.239.00000000.00000001 155.11111111.31.254 – end Customer 2 New subnets 10011011. 10011011.32.00000000.11111110 155.0.0.00111111. The rule of not allowing all “0s” or all “1s” in the subnet field must only be obeyed once.11101111.0 /21 2.224.00000000.63.11111111.0.11100000.254 – end Etc.00101111.094 155. .046 10011011.0. .046 155.00110000.01000000.48.00100000.1 2.48.00000000.255.0.0.00000000.1 – start 4.127.00011111.0.11100000.Chapter 5 – CIDR and VLSMs Explained ASSIGNMENT CUSTOMER HOST ADDRESS RANGE 10011011. .255. Copyright © 2001-06 by New Frontier Training 47 .0.16.0.00000001 10011011.00000000 155.0.64.16.11111110 155.0.00010000. 0. Network ID Subnet IDs Host ID range 155.0.0..0. The table below illustrates one way this allocation could be accomplished. 155.0.30.17.0 /23 155.0 /24 155.0.5 – 155.4 /30 155. and create any number of subnets it pleases –within the confines of the allocated space.0.0.12 /30 155. the ISP has efficiently administered its CIDR block.25.17 – 155.28.254 155.0.1 – 155.254 155.0 /30 Total # of subnets 6 2 128 Hosts per subnet 510 510 510 510 510 510 254 254 2 2 2 2 2 .30.0.0.26.0.1 – 155.254 155.254 155.252 /30 155.254 155.0..30.253 – 155.0.30.0 /30 155.0. Furthermore the ISP needs a whole bunch of 2-host subnets for pointto-point connections to provide Internet access for other customers.0.0.0 /23 155.254 155.29. The assigning authority owns the first 20 bits of the 155.1 – 155.0.0.0. 2 Varying the applied mask to create the right balance of networks and hosts By varying the mask applied to different portions of the address space. Moreover.2 155.0.30.21.18.16 /30 . and two customers each requiring an address space of 200 hosts. However.10 155.0.22.0. Let’s say the ISP has several customers requiring an address space of 500 hosts.8 /30 155.30.1 – 155. Recall that the large ISP has been assigned what at this point is a single network ID with over 4.254 155.0.0..24.9 – 155.0.0.26.0.0 /23 155.0 /24 155.1 – 155.24. Rather. the ISP is going to vary the mask applied to various blocks of the address to hand out just the right number of addresses to each of its customers.254 155.20. 155.30. Let’s walk through the table and clarify how everything works out.0.0.18. Those bits are frozen as far as the ISP is concerned.30.29.0.0 /23 155.0 /23 155.0 /24 155.0..16.16.18 .0.30.0.000 addresses.30.23.6 155.0.0.27. This is the essence of VLSMs.30.1 – 155.14 155..1 – 155..254 155. the ISP is free to have its way with the remaining bits. it is going to apply a new prefix to its CIDR block that breaks up the address.28.30.0. 48 Copyright © 2001-06 by New Frontier Training .30.30.0.0.1 – 155.31.0.30. The ISP almost certainly does not have one customer with a need for 4K addresses.22.0.0 /23 155.28.0.13 – 155.0 /20.1 – 155.20.Chapter 5 – CIDR and VLSMs Explained New mask (/21) 1st octet 11111111 2nd octet 11111111 3rd octet 11111 1 000 4th octet 00000000 NETWORK ID | Subnet ID | HOST IDs Altering the mask from /20 to /21 creates one subnet bit VLSMs Applied After Allocating a CIDR Address Let’s continue the example to see how VLSMs are used once the CIDR block has been assigned.30.0.16.31.0.0.0.28.0 /23 155.19.16.31.29. 18.26 00011100 = .18.0 /23 155. New mask (/23) 1st octet 11111111 2nd octet 11111111 3rd octet 1111 111 0 4th octet 00000000 NETWORK ID | Subnet ID | HOST IDs Altering the mask from /20 to /23 creates three subnet bits Three subnet bits allows for 8 subnets (23 = 8).18.1 155.16 00010010 = .0.28.00000010 00010010.0. 3rd octet Frozen bits Borrowed bits for subnet IDs Remainder of host bits Combine bits and convert octet back to decimal 0001 0001 0001 0001 0001 0001 0001 0001 000 001 010 011 100 101 110 111 0 0 0 0 0 0 0 0 00010000 = .0 /23 Enumerating the subnet IDs for the 155.0 /23 155. and applies a mask of Copyright © 2001-06 by New Frontier Training 49 .1 .0.16.24.64 subnet Row 2 To satisfy the requirements of the two customers needing an address space of 200 hosts.00000011 00010010. The table below enumerates each /23 subnet.0.0. it’s easiest to calculate in binary as illustrated below.4 .18 00010100 = .0. Note that the value 2 was not subtracted from the number of subnets.0. which is the required amount for the customers needing 500 host networks.22 00011000 = .16.18.0.26.18.22.0.18.18. the /20 prefix was changed to /23.0 /23 155.00000001 00010010.2 155. the ISP simply takes the next unassigned range of addresses starting at 150.0.19.3 . 155.0 /23 155.18. thus retaining 3 bits for subnet IDs. . Last host 00010011. To enumerate each created /23 subnet.0.0.0.0 /23 155.24 00011010 = .0.20.0 /23 For completeness.0 /23 network Host ID 1st host ID 2nd host ID 3rd host ID 4th host ID Binary format 00010010. .00000100 And so on .28 00011110 = .Chapter 5 – CIDR and VLSMs Explained Row 1 In row 1.4 155.18.0 /23 155.0 /23 155.0.0.20 00010110 = .11111110 ID Covert to decimal Complete host address . The no all 0’s or all 1’s rule has already been obeyed. the host IDs of one subnet will be enumerated.0.30 Subnets Resulting network IDs 155.2 .19. This leaves 9 bits for hosts.30.28.18.254 155.3 155.254 Subnet ID Host ID Enumerating the host IDs for the . Chapter 5 – CIDR and VLSMs Explained /24. This is the closest choice to create the required number of addresses because the remaining 8 host bits allow for 254 addresses per subnet. New mask (/24) 1st octet 11111111 2nd octet 11111111 3rd octet 1111 1111 4th octet 00000000 NETWORK ID | Subnet IDs | HOST IDs Applying a /24 prefix to the next range of the address to create 254 host subnets Just as applying the /23 prefix would have created eight 500-host subnets if the mask was not varied again, here the /24 applied to the starting range 155.0.28.0 would create sixteen 254-host subnets. However, only two of those 254 host subnets are needed, and so in a moment the mask will again be varied at the address following the first two of the sixteen subnets. First let’s enumerate those two subnets before moving on to the 2-host subnets. 3rd octet Frozen bits Borrowed bit for subnet IDs Remainder of host bits Combine bits and convert octet back to decimal 0001 0001 1100 n/a n/a 00011100 = .28 00011101 = .29 111 Subnets Subnet ID 155.0.28.0 /24 155.0.29.0 /24 Enumerating the subnet IDs for the 155.0.28.0 /24 As always, the customer receiving the assignment of either subnet would be free to vary the mask again and create additional subnets –as long as the customer does not touch the frozen bits, which for it are the first 24 bits. Row 3 The ISP wants to allocate the balance of the address space as a bunch of 2-host subnets. The next unallocated portion of the address space is 155.0.30.0. Two bits must be left for host IDs, so a /30 mask is applied to the address. New mask (/30) 1st octet 11111111 2nd octet 11111111 3rd octet 4th octet 1111 1111 111111 00 NETWORK ID | Subnet IDs | HOST IDs Applying a /30 prefix to the next range of the address to create 2 host subnets 50 Copyright © 2001-06 by New Frontier Training Chapter 5 – CIDR and VLSMs Explained 3rd and 4th octet Frozen bits 0001 0001 0001 0001 etc. . . . Borrowed bits for subnet IDs 1110.000000 1110.000001 1110.000010 1110.000011 0001 1111.111110 Remainder host bits 00 00 00 00 Combine bits and convert octets back to decimal 00011110.00000000 = .30.0 00011110.00000100 = .30.4 00011110.00001000 = .30.8 00011110.00001100 = .30.12 00 00011111.11111100 = .31.252 Enumerating the subnet IDs for the 155.0.30.0 /30 Subnets Subnet ID 155.0.30.0 /30 155.0.30.4 /30 155.0.30.8 /30 155.0.30.12 /30 155.0.31.252 /30 Summing up CIDR and VLSMs The examples in the last few pages should clearly illustrate what a powerful combination CIDR and VLSMs are. An assigning authority can allocate address space efficiently, and the space can be utilized efficiently as it is reallocated to other providers. The key to using CIDR assigned addresses is to always remember the following rules: • All bits dictated by the mask as network bits are frozen and can’t be altered. • All bits designated as host bits may be used as is, or further subnetted as needed. • When subnetting, always start borrowing from the high order hosts bits of the current mask. • When subnetting, borrow as many bits as possible, leaving only enough host bits to meet the requirements of the number of hosts required for the subnet. This will yield the maximum number of subnets that can later be subdivided further as needed. Riding the Hierarchical Highway An important side effect shown by the examples is that classless addressing with CIDR and VLSMs make possible a hierarchical structure of network addressing. Hierarchical numbering schemes allow for efficient, organized addressing of networks. At the assignment level, representing many networks as a single network ID (less specific) makes for smaller route tables and more efficient routing of packets. Only at the point in the route where more specific addressing information is required must the subnets of the network ID be enumerated in the route tables. Hierarchical addressing makes sense at the organizational level as well –even with private IP addresses. Rather than deploying several private class B or class C network for each routed network, you could start with a base 32 bit address, say the 10.0.0.0, or the 172.16.0.0 and use VLSMs to allocate the appropriate number of addresses to each subnet. With a little planning you can develop a hierarchical structure that maps to the structure of the organization. Then a glance at any IP address reveals say, the country, state and city, building, department, floor, and even device type, greatly simplifying route tables at the same time. OTHER HIERARCHICAL ANALOGIES If all this hierarchical stuff makes you a little dizzy. it may help to realize that we live with many different hierarchical schemes in daily life. The phone organization is a great example. Telephone switches make a long distance connection first by area code. The balance of the number is ignored for most of the call’s journey. When the call has been routed to the correct area code the Copyright © 2001-06 by New Frontier Training 51 Chapter 5 – CIDR and VLSMs Explained telephone number’s prefix is checked to route the call to the appropriate regional switch. Finally the suffix is checked to make the actual connection. The backbone switches only need listings of area codes, and the regional switches only need listings of local prefixes. The local switches only need to know which suffix matches a customer. None of the switches can route the call on their own, but working together they can get the call to its destination. IPv6 to the Rescue? CIDR, VLSMs, and NAT were created as a solution to the problem of 32 bit network addresses being exhausted. Another solution would be to increase the size of the existing address space beyond 32 bits. That’s where the next version of IP, IPv6, comes in. IPv6 purports to ultimately replace the current version of IP, version 4, with a quadrupled address length of 128 bits. IPv6 deployment is proceeding slowly however. CIDR and NAT have been so successful, that the pressure to move to a new addressing scheme has been lessened. Network security also plays a role in lessening the demand for public addresses. We’re trying to hide our networks from the Internet now. It used to be you had bragging rights if you had enough public addresses to assign one to every workstation in you organization. Not anymore. Now the trend is to address hosts with private addresses that hide behind NAT appliances and stateful firewalls. Although IPv6 is slowly permeating into our networks, it is likely to be some time before we all jump the IPv4 ship. During this transition many IP hosts will run dual IP stacks. 52 Copyright © 2001-06 by New Frontier Training leaving only enough host bits to meet the requirements of the number of hosts required for the subnet. thus maintaining efficiency of allocation. Varying masks can be applied to the same 32 bit address space when initially allocating an address. borrow as many bits as possible.Chapter 5 – CIDR and VLSMs Explained Chapter 5 Summary • • • • • • • Classless Inter-Domain Routing was developed to more efficiently allocate network addresses by allocating the exact amount of address space an organization requires. Networking equipment must support classless addressing. Remember the following rules when working with classless addressing: o All bits dictated by the mask as network bits are frozen and can’t be altered. or further subnetted as needed. and the use of classless routing protocols on the routers. but its great success has lessened the need to deploy IPv6 right away. hierarchical. o When subnetting. greatly leveraging the efficiency of CIDR notation. Variable masks can be applied to privately addressed networks to allow an organization to benefit form the organizational. and routing table efficiencies brought by VLSMs. This mainly has to do with the IP stack running on the hosts. flexible system of network and host address allocation. and lessens the load on backbone routers by aggregating multiple routes into a single routing entry. CIDR provides an efficient. o When subnetting. This will yield the maximum number of subnets that can later be subdivided further as needed. o All bits designated as host bits may be used as is. CIDR obsoletes the class system at the assignment level. Copyright © 2001-06 by New Frontier Training 53 . CIDR was developed as a work-around technology until IPv6 can be fully deployed. VLSMs can also be applied to CIDR addresses at the organizational level. always start borrowing from the high order hosts bits of the current mask. Appendixes Appendix A – Subnetting Exercises Appendix A – Subnetting Exercises Overview This appendix gives you an opportunity to hone your subnetting skills. Examples using private, classful IP addresses will be presented for simplicity. The same procedures shown here are applied to classless addresses however. You can work through each exercise on your own and check the answers on the page following the exercise. Or if you get stuck you can jump forward and get a hint. As you go through the exercises keep an eye out for patterns and shortcuts. After you subnet a few times you will start to see patterns for how subnet and host IDs are created. Through experience you will also start to see obvious shortcuts that can be taken when subnetting. When that happens you are well on your way to becoming a subnetting master! and 40 computers on the other floor. A router connects the two segments of the network.0.45. List just the first and last host ID for each subnet.Appendix A – Subnetting Exercises Exercise #1 Scenario: An organization has chosen to deploy a private Class C address 192. Configure a subnetting scheme for this network that assumes that there will never be more than 2 subnets and allows for the maximum number of hosts. The organization’s network is in one building on two separate floors. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ .168. There are 50 computers on one floor. 0). you ALWAYS treat the octet as a whole when converting to decimal.11111111.000000000 b) Turn on the first two bits in the host octet of the mask to indicate these are now subnet bits: 11111111. (26) –2 = 62.Appendix A – Subnetting Exercises Solution to exercise #1 Original IP address: 192.192 4) Define the subnet IDs to be used a) List all the possible combinations of the borrowed bits 00 01 10 11 b) Combine each valid combination with the remainder of the octet and convert to decimal 01 000000 = 64 10 000000 = 128 Note: Remember the cardinal rule of subnetting when converting binary numbers to decimal: Always convert the entire octet.64 192.168.45. Therefore. 3) Define a custom subnet mask a) Convert the default subnet mask to binary (255.168.128 . 192. c) Reunite the octet with rest of the IP address and you have your subnet IDs. which is 62 hosts per network.255. (22) –2 = 2.11111111. Borrowing two bits results in two subnets.255.255. 2 bits have been borrowed from the host ID.255.110000000 c) Convert the subnet mask back to decimal 255. Even if bits have been borrowed from an octet to create subnet IDs. leaving 6 bits.45.0 1) Determine the number of subnets needed a) Two subnets are specifically asked for.45. the two bits borrowed for the subnet ID will still allow for a sufficient number of hosts. 2) Determine the number of host IDs needed per network a) The largest number of hosts either subnet must support is 50.11111111.168.11111111. 11111111. 127 192.64 192. Subnet #1 → 192.67.168.190 Subnetting Helper Sheet — completed 1 2 3 4 5 6 7 8 9 10 Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 255.168.45.168.45.128 192.190 192.168.Appendix A – Subnetting Exercises 5) Determine the beginning and ending host ID for each subnet a) The 1st host ID is all host bits turned OFF except one (all 0’s would be the network number) 000001 b) The last host ID is all host bits turned ON except one (all 1’s would be the broadcast address) 111110 c) Combine each subnet ID with the beginning and ending host IDs in turn and convert to decimal Subnet #1 → 01 000001 = 65 01 111110 = 126 Subnet #2 → 10 000001 = 129 10 111110 = 190 d) Combine with remainder of address and you have your beginning/ending host IDs.255.168.168.168.168.192 or /26 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 192.45.255.0 .45.191 192.45.65 192.67.0 2 62 2 255.255.168.45.168.45.45.129 192.45.129 to 201.255.45.45.168.126 192.65 to 201.45.45.126 Subnet #2 → 192. 168. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ . Configure a subnetting scheme for this network that allows for the growth of two additional subnets and accommodates up to 25 hosts per network. There are 12 computers in each building. A router connects the segments of each network. The organization’s network has four buildings located 250’ apart.11.Appendix A – Subnetting Exercises Exercise #2 Scenario: An organization has chosen to deploy the private Class C address 192.0. 255.32 193. (25) – 2 = 30.11.1. Borrowing three bits will be just enough.168.11. 3 bits were borrowed from the host ID leaving 5 bits.1.160 193. (23) –2 = 6. 193.11.255.11.11.11.96 5) Determine the beginning and ending host ID for each subnet a) The 1st host ID is all bits turned OFF except one (all 0’s would be the network number) 00001 b) The last host ID is all bits turned ON except one (all 1’s would be the broadcast address) 11110 c) Combine each subnet ID with the beginning and ending host IDs and convert to decimal Subnet #1 → 001 00001 = 33 001 11110 = 62 Subnet #2 → 010 00001 = 65 .255.1.224 4) Define the network subnet IDs to be used a) List all the possible combinations of the borrowed bits 000 100 001 101 010 110 011 111 b) Combine each valid combination with the remainder of the octet and convert to decimal 100 00000 = 128 001 00000 = 32 101 00000 = 160 010 00000 = 64 110 00000 = 192 011 00000 = 96 c) Reunite the octet with rest of the IP address and you have your subnet IDs.000000000 b) Turn on the first three bits in the host octet of the subnet mask to indicate these are now network bits: 11111111.64 193.0 1) Determine the number of subnets needed a) Four subnets are needed plus planning for two additional subnets makes six.1110000 c) Convert the subnet mask back to decimal 255.11111111. which is 30 hosts per network.0).11.1.1.11111111. 2) Determine the number of host IDs needed per network a) The largest number of hosts any subnet must support is 25.11111111.192 193.Appendix A – Subnetting Exercises Solution to exercise #2 Original IP address: 192.11111111.1. 11111111.255. 3) Define a custom subnet mask mask a) Convert the default subnet mask to binary (255. Plenty for this job.128 193. 168.11.159 192.33 192.62 192.11.190 192.11.11.168.65 to 192.11.11.168.Appendix A – Subnetting Exercises 010 11110 = 94 Subnet #3 → 011 00001 = 97 011 11110 = 126 Subnet #4 → 100 00001 = 129 100 11110 = 158 Subnet #5 → 101 00001 = 160 101 11110 = 190 Subnet #6 → 110 000001 = 193 110 111110 = 222 d) Combine with remainder of address and you have your beginning/ending host IDs Subnet #1 → 192.11.161 192.129 to 192.11.168.32 192.168.168.11.168.168.62 Subnet #2 → 192.11.168.96 192.168.168.168.11.158 Subnet #5 → 192.168.255.168.94 Subnet #3 → 192.168.192 192.11.255.11.129 192.190 Subnet #6 → 192.11.11.168.126 192.11.11.11.223 .168.168.97 192.168.168.128 192.126 Subnet #4 → 192.11.64 192.11.168.168.11.11.255.11.33 to 192.11.168.158 192.11.11.11.222 Broadcast Address: ↓ 192.11.11.193 192.168.11.191 192.168.168.255.168.127 192.168.97 to 192.94 192.11.224 or /27 Last Host ID: 1st Host ID: ↓ ↓ 192.168.168.11.193 to 192.0 6 25 3 (renders 6 networks with 30 hosts per network) 255.63 192.168.160 192.0 255.11.95 192.11.11.222 Subnetting Helper Sheet — completed Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1 2 3 4 5 6 7 8 9 10 192.11.11.168.160 to 192.168.168.65 192.168.168.168. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ .0. and leaves room for additional subnets only as long as the subnetting scheme accommodates at least 12 hosts per network. Configure a subnetting scheme that allows for eight networks now.168. The organization’s network has eight departments and wants to put all departments on separate networks to avoid broadcast storms (routers don’t usually pass broadcast packets). There are no more than 10 people per department.Appendix A – Subnetting Exercises Exercise #3 Scenario: An organization is deploying private Class C address 192.254. 112 201.168. 3) Define a custom subnet mask mask a) Convert the default subnet mask to binary (255.48 201.255.255.254.254.11111111.32 201.144 201.255. Borrowing 3 bits yields 8 potential networks.254. 2) Determine the number of host IDs needed per network a) Borrowing 4 bits from the host ID leaves 4 bits remaining.160 201. That allows for 6 spare networks.000000000 b) Turn on the first 4 bits in the host octet of the subnet mask to indicate these are now network bits: 11111111.208 201.255.255.255.255. (24) – 2.254.111100000 c) Convert the subnet mask back to decimal 255.255.254.11111111.255.255.254. but when the 2 invalid networks are removed you come up short. the remaining 3 bits of the octet would only allow 6 hosts per subnet.80 201.255. (24) –2 = 14.128 201.11111111.255.254.0).255. Therefore 4 bits must be borrowed. (23) –2 = 6.96 201.255.Appendix A – Subnetting Exercises Solution to exercise #3 Original IP address: 192.176 5) Determine the beginning and ending host ID for each subnet a) The 1st host ID is all bits turned OFF except one (all 0’s would be the network number) 00001 b) The last host ID is all bits turned ON except one (all 1’s would be the broadcast address) 11110 .224 201.254.254.0 1) Determine the number of subnets needed a) A minimum of eight subnets are needed and only more can be created if there are at least 12 host addresses to go around.16 201.11111111. 11111111.254.64 201.254.255.255.254.254. If 5 bits were borrowed for network IDs.254. You could not borrow anymore than 4 bits because at least 12 hosts are required per subnet. 201.255.192 201.255.240 4) Define the network (subnet) IDs to be used a) List all the possible combinations of the borrowed bits 0000 0100 1000 1100 0001 0101 1001 1101 0010 0110 1010 1110 0011 0111 1011 1111 Combine each valid combination with the remainder of the octet and convert to decimal 0100 0000 = 64 1000 0000 = 128 1100 0000 = 192 0001 0000 = 16 0101 0000 = 80 1001 0000 = 144 1101 0000 = 208 0010 0000 = 32 0110 0000 = 96 1010 0000 = 160 1110 0000 = 224 0011 0000 = 48 0111 0000 = 112 1011 0000 = 176 b) Reunite the octet with rest of the IP address and you have your subnet IDs. which is 14 hosts per network.254. 254.168.97 192. .168.168.168.255.254.168.254.65 192.254.168.254.206 192.254.79 192.63 192.168.78 192.254.254.209 192.254.168.80 192.238 192.254.168. .254. .207 192.168.254.168.255.168.254.254.254.168.254.254.254.168.168.254.159 192.254.254.254.48 192.168.168.65 to 192. .168.254.161 192.0 8 12 4 (renders 14 networks with 14 hosts per network) 255.168.254.254.254.254.254.254.129 192.168.254.31 192.46 192.254.111 192.254.254.239 You could allocate any 10 of these 14 subnets to satisfy the organization’s initial need.96 192.168.168.168.168.254.112 192.254.168.254.175 192.238 Subnetting Helper Sheet — completed Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 192.254.168.17 192.240 or /28 1st Host ID: ↓ 192.254.254.254.95 192.254.168.254.254.254.254.193 192.17 to 192.168.Appendix A – Subnetting Exercises c) Combine each subnet ID with each host ID in turn and convert to decimal Subnet #1 → 0001 0001 = 17 0001 1110 = 30 Subnet #2 → 0010 0001 = 33 0010 1110 = 46 Subnet #3 → 0011 0001 = 65 0011 1110 = 78 etc.143 192.33 192.254.168.168.190 192.254.168.168.191 192.168.254.225 Last Host ID: ↓ Broadcast Address: ↓ 192.168.168.224 192.208 192.168.254.62 192.110 192.160 192.254.30 Subnet #2 → 192.81 192.168. .64 192.192 192.168.113 192.168.32 192.168.168.168.78 etc.255.254.254.168.158 192.128 192.254.254.254.47 192.168.94 192.168.168.127 192. Subnet #14 → 192.168.168.254.177 192.242 192.33 to 192.254.168.176 192.30 192.168.243 192.0 255.144 192.168.168.254.168.168.168.254.254.46 Subnet #3 → 192.254.168.168.254.168.174 192.126 192.168.168.168.225 to 192.168.168.254.16 192.168.168.255.49 192.142 192.145 192. .254. Subnet #14 → 1110 0001 = 225 1110 1110 = 238 d) Combine with remainder of address and you have your beginning/ending host IDs Subnet #1 → 192.254. 168. Configure a subnetting scheme that accommodates the objective. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ .0.222.Appendix A – Subnetting Exercises Exercise #4 Scenario: An organization is deploying private Class C address 92. The organization’s only needs two hosts attached to each network but it needs the maximum number of subnets possible –while still allowing for the two hosts. 11111111. With 1 bit remaining the calculation is..0)..222.168.16 192.0 1) Determine the number of subnets needed a) To gain the maximum number of subnets.255.255.8 192.222.248 192. Just right. Borrowing 7 bits works out like this.11111111.11111111. 192. (26) –2 = 62.28 5) Determine the beginning and ending host ID for each subnet a) The 1st host ID is all bits turned OFF except one (all 0’s would be the network number) 01 b) The last host ID is all bits turned ON except one (all 1’s would be the broadcast address) 10 . 000010 00 = 8 000110 00 = 24 111110 00 = 248 000011 00 = 12 000111 00 = 28 c) Reunite the octet with rest of the IP address and you have your subnet IDs. With two bits left for host addresses it works out like this: (22) – 2 = 2.168.168.222.168. Lets’ try borrowing just 6 bits. you need to borrow the maximum number of bits. 192.222.11111111.222. Whoops.Appendix A – Subnetting Exercises Solution to class C exercise #4 Original IP address: 192.168.4 192.24 192.168.168.222.168..255.32 192.12 192. Zero host addresses is unacceptable.000000000 b) Turn on the first three bits in the host octet of the subnet mask to indicate these are now network bits: 11111111.222. That’s 126 subnets. (21) – 2 = 0. Try borrowing 7 bits and see how that works out.255.20 . (2*2) – 2 = 2..252 4) Define the network (subnet) IDs to be used a) List all the possible combinations of the borrowed bits 000000 000100 001000 000001 000101 … 000010 000110 111110 000011 000111 111111 b) Combine each valid combination with the remainder of the octet and convert to decimal 000100 00 = 16 001000 00 = 32 000001 00 = 4 000101 00 = 20 .222.222. 3) Define a custom subnet mask mask a) Convert the default subnet mask to binary (255. but before proceeding further check to see if this scheme allows for enough host addresses.11111100 c) Convert the subnet mask back to decimal 255.168.11111111.168.222. (27) –2 = 126. 2) Determine the number of host IDs needed per network a) As calculated in the previous step. 8 192.31 192.222.222.168.222.222.4 192.222.11 192.168.222.27 192.222.222.222.222.168.222.222.222.10 192.168.168.222.222..24 192.168.222..222.168.222.14 192.168.20 192.222.168.168.33 192.168.168.168.222.249 192.222.168..34 192.222.30 192.168.168.6 192.168..168.168.21 192.222.26 192.222.9 192.222.222.168.222. 62 192.0 255.251 .6 Subnet #2 → 192.222.168.17 192.168.Appendix A – Subnetting Exercises c) Combine each subnet ID with each host ID in turn and convert to decimal Subnet #1 → 000001 01 = 5 000001 10 = 6 Subnet #2 → 000010 01 = 9 000010 10 = 10 Subnet #3 → 000011 01 = 13 000011 10 = 14 .7 192.168.168.168.252 or /30 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 192.168. Subnet #62→ 192.168.222.222.29 192.35 192.255.250 192.23 192.255.222.19 192.222.168.10 Subnet #3 → 192.168.168.222.255.28 192.168.222.222.5 192.12 192.16 192..168.168.9 to 192.222.168.168.0 Maximum 2 6 (renders 62 networks with 2 hosts per network) 255.5 to 192.222.168.168.25 192.168.222.168.168.168.222.248 192. 192.168. Subnet #62 → 111110 01 = 249 111110 10 = 250 d) Combine with remainder of address and you have your beginning/ending host IDs Subnet #1 → 192.168.22 192.168.14 ..13 to 192.168.13 192.222.222.18 192.222.222.250 Subnetting Helper Sheet — completed Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1 2 3 4 5 6 7 8 .15 192.255.249 to 192..222.222.32 . There are 250 computers on one floor. Configure a subnetting scheme that accommodates the objective. The organization’s network is in one building on two separate floors. Configure a subnetting scheme for this network that assumes that there will never be more than 2 subnets and allows for the maximum number of hosts. Just list the first and last host ID for each subnet. and 200 computers on the other floor.16.0.Appendix A – Subnetting Exercises Exercise #5 Scenario: An organization is deploying private Class B address 172.0. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ . A router connects the two segments of the network. (216)-2.0 4) Define the network (subnet) IDs to be used a) List all the possible combinations of the borrowed bits 00 01 10 11 b) Combine each valid combination with the remainder of the octets and convert to decimal 01 000000. which for a class B addresses is the 3rd octet.00000000 c) Convert the subnet mask back to decimal 255. Two networks are what’s required.00000000.11111111.16.0 Note: As with class C addresses. 3) Define a custom subnet mask mask a) Convert the default subnet mask to binary (255.00000000 = 128.0 10 000000.255.11000000. the original network number (172.64. 2) Determine the number of host IDs needed per network a) The scenario specifies a maximum of 250 hosts per subnet. 5) Determine the beginning and ending host IDs for each subnet a) The 1st host ID is all bits turned OFF except one (all 0’s would be the network number) 000000. When borrowing bits to create additional networks you always start from the left most octet.0.11111110 .0) is rendered invalid. so borrowing two bits should be adequate (22)-2 = 2.00000001 (when calculating host ID’s always add from the far right) b) The last host ID is all bits turned ON except one (all 1’s would be the broadcast address) 111111. Borrowing 2 bits for the subnet IDs leaves 14 bits remaining for host IDs.Appendix A – Subnetting Exercises Solution to exercise #5 Original IP address: 172.16.0.0 Reunite the octets with rest of the IP address and you have your subnet IDs.11111111.0 1) Determine the number of subnets needed a) Remember that class B host addresses occupy two octets. for a total of 65.000000000 b) Turn on the first three bits in the host octet of the subnet mask to indicate these are now network bits: 11111111.0 172.534 possible hosts.382.0).192.128. (214) – 2 = 16.16. 172.16.255. 11111111.0.00000000 = 64. 16.00000001 = 172.191.1.64.0 /18 1st Host ID: ↓ 172.128.16 Last Host ID: ↓ Broadcast Address: ↓ 172. not a host ID.16.16.64.253.16. 172.Appendix A – Subnetting Exercises c) Combine each subnet ID with each host ID in turn and convert to decimal Subnet #1 → 01 000000.254.2. .16.0. .254 d) Combine with remainder of address and you have your beginning/ending host IDs Subnet #1 → 172. .16. 172.11111110 = 191. The 10 of course is the network ID.254 172.1 to 172.1.16.66.127.11111110 = 127.254 Subnetting Helper Sheet — completed Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1 2 172.255 172.16.254). 172.192.16.64.16.64. 172. . 172.254 Why is 172.16.0.1 01 111111.65.0 172.254 172.255.16.2.382 hosts per network) 255.191.255 Perplexed? Keep in mind that class B host addresses increment like this: 172. .16.16.254 the last host address? That is the decimal equivalent of all bits but one being turned on (10 111111. 172.191.16.1 .127. .64.16.191.16.0 255.254 Subnet #2 → 172. . 172.191.16. .254 Subnet #2 → 10 000000.64.0 172.16.255.11111110 = 191.0 2 Max 2 (renders 2 networks with 16. . 172.255.172. .254. Even though it is part of the octet it is not part of the host ID.16.16.00000001 = 64.252. .65.127. 172.16 10 111111.191.16.16.65. . 172.1 172. 172.16.255. .65.191.172.16.64.16.16 to 172. The organization’s network has ten buildings located 250’ apart. Subnetting Helper Sheet Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 1 2 3 4 5 6 7 8 9 10 Workspace: _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ . A router connects the segments of each network. There are 500 computers in each building.0.23.Appendix A – Subnetting Exercises Exercise #6 Scenario: An organization is deploying private Class B address 172. Configure a subnetting scheme for this network that allows for the growth of five additional subnets and accommodates up to 1000 hosts per network.0. 16. 00010 000.0 11110 000.00000000 = 8.255.23.0 00110 000.248.23.0 .23..0.11111000. Therefore 5 bits must be borrowed to accommodate the planned growth.00000000 = 56..23.Appendix A – Subnetting Exercises Solution to exercise #6 Original IP address: 172..0 00011 000.0 172.11111111.000000000 b) Turn on the first three bits in the host octet of the subnet mask to indicate these are now network bits: 11111111. Borrowing 5 bits allows for up to 30 subnets (25) – 2 = 30. 11111111.00000000 c) Convert the default subnet mask back to decimal 255.23.00000000 = 24.24.23. (211) – 2 = 2.0 ...0 01000 000.48.240.00000000 = 48.0 172.255.0 172.0 00111 000. 2) Determine the number of host IDs needed per network a) The scenario specifies at least 1000 hosts per subnet.00000000 = 32.00000000 = 64.23. 172.8.0 172.00000000 = 40.56.23.0 1) Determine the number of subnets needed a) 10 networks are in place now but there may be up to 15. Borrowing 5 bits for the subnet IDs leaves 11 bits remaining.0 c) Reunite the octets with rest of the IP address and you have your subnet IDs. 3) Define a custom subnet mask mask a) Convert the default subnet mask to binary (255.11111111.23..40.00000000.0 00101 000.00000000 = 240.046. 172.0 .0 00001 000.0).0.0 4) Define the network (subnet) IDs to be used a) List all the possible combinations of the borrowed bits 00000 00100 00001 00101 00010 00110 00011 00111 01000 . 11110 11111 b) Combine each valid combination with the remainder of the octets and convert to decimal 00100 000.00000000 = 16.32.23.64.0 172. Borrowing 4 bits is not quite enough (24) – 2 = 14 subnets.0 172.0 172. 23.254 Subnet 2 → 00010 000.00000001 = 16.31.254 Subnet 3 → 00011 000..1 00011 111.247.1 to 172.00000001 = 8.8.11111110 = 247.1 to 172.1 to 172.23.254 Subnet 3 → 172.11111110 = 23.24.1 11110 111.00000001 = 24.1 to 172.254 .23. Subnet 14 → 172.15.254 d) Combine with remainder of address and you have your beginning/ending host IDs for each subnet.23.240.23.1 00010 111.11111110 = 27..Appendix A – Subnetting Exercises 5) Determine the beginning and ending host IDs for each subnet a) The 1st host ID for each subnet is all bits turned OFF except one (all 0’s would be the network number) 000.1 00001 111..11111110 = 15. Subnet 14 → 11110 000.23..11111110 c) Combine each subnet ID with each host ID in turn and convert to decimal Subnet 1 → 00001 000.16.254 Subnet 2 → 172.00000001 (when calculating host ID’s always add from the far right) b) The last host ID for each subnet is all bits turned ON except one (all 1’s would be the broadcast address) 111.23. Subnet 1 → 172.254 .00000001 = 240.23.254 .23. 247.8.239.1 170.239.24.239.239.000 5 (renders 30 networks with 2.239.239.239.63.239.239.47.0 170.47..239.248.239.31.0 170.239.1 170.239.15.56.239.239.16.0 255.254 170.255 170.239..63.00000000 ↑ ↑ network host Turning on all network bits except one is: 11110 000.240.254 170.15.239.55.255.255 170.23.Appendix A – Subnetting Exercises Subnetting Helper Sheet — completed Network address to subnet: Default subnet mask: # of networks required: # of hosts per network: # of bits borrowed: Custom subnet mask: Subnet IDs: ↓ 1 2 3 4 5 6 7 8 .0.239.56.8.254 170.254 170.255.239.1 170.254 170.1 170.239.0 170. 30 170.255 170.40.1 170.239.55.255 170.254 170.239.40.0 15 1.1 170.239.046 hosts per network) 255.239.254 170.239.48.239.32.239.239.0.239.16.0 170.39.254 170.239.255 170.255 How do you easily know what the last network number is without incrementing through every single network number? Simply turn on all the network address bits except one and convert to binary! In this example since we borrowed 5 bits the network portion of the IP address is: 00000 000.0 170.48.247.64.239.0 170.0 170. 170.239.1 170.0 or /21 1st Host ID: ↓ Last Host ID: ↓ Broadcast Address: ↓ 170.71.239.24.00000000 Convert to decimal and the answer is 240.240.1 170.0 .39.31.64..32. .255 170.0 170.239.1 170.239.239.23.239.71.255 170.254 170.0 The weird thing about subnetting is that the octet value of 240 represents both the network number and the host IDs. But the ANDing process always reveals the truth of the matter.255 170. Appendix B – Quick & Dirty Subnetting . Appendix B – Quick & Dirty Subnetting Overview You’ve sweated and toiled. You can use this method for any classful or classless address. Copyright © 2001-06 by New Frontier Training 77 . and you finally have a good grasp of subnetting. Note: This method works only if you are borrowing from a single octet. Quick and dirty means NO BINARY and NO CALCULATOR. as long as you are only borrowing from one octet. Now you will learn how to subnet the Quick and Dirty style. You have worked with the magic number already – though you may not have realized it. Once you determine the magic number in a subnetting problem. If borrowing beyond one octet. everything else is child’s play. The key to subnetting Quick and Dirty style is via something known as the magic number. do not use this method. Subtract two from the result.1.224) There are 30 host addresses (32-2=30) The first host number is 192. Just add the magic number to the previous subnet number. Start at the number 256. The first Host ID is always one greater than the subnet number. starting at two. Example: 224-32 = 192 (192. Example: Subnet 192. Example with 3 borrowed bits: 128. Example: Previous subnet number was 192. The next subnet number is 192. then 192. Determine successive subnet numbers a. you’re one finger short.1.1.63 (64-1) .Appendix B – Quick & Dirty Subnetting How to subnet with no binary numbers and no calculator This example uses the address 192.62 (64-2) Broadcast address is 192. (32 is the magic number) 3. so 3 bits will be borrowed. d. 4. This gives you the MAGIC NUMBER. 1. c. If you still have enough subnets while retaining the desired number of host bits. 224 is the custom subnet mask mask for the 4th octet (255. If you still have enough hosts. b.33 (32+1) The last host number is 192.1.168. two fingers = 4 subnets etc). Example: 256-32=224.32) 5. Subtract the magic number from 256.168. Subtract the magic number from the custom subnet mask.1. Determine the Magic Number a. The broadcast address is always one less than the next subnet number. 64. 6. doubling the number for each finger until you get the number of subnets you need. b. a. Determine the first subnet number a. The subnet mask.255. If not.168. 3 bits is enough for 6 subnets.255.. that is the number of bits that must remain after borrowing. Determine the number of bits to borrow a. The magic number is the 1st subnet number (192.168.96.168. Determine the Host IDs and broadcast address for any subnet.32 (255.168. Determine the last subnet number a. and cut it in half for each bit you borrowed.168. Add the magic number to 32 = 192.e. The number of Host IDs per subnet is always the magic number – 2.168. etc.1. subtract two from the result (must obey the rule of no all 0s or all 1’s the first time an address is subnetted). then borrow that number of bits.1. count on your fingers starting at two.255.0 /24. 2. Determine the number of subnets Like before. doubling the number for each finger until you get the number of hosts you need (i. and all subnet addresses come from this number.1.168.128. leaving 3 bits to borrow. 1 finger = two subnets.1.192) 7. Determine the number of hosts per subnet Count on your fingers. so just borrow one additional bit. 32. The last Host ID is always two less than the next subnet number. Example for 6 subnets with 30 hosts: 5 bits must remain for hosts.168.168. Determine the custom subnet mask a.1.64.255. If you are subnetting an address not previously subnetted.224 or /27).1.32. Appendix C – Real Life Classful Subnetting Examples . you need to be able to look at an IP address along with its mask and determine what network ID it is a part of. In either case. you often need to “reverse-engineer” the addressing scheme of a network. .Appendix C – Real Life Subnetting Examples – Classful Addresses Working With Existing Subnetted Networks Whether you walk into an environment with an existing network. or preparing to take a certification test. Appendix D has some classless examples. Here are some examples of classful networks to get you in practice. it’s a pretty straight forward process. then recombine the result with the rest of the bits in the octet. class C address. 01 000000 = . 26 -2 = 62. Now the questions about this network can be answered.128.255. then recombine the result with the rest of the bits in the octet. and the number of hosts per subnet. What subnet number is the IP address part of? 2. the subnet IDs.192 1. The first subnet is all subnet bits turned OFF except the low order bit. A value of . From here just act like you are subnetting the address for the first time: • • • • Two borrowed bits means 2 possible subnets.1.64.69 255. That means two bits were borrowed. The host is part of subnet 192. The last subnet is all subnet bits turned ON except the low order bit. How many subnets are there? To answer these questions. Since this is a classful address.255. There are 62 hosts per subnet. . There are 6 bits for host IDs. There are two subnets. The number of bits in the subnet field determines how many subnets exist. 10 000000 = . This is a private.168.64.1. How many host IDs for this subnet? 3.168. answer the questions below: 192.Appendix C – Real Life Subnetting Examples – Classful Addresses Example #1 Given the following IP address.192 in the 4th octet where the bits were borrowed converts to 11000000. the first order of business is to determine how many bits were borrowed to create the subnet field. 22-2 = 2. 255. 4. Quite common.232 255. There are 254 hosts per subnet. 1. 2.0 1. How many subnets are there? Here we have a private class B address with the mask of a class C address. 28 -2 = 254. The first subnet is all subnet bits turned OFF except the low order bit.255. answer the questions below: 172. 3.1. 11111110 = . Eight borrowed bits in the 3rd octet means 254 possible subnets.2. How many host IDs for this subnet? 3.16.255. then recombine the result with the rest of the bits in the octet.16. 28-2 = 254. There are 254 subnets. 00000001 = . What subnet number is the IP address part of? 2. The host is part of subnet 172. then recombine the result with the rest of the bits in the octet.2. There are 8 bits for host IDs. The last subnet is all subnet bits turned ON except the low order bit.0.Appendix C – Real Life Subnetting Examples – Classful Addresses Example #2 Given the following IP address. . 12. See example 2 in appendix D for a shortcut to quickly determine the subnet a host belongs to. then recombine the result with the rest of the bits in the octet.233 255. 0. Eight bits have been borrowed from the 3rd octet .248. 210-2 = 1022. By enumerating the subnets (0. you will eventually reach the 2. There are 6 bits for host IDs. etc. answer the questions below: 172. 5.2.16. How many host IDs for this subnet? 3. and two bits more from the 4th octet (192 = 11000000).192 1.16. There are 1. The first subnet is all subnet bits turned OFF except the low order bit.). 10 borrowed bits means 254 possible subnets. 6. 26 -2 = 62.2.232. 4. 00000000. What subnet number is the IP address part of? 2. 11111111.8.4.000001 00 = . There are 62 hosts per subnet. The last subnet is all subnet bits turned ON except the low order bit. How many subnets are there? Here we have a private class B address with bits borrowed from two octets to create the subnet field.4.111110 00 = 255. 7.255. . (note that 232 is a multiple of 4).232. for a total of 10 bits in the subnet field. No need to panic however.255. The host is part of subnet 172.022 subnets.0. The same procedure as the two previous examples applies. then recombine the result with the rest of the bits in the octet. 0.Appendix C – Real Life Subnetting Examples – Classful Addresses Example #3 Given the following IP address. Appendix D – Real Life Classless Subnetting Examples . Appendix D – Real Life Subnetting Examples – Classless Addresses Real life classless addressing examples The following subnetting examples are taken from real life applications of classless addressing. . All three are actual examples of ISPs using classless addressing to provide the appropriate amount of host addresses for its subscribers. 254. .0. this is a LAN not a WAN (a WAN would require a WAN layer 2 protocol such as SLIP or PPP. These are classless CIDR addresses.0. and likely use a twohost subnet address).1 is the ISP’s router for this subnet. what is not known is what the mask was of the address just before the subnet was created.0 /24. 3. the customer is relegated to using Network Address Translation or a proxy server in order to share the connection.11.1 1. Was it an /8? Doubtful.203.255. The default gateway of 24. so you have to proceed more carefully. Variable subnetting used? Who knows.11.11. the subnet ID and host scope for this address can be ascertained.203. Type in the address and click the search button.203.84 Subnet Mask 255.0 and a prefix of /24 would tell us that. But it’s a public address. ARIN allocates public addresses to large ISPs and some large organizations.84 is assigned to the cable modem at the customer’s premises.203. The gateway address must be on the same subnet.203. Even though it is clear that 24 bits form the network portion of the address. In other words. If this was a classful address it would be known that 16 bits had been borrowed for the subnet field. The class A 24.255.1 to 24. However. which allows 8 bits to form 254 host addresses. It does not show any entities that ranges of the address have been leased to. virtually all home Internet routers have NAT capability.11. The subnet ID is 24. and provides host addresses in the range 24.arin. The results will show ARIN’s record of who has received the initial allocation. Of course. a CIDR address. With likely only one IP address. 2. They are all on one LAN that extends throughout the “neighborhood”. How many subnets are there? Now we are in a world that is quite apart from the classful examples in appendix C. LOOKING UP AN ADDRESS WITH WHOIS In America. How many host IDs for this subnet? 3. The customer is not necessarily entitled to use any other addresses on the subnet.203. It’s just not easy to determine how the base address was allocated Therefore it is not known what the range of subnets is using this mask.11. What subnet number is the IP address part of? 2.0 Default Gateway 24.11. This is a simple calculation based on the /24 prefix. The cable provider is usually running Ethernet as the layer 2 protocol – even over what must be a significant distance. An ARIN allocated address can be looked up at http://www. IP address 24. probably automatically through DHCP. 1. so no assumptions can be made about the starting point for borrowing bits. The customer is in fact sharing the address range (as well as the bandwidth!) of this network with the neighbors.Appendix D – Real Life Subnetting Examples – Classless Addresses Example #1 Cable provider allocating a single IP address to a subscriber Customer’s IP configuration: IP Address 24. A /16? Maybe.11. and 8 bits form the host portion. and the Windows based Internet Connection Sharing facility provides software based NAT.net/whois.203. 11110000.255.0. You could enumerate each subnet like this .211. except it’s a DSL connection provided by the phone company. you can’t just eyeball the address and determine the subnet number.. Unlike the last example.00000000 = 16. Now convert back to decimal. where the custom mask fell on an octet boundary.3. there is no way to look at just the IP configuration of a host and determine how the address space has been allocated. not the same bandwidth.00000000 = 8.3. The assigned public address is either a CIDR address or a legacy class A address that has not yet been reallocated.3.3. convert the octet of the portion of the address where the dividing line is drawn between the network bits and the host bits –the 3rd octet in this case. .0 .112 Subnet Mask 255.1 This is the same basic drill as example #1. . Here’s how: First. The mask of .208.00000000 = 240. 00001 000. . but is there a better way? Yes. Now simply turn OFF the bits in the octet that are NOT part of the subnet ID.. DSL provides a private pipe to the customer premises. . The first computer will be used as an example.00000000 = 24.255. That would be the 3 low order bits.25 Subnet Mask 255. Let’s determine which subnet these two hosts are a part of. 211 = 11010 011 Remember that the first 21 bits of this address are used for the subnet ID. thus 2046 host addresses for this subnet.248 in the 3rd octet (/21) tells us that 11 bits remain for host IDs. 11010 000 = 208 The subnet ID is 4. As with any CIDR address.0 00010 000. .208.3.0 Default Gateway 4.1 Computer #2 IP Address 4. and the customer has two systems both getting their IP address from the cable provider.208. Unlike cable.0 .Appendix D – Real Life Subnetting Examples – Classless Addresses Example #2 DSL provider allocating a network to a subscriber Customers IP configuration: Computer #1 IP Address 4.248. but in this case the subscriber is only sharing the same network with its neighbors.248.213. A 2000+ address space for this subnet makes for a much larger network than the previous cable example. Let’s see what we can learn though.0 00011 000.0 Default Gateway 4. Appendix E – Subnetting Tables . 255.048.150 (221-2) 1.255.252.255.248.255 .0 255.255.0 255.255.382 (214-2) 8.255.255.0.255.286 (219-2) 262.142 (218-2) 131.224.240 255.) Number of bits borrowed for subnet mask 2 3 4 5 6 7 8 Number of Subnets created from borrowed bits 2 (22-2) 6 (23-2) 14 (24-2) 30 (25-2) 62 (26-2) 126 (27-2) Invalid 254 (28-2) Invalid Number of hosts per subnet Custom Subnet Mask 62 (26-2) 30 (25-2) 14 (24-2) 6 (23-2) 2 (22-2) 0 (21-2) Invalid -1 (20-2) Invalid 255.254.254.0 255.0. Class C network subnetting possibilities (default subnet mask = 255.0 255.255.224 255.192.255.252 255.255.0 255.255.255.255.0 255.255.252.255.Appendix E – Subnetting Tables Subnetting Tables (classful) Class A network subnetting possibilities (default subnet mask = 255.248 255.0.224.255.255.240.0 255.097.0.255.254 255.534 (216-2) 255.094 (212-2) 2.0.0.255.190 (213-2) 4.0.022 (210-2) 510 (29-2) 254 (28-2) 255.046 (211-2) 1.240.255.0 255.0.248.302 (222-2) 2.0.070 (217-2) 65.255.255.255.0.194.0 255.0.255.) Number of bits borrowed for subnet mask 2 3 4 5 6 7 8 Number of Subnets created from borrowed bits 2 (22-2) 6 (23-2) 14 (24-2) 30 (25-2) 62 (26-2) 126 (27-2) 254 (28-2) Number of hosts per subnet Custom Subnet Mask 16.192.0 Class B subnetting could continue past this table by borrowing bits from the 4th octet.255.574 (220-2) 524.) Number of bits borrowed for subnet mask 2 3 4 5 6 7 8 Number of Subnets created from borrowed bits 2 (22-2) 6 (23-2) 14 (24-2) 30 (25-2) 62 (26-2) 126 (27-2) 254 (28-2) Number of hosts per subnet Custom Subnet Mask 4.0.0 255.0 255.0 Class A subnetting could continue past this table by borrowing bits from the 3rd and 4th octet. Class B network subnetting possibilities (default subnet mask = 255.0 255.192 255.0. Appendix F – A word about Cisco Routers 90 Copyright © 2001-06 by New Frontier Training . have a few unique features that make life more flexible for network addressing. When implementing such a configuration. This does not conform to the RFCs for subnetting. but we are mentioning them here since Cisco owns such a large portion of the router market. This command allows a point-topoint link between two networks without the use of an IP address on either router interface.Appendix F – A Word About Cisco Routers A word about Cisco routers Cisco routers. care must be taken to insure that all networking equipment in the environment supports the “0” subnet. Copyright © 2001-06 by New Frontier Training 91 . Cisco routers also have the IP unnumbered command. 2. 3. 1. Cisco routers also have the capability of defining two IP addresses to one interface (known as a secondary addresses). but none-theless Cisco routers can do it if you use the global configuration command ip subnet-zero. and they have their caveats. This is a flexible tool that helps out in a variety of circumstances. Cisco routers allow subnets to begin at “0” (all subnet bits set to “0”). These features don’t always follow RFC conventions. which say zero cannot be a valid network number.
Copyright © 2024 DOKUMEN.SITE Inc.