cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2553
Views
0
Helpful
3
Replies

NAT Scripting

NaderHussain
Level 1
Level 1

When scripting on a router to translate the following network's addresses to 192.168.x.x/24 addresses, which commands should be used?

 

172.16.4.0/24 to 192.168.1.0/24

 

The NAT pool is for the entire network.

This can exclude the ACL statement since I know how to do it.

What I need to know is what the NAT pool statement is supposed to be and the source list statement's format.

 

Thanks

Nader

3 Replies 3

luis_cordova
VIP Alumni
VIP Alumni

Hi @NaderHussai,

I hope this is what you mean:

 

R(config)#ip nat pool <name> 172.16.4.0 172.16.4.255 netmask 255.255.255.0

 

R(config)#access-list <n°> permit 192.168.1.0 0.0.0.255

 

R(config)#ip nat inside source list <n°> pool <name>

 

Regards

Attached to this message is my NAT script and the troubleshooting commands I used. I am still getting no output. What needs to be changed in the script?

Hi @NaderHussain,

 

Imagining the rest of your network, I propose these changes:

router ospf 6

network 172.16.12.4 0.0.0.3 area 2 <- remove this (the public network should not be included in the internal routing protocol)

network 192.168.5.0 0.0.0.3 area 0 <- change to area 0

network 192.168.4.0 0.0.0.255 area 0 <- add this line

 

ip nat pool PoolA 172.16.12.5 172.16.12.6 netmask 255.255.255.252 <- change the public IPs

 

access-list 5 permit 192.168.5.0 0.0.0.3

access-list 5 permit 192.168.4.0 0.0.0.255 <- add this line 

 

Regards 

Review Cisco Networking for a $25 gift card