Need to have one real public IP address for every private IP address..
Used with servers mostly..
Let's configure static NAT on R2 where the servers are..
Define inside & outside..
R2(config)#int e0/0
R2(config-if)#ip nat outside
R2(config)#int e0/1
R2(config-if)#ip nat inside
Do the mapping..
R2(config)#ip nat inside source static 192.168.2.21 203.115.41.221
R2(config)#ip nat inside source static 192.168.2.22 203.115.41.222
As soon as you enter the above commands, you will see the following output on nat translations..
If you look into the routing table, you will see the public IP address are taken into the routing table like the following.. It will not go away even though you cleared the nat translations..
When the servers are generating traffic destined to outside of their network (ex:- pinging to 203.115.41.111 which is actually the PC1 from 203.115.41.221), you will see the following output..
But when an outside host try to reach the servers, you will see something like the following..
(pinging from 203.115.41.111 which is actually the PC1 to 203.115.41.221)
As you can see, both the outputs are same..
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)
No comments:
Post a Comment