Week 4

NAT (Network Address Translation) and PAT (Port Address Translation) are two vital technologies we were essentially forced into adopting to overcome the shortcomings of IPv4 addresses.

When IPv4 came out, it used a 32-bit system of numbers to represent a unique device id, sort of like a house address which gave us about 4.3 billion addresses to work with. However, when the internet started gaining popularity, everyone and their mother started claiming IP addresses left and right and created an issue where we would quickly be running out of addresses.

To combat this, NAT and PAT were developed which allow one IP external Address to be used by several (potentially tens of thousands) internal private devices at once. PAT works in combination with NAT by assigning a port number to any traffic leaving the LAN and keeping note of it. NAT then changes the private internal IP address to the single public address assigned by the ISP and appends the port information from PAT to the IP packet.
When the packet is received by the destination server, the server sees that it comes from the public IP with a port attached to it. When the server replies to the packet, it sends it back to the public IP with the same port number that PAT assigned.

When the packet returns to the LAN, PAT sees the port, and is able to re-translate it to the internal IP address and deliver the packet to the proper device.

Several years later, IPv6 came out which uses a 128-bit address which completely solves the limited IPv4 address problem. That is, until we create 340,282,366,920,938,463,463,374,607,431,768,211,456 devices.

Comments

Popular posts from this blog

Week 1

Week 5