NAT

Network address translation (NAT) is a method of remapping one IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device(wiki).

In simple word, translating IP address to another IP is called NAT. Imagine that, we have one static IP address and we want to use this IP for diffenet services in local network. For example:

FTP : 192.168.20.100

HTTP : 192.168.20. 101

HTTPS: 192.168.20.102

Static IP: 205.174.165.23

How we can use this static IP address for different services?

NAT. By using NAT, you can map static IP address to different services, like below:

205.174.165.23: 21 –> 192.168.20.100

205.174.165.23: 80 –> 192.168.20.101

205.174.165.23: 443 –> 192.168.20.102

Enter a caption for this image (optional)

We can simple write in router to map IP 192.168.20.100 to 205.174.165.23 on port 21:

router# conf t
router(config)# ip nat inside source static tcp 192.168.20.100 21 205.174.165.23 21

If we have bunch of static IP address, we can define pool and access-list and pass it to NAT:

router# conf t
router(config)# ip nat pool mypool 205.174.165.23 205.174.165.89 netmask 255.255.255.0
router(config)# access-list 1 permit 192.168.20.0 0.0.0.255
router(config)# ip nat inside source 1 pool mypool overload

“overload” simply translate all ports in static IP address to inside local address.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *