You are on page 1of 3

1. Overloading or Port Address Translation (PAT) This is the most frequently used form of NAT in IP networks.

It uses the concept of “many-toone” translation where multiple connections from different internal hosts are “multiplexed” into a single registered (public) IP address using different source port numbers. This type of NAT allows a maximum of 65,536 internal connections to be translated into a single public IP. This type of NAT is very useful in situations where our ISP has assigned us only a single public IP address, as shown below.

In our scenario above, our internal network range is 192.168.32.0/24 and our assigned public IP address is 213.18.123.100. All internal hosts will be translated to the public address using different port numbers. Configuration: Router(config)# interface ethernet 0 Router(config-if )# ip address 192.168.32.1 255.255.255.0 Router(config-if )# ip nat inside Router(config)# interface serial 0 Router(config-if )# ip address 213.18.123.100 255.255.255.0 Router(config-if )# ip nat outside Router(config)# ip nat pool overloadpool 213.18.123.100 213.18.123.100 prefix-length 24 Router(config)# ip nat inside source list 1 pool overloadpool overload Router(config)# access-list 1 permit 192.168.32.0 0.0.0.255 2. Dynamic NAT Dynamic NAT translates internal private IP addresses to public addresses from a range (pool) of public addresses assigned to our network from an ISP.

In our example scenario above, assume that we own the range of public IP addresses 213.18.123.0/24. Any internal host accessing the internet, will be translated by the NAT router to the first available public IP in the public pool range. In our example above, internal host

This scenario is useful to provide access to public company servers such as Web Server.168.32.32.255.112 etc. Inbound traffic coming towards address 100.100.168.0 0.168.18.168.111 Router(config)# ip nat inside source static 192.32. 192.100.10 213.1.112 4.32.123. Similarly.168.255.192.100. Hosts from the outside public internet will be able to directly access the statically nated internal hosts by accessing their mapped public IP address. Port Redirection This is useful in situations where we have a single public IP address and we need to use it for accessing two or more internal servers from outside. Email Server etc.123.252 Router(config-if )# ip nat outside Router(config)# ip nat pool dynamicpool 213.32.255.110 Router(config)# ip nat inside source static 192.15 213.255.100.168.32.18. Configuration: Router(config)# interface ethernet 0 Router(config-if )# ip address 192.1 255.255. Static NAT This form of NAT creates a permanent one-to-one static mapping of a public IP address with a private IP address.10 is translated to 213. Assume that our public address is 100. Configuration: Router(config)# interface ethernet 0 Router(config-if )# ip address 192.1 255.0 Router(config-if )# ip nat inside Router(config)# interface serial 0 Router(config-if )# ip address 100.255.123.0.1 .18.123. Assume that we have a Web and Email servers that we need to provide access from outside using only a single public IP address.168.18.100.168.255 prefix-length 24 Router(config)# ip nat inside source list 1 pool dynamicpool Router(config)# access-list 1 permit 192.123.12 is translated to 213.0 Router(config-if )# ip nat inside Router(config)# interface serial 0 Router(config-if )# ip address 100.100.10 will always be translated to 213.110.18.100.12 213. In our example diagram above. the internal host with private IP address 192.100.18.18.32.255.252 Router(config-if )# ip nat outside Router(config)# ip nat inside source static 192.168.18.255.1 255.1 255.123.32.32.116 (one-to-one mapping).255 3.123.0 213.123. It is particularly useful in cases where an internal host needs to be accessible from the outside public internet.0.

168.252 Router(config-if )# ip nat outside Router(config)# ip nat inside source static tcp 192.1 port 25 will be redirected to our internal Email Server 192.32.32.32.0 Router(config-if )# ip nat inside Router(config)# interface serial 0 Router(config-if )# ip address 100.168.32.255.168.32.100.10 80 100.port 80 will be redirected to our internal Web Server 192.100.100.1 25 .255.10.255.168.255.1 255.168.100.20 25 100.100. and inbound traffic coming towards address 100.100.100.1 80 Router(config)# ip nat inside source static tcp 192.100.1 255. Configuration: Router(config)# interface ethernet 0 Router(config-if )# ip address 192.20.