
A decade ago not too many people thought of having more than one PC at home. But today, having two or more personal computers is almost a necessity for many people. Back then, there was also only a small portion of home computer users subscribing to ADSL or Internet over cable. Currently, more and more people are subscribing to these broadband services.
The IP addressing scheme was not implemented with the extreme growth of the internet and the services related to it in mind. At the beginning, the problem of running out of IP addresses was just a theoretical one that could possibly happen in the far away future. But the future is here! The problem is not theoretical anymore — it is occurring this very moment. More and more users started to require permanent public IP addresses, adding to the problem, and a fast solution was needed.
This solution came with NAT - Network Address Translation and PAT - Port Address Translation. However, NAT does not provide a long-term solution. A more reliable and efficient solution has to do with a completely new addressing scheme called IPv6 which uses 128 bit addresses instead of the 32 used in IPV4.
The concept of NAT is based on the fact that every computer sending traffic outside its LAN to the Internet must be assigned a routable IP address. To conserve IP addresses, LAN users make use of a range of private IP addresses for routing local traffic. When a company, for example needs to send traffic to the Internet, via the ISP of course, an address translation takes place. Therefore the range of private IP addresses used by the company is translated to a single (or a small number) IP address.
The ranges of private IP addresses that can be used in the Local network and cannot be routed to the Internet include:
These IP addresses, in NAT terminology, are called “inside networks”. In other words, traffic originated from these networks and is destined for any other network outside private scope needs to be translated to a routable network, known as “outside network”.
Here are the NAT terms defined by Cisco:
NAT comes in three flavors:
Figure 1: NAT Example
The diagram above shows a router translating an inside source IP address to a source IP address for the outside network. Translation process follows these steps:
To configure static inside source address translation for the example shown in Figure 1, the following need to be performed on the router:
To configure dynamic inside source address translation for the example shown in figure 1, the following need to be performed:
Figure 2: NAT Overloading
From the above image, it can be seen that NAT overloading conserves register inside global IP addresses on the router. Inside local IP addresses are translated to a common global IP address and are distinguished between them by the use of different port numbers. Outside hosts do not see this translation; they believe they are talking to the same host with IP address 179.2.2.80, though they are actually talking to two different hosts.
To configure NAT Overloading for the example shown in figure 2, the following need to be performed:
NAT’s contribution to the reliability and existence of the Network society as known today has turned out to be extremely valuable. Although it does not provide a stable long-term solution it offers a lot of benefits. Conservation of IP addresses is the primary benefit of NAT through NAT Overloading. Theoretically up to 65000 hosts can be served by a single global IP address by using PAT. Security is another important benefit of NAT. Private networks hide their real identity therefore remain secure without revealing their network topology to the outside world.
Something important to keep in mind is that Cisco’s NAT implementation tries to preserve the original source port all the way through the translation. In the real world, NAT implementation assigns source port numbers dynamically and it’s up to the user’s instructions to allocate specific source port numbers.
____________________________________________________________________________________
1 Router(config)# ip nat inside source static [local IP address] [global IP address]
2 Router(config)# access-list [access list number] permit [source address] [source address wildcard]
3 Router(config)# ip nat pool [pool name] [start IP address] [end IP address] netmask [netmask]
4 Router(config)# ip nat inside source list [access list number] pool [pool name]
5 Router(config)# ip nat inside source list [access list number] interface [interface] overload
Learn Advanced IP Addressing and Routing from Chris Bryant, a Cisco Expert and CCIE! You get:
Learn more and view a free demo here!
Copyright © Train Signal Inc. All Rights Reserved.
Tison King Says:
September 14th, 2007 at 7:28 am
I enjoyed the article very much.
thanks
Nomi Dar Says:
September 14th, 2007 at 1:59 pm
Well, Good article and like to see more like that in future.
Thanks
Brian Faghih Says:
September 15th, 2007 at 10:51 am
It is very good article, and I am looking forward to read more about it in your next article.
shujah Says:
September 17th, 2007 at 2:06 pm
I enjoyed the article very much.looking forward to read more about it in your next article.
dr.zing Says:
April 14th, 2008 at 4:45 am
hello, excellent!!!
is it possible to know what software you used to create the diagrams?
Stelios Antoniou Says:
April 17th, 2008 at 2:06 am
The software I have used for creating the diagrams is Microsoft’s Vision
Tiago Says:
September 18th, 2008 at 8:02 pm
Good article!
However, would you be able to show me a diagram where the “outside local address” comes into play?
Scott Martin Says:
October 30th, 2008 at 9:26 am
Very nice clear layout.However, there is one thing that is bothering me though about this explanation.
!defines the private (inside local)
!private addresses (10.10.0.x) that can be translated to a local global address.(I think)
access-list 1 permit 10.0.0.0 0.0.0.255
Where in the configuration does it define the global address( or pool of global addresses , that the inside local addresses will be translated to?
I assume that the local global address is 178.2.2.80