This article goes in depth on
MAC Address - Review
A
Clue: Think of a MAC address like a person's diver's license number, it is just a number that is unique from anyone else's. Now think of an
Enter the IP address
The IP address provides the grouping capability that MAC addresses do not. An IP address not only provides a grouping hierarchy but can be freely assigned and moved from one host to another. This grouping capability allows a host to differentiate local computers and distant ones so that communication to a host that is local could be direct and communication to a distant host could be efficiently routed.
Big Picture
Ok that is a quick discussion of why you need TCP/IP and its routing capabilities. Here is the real meat: TCP/IP addressing is actually in
I highly recommend that you brush up on binary before going any further. Make sure you can convert between decimal and binary numbers. Once again, refer to our tutorial on binary.
The Internet before subnet masks
Early on, to get IP address space on the Internet you were assigned a class A, B, or C block of addresses. A class A block was an address similar to: 124.xxx.xxx.xxx Where the Xs are address numbers between 0 and 255.
Since each segment of an IP address is 8 bits long, and there are 4 segments, it takes 32 bits to make up a whole IP address. From the example above, we can calculate the total number of
Class | Address Range | Total Hosts | Number of blocks |
A | 0-127.XXX.XXX.XXX | 16.7 Million | 128 |
B | 128.0.0.0- 191.255.255.255 | 65.5 Thousand | 16,384 |
C | 192.0.0.0- 223.255.255.255 | 256 | 2 million |
D & E | 224.0.0.0- 255.255.255.255 | N/A | N/A |
I also listed the Classes D & E which are out of the scope of this article. Class D networks are for
There is something significant about the addresses for a Class A, B, and C Block. If you were to convert the decimal value of each class to binary you can see that there is a pattern in the most significant bits. See table below:
Class | First 4 bits |
A | 0XX |
B | 10X |
C | 110 |
Although this pattern made it immediately obvious to routers what type of address block they were dealing with, it was also very innefficient with the address space.
Enter the Subnet Mask
Similar to the first 3 bits of an IP address that make a class, the subnet mask is now used instead to determine the size of an address block. Most people are familiar with an address followed by a subnet mask of 255.255.255.0 Calculated out, this subnet mask allows for up to 254 hosts. So if the address of a computer is 63.26.15.5 and the subnet mask is 255.255.255.0 there are 253 other addresses on this network block ranging from 63.26.15.1 - 63.26.15.254 (the .0 and .255 addresses are reserved and cannot be asigned to a network host).
From this a newbie can easily surmise that an address of 45.52.75.10 with a subnet mask of 255.255.0.0 allows for 256 times 256 minus 2 addresses (65,534 addresses). These addresses range from 45.52.0.1 to 45.52.255.254 Again we subtract two from the total number because of those two reserved addresses that are at the beginning and end of the block.
Clue: Determining the number of hosts in your subnet is always done by caculating the number of bits used for the host address (there are 8 bits for a mask of 255.255.255.0 for example). Set 2 to the Nth power where N is the total number of host addrress bits, then subtract 2.
In other words (2^8) - 2=254.
Clue: All address blocks (subnets) will be 2 less of each power of 2: 6, 14, 30, 62, 126, 254..... That is because in each address block we must reserve space for a
Unfortunately if you leave yourself with only the ability to declare subnet masks using the number 255 or 0 you have very few options. The smallest subnet you know how to make is 254 hosts. The next article is where the real lesson begins!
However, if you are not up to learning how to calculate your own masks, we have also provided a subnet mask reference table. Just be warned that we will take to responsibility for your sleepless nights as you ponder how a subnet mask actually works.
No comments:
Post a Comment