Previous Table of Contents Next


The Total Length field (16 bits) measures the length, in octets, of the IP datagram (the IP header plus higher-layer information). The 16-bit field allows for a datagram of up to 65,535 octets in length, although at minimum all hosts must be able to handle datagrams of 576 octets in length.

The next 32-bit word contains three fields that deal with datagram fragmentation/reassembly. The sender assigns the Identification field (16 bits) to reassemble the fragments into the datagram. Three flags indicate how the fragmentation process is to be handled:

Bit 0: Reserved (set to 0)
Bit 1: (DF) 0 = May fragment, 1 = Don’t fragment
Bit 2: (MF) 0 = Last fragment, 1 = More fragments

The last field within this word is a 13-bit Fragment Offset, which indicates where in the complete message this fragment belongs. This offset is measured in 64-bit units.

The next word in the IP header contains a time-to-live (TTL) measurement, which is the maximum amount of time that the datagram is allowed to live within the internet. When TTL = 0, the datagram is destroyed. This field is a fail-safe measure that prevents misaddressed datagrams from wandering around the internet forever. TTL may be measured in either router hops or seconds, with a maximum of 255 of either measurement. If the measurement is in seconds, the maximum of 255 seconds is equivalent to 4.25 minutes (a long time to be “lost” within today’s high-speed internetworks).

The Protocol field (8 bits) identifies the higher-layer protocol following the IP header. Examples include:

Decimal Keyword Description

1 ICMP Internet ControlMessage Protocol
6 TCP Transmission Control Protocol
17 UDP User Datagram Protocol

RFC 1700, “Assigned Numbers” [6-4], provides a more detailed listing of the protocols defined. A 16-bit Header Checksum completes the third 32-bit word.

The fourth and fifth words of the IP header contain the Source and Destination Addresses, respectively. Addressing may be implemented at several architectural layers. For example, hardware addresses are used at the ARPA Network Interface layer (or OSI Data Link layer) and are associated with a specific network interface card, usually burned into an address ROM on the card. The addresses within the IP header are the Internet layer (or OSI Network layer) addresses. The Internet address is a logical address that routes the IP datagram through the Internet to the correct host and network (LAN, MAN, or WAN).

6.3 Internet Addressing

Each 32-bit IP address is divided into Host ID and Network ID sections, and may take one of five formats, Class A through E addresses, as shown in Figure 6-4. The formats differ in the number of bits allocated to the Host and Network IDs and are identified by the first three bits. Class A addresses are designed for very large networks having many hosts; they are identified by Bit 0 = 0. Bits 1 through 7 identify the network, and Bits 8 through 31 identify the specific host on that network. With a seven-bit Network ID, only 128 class A addresses are available. Of these, addresses 0 and 127 are reserved.


Figure 6-4.  IP address formats

Class B addresses are designed for corporate internetworks having multiple LANs. Class B addresses are identified by the first two bits having a value of 10 (binary). The next 14 bits identify the Network and the remaining 16 bits identify the Host. As many as 16,384 Class B addresses are possible, with addresses 0 and 16,383 reserved.

Class C addresses are generally used for smaller networks such as LANs. Class C addresses begin with a binary 110. The next 21 bits identify the Network, and the remaining 8 bits identify the Host. A total of 2,097,152 Class C addresses are possible, with addresses 0 and 2,097,151 reserved.

Class D addresses begin with a binary 1110 and are intended for multicasting. Class E addresses begin with a binary 1111 and are reserved for future use.

All IP addresses are written in dotted decimal notation, in which each octet is given a decimal number from 0 to 256. For example, network 10.56.31.84 is represented in binary as

00001010 00110111 00011111 1010100

  The first bit (0) indicates a Class A address.
  The next seven bits (0001010) represent the Network ID (decimal 10).
  The last 24 bits (00110111 00011111 1010100) represent the Host ID.

Class A addresses begin with 1-127, Class B with 128-191, Class C with 192-223, and Class D with 224-254. Thus, an address of 150.100.200.5 is easily identified as a Class B address.

IP addresses may be divided into two fields that identify a Network and a Host. A central authority assigns the Network ID, and the network administrator assigns the Host ID. Routers send a packet to a particular network (using the Network ID), and then the Network completes the delivery to the particular Host.

If an organization had two networks, it could request two Network ID assignments from the central authority. Unfortunately, this would cause the routing tables within Hosts and Routers to greatly expand. As more Network IDs were assigned, the routing tables would continue to grow. The popularity of LANs in the mid-1980s inspired the Internet community to revise the IP address structure to allow for an additional field that would identify a subnetwork within an assigned Network ID. Thus the Network, Host address has been replaced with Network, Subnetwork, Host. The space required for the Subnetwork field comes from reducing the Host field. The central authority assigns the Network ID, and the individual organization assigns the Subnetwork IDs as well as the Host IDs on each subnetwork.


Previous Table of Contents Next