The Transmission Control Protocol/Internet Protocol (TCP/IP) suite was designed and implemented by the Department of Defense (DoD) to ensure and preserve data integrity as well as maintain communications in the event of catastrophic war. TCP/IP is at the very core of all things networking, so I really want to ensure that you have a comprehensive and functional command of it.
TCP/IP and the DoD Model
The DoD model is basically a condensed version of the OSI model that comprises four instead of seven layers:
- Process/Application layer
- Host-to-Host layer/or Transport
- Internet layer
- Network Access layer/or Link
You can used the word ATINA to remember it where A=Application layer, T= Transport Layer, I = Internet Layer and NA=Network Access.
Figure 1.0 show a comparison of DoD model and OSI model, you can see the two are similar in concept, but each have different number of layers. Let explore the DoD model a little.
- Process/Application: This layer defines protocols for node-to-node application communication and controls user-interface specifications.
- The Host-to-Host Layer: This layer has paralleled the functions of the OSI’s Transport layer, defining protocols for setting up the level of transmission service for applications. It tackles issues like creating reliable end-to-end communication and ensuring the error-free delivery of data. It handles packet sequencing and maintains data integrity.
- The Internet Layer: This layer corresponds to the OSI’s Network layer, designating the protocols relating to the logical transmission of packets over the entire network. It takes care of the addressing of hosts by giving them an IP (Internet Protocol) address and handles the routing of packets among multiple networks.
- The Network Access layer: This layer implements the data exchange between the host and the network. The equivalent of the Data Link and Physical layers of the OSI model, the Network Access layer oversees hardware addressing and defines protocols for the physical transmission of data.
The DoD and OSI models are alike in design and concept and have similar functions in similar layers.
The fig 1.1 below shows the TCP/IP protocol suite and how the protocol relate to the DOD model.
The TCP/IP protocol suite.
The network address (which can also be called the network number) uniquely identifies each network. Every machine on the same network shares that network address as part of its IP address. For example, in the IP address 172.16.30.56, 172.16 is the network address. The node address is assigned to, and uniquely identifies, each machine on a network. This part of the address must be unique because it identifies a particular machine—an individual— as opposed to a network, which is a group. This number can also be referred to as a host address. In the sample IP address 172.16.30.56, the 30.56 specifies the node address.
The designers of the Internet decided to create classes of networks based on network size. For the small number of networks possessing a very large number of nodes, they created the rank Class A network. At the other extreme is the Class C network, which is reserved for the numerous networks with a small number of nodes. The class distinction for networks between very large and very small is predictably called the Class B network.
The table below summarizes the three classes of networks used to address hosts.
Network Address Range: Class A
The designers of the IP address scheme decided that the first bit of the first byte in a Class A network address must always be off, or 0. This means a Class A address must be between 0 and 127 in the first byte, inclusive.
Consider the following network address: 0xxxxxxx If we turn the other 7 bits all off and then turn them all on, we’ll find the Class A range of network addresses: 00000000 = 0 01111111 = 127 So, a Class A network is defined in the first octet between 0 and 127, and it can’t be less or more. Understand that 0 and 127 are not valid in a Class A network because they’re reserved addresses.
Network Address Range: Class B
In a Class B network, the RFCs state that the first bit of the first byte must always be turned on but the second bit must always be turned off. If you turn the other 6 bits all off and then all on, you will find the range for a Class B network: 10000000 = 128 10111111 = 191 As you can see, a Class B network is defined when the first byte is configured from 128 to 191.
Network Address Range: Class C
For Class C networks, the RFCs define the first 2 bits of the first octet as always turned on, but the third bit can never be on. Following the same process as the previous classes, convert from binary to decimal to find the range. Here’s the range for a Class C network: 11000000 = 192 11011111 = 223 So, if you see an IP address that starts at 192 and goes to 223, you’ll know it is a Class C IP address.
Network Address Ranges: Classes D and E
The addresses between 224 to 255 are reserved for Class D and E networks. Class D (224– 239) is used for multicast addresses and Class E (240–255) for scientific purposes.
Network Addresses: Special Purpose
Some IP addresses are reserved for special purposes, so network administrators can’t ever assign these addresses to nodes.
The table below show some reserved IP addresses.
Class A Addresses
In a Class A network address, the first byte is assigned to the network address and the three remaining bytes are used for the node addresses. The Class A format is as follows:
For example, in the IP address 220.127.116.11, the 49 is the network address and 22.102.70 is the node address. Every machine on this particular network would have the distinctive network address of 49.
Class A network addresses are 1 byte long, with the first bit of that byte reserved and the 7 remaining bits available for manipulation (addressing). As a result, the maximum number of Class A networks that can be created is 128. Why? Because each of the 7 bit positions can be either a 0 or a 1, thus 27 , or 128.
Additionally, the address 127, which is reserved for diagnostics, can’t be used either, which means that you can really only use the numbers 1 to 126 to designate Class A network addresses. This means the actual number of usable Class A network addresses is 128 minus 2, or 126.
Each Class A address has 3 bytes (24-bit positions) for the node address of a machine. This means there are 224—or 16,777,216—unique combinations and, therefore, precisely that many possible unique node addresses for each Class A network. Because node addresses with the two patterns of all 0s and all 1s are reserved, the actual maximum usable number of nodes for a Class A network is 224 minus 2, which equals 16,777,214. Either way, that’s a huge number of hosts on a single network segment!
Class A Valid Host IDs
Here’s an example of how to figure out the valid host IDs in a Class A network address:
A. All host bits off is the network address: 10.0.0.0.
B. All host bits on is the broadcast address: 10.255.255.255.
The valid hosts are the numbers in between the network address and the broadcast address: 10.0.0.1 through 10.255.255.254. Notice that 0s and 255s can be valid host IDs. All you need to remember when trying to find valid host addresses is that the host bits can’t all be turned off or on at the same time.
Class B Addresses
In a Class B network address, the first 2 bytes are assigned to the network address and the remaining 2 bytes are used for node addresses. The format is as follows:
For example, in the IP address 172.16.30.56, the network address is 172.16 and the node address is 30.56. With a network address being 2 bytes (8 bits each), you get 216 unique combinations. But the Internet designers decided that all Class B network addresses should start with the binary digit 1, then 0. This leaves 14 bit positions to manipulate, therefore 16,384, or 214 unique Class B network addresses. A Class B address uses 2 bytes for node addresses. This is 216 minus the two reserved patterns of all 0s and all 1s for a total of 65,534 possible node addresses for each Class B network.
Class B Valid Host IDs
Here’s an example of how to find the valid hosts in a Class B network:
- All host bits turned off is the network address: 172.16.0.0.
- All host bits turned on is the broadcast address: 172.16.255.255.
The valid hosts would be the numbers in between the network address and the broadcast address: 172.16.0.1 through 172.16.255.254.
Class C Addresses
The first 3 bytes of a Class C network address are dedicated to the network portion of the address, with only 1 measly byte remaining for the node address. Here’s the format:
Using the example IP address 192.168.100.102, the network address is 192.168.100 and the node address is 102. In a Class C network address, the first three bit positions are always the binary 110. The calculation is as follows: 3 bytes, or 24 bits, minus 3 reserved positions leaves 21 positions. Hence, there are 221, or 2,097,152, possible Class C networks. Each unique Class C network has 1 byte to use for node addresses. This leads to 28, or 256, minus the two reserved patterns of all 0s and all 1s, for a total of 254 node addresses for each Class C network.
Class C Valid Host IDs
Here’s an example of how to find a valid host ID in a Class C network:
- All host bits turned off is the network ID: 192.168.100.0.
- All host bits turned on is the broadcast address: 192.168.100.255.
The valid hosts would be the numbers in between the network address and the broadcast address: 192.168.100.1 through 192.168.100.254.
Private IP Addresses
These addresses can be used on a private network, but they’re not routable through the Internet. This is designed for the purpose of creating a measure of well-needed security, but it also conveniently saves valuable IP address space.
The Table below show the reserved IP address space
IPv4 Address Types
here are the address types that I’d like to define:
Loopback (localhost): Used to test the IP stack on the local computer. Can be any address from 127.0.0.1 through 127.255.255.254.
Layer 2 broadcasts: These are sent to all nodes on a LAN.
Broadcasts (layer 3): These are sent to all nodes on the network.
Unicast: This is an address for a single interface, and these are used to send packets to a single destination host.
Multicast: These are packets sent from a single source and transmitted to many devices on different networks. Referred to as “one-to-many.”
Layer 2 Broadcasts
First, understand that layer 2 broadcasts are also known as hardware broadcasts—they only go out on a LAN, but they don’t go past the LAN boundary (router). The typical hardware address is 6 bytes (48 bits) and looks something like 45:AC:24:E3:60:A5. The broadcast would be all 1s in binary, which would be all Fs in hexadecimal, as in ff:ff:ff:ff:ff:ff.
Every network interface card (NIC) will receive and read the frame, including the router, since this was a layer 2 broadcast, but the router would never, ever forward this!
Layer 3 Broadcasts
Then there are the plain old broadcast addresses at layer 3. Broadcast messages are meant to reach all hosts on a broadcast domain. These are the network broadcasts that have all host bits on. Here’s an example that you’re already familiar with: The network address of 172.16.0.0 255.255.0.0 would have a broadcast address of 172.16.255.255—all host bits on. Broadcasts can also be “any network and all hosts,” as indicated by 255.255.255.255.
A unicast is defined as a single IP address that’s assigned to a network interface card and is the destination IP address in a packet—in other words, it’s used for directing packets to a specific host.
Multicast does allow pointto-multipoint communication, which is similar to broadcasts, but it happens in a different manner. The crux of multicast is that it enables multiple recipients to receive messages without flooding the messages to all hosts on a broadcast domain. However, this is not the default behavior—it’s what we can do with multicasting if it’s configured correctly!
The range of multicast addresses starts with 18.104.22.168 and goes through 22.214.171.124. As you can see, this range of addresses falls within IP Class D address space based on classful IP assignment.