Your Friend In IP Addressing
In your hand is an instrument that can be configured for 3,758,096,384 unique combinations of 1s and 0s. This sequence of 32 binary numbers are how computers identify themselves to each other. This is called an Internet Protocol Address or IP Address. It basically works like a phone number in essence to allow a device to be located and establish communications for various purposes like getting your email or surfing the web. Understanding the use of this 32 bit number has become a necessity for those entering into the high technology world of communications. The IPBuddytm will help you understand what IP addressing is about by making it something that can be grasp (physically) and mentally. Or as a very smart friend of mine in the industry once said, "explain it to me like I was 6". Bringing it down to the level of a "toy" is the best way I know to explain this complex subject. So lets get started.
The IPBuddytm is simply a representation of this 32 bit address in a plastic toy. Every hexagonal block can rotate into place as a 1 or 0 to form this 32 bit number quickly and easily. Try spinning a few numbers into place and then back again. You will notice a couple of things right away. First off there are different colors of blocks. Red, Green, Yellow and White. These will show the various "classes" of IP Addresses that can be generated. Since this is a binary numbering scheme you will also notice that each cube is assigned a value from 1 to 128. This is the "place value" of that bit. If you are not binary literate you will be after a short while with the IPBuddytm . Lets dial up an address by focusing on the green face of the IPBuddytm .One green face is
This is the way a computer would see the address of 126.96.36.199. The green part or the first 16 bits are known as the network ID and the next 16 white bits are known the host ID. IP addresses are viewed by computers to contain a Network ID and a Host ID. Since computers cant see colors they use the first few bits in the address to identify what part is network and what part is host. In this case since the first bits are 10 and that automatically tells the computer to use 16 bits as the Network ID. The IPBuddytm represents the 3 main classes of addresses like the following diagram.
X=1 or 0
You will notice that the first few bits are fixed values while the remaining bits can be either a 1 or 0. This ultimately means that IP address classes will span a range of values. If you start with the IPBuddytm in its fully aligned state, all colors lined up and all 1s and 0s lined up you can see the range of each address by simply turning the entire device through all 6 faces. Lets start with the Red Face.
A=00000000.00000000.00000000.00000000 which is a big fat 0.0.0.0 in decimal format
A=01111111.11111111.11111111.11111111 which is 127.255.255.255 in decimal format
So, a class A address can range between the values of 0.0.0.0 to 127.255.255.255.
(really only 188.8.131.52 to 184.108.40.206 since the 127 address range was reserved for "loopback testing" and 0.0.0.0 is another special case reserved for a "default route"
Lets keep going.
B=10000000.00000000.00000000.00000000 which is 220.127.116.11 in decimal format
B=10111111.11111111.11111111.11111111 which is 18.104.22.168 in decimal formatwhich is 22.214.171.124 in decimal format
So, a class B address can range between the values of 126.96.36.199 to 188.8.131.52
The last two faces look like
C=11000000.00000000.00000000.00000000 which is 192.0.0.0 in decimal format
C=11011111.11111111.11111111.11111111 which is 184.108.40.206 in decimal format.
Therefore, a class C address can range between the values of 192.0.0.0 to 220.127.116.11
If you cant add up binary values in your head yet, the IPBuddytm offers some help in that area by listing some of the most common values of binary numbers. You will also notice the place values are listed right on the IPBuddytm s blocks. You might also wonder why in the world you should even try to think in binary! Well, it is indispensable when we get to the dreaded sub-net masking section.
Once you get familiar with the ABCs of IP Addressing and the battle is half over. The key thing to keep in mind is the first few bits define the address class. Just look at the IPBuddytm s first few colored bits in positions 32-31-30, and see how it only allows a 0, 10 or 110 combination to occur. This was done by the inventors of IP addressing to make it easy for quick recognition of the kind of address that is to follow, why? Because knowing how many bits define the network and how many bits define the host allows for sorting (routing) these packets of information to their ultimate destinations. For an analogy lets use the US Postal Service and their use of zip codes. When you write a letter and include the zip code in the address, the mail sorters can quickly decide which State that letter belongs in. They are not looking at your street address (host) initially, they let a local postmaster do that dirty work or in the case of IP addressing local routers.
This description of IP addressing is known as "classful" addressing. It is assumed by the majority of devices in the network. It assumes by the embedded 0, 10 or 110 in the first few bits that an ABC class of address is about to follow. Go ahead and spin in a few more addresses.
192 .192 .192 .192
The lucky computer lives on the class C network 192.192.192 and is host number 192.
191 .191 .191 .191
A Class B network of 191.191 and the host number is 191.191
126 .126 .126 .126
A Class A network of 126 and a host number of 126.126.126
OK, you get the idea. I only used the same value in all quads just for ease.
Now, lets consider the size of network/host relationship that is defined by classes of address. It is easy to see that a class A address can have lots and lots of host and only a few networks. In fact we can have 126 networks and 16,777,216* host. Go ahead and dial up all the combinations of host starting with 00000000.00000000.00000000 to 11111111.11111111.11111111 on the white cubes, Ill get a cup of coffee while you do that.
A Class B address is just about evenly split (except for first 2 green bits which are fixed values) so we have networks 128.000 to 191.255 or in my math 64 networks in the first quad times 256 networks in the second quad. 64x256=16,384 total class B networks with 216 = 65,536 host* each.
A Class C address is composed of lots and lots of networks and a small number of host per network. It works out like this, 192.000.000 to 223.255.255 networks or in my math 32x256x256=2,097,152 networks and 256* host per network (the reason I use 32 and 256 is that I start my counts at 0 inclusive)
When the host address values are all 1s or all 0s they are treated as special cases. All ones in the host field mean the equivalent of "All Host" or in IP terms a broadcast. When the bits in the host field are all 0s they effectively mean "this network" so we need to subtract the all 1s and all 0s case. This reduces the host count by 2 in each class.
Bottom line, is that we have 3 major default classes of address that can be compared to the small-medium-large concept of network/host size. Speaking from experience I could not buy my clothes that way, at least a well fitting suit anyway, and the same thing applies to people building networks. One size does not fit all and 3 sizes only gets us in the ball park. Couple that with the growing shortage of IP version 4 (IPV4) Addresses and the explosion of router tables and we need to slice this up a different way. Enter the concept of subnets and variable-length subnet mask. The IPBuddytm will make these concepts simple to understand and explain. Everything so far has been based on classful addressing. In a classful addressing scheme we assume the number of bits that define the network ID is 8, 16 or 24. These are colored RED, GREEN and YELLOW on the IPBuddytm. RED, GREEN and YELLOW represent also what is also known as a "mask" in the old jargon of IP Speak or what is known as a "prefix" in the newer terminology. The default mask in classful addressing is 255.0.0.0 for Class A, 255.255.0.0 for Class B and 255.255.255.0 for Class C. In newer terminology a Class A is also known as a /8 network prefix. A Class B is also known as a /16 network prefix. A Class C is known as a /24 network prefix. These are spoken like "slash 8" or "slash 16". I got your 192.0.0.1 slash 24 right here. This notation simply describes the number of bits that are network bits. We will rely initially on the colors to show us the mask or prefix. The use of a prefix makes it easier to write IP addresses. Now that we are moving away from the assumed prefixes or mask we will have to include this information along with the address. So grab your IPBuddytm and lets get on to graduate school IP Addressing.
Take the IPBuddytm and create the following address.
That should look like
Now, slide the carrying tube over this address to the midpoint with the window showing just the green portion. You will notice that the numbers on the carrying tubes window that range from 32-1 meet the IPBuddytm at the number 16. This is indicating a /16 address. Or in this specific example 18.104.22.168 /16. Think of the carrying tube as your "masking device" Since we are masking at the boundary between green and white this also the default mask. If we do that for the other classes you would see that a class A would line up exactly with /8 and the class C would line up with /24. Go ahead and try it if you dont believe me. Not very interesting yet but wait, what about other mask lengths! How about taking the same address we used above and slide the tube over the next 8 white bits. This is kind of like borrowing some of the host bits. Like so.
I used the color gray in my figure above to show the carrying tube extending over the next 8 bits. What does this represent? This my friends is the amazing variable length subnet mask. We are entering the world of "classless IP addressing" In the current verbiage a /24 or in the old world a 255.255.255.0. Either way I am saying that I wish to take my standard Class B address and break it up into chunks. The gray area is the area that will represent "networks within my Class B network" and the white area that is outside the IPBuddytm will be my host addresses. With this little trick I can now take a single class B address and turn it into 256-2=254 individual subnets or all the way from (see figure below and focus on the gray bits)
Each one of these subnets can accommodate up to 254 host. Now these subnetted addresses will only be recognized within my locally administered network since I am using a "non-default" mask.
Lets take the IPBuddytm with another address and subnet it. How about:
Which is 22.214.171.124 /27 (you should be getting good at adding up 128s, 64s, 4s, 2s and 1s)
You will have most of the address inside the tube with the IPBuddytm aligned with the 27 on the face. The bits we are focusing on are the 3 host bits we "stole".
Here are the subnets that can be created from 3 bits
11000111.00000000.00000000.00000000 Subnet 0 (not allowed)
11000111.00000000.00000000.00100000 Subnet 1 126.96.36.199
11000111.00000000.00000000.01000000 Subnet 2 188.8.131.52
11000111.00000000.00000000.01100000 Subnet 3 184.108.40.206
11000111.00000000.00000000.10000000 Subnet 4 220.127.116.11
11000111.00000000.00000000.10100000 Subnet 5 18.104.22.168
11000111.00000000.00000000.11000000 Subnet 6 22.214.171.124
11000111.00000000.00000000.11100000 Subnet 7 (not allowed11000111.00000000.00000000.11100000 Subnet 7 (not allowed)
OK, so we have 6 usable subnets by taking 3 bits from the host field. That leaves us with 5 bits for the host field (the hexcubes hanging outside the IPBuddytm 's masking tube) Each subnet can have 32-2=30 valid host.
If you truly understand this so far then you should be able to answer the question. "What is the address of the first host on the first subnet?" Spin the lowest host bit up one like below.
11000111.00000000.00000000.00100001 Subnet 1 126.96.36.199
11000111.00000000.00000000.00100010 Subnet 1 188.8.131.52
11000111.00000000.00000000.00100011 Subnet 1 184.108.40.206
Well, it looks like 220.127.116.11 /27 will peg host number one on subnet number one. The
second host will be 18.104.22.168 /27, the third host is 22.214.171.124 /27 all the way up to
126.96.36.199 /27. I cant use
188.8.131.52 /27 do you see why? That
would make the 5 host bits I am working with all 1s. Also notice that all 0s
are not allowed when starting subnet 2. Lets look at the IPBuddytm
11000111.00000000.00000000.00111111 Subnet 1 184.108.40.206 11000111.00000000.00000000.00111111 Subnet 1 220.127.116.11 Not allowed
11000111.00000000.00000000.01000000 Subnet 2 18.104.22.168 Not allowed
Notice that the subnet values increase as a multiple of 32s. It is easy to see why with the IPBuddytm in hand. We are spinning the 32 hexcube as our lowest increment of subnet value. Also remember (so much to remember) that we do not allow values of all 1s or 0s as our subnetwork number. And we do not allow values of all 1s or 0s as our host number.
I am ready to do another one. Here we go.
IP Address 22.214.171.124 /16
Lets Subnet using 2 host bits this time (slide your carrying tube over the next 2 bits)
Now we write it as 126.96.36.199 /18 since we are 18 blocks into this address
Spin up the subnet fields.
10111111.10111111.00111111.10111111 Subnet 0 (not allowed)
10111111.10111111.01111111.10111111 Subnet 1 188.8.131.52
10111111.10111111.10111111.10111111 Subnet 2 184.108.40.206
10111111.10111111.11111111.10111111 Subnet 3 (not allowed)
The 2 bits we borrowed from the 3rd quad gives us 2 valid subnets from a single class B address. Since we began at 191 as our starting point in the 4th quad and the 3rd quad is already ones we can only have 63 host per subnet before we max out our host bits to all ones! This is not a very good candidate for subnetting but more of an exercise to make sure you get it. Here is the first host on the first subnet
10111111.10111111.01111111.11000000 Subnet 1 220.127.116.11
and the last host on the first subnet
10111111.10111111.01111111.11111110 Subnet 1 18.104.22.168
Here is a question that I pondered myself early on. What is the main difference between the 4 addresses
10000000.00000000.00000000.00000001 22.214.171.124 /16
They appear to be the same address but, they live on different networks.
When I type a ping command for 126.96.36.199 into the public internet what I am really specifying is the default mask of 255.255.0.0 or /16. I am really trying to find host 188.8.131.52 /16. The other addresses are locally administered addresses typically found inside companies intranets or "autonomous systems" (I love that word, it makes me feel smart when I say it)
Heres little advice since I am the one writing this manual. Even though slash notation is the modern way to represent an IP mask, get familiar with it represented as dotted decimal notation as well. Some test and software are not as current as you would think. You should get the gist after going through a few of these mask conversions.
/8=255.0.0.0 /16=255.255.0.0 /24=255.255.255.0
/9 =255.128.0.0 /17=255.255.128.0 /25=255.255.255.128
/10=255.192.0.0 /18=255.255.192.0 /26=255.255.255.192
/11=255.224.0.0 /19=255.255.224.0 /27=255.255.255.224
/12=255.240.0.0 /20=255.255.240.0 /28=255.255.255.240
/13=255.248.0.0 /21=255.255.248.0 /29=255.255.255.248
/14=255.252.0.0 /22=255.255.252.0 /30=255.255.255.252
/15=255.254.0.0 /23=255.255.254.0 /31=255.255.255.254
Look...Up in the Sky... It's a bird, it's a Plane, No..It's
OK, Now lets move on to supernetting. Supernetting, Route Summarization, or as it is more commonly called prefix routing.
In prefix routing we "summarize an area" by making sure all the network addresses in that area share the same value of contiguous bits in the IP Address from left to right.
This term that has it's roots in the way we used an upfront identifier to see if the address we had was a Class A, Class B, or Class C. You must know it by now from looking at the IPBuddytm The use of a 0, 10, or 110 in the first few bits of the IP Address gave us the needed information of what kind of address was about to follow. We can extend the same reasoning to a few more bits past the first three. For example let's create this address on the IPBuddytm
and for this example use the colors of the IPBuddytm to highlight the next 3 bits like so.
Now all the networks that have 10000000.00001010.000 in their address live in this area. This is really helpful when we need to abreviate the reply a router sends to other routers. What we are saying is, "all routes with this sequence of bits in their IP address can be found here" This includes addresses 184.108.40.206 up to 220.127.116.11 just like the IPBuddytm Says below.
And here are the rest of the Areas.
10000000.00001010.00100000.00000000 18.104.22.168 Area 1
10000000.00001010.01000000.00000000 22.214.171.124 Area 2
10000000.00001010.01100000.00000000 126.96.36.199 Area 3
10000000.00001010.10000000.00000000 188.8.131.52 Area 4
10000000.00001010.10100000.00000000 184.108.40.206 Area 5
10000000.00001010.11000000.00000000 220.127.116.11 Area 6
10000000.00001010.11100000.00000000 18.104.22.168 Area 7
This is one more way to slice up the IP Pie so that we can define groups of devices with one address. Keep in mind that the prefix mask is not the subnet mask. In fact we have not subnetted yet. Let's go ahead and do that with the first area 0. Slide your carrying tube over the IPBuddytm's first 24 blocks for a /24 or 255.255.255.0 mask.
What we have here is a prefix mask of 255.255.224.0 and a subnet mask of 255.255.255.0 . The yellow blocks are unavailable for the subnet mask bits so we can define 30 subnets in this area with 254 host each. This is a hierarchial addressing scheme that works well with hierarchial routing protocols such as OSPF and EIGRP (I love talking in acronyms)
So, contained in this lowly IP Address with all the mask applied we have.
Or in a nice graphical picture.
The beauty of this is that each area only has to "advertise" one route to area 0. Advertising is expensive in the IP world just like TV. It's kind of like getting your advertisement on the Super Bowl, everybody see's it (or at least knows where it can be seen)
So, in summary. SuperNetting AKA prefix routing, route summarization, route aggregation, is just another way to slice up the IP Pie. I like to think of supernetting as "stealing the network bits" to make areas and subnetting as "stealing the host bits" to create networks-- if that helps. We only got 32 bits to work with so it has to come from somewhere.
That's all for now.