Discussion Locked

One Public IP for multiple privates

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do you set up a Cisco routers to do NAT using one public IP address for multiple private networks.
I have networks 192.168.42.0/24, 10.100.0.0/16 and 172.16.0.0/16. The Cisco router is directly connected to 192.168.42.0/24 network and I can get all the clients in that network to get out fine. But none of the other networks does work.

My configuration is something like this:

ip nat pool puye1 199.45.204.79 199.45.204.79 netmask 255.255.255.224
ip nat inside source list 40 pool puye1 overload
ip classless
ip route 0.0.0.0 0.0.0.0 199.45.204.65
access-list 40 permit 192.168.42.0 0.0.0.255
access-list 40 permit 10.100.0.0 0.0.255.255
access-list 40 permit 172.16.0.0 0.0.255.255

Do any one know how to do this?

Thanks in advance.

5 replies

by luis

Question: Are the two networks that can't get out (172.16.0.0 & 10.100.0.0) directly connected to the same segment as 192.168.42.0? Or are they routing to you from other routers on your network?

Your code on the NAT router looks correct. It sounds like the two remote networks don't have default gateways that enable them to reach your Internet router.

If the two networks are on the same physical segment, then you can easily just add two secondary interfaces to your NAT router that would make it look like it resides on those two networks. You would also have to set the Default gateway of your client workstations to the correct address of your NAT router.

by kasey

like the other guy wrote. check your default routes. how are the networks connected. do the other routers (10.x, 172.16.x) have interfaces on the 192.168.42 net. if so,
can you ping from these routers?

Also, this is probably the key:

ip routing
router rip
network 192.168.42.0

and on each of the other routers, put the
networks that are connected. include the
upper and lower interfaces. let RIP do the routing. then all you have to do is make sure that all routers point 0.0.0.0 up to your natting gateway.

This discussion is closed to new replies.