NAT (Network Address Translation)
NAT (Network Address Translation) is used to translate IP Address form Private IP to Public IP. NAT help to improve the security of network in organization/ industry and it also decreases the number of Public IP Address needed by organization/ Industry.
NAT is implemented between outside and inside network. It translates the inside network IP to outside network IP because IP Address assigned to device form inside network can't be routed over the other network due to duplication in IP Address that why Private IP Address are replaced with Public IP Address with the help of NAT.
PAT (Port Address Translation)
PAT (Port Address Translation) is advance form of NAT which is used to map multiple LAN devices over the single public IP Address. The goal of PAT is to decrease the number of Public IP Addresses needed by organization/ industry.
PAT is mostly used in home networks. In such a case, ISP (Internet Service Provider) assign a single public IP Address to the home network router.
For example
In home network there are two different computers which wants to access the internet. They request router to assign Public IP Address to them. Router records their port number and assign them the Public IP Address configured in router with the different port numbers. With the help of this both computer access the internet at the same time with same IP Address but with different Port Number.
Here are some advantages and disadvantages of NAT (Network Address Translator)
Advantages of NAT
- NAT can prevent the duplication of IP Address on Internet.
- NAT Provides an extra layer of security because it hides original source and destination mac addresses.
- NAT provides much more flexibility when it is connected to public internet.
- NAT allows you to use your own private ip address and it can’t changes the internal address if IPS is changed.
Disadvantages of NAT
- NAT consumes much more memory because it has to translate all the incoming and outgoing packets that’s why it needs more memory to keep translation details.
- NAT some time causes delay in packet communication.
- NAT also causes loss of IP tractability from one end device to other end device.
Configuration of NAT/ PAT
Customer
Router>enable
Router#configure terminal
Router(Config)#hostname Customer
Customer(Config)#enable password cisco
Customer(Config)#line console 0
Customer(Config-line)#password cisco
Customer(Config-line)#login
Customer(Config-line)#exit
Customer(Config)#line vty 0 4
Customer(Config-line)#password cisco
Customer(Config-line)#login
Customer(Config-line)#exit
Customer(Config)#interface fasteathernet 0/0
Customer(Config-if)#ip address 192.168.1.1 255.255.255.0
Customer(Config-if)#no shutdown
Customer(Config-if)#exit
Customer(Config)#interface serial 0/0/0
Customer(Config-if)#ip address 192.168.2.1 255.255.255.0
Customer(Config-if)#no shutdown
Customer(Config-if)#exit
Customer(Config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0
Customer(config)#ip nat inside source list 1 interface serial 0/0/0 overload
Customer(config)#interface serial 0/0/0
Customer(config-if)#ip nat outside
Customer(config-if)#exit
Customer(config)#interface fastethernet 0/0
Customer(config-if)#ip nat inside
Customer(Config-if)#exit
Customer(Config)#exit
Customer#wr
ISP
Router>enable
Router#configure terminal
Router(Config)#hostname ISP
ISP(Config)#enable password cisco
ISP(Config)#line console 0
ISP(Config-line)#password cisco
ISP(Config-line)#login
ISP(Config-line)#exit
ISP(Config)#line vty 0 4
ISP(Config-line)#password cisco
ISP(Config-line)#login
ISP(Config-line)#exit
ISP(Config)#interface serial 0/0/0
ISP(Config-if)#ip address 192.168.2.2 255.255.255.0
ISP(Config-if)#no shutdown
ISP(Config-if)#exit
ISP(Config)#interface loopback 0
ISP(Config-if)#ip address 192.168.3.1 255.255.255.0
ISP(Config-if)#no shutdown
ISP(Config-if)#exit
ISP(Config)#ip route 192.168.1.0 255.255.255.0 serial 0/0/0
ISP(Config)#exit
ISP#wr
No comments:
Post a Comment