Information Technology Reference
In-Depth Information
amount of time that a destination IP node should wait for the next datagram fragment.
Protocol (8 bits). Different IP protocols can be used on the datagram. The 8-bit proto-
col field defines the type to be used. A full list is given later in Table 23.5 (Section
23.16.1). Typical values are: 1 = ICMP and 6 = TCP.
Header checksum (16 bits). The header checksum contains a 16-bit pattern for error
detection. As values within the header change from gateway to gateway (such as the
time-to-live field), it must be recomputed every time the IP header is processed. The al-
gorithm is:
The 16-bit 1's complement of the 1's complement sum of all the 16-bit words in the
header. When calculating the checksum the header checksum field is assumed to be set to
a zero.
Source and destination IP addresses (32 bits). The source and destination IP
addresses are stored in the 32-bit source and destination IP address fields.
Options . The options field contains information such as debugging, error control and
routing information. Section 23.16.2 gives further information.
23.5 ICMP
Messages, such as control data, information data and error recovery data, are carried between
Internet hosts using the Internet control message protocol (ICMP). These messages are sent
with a standard IP header. Typical messages are:
Destination unreachable (message type 3) - sent by a host on the network to say that a
host is unreachable. The message can also include the reason the host cannot be reached.
Echo request/echo reply (message type 8 or 0) - used to check the connectivity between
two hosts. The ping command uses this message, where it sends an ICMP 'echo request'
message to the target host and waits for the destination host to reply with an 'echo reply'
message.
Redirection (message type 5) - sent by a router to a host that is requesting its routing ser-
vices. This helps to find the shortest path to a desired host.
Source quench (message type 4) - used when a host cannot receive any more IP packets
at the present (or reduce the flow).
An ICMP message is sent within an IP header, with the version field, source and destination
IP addresses, and so on. The type of service field is set to a 0 and the protocol field is set to a
1 (which identifies ICMP). After the IP header, follows the ICMP message, which starts with
three fields, as per Figure 23.4. The message type has eight bits and identifies the type of
message, as given in Table 23.1. The code fields are also eight bits long and a checksum
field is 16 bits long. The checksum is the 1's complement of the 1's complement sum of all
16-bit words in the header (the checksum field is assumed to be zero in the addition).
The information after this field depends on the type of message, such as:
Search WWH ::




Custom Search