Dynamic NAT configuration

 


Why we configure Dynamic NAT: In Static NAT we have to configure each and every users but when we have a lot of user we cannot configure each and every one by one. So we use Dynamic NAT to configure all the user at a time.



 

To configure dynamic NAT on Cisco devices, following steps are required:

1.    Configure private/public IP address mapping by using the ip nat inside source PRIVATE_IP PUBLIC_IP command

2.    Configure the router’s inside interface using the ip nat inside command

3.    Configure the router’s outside interface using the ip nat outside command

 

Steps to configure static NAT on Cisco devices through CLI

 

Steps 1: Put IP address in every ports. But remember to put private IP into local inside and outside local to public IP.

 


 

PC0: Right click on PC0 then click IP Configuration and put IP 10.0.0.2    Subnet 255.0.0.0     Default Gateway 10.0.0.1



 

 

Do so same for PC1 and PC2

PC1: Right click on PC0 then click IP Configuration and put IP 10.0.0.3 Subnet 255.0.0.0 Default Gateway 10.0.0.1

PC2: Right click on PC0 then click IP Configuration and put IP 10.0.0.4 Subnet 255.0.0.0 Default Gateway 10.0.0.1

 

Router0 Configuration (Insert IP Address)

Go into the CLI mode.

 

Router>

Router>enable

Router#configure terminal

Router(config)#int Gig0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

 

Router(config)#

Router(config)#int Gig0/1

Router(config-if)#no shutdown

Router(config-if)#ip address 20.0.0.1 255.255.255.248

Router(config-if)#exit

 


 

Router1 Configuration (Insert IP Address)

Go into the CLI mode.

 

Router>

Router>enable

Router#configure terminal

Router(config)#int Gig0/0

Router(config-if)#ip address 20.0.0.6 255.255.255.248

Router(config-if)#no shutdown

Router(config-if)#exit

 

Router(config)#

Router(config)#int Gig0/1

Router(config-if)#no shutdown

Router(config-if)#ip address 30.0.1.1 255.255.255.252

Router(config-if)#exit

 

Router2 Configuration (Insert IP Address)

Go into the CLI mode.

Router>

Router>enable

Router#configure terminal

Router(config)#int Gig0/0

Router(config-if)#ip address 30.0.1.2 255.255.255.252

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 int Gig0/0

 

 


 

Router0 Configuration (Configure the router's inside interface)

Go into the CLI mode.

Router(config)#interface Gig0/0

Router(config-if)#ip nat inside

Router(config-if)#exit

Router(config)#interface Gig0/1

Router(config-if)#ip nat outside

Router(config-if)#exit

 

 

 

 

 

 

 

For Dynamic Configuration

Router(config)#ip nat pool Dynamic-pool 20.0.0.2 20.0.0.3 netmask 255.255.255.248

Router(config)#access-list 1 permit 10.0.0.0 0.0.0.255

Router(config)#ip nat inside source list 1 pool Dynamic-pool

Router(config)#

 

NOTICE

HERE,             Dynamic-pool is a name, you can use your desire name

 

access-list 1 permit 10.0.0.0 0.0.0.255           command for

 

                        Create ACL and permit

                        0.0.0.255 is wildcard mask

 

ip nat inside source list 1 pool Dynamic-pool command for

 

                        TO match with dynamic NAT and ACL permit




 

Ping form PC1



Here  every pc can access the internet.

 

Comments

  1. If any error in the context plz inform me??
    It will be helpful
    Thank you so much in advance

    ReplyDelete

Post a Comment

Popular posts from this blog

Static Routing Protocol Configuration

BitLocker installation

Backup & Restore process of CISCO Router