04 Try it yourself Interactive

Three hosts, one public address, and the table that keeps them apart

The same three machines from section 02, the same single public address 203.0.113.5, and all three opening a connection to 198.51.100.7:80. Host 1 and Host 2 have both picked source port 50000, independently and legally, and watching the router resolve that collision is the point of the whole exercise. Each step shows the packet as it arrived at the router and, once the router has actually forwarded it, as it left, with every field the router changed marked in rose. The translation table below grows as rows are written; a green row was just created and an indigo row is the one an arriving reply matched. Nothing plays on its own: Next, Back and Reset, or the arrow keys.

PAT · one public address
translation table empty, nothing sent yet
Indigo is the box transmitting. Amber is a box that received the packet. Green is a row that was just written, a field the router left alone, or a host receiving its reply. Rose is a field the router rewrote, or a packet with no row to match and therefore dropped.
Press Next to begin. Each press moves the story one step.


      
Active translations0
Packets translated0
Public ports in use0
step 0 / 0

Every address here is real address space used correctly: 192.168.1.0/24 is RFC 1918 private, and 203.0.113.0/24, 198.51.100.0/24 and 192.0.2.0/24 are the three ranges RFC 5737 reserves for documentation so that no example ever names somebody’s real machine.