2

As I understand it, NAPT takes one outer IP address and, by coupling it with a port, translates it to some fixed number of internal/non-routable IP addresses for clients that require internet access.

Suppose, an outer NAPT, NAPTa, connects to an ISP via one IP address. NAPTa would give all of its clients that need an internet connection an address:port mapping.

Could another NAPT, NAPTb, act as one of NAPTa's clients and take, as its one outer IP address, a port on NAPTa, and create something like an address:porta:portb mapping to all of NAPTb's clients?

1

This is fully doable.

Assume you have an internet address lets pretend it is... 8.8.8.8, just to have something. (I know, it is actually google's address...)

You can have a NAT router A which have this 8.8.8.8 address as its only external address and an inside network 10.0.0.0/8 that use NAT to reach the internet via the external 8.8.8.8 interface.

On that 10.0.0.0/8 network, you can have a NAT router B with an external IP address in that 10.0.0.0/8 network (say, 10.1.1.1) and an internal subnet of 192.168.1.0/24.

A client PC connected to that 192.168.1.0 subnet (e.g with IP 192.168.1.33) can communicate through both NAT routers to connect to sites on the internet.

--

When creating virtual machines on a host server, one option for network connectivity for them is to let them (the virtual machines) connect to the local network (and the rest of the world) using the virtualization host server as a NAT router. In this case, the VMs never communicate directly with the network outside of their host server.

If the physical server itself that hosts the VMs is located inside a NATed network which access the internet via a NAT router, then the virtual machines hosted on that server are effectively talking with the internet via two NAT routers.

--

Then of course, with many clients behind multiple layers of NAT routers, you will eventually run out of ports on the internet-connected NAT router. But that is another story.

(I don't have time right now, but I got a NAT router connected to the internet and some more routers to play around with, so I should within the next week actually try this out myself, only to see it in action :-) ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.