Powered by Blogger.
Showing posts with label Static NAT. Show all posts
Showing posts with label Static NAT. Show all posts

Network Address Translation V


In this part of NAT we will discuss the last common type of NAT, which is Static NAT. we will also discuss some of the features and special services on NAT. The discussion ends with a brief overview of SNAT (state-full Network Address Translation)

Static NAT:

Now let’s suppose we have our email server on 192.168.4.1/24 on R1. Suppose we want to create a static NAT entry to for SMTP (simple mail transfer protocol) on this server, so that it can communicate with the outside world and its SMTP service should be accessible from outside as well.

 It is achieved by enabling Static NAT on R2; we just need to issue the following command in global configuration mode:

ip nat inside source static tcp 192.168.4.1 25 interface Serial1/0 25



Port 25 = SMTP port or email server port

On Port 25 if any packet is received on our Router R2 interface serial 1/0, it will be forwarded to our SMPT server 192.168.4.1 and vice versa.  So if we see our NAT translations, we will see a permanent static NAT entry for TCP port 25 in it:


 





This entry will not expire from the NAT table after translation timeout.  All dynamic entries are deleted from the NAT translation table after translation timeout. As we have already discussed, static mapping is mostly use for server accessibility from outside the local network. 
Please remember, STATIC NAT is both way NAT i.e. we can use it for accessibility from outside our network.



Troubleshooting NAT:

Some of the points we need to keep in mind while troubleshooting NAT:

  • Check they dynamic pools, they must contain correct IP ranges.
  • Check if static IPs are overlapping with the IP pool configured.
  • Check if ACL is correctly defined. The addresses to be mapped are properly specified no address left out.
  • Proper inside/outside NAT interfaces are configured.
 -- to be continued --

Network Address Translation II



Static NAT: static NAT is a one to one mapping of internal addresses with the global IP addresses. In network design, static NAT is best if we are going to host some server inside our network and want it to be accessible from global internet.

Some of the terminology of NAT worth remembering:

  • Inside Local: the host address inside the network that we want to translate
  • Outside Local: translated address of the outside hosts, as seen inside their network
  • Inside Global: the addresses used to translate the inside addresses
  • Outside Global: addresses of outside hosts as seen on the outside
A few more terminologies of NAT:

  • Policy based NAT
  • Port redirection (one to one mapping for a single port, also called Static PAT)
  • NVIs or NAT virtual interfaces (a newer method of NAT configuration in which there is no need for inside/outside definition on an interface. NAT table is maintained on per interface basis)

I think we have covered enough of the terminology regarding Network Address translation, now it’s time to practically implement all of the above concepts for getting a strong technical grasp of above concepts.

For practical implementation of NAT on a Cisco router, follow the following three steps:

  • Designate the interfaces for inside/outside NAT
  • Define an ACL for the local host IPs
  • Implemented NAT from the global configuration mode
In VoIP packets, as it’s not possible to modify the source header, for this we had to enable some special services of NAT to support SIP or Skinny protocols etc. there are also some other issues that might arise by changing the IP in a packet as it will change the packet checksum value, encapsulated data and hence breaking the meaning of the application.

For an interesting demonstration of NAT, please check http://www.cisco.com/image/gif/paws/6450/nat.swf URL.

--to be continued--