router

term

networking

A device that forwards packets between networks by choosing a next hop from a routing table.

The decision is per packet and purely local: a router does not know the path, only the next step, and the packet's journey is the sum of independent choices made by machines that never coordinate. That is why traceroute shows a path that may not be the path the next packet takes, and why routing problems are often asymmetric - the way out and the way back are decided by different devices with different tables.

RFC 1812, the requirements for IPv4 routers, describes the forwarding step in one sentence: the router 'generally removes the Link Layer header a message was received with, modifies the IP header, and replaces the Link Layer header for retransmission'. The modification is the time-to-live: every router decrements it and drops the datagram when it reaches zero, so a routing loop, unlike a switching loop, burns itself out, and traceroute works by provoking exactly those drops one hop at a time.

What a router does not change on its own is the source and destination IP address. Those survive end to end unless something translates them, which is why a capture at the server shows the client's address only when no network address translation stands between them, and why the MAC addresses on either side never match at all.

Also known as: routing

← All glossary entries