Transport Control Protocol/Internet Protocol was developed by the U.S. Dept. of Defense in 1973. TCP/IP is the de facto protocol for WANs (Wide Area Networks) and the Internet which itself is effectively a world wide WAN. The standards for TCP/IP are published as RFCs by the IETF.
TCP/IP is composed of two communications protocols for transferring data, files, and e-mail on a network of computers of nearly any make and model:
An IP Address is a unique identifying number to each host (computer, workstation, server, router, etc.) on a TCP/IP network. It is a a 32 digit binary number that may also be expressed in the following ways:
| Example | Format |
00001010000000010001011100001000 |
32 bits |
00001010 00000001 00010111 00001000 |
4 bytes |
00001010 00000001 00010111 00001000 |
4 sets of 8 bits |
00001010.00000001.00010111.00001000 |
4 octets of binary numbers |
10.1.23.8 |
4 decimal numbers |
The number of combinations for a 32 bit number is 2 ^32 or 4^256 or roughly 4.3 billion different IP addresses.
The IP address actually has two parts:At what digit the Network ID ends and the Host ID ends depends on what network or subnetwork you are on. A Subnet Mask is used on an IP address to filter out the the Host ID and leave the Network ID. A subnet mask utilizes how the AND operation works on binary numbers. Basically, given two binary numbers, an AND operation will return a 1 if and only if both the numbers are one. Thus a subnet mask is 32 bit number where the positions for the Network ID are 1 and the positions for the Host ID are 0. When a Subnet Mask is ANDed with an IP address, it returns the Host ID.
EG:
192. 2. 9. 22 (arbitrary IP address in decimal) 252. 255. 255. 0 (Subnet Mask in decimal) ----------------------------------- 192. 2. 9. 0 (Network ID in decimal after AND operation)
This is because:
11000000.00000010.00001001.00010110 (arbitrary IP address in binary) 11111111.11111111.11111111.00000000 (Subnet Mask in binary) ----------------------------------- 11000000.00000010.00001001.00000000 (Network ID in binary after AND operation)
The InterNIC governs how IP addresses are assigned to networks. They divide the networks into Classes A through E.
| Network Class |
First Octet in Binary & Decimal |
Octets Used for Network IDs |
# Networks IDs Available |
Octets Used for Host IDs |
# Host IDs Available per Network ID |
Default Subnet Mask in Binary & Decimal |
|---|---|---|---|---|---|---|
| A (/8) |
0xxxxxxxx
|
1st | 126 | 2nd, 3rd & 4th | 16,777,214 |
11111111.
|
| B (/16) |
10xxxxxx
|
1st & 2nd | 16,382 | 3rd & 4th | 65,534, |
11111111.
|
| C (/24) |
110xxxxx
|
1st, 2nd & 3rd | 2,097,150 | 4th | 254 |
11111111.
|
| D |
1110xxxx
|
Reserved for multicasting | ||||
| E |
1111xxxx
|
Reserved for future & experimental use. | ||||
The number of networks or hosts available is calculated with 2^n -2, where n is the number of bits available to toggle, and the 2 is subtracted so there are no scenarios where the toggled bits are all 0s or all 1s. EG: In Class B the 1st and 2nd octets are used for network IDs but only the last 14 bits of the two octets are available to toggle, thus there are 2^14 -2 = 16,384 -2 = 16,382 network IDs possible. Also in Class B, the 3rd and 4th octets are used for host IDs thus there are 2^16 -2 = 65,536 -2 = 65,534 host IDs are possible per network ID.
Although a 32 bit number has roughly 4.3 billion possibilities, only Class A, B, and C networks available, i.e. only 126 + 16,382 + 2,097,150 = 2,113,658 networks available. Most of these have been almost arbitrarily grabbed by miscellaneous entities, including backbone ISPs, universities, and government agencies. What about the rest of us?!
They have been working on a more permanent solution but they have been using subnetting as a workaround for years. (The current version of IP is also called IPv4, the next version is IPv6) Subnetting was introduced as an RFC in 1985. Subnetting basically borrows bits from the the octets set aside for Host IDs, and uses them to make subnets. That is, whereas before you had Network IDs and Host IDs, now you have Network IDs, Subnet IDs, and Host IDs.
The number of Subnet IDs and Host IDs available, depends on how many bits you borrow. How many bits you can borrow, depends on what class of network you are in. The same formula as before is used. You cannot borrow only 1 bit, since if you borrowed 1, then 2^1 -2 = 2 -2 = 0 Subnet IDs which is not allowed. You must also leave at least 2 bits for the Host IDs since if you left only 1, then 2^1 -2 = 2 -2 = 0 Host IDs which is not allowed.
Here are Subnet tables that I have oh so carefully hand crafted (so you'd better appreciate them):
Class A Subnet Subnet IDs Host IDs # bits Mask Available Available borrowed per Network per Subnet -------- --------------- ----------- --------- 2 255.192.0.0 2 4,194,302 3 255.224.0.0 6 2,097,150 4 255.240.0.0 14 1,048,574 5 255.248.0.0 30 524,286 6 255.252.0.0 62 262,142 7 255.254.0.0 126 131,070 8 255.255.0.0 254 65,534 9 255.255.192.0 510 32,766 10 255.255.224.0 1,022 16,382 11 255.255.240.0 2,046 8,190 12 255.255.248.0 4,094 4,094 13 255.255.252.0 8,190 2,046 14 255.255.254.0 16,382 1,022 15 255.255.254.0 32,766 510 16 255.255.255.0 65,534 254 17 255.255.255.192 131,070 126 18 255.255.255.224 262,142 62 19 255.255.255.240 524,286 30 20 255.255.255.248 1,048,574 14 21 255.255.255.252 2,097,150 6 22 255.255.255.254 4,194,302 2
Class B Subnet Subnet IDs Host IDs # bits Mask Available Available borrowed per Network per Subnet -------- --------------- ----------- --------- 2 255.255.192.0 2 16,382 3 255.255.224.0 6 8,190 4 255.255.240.0 14 4,094 5 255.255.248.0 30 2,046 6 255.255.252.0 62 1,022 7 255.255.254.0 126 510 8 255.255.255.0 254 254 9 255.255.255.128 510 126 10 255.255.255.192 1,022 62 11 255.255.255.224 2,046 30 12 255.255.255.240 4,094 14 13 255.255.255.248 8,190 6 14 255.255.255.252 16,382 2
Class C Subnet Subnet IDs Host IDs # bits Mask Available Available borrowed per Network per Subnet -------- --------------- ----------- --------- 2 255.255.255.192 2 62 3 255.255.255.224 6 30 4 255.255.255.240 14 14 5 255.255.255.248 30 6 6 255.255.255.252 62 2So the rest of us are subnetted to the existing Class A, B, or C Networks.
An IP address may be translated to a domain name by a DNS (Domain Name Server), eg 12.9.0.45 = www.somewebsite.com. See my article on Computer IDs.
For a TCP/IP client to communicate, it needs an IP address and a subnet mask.
For a TCP/IP client to communicate through a router, it needs an IP address, a subnet mask, and a default gateway. A default gateway is where a packet is sent if its destination is outside of the current network.
A TCP/IP connection is connection oriented, i.e. a communication session is established before data is transmitted. TCP utilizes checksum for data integrity. TCP/IP utilizes sockets, i.e. the IP address and port at that IP address, as the endpoints in transmissions.
Here are some TCP/IP utilities that I know work on Windows:
Here are some other TCP/IP utilities:
Page Modified: (Hand noted: 2007-09-13 21:19:55Z) (Auto noted: 2007-11-17 06:38:49Z)