Computer Networks Questions & Answers – ICMP

This set of Computer Networks Multiple Choice Questions & Answers (MCQs) focuses on “ICMP”.

1. Internet Control Message Protocol (ICMP) has been designed to compensate _________
a) Error-reporting
b) Error-correction
c) Host and management queries
d) All of the mentioned
View Answer

Answer: d
Explanation: IP by itself does not provide the features of error reporting or error correction. So, to address these issues a network layer protocol called Internet Control Message Protocol is used. ICMP operates over the IP packet to provide error reporting functionality.

2. Header size of the ICMP message is _________
a) 8-bytes
b) 8-bits
c) 16-bytes
d) 16-bits
View Answer

Answer: a
Explanation: An ICMP message has an 8-byte header and a variable size data section. Out of the 8 bytes, the first 4 bytes are of a fixed format having the type, code and checksum fields and the next 4 bytes depend upon the type of the message.

3. During error reporting, ICMP always reports error messages to ________
a) Destination
b) Source
c) Next router
d) Previous router
View Answer

Answer: b
Explanation: ICMP notifies the source about the error when an error is detected because the datagram knows information about source and destination IP address. The source can then retransmit the data again or try to correct those errors.
advertisement
advertisement

4. Which of these is not a type of error-reporting message?
a) Destination unreachable
b) Source quench
c) Router error
d) Time exceeded
View Answer

Answer: c
Explanation: Router error is not a type of error-reporting message in ICMP. The type of error reporting message is specified in the ICMP header. Destination unreachable is type 3 error message, source quench is type 4, and time exceeded is type 11 error message.

5. ICMP error message will not be generated for a datagram having a special address such as _______
a) 127.0.0.0
b) 12.1.2
c) 11.1
d) 127
View Answer

Answer: a
Explanation: 127.0.0.0 is a special address known as the loopback address which is used for testing purpose of a machine without actually communicating with a network. Thus no error reporting message will be generated for such special addresses.

6. When a router cannot route a datagram or host cannot deliver a datagram, the datagram is discarded and the router or the host sends a ____________ message back to the source host that initiated the datagram.
a) Destination unreachable
b) Source quench
c) Router error
d) Time exceeded
View Answer

Answer: a
Explanation: Router sends destination unreachable message if the destination is not found. Destination unreachable is type 3 error reporting message. It is invoked when the router can’t find a path to the intended destination to forward the packet through.

7. The source-quench message in ICMP was designed to add a kind of ____________ to the IP.
a) error control
b) flow control
c) router control
d) switch control
View Answer

Answer: b
Explanation: Firstly, it informs the source that the datagram has been discarded. Secondly, it warns the source that there is congestion in the network. It’s type 4 error reporting message after which the source is expected to reduce the flow of packets.
advertisement

8. In case of time exceeded error, when the datagram visits a router, the value of time to live field is _________
a) Remains constant
b) Decremented by 2
c) Incremented by 1
d) Decremented by 1
View Answer

Answer: d
Explanation: This field will be decremented by 1 at every router, and will be zero by the time it reaches source. This error reporting message is type 11 and is used to prevent the router from travelling forever in case some unknown path anomaly occurs.

9. Two machines can use the timestamp request and timestamp replay messages to determine the ___________ needed for an IP datagram to travel between them.
a) Half-trip time
b) Round-trip time
c) Travel time for the next router
d) Time to reach the destination/source
View Answer

Answer: b
Explanation: The round-trip time refers to the total time taken combining the time taken for a packet sent from a source to reach a destination and the time taken the acknowledgement sent by the destination to reach the source. The Router sends destination unreachable message if the destination is not found.
advertisement

10. During debugging, we can use the ____________ program to find if a host is alive and responding.
a) traceroute
b) shell
c) ping
d) java
View Answer

Answer: c
Explanation: Ping program is used to find if a host is alive and responding. It is to be entered into a command line with the syntax “ping (IP address)” to be executed. Traceroute is a program used to find the shortest route to the destination IP.

11. In windows ____________ can be used to trace the route of the packet from the source to the destination.
a) traceroute
b) tracert
c) ping
d) locater
View Answer

Answer: b
Explanation: Tracert is used in case of windows, whereas Traceroute in UNIX. Tracert is a program used to find the shortest route to the destination IP. The Router sends destination unreachable message if a path to the destination IP is not found.

12. In a simple echo-request message, the value of the sum is 01010000 01011100. Then, value of checksum is ___________
a) 10101111 10100011
b) 01010000 01011100
c) 10101111 01011100
d) 01010000 10100011
View Answer

Answer: a
Explanation: The sender side adds the bits of the fragmented packet to find a sum. Checksum is the compliment of the sum (exchange 0’s and 1’s). The receiver then has to verify the checksum by adding the bits of the received packet to ensure that the packet is error-free.

Sanfoundry Global Education & Learning Series – Computer Networks.

To practice all areas of Computer Networks, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.