Static configuration
Static configuration
To cTo Configure static NAT on Cisco devices, following steps are
required:
1. 1.Configure private/public IP address mapping
by using the ip nat inside source static PRIVATE_IP PUBLIC_IP command
2. 2.Configure the router’s inside interface using
the ip nat inside command
3. 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
Router(config)#ip
nat inside source static 10.0.0.2 20.0.0.2
Router(config)#ip
nat inside source static 10.0.0.3 20.0.0.3
Router(config)#ip route 0.0.0.0 0.0.0.0 int Gig0/1
Ping pc0
Here we can access
pc0,pc1 only because we only configure IP 10.0.0.2 and 10.0.0.3 but we didn’t configure 10.0.0.4 . So
that pc2 could not access the internet.
If any error in the context plz inform me??
ReplyDeleteIt will be helpful
Thank you so much in advance