You are correct that the book says something different. To the best of my knowledge, it is incorrect. I do not find any mention of that in RFC 768, (
nor do I find any mention of it in a quick 20 minute search on the internet.
According to the RFC, there is no field in the datagram to state a sequence number. So you cannot, for example, say that this is datagram 6 out of a total of 10; each datagram is an entity unto itself and does not refer to any other related datagram (the
data contained within the datagram could, but this error checking would be handled by the application, not the protocol).
Let's look at a couple of scenarios.
1: The receiving party gets a malformed or "bad" datagram. It could then send an ICMP request back to the sender (even though the RFC does not say to) but it would be of no use whatsoever. The sender would have no way of knowing that the ICMP packet is related to any datagrams that have been sent, nor which particular datagram it is in response to. Indeed, the receiver
could have sent the ICMP from a totally unrelated application and port, for a totally unrelated reason.
2: The receiving party misses a datagram. Since there is no time frame in which to expect the datagram, and there is no sequence number in the datagram, the receiver
does not know that it missed anything. It sits and waits for the next datagram to come along, whenever that might be.
I hate to argue with a published author, but I see no reference to the mechanism he describes. If anyone can show me differently, I welcome the opportunity to become better educated on the subject.
--
The stagehand's axiom: "Never lift what you can drag, never drag what you can roll, never roll what you can leave.