IMPLEMENTATION OF NAT IN CISCO PACKET TRACER

                       IMPLEMENTATION OF NAT IN CISCO PACKET TRACER

 NAT was primarily introduced to the world of IT and networking due to the lack of IP addresses, or looking at it from another view, due to the vast amount of growing IT technology relying on IP addresses. To add to this, NAT adds a layer of security, by hiding computers, servers and other IT equipment from the outside world.


Inside refers to the addresses which must be translated while Outside refers to the addresses which are not in the control of an organisation. These are the Network Addresses in which the translation of the addresses will be done.



Network Address Translation (NAT) Types:

  • Static NAT:
In this, a single unregistered (Private) IP address is mapped with a legally registered (Public) IP address i.e. one-to-one mapping between local and global address. This is generally used for Web hosting. These are not used in organisations as there are many devices which will need Internet access and to provide Internet access, public IP address is needed.

Suppose, if there are 3000 devices which need access to the Internet, then the organization  will have to buy 3000 public addresses that will be very costly.

  • Dynamic NAT:
In this type of NAT, an unregistered IP address is translated into a registered (Public) IP address from a pool of public IP address. If the IP addresses of pool are not free, then the packet will be dropped as only a fixed number of private IP addresses can be translated to public addresses.

CONFIGURATION:

TOPOLOGY:


Create a n/w topology as shown in Figure 7.1. I have taken 3 PCs with IP address as 10.0.0.10, 10.0.0.20, 10.0.0.30. These PCs are connected to a switch which is connected to a router Router4 with gig 0/1.

 The interface IP address of gig 0/1 is10.0.0.1. The Router4 is connected to Router5 via a serial ports is 0/1/0 in both the routers.

The interface IP address for Router4 at se 0/1/0 is 100.0.0.1. The interface IP address for Router5 at se 0/1/0 is 100.0.0.2.

 Router5 is connected to a server whose IP address is 192.168.1.10 via gig 0/0 port whose interface IP address is192.168.1.1.

Now run the following commands as below to setup static NAT.


ON ROUTER 4:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gig 0/1
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shut
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
Router(config-if)#int se 0/1/0
Router(config-if)#ip address 100.0.0.1 255.0.0.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
Router(config-if)#
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

Router(config-if)#exit
Router(config)#ip nat inside source static 10.0.0.10 50.0.0.10
Router(config)#int gig 0/1
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#int se 0/1/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat inside source static 10.0.0.20 50.0.0.20
Router(config)#ip nat inside source static 10.0.0.30 50.0.0.30
Router(config)#exit
Router(config)#ip route 200.0.0.0 255.255.255.0 100.0.0.2
Router(config)#exit

ON ROUTER 5:

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gig 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
Router(config-if)#int se 0/1/0
Router(config-if)#ip address 100.0.0.2 255.0.0.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up

Router(config-if)#ip nat inside source static 192.168.1.10 200.0.0.10
Router(config)#int gig 0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#int se 0/1/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip route 50.0.0.0 255.0.0.0 100.0.0.1
Router(config)#exit

NAT Successful:


Comments