Thursday 20 August 2015

How NAT Works

Okay, now it's time to look at how this whole NAT thing works. I'm going to start by using Figure 11.2 to describe the basic translation of NAT.
In the example shown in Figure 11.2, host 10.1.1.1 sends an outbound packet to the border router configured with NAT. The router identifies the IP address as an inside local IP address destined for an outside network, translates the address, and documents the translation in the NAT table.

The packet is sent to the outside interface with the new translated source address. The external host returns the packet to the destination host and the NAT router translates the inside global IP address back to the inside local IP address using the NAT table. This is as simple as it gets.

Let's take a look at a more complex configuration using overloading, or what is also referred to as Port Address Translation (PAT). I'll use Figure 11.3 to demonstrate how PAT works. With overloading, all inside hosts get translated to one single IP address, hence the term overloading . Again, the reason we have not run out of available IP addresses on the Internet is because of overloading (PAT).

Take a look at the NAT table in Figure 11.3 again. In addition to the inside local IP address and outside global IP address, we now have port numbers. These port numbers help the router identify which host should receive the return traffic.


Port numbers are used at the Transport layer to identify the local host in this example. If we had to use IP addresses to identify the source hosts, that would be called static NAT and we would run out of addresses. PAT allows us to use the Transport layer to identify the hosts, which in turn allows us to use (theoretically) up to 65,000 hosts with one real IP address.

1 comment:

  1. DUDE! You STOLE MY chapters from my book and posted it here! You're a piece of shit! This is copied directly from my CCNA R/S Cisco Study Guide! Get this off your site now! EVERYTHING ON YOUR SITE IS STOLEN
    YOU'RE A LOSER!

    ReplyDelete