#

Monday, September 4, 2017

Dynamic Network Address Translation

Maps a local address with a pool global addresses..
Need to have one real public IP address for every private IP address..
Cannot permanently bind a public IP address with host like in static NAT..
When the pool is exhausted, router discards the translation..


















Let's configure dynamic NAT on R1..

Define inside & outside..

R1(config)#int e0/0
R1(config-if)#ip nat outside

R1(config)#int e0/1
R1(config-if)#ip nat inside

Create a pool for private IP range..
R1(config)#access-list 10 permit 192.168.1.0 0.0.0.255

Create a pool for public IP range..
R1(config)#ip nat pool DYNAMIC 203.115.41.110 203.115.41.120 netmask 255.255.255.0

Do the mapping..
R1(config)#ip nat inside source list 10 pool DYNAMIC

As soon as you enter the above commands, you will not see anything on nat translations & routing table like in static NAT.. But when the traffic is generated, they will start to populate..

When PC-1 is pining the server 203.115.41.221; following will be the output.


Inside local address – The private IP address assigned to a host in the inside network.
Inside global address – The public IP address which represents a host in the inside network.
Outside local address – The public IP address of a host in the outside network as it is seen to the hosts in the inside network.
Outside global address – The public IP address which represents a host in the outside network.

Above terms are local to the router.. Inside and Outside terms are adapted from the router's interface definitions (inside nat interface & outside nat interface.

You will see a new entry for the public IP address in the routing table too to the outside interface..
Note that it will clear this entry when you clear ip nat translations..


No comments:

Post a Comment