What is NAT?
Network Address Translation translates your local or private IP addresses to public IP addresses so you can communicate with the internet world.
Why NAT? Because its expensive to buy public IP addresses to each and every computer in a network.

Types of NAT:
Static NAT: This is like one-to-one i.e. your one particular private ip address is always translated to one dedicated public ip address.
Dynamic NAT: This is like many-to-many. Your list of private ip addresses are translated to a pool of public addresses, a public ip dynamically picked from that pool for your private ip addresses.
PAT-Port Address Translation: This is like one to many. Your list of private ip addresses are translated to one public ip address. This uses source port no. of your local network to differentiate individual hosts or computers in your local network. This is also called NAT Overload.

Local router:
f0/0 - desktop
f0/1 - vpcs1
s1/0 - border router

Border router:
s1/0 - local router
s1/1 - isp router

Isp router:
s1/1 - border router and f0/0 - vpcs2

Local router configuration:

Border router configuration:

Isp router Configuration:

Vpcs Configuration:

  • Desktop( MS Loop back Adapter) gets, GW:, DNS:
  • We will use EIGRP in Local and Border routers for routing protocol, so that desktop and vpcs can communicate with Border router via Local router. We will configure them both routers in Autonomous system no 10 so they become neighbours and exchange topology database.

local(config)#router  eigrp 10

  • Border router should be able to communicate with both public and private networks. With Eigrp, border router is already communicating with our local networks. In real world, all local computers connect to border router and border router knows how to get to ISP router, these settings are given by ISP provider. For this lab, we will need to configure border router ourselves, it needs to know the routes. We can use any routing protocol but because we only have one network to be included in the routing table, since is directly connected, lets use static routing.

border(config)#router eigrp 10
border(config)#ip   route
border(config)#ip    default-network

  • I also used 'ip default-network' command so EIGRP can adveterise it to local router.
  • With all the above setup we should be able to succefully ping within our local network and within our public i.e. and network. But we can not ping from local network to public network and thats where NAT comes into picture. NAT will translate our local ip addresses to public ip address so we can communicate with our public networks. We are going to implement NAT overload or PAT in our border router.

border(config)#ip   nat   pool   test  netmast
border(config)# access-list   10   permit
border(config)# ip   nat   inside   source   list   10  pool   test   overload

  • First line creates a pool called 'test' with a range of public addresses. In this case only because we're implementing NAT overload i.e. many-to-one. However, we can use more than one public IP.
  • Second line creates a list of our local addresses identified by no. '10' with 'permit' option.
  • Third line tells NAT to translate inside addresses that are specified in list no. 10 to addresses in pool named 'test', the 'overload' tells NAT to use port no.'s to identify a particular host in the local network.
  • Now we're left configuring interfaces as belonging to inside network or outside network in our border router. In this lab, s1/0 of border router belongs to inside network and s1/1 to the outside.

border(config)#int s1/0
border(config-if)# ip nat inside
border(config-if)#int s1/1
border(config-if)#ip nat outside


Posted by Freeman On 3:27 AM
Stumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditAdd To FacebookAdd To Yahoo

0 Response to "Implement NAT in GNS3"

Post a Comment

Blog Archive

Related Posts with Thumbnails


HTML hit counter - Quick-counter.net
Copyright 2009 - tips .. come on in. Protected by Copyscape plagiarism checker - duplicate content and unique article detection software. Designed by Gaganpreet Singh