TCP/IP - Numbers
One of the very first concepts that anyone getting on the internet for the first time must confront is this thing called a TCP/IP address. I know most people have seen this for the first time when they purchased our first DSL or cable modem connection. Those people on dialup lines may have been exposed to the concept while surfing the internet, or when they tried to add a second computer to their household network. In any event, a personal computer must have a TCP/IP address to be able to connect to the internet at all (dialup users just don't see this number directly).
So what the heck is a TCP/IP address?
It's actually a very simple concept - a TCP/IP address is a way to identify your computer, in much the same way that a state uses a driver's license number to identify a driver, or the government uses a social security number to identify a person. That's really all that a TCP/IP number does - it allows other computers on the internet to send you information and receive information from you (well, your computer).
A TCP/IP address consists of four numbers, each of which is between 0 and 255 (there are some restrictions on what some of these numbers mean). The numbers are separated by periods. Each of these numbers is called an octet.
They are called octet's because each consists of eight bits. A bit is a single binary digit, which can be a zero or a one. This is the language that a computer talks - zeroes and ones. So while you see the number as decimal digits the computer sees it as binary (0 and 1) digits.
For example, your TCP/IP address might be 63.123.4.0 or 99.34.2.1. These are represented at the machine level as:
IP Address
Binary Translations
63.123.4.0 00111111.01111011.00000100.00000000 99.34.2.1 01100011.00100010.00000010.00000001
Why is this important? Well, the internet has been designed to understand the binary values of this number. How so? The first few binary digits define what the remainder mean. The chart below shows how this looks.
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
--+-------------+------------------------------------------------
Class A |0| Network | Host Number |
|-+-+-----------+---------------+-------------------------------|
Class B |1|0| Network | Host Number |
|-+-+-+-------------------------+---------------+---------------|
Class C |1|1|0| Network | Host Number |
|-+-+-+-+---------------------------------------+---------------|
Class D |1|1|1|0| Multicast ID |
|-+-+-+-+-------------------------------------------------------|
Class E |1|1|1|1| Experimental ID |
--+-+-+-+--------------------------------------------------------
These classes are as follows:
-
A class A address is intended for large networks. They can address 16,777,216 (224) hosts on 126 different networks. The first digit will be between 1 and 126.
-
Class B addresses are for medium size networks. They can address up to 65,536 (216) hosts per network and the first digit will be between 128 and 191.
-
Class C addresses are for small networks. They can address 254 (28-2) hosts per network, and the first digit will be a number between 192 and 223.
-
Class D addresses are intended for multicasts. These begin with a value between 224 and 239. A multicast is a packet sent to multiple hosts (computers).
-
Class E addresses are intended for experimental uses (whatever that means) and will begin with a value between 240 and 255
Some special values include:
-
If the host id is zero (all binary bits equal to zero), it is a reference to the entire subnetwork. Thus, 63.0.0.0 refers to the network 63.
-
If the host id is all ones (written as 255 or -1) it means this is a broadcast address. Thus, 63.255.255.255 is a broadcast to all hosts in the 63 network.
-
A network id of 127 means loopback, and 127.0.0.1 means the local system. You can always ping 127.0.0.1, which pings your current machine.
-
Any network id of 10, 172 and 192 is reserved for an internal network. These addresses will not appear on the internet, but are intended for intranets.