System information
Troubleshooting TCP/IP 7-93
Addressing
The fields of the IP packet are as follows:
• Version—Indicates the version of IP currently used.
• IP header length (IHL)—Indicates the datagram header length in 32-bit words.
• Type-of-service—Specifies how a particular upper-layer protocol would like the current
datagram to be handled. Datagrams can be assigned various levels of importance through this
field.
• Total length—Specifies the length of the entire IP packet, including data and header, in bytes.
• Identification—Contains an integer that identifies the current datagram. This field is used to help
piece together datagram fragments.
• Flags—A 3-bit field of which the low-order 2 bits control fragmentation. One bit specifies
whether the packet can be fragmented; the second bit specifies whether the packet is the last
fragment in a series of fragmented packets.
• Time-to-live—Maintains a counter that gradually decrements down to zero, at which point the
datagram is discarded. This keeps packets from looping endlessly.
• Protocol—Indicates which upper-layer protocol receives incoming packets after IP processing is
complete.
• Header checksum—Helps ensure IP header integrity.
• Source address—Specifies the sending node.
• Destination address—Specifies the receiving node.
• Options—Allows IP to support various options, such as security.
• Data—Contains upper-layer information.
Addressing
As with all network-layer protocols, the addressing scheme is integral to the process of routing IP
datagrams through an internetwork. An IP address is 32 bits in length, divided into either two or three
parts. The first part designates the network address; the second part (if present) designates the subnet
address; and the final part designates the host address. Subnet addresses are present only if the
network administrator has decided that the network should be divided into subnetworks. The lengths
of the network, subnet, and host fields are all variable.
IP addressing supports five different network classes, and the far left bits indicate the network class:
• Class A networks are intended mainly for use with a few very large networks because they
provide only 7 bits for the network address field.
• Class B networks allocate 14 bits for the network address field and 16 bits for the host address
field. This address class offers a good compromise between network and host address space.
• Class C networks allocate 22 bits for the network address field. Class C networks provide only 8
bits for the host field, however, so the number of hosts per network may be a limiting factor.
• Class D addresses are reserved for multicast groups, as described formally in RFC 1112. In Class
D addresses, the 4 highest-order bits are set to 1, 1, 1, and 0.
• Class E addresses are also defined by IP but are reserved for future use. In Class E addresses, the
4 highest-order bits are all set to 1.
IP addresses are written in dotted decimal format (for example, 34.10.2.1). Figure 7-3 shows the
address formats for Class A, B, and C IP networks.