Introduction to TCP/IP |
The IP routing processes on all nodes involved in the delivery of an IP packet includes: the sending host, the intermediate routers, and the destination host.
When a packet is sent by a sending host, the packet is handed from an upper layer protocol (TCP, UDP, or ICMP) to IP. IP on the sending host does the following:
If no route is found, IP indicates a routing error to the upper layer protocol (TCP, UDP, or ICMP).
When a packet is received at a router, the packet is passed to IP. IP on the router does the following:
If the IP header checksum fails, the IP packet is discarded without notification to the user. This is known as a silent discard.
If so, the router processes the IP datagram as the destination host (see step 3 in the following "IP on the Destination Host" section).
If the TTL is 0, the router discards the packet and sends an ICMP Time Expired-TTL Expired message to the sender.
If no route is found, the router discards the packet and sends an ICMP Destination Unreachable-Network Unreachable message to the sender.
This entire process is repeated at each router in the path between the source and destination host.
When a packet is received at the destination host, it is passed up to IP. IP on the destination host does the following:
If the IP header checksum fails, the IP packet is silently discarded.
If the destination IP address is not assigned to the host, the IP packet is silently discarded.
If the protocol does not exist, ICMP sends a Destination Unreachable-Protocol Unreachable message back to the sender.
If no application exists for the UDP port number, ICMP sends a Destination Unreachable-Port Unreachable message back to the sender. If no application exists for the TCP port number, TCP sends a Connection Reset segment back to the sender.