How to Configure Static, Dynamic and Port NAT ?

 

You can follow the Following Steps:

Figure : Static and dynamic NAT Example

 

1. Static NAT Configuration :
To configure static inside source address translation for the example shown in above  Figure , the following need to be performed on the router:

  • Specify the inside interface:
    • Router(config)#interface ethernet0
    • Router(config-if)# ip nat inside
  • Specify the outside interface:
    • Router(config)#interface serial0
    • Router(config-if)# ip nat outside
  • Enter static translation entry 1:
    • Router(config)# ip nat inside source static 10.0.0.3 179.2.2.80

 

2. Dynamic NAT Configuration :

To configure dynamic inside source address translation for the example shown in above figure , the following need to be performed:

  • Specify the inside interface:
    • Router(config)#interface ethernet0
    • Router(config-if)# ip nat inside
  • Specify the outside interface:
    • Router(config)#interface serial0
    • Router(config-if)# ip nat outside
  • Define an Access List to permit the inside local addresses to be translated 2:
    • Router(config)#access-list 1 permit 10.0.0.0 0.0.0.255
  • Define a pool of global addresses 3:
    • Router(config)# ip nat pool figure1 179.2.2.65 179.2.2.90 netmask 255.255.255.224
  • Enter dynamic translation entry 4:
    • Router(config)# ip nat inside source list 1 pool figure1

 

3.  Port NAT Configuration :

To configure NAT Overloading for the example shown in following figure , the following need to be performed on the router interfaces :

Figure PAT

  • Specify the inside interface:
    • Router(config)#interface ethernet0
    • Router(config-if)# ip nat inside
  • Specify the outside interface:
    • Router(config)#interface serial0
    • Router(config-if)# ip nat outside
  • Define an Access List to permit the inside local addresses to be translated:
    • Router(config)#access-list 1 permit 10.0.0.0 0.0.0.255
  • Enter dynamic translation entry 5:
    • Router(config)# ip nat inside source list 1 interface serial0 overload

 

Note : Some Important Commsnd syntaxs which useful during NAT configuration on Routers.

1 Router(config)# ip nat inside source static [local IP address] [global IP address]
2 Router(config)# access-list [access list number] permit
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

 

I hope this is Helpful to all.

How to Translate Inside Local and Inside Global Address by NAT

 

1. Inside Local Source Address Translation :

 

Figure 1: NAT Example

Above The diagram  shows a router translating an inside source IP address to a source IP address for the outside network (1:1 Mapping).

Translation process follows these steps:

  1. User at host 10.0.0.3 begins to send traffic to the router, destined for host at 212.31.80.2.
  2. Upon receiving the first packet, the router checks its NAT table.
    1. If dynamic NAT is configured, the router picks up a free global address from its dynamic address pool (in the above example 179.2.2.80) and creates a translation entry into its NAT table.
    2. If static NAT is configured, the router automatically translates the inside local address: 10.0.0.3 with its equivalent global IP address: 179.2.2.80, and forwards the packet.
  3. User at 212.31.80.2 replies to host 10.0.0.3 using the inside global destination address 179.2.2.80 (Destination address=179.2.2.80).
  4. When the router receives the replied packet, it checks its NAT table again to find an entry for the inside global address 179.2.2.80. If a match is found, then the router translates the address back to its respective local address 10.0.0.3 and forwards it to the user.
  5. The router continues to perform all the above steps for each packet it receives.

 

2. Inside Global Address Overloading :

 

Figure 2: NAT Overloading

 

From the above Figure, 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.

 

Note : Read my Next Post How to configure SNAT, DNAT and PNAT. and Also read my previous Post “What is NAT”.

Basic About Routers and Switches Modes

I have Publish a number of Post about Computer Networking. Today I wrote this Post about CCNA.
In this Post, I will give you a short introduction to the Cisco Internetwork Operating System, also known as the IOS. This is the operating system that controls Cisco routers and switches and provides the interface to configure Cisco devices as well.

We will take a look at the various router command modes, set router passwords and banners, configure router hostnames and interface descriptions, and much more.

Overview of Router Modes :

1. User/Enable mode :
Once you login into a router you instantly enter the so-called user mode – the prompt [Router name] > appears. From this mode you can only see some statistic information.

2. Privileged mode :
To view and change the configuration of the router you have to enter into the privileged mode by entering the enable command. Here are the steps:

RouterA>
    RouterA>enable
    RouterA#

3. Global/Configuration Mode :
To be able to make global changes to the configuration of the router you have to enter the global configuration mode. Once you achieve that, you are able to access any possible subsequent configuration mode and make global changes:

    RouterA#configure terminal or config t for short
    RouterA(config)#

Now you have the control of your device. If you need to modify your router’s configuration then you enter the appropriate configuration mode. For example, if you want to make a change to your Fastethernet interface 0/0 then you have to enter interface configuration mode and make your modifications from there. Here are the steps:

RouterA(config)# interface fastethernet 0/0
    RouterA(config-if)#

Prompt RouterA(config-if)# indicates you are in interface configuration mode. At any time, and any mode you are in, you can insert a question mark ? and the router will automatically show all the possible commands or option parameters you can apply at that specific time.

RouterA(config-if)# ?

Interface configuration commands:

access-expression    Build a bridge boolean access expression
arp                  Set arp type (arpa, probe, snap) or timeout
backup               Modify backup parameters
ip                   Interface Internet Protocol config commands .
.
.
.

Below there is a list of the most important configuration modes along with the commands used to enter these modes: