ICMP
Internet Control Message Protocol Information
ICMP is very important in IP protocols because IP protocol has no error-reporting or error correction method. Therefore, it becomes a critical situation when something goes wrong with a datagram. What would happen if a router must discard a datagram because it could not find a router to the final destination or because it had not received all the fragments within a predetermined time limit? All these are very critical. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is s companion to an IP protocol. In ICMP error reporting, messages report problems that a router or a host may encounter when it processes an IP packet. An ICMP message has an 8 byte header and a variable size data section.
Ping program to find if a host is alive and responding. We use ping here to see how it uses ICMP packets. The source host sends ICMP echo-request messages (type: 8, code: 0); the destination, if alive, responds with ICMP echo-reply messages. The ping program sets the identifier field in the echo-request and echo-reply message and starts the sequence number from 0; this number is incremented by 1 each time a new message is sent. Note that ping can calculate the round-trip time. It inserts the sending time in the data section of the messages. When the packet arrives, it subtracts the arrival time from the departure time to get the round-trip time (RTT).
The ping program sends messages with sequence numbers starting from 0. For each probe it gives us the RTT time. The TTL (time to live) field in the IP datagram that encapsulates an ICMP message has been set to 62, which means the packet can't travel more than 62 hops. At the beginning, ping defines the number of data bytes as 56 and the total number of bytes as 84. it is obvious that if we add 8 bytes of ICMP header and 20 bytes of IP header to 56, the result is 82. Note that in each probe ping defines the number of bytes as 64. This is the total number of bytes in the ICMP packet (56+8). The ping program continues to send messages, if we do not stop it by using the interrupt key (ctr+c). After it is interrupted, it prints the statistics of the probes. It tells us the number of packets sent, the number of packets received, the total time, and RTT minimum, maximum, and average. Some systems may print more information.
Prot | Protocol | Description |
| 7 | Echo | Echoes a received datagram back to the sender |
| 9 | Discard | Discards any datagram that is received |
| 11 | Users | Active users |
| 13 | Daytime | Returns the date and the time |
| 17 | Quote | Returns quote of the day |
| 20 | FTP, Data | File Transfer Protocol (data connection) |
| 21 | FTP, Control | File transfer protocol (control connection) |
| 23 | TELNET | Terminal network |
| 25 | SMTP | Simple Mail transfer protocol |
| 53 | DNS | Domain name server |
| 67 | BOOTP | Bootstrap protocol |
| 79 | Finger | Finger |
| 80 | HTTP | Hypertext transfer protocol |
| 111 | RPC | Remote Procedure call |
0 comments:
Post a Comment