Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

Simulating several NAT devices with internal networks + introducer server

This topic is 2567 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey,

I recently took the time to read up on NAT punch-through and I want to implement this into my game/engine. The final product will (most likely) be a p2p game using UDP (well, enet really, which is based on UDP) where people host games on their home computers. These hosts are reported to an authentication server, which also acts as the NAT intruducer (a small server running Linux or something similar). I would need some way to test a setup like this while I am developing it. How would you do this/how have you done it?

I guess I need:
-Two (or more) NAT devices with a public IP and a gateway IP
-Two (or more) computers, each behind a NAT device, with a private IP
-One linux server with a public IP

I have:
-One NAT device (linksys WLAN router)
-Two windows machines and enough parts to build a test ubuntu introducer server

Can I somehow simulate the missing parts or do I have to have two physical networks each with it's own NAT device + a server with a public IP?

Also, am I missing something really crucial? Last week I did not understand NAT at all, and last year I sucked at network programming altogether.

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Virtual NAT devices as well?

Yes. You can configure virtual Linux servers as a routers with IP masquerading to be your test NAT devices. Virtualbox will handle this easily.

Share this post


Link to post
Share on other sites

Virtual NAT devices as well?


Yes! VMWare comes with a Virtual Network Editor. VirtualBox has network options. KVM/QEmu lets you use the Linux kernel networking, set up bridging/translation using iptables, ifconfig and route, which is very flexible. Either of these should let you test the system if you work at it. The configuration will likely be annoyingly fiddly, though.

Share this post


Link to post
Share on other sites

VirtualBox seems very cool, thanks for the tip! I have to look at VMWare too, though I thought it is very expensive...


VMWare Workstation is a few hundred dollars. Whether that counts as "very expensive" compared to the cost of a computer or the cost of a MSDN subscription or other tools you may want to use is really dependent on you.

Share this post


Link to post
Share on other sites
I don't count that as expensive :)

I have heard talk about thousands of euros, but I guess that's some of the enterprise products they offer. Anyway, thanks for your tips. I'll try out virtualbox to get more familiar with virtualization, and see if I should consider VMWare later.

Share this post


Link to post
Share on other sites

I don't count that as expensive :)

I have heard talk about thousands of euros, but I guess that's some of the enterprise products they offer. Anyway, thanks for your tips. I'll try out virtualbox to get more familiar with virtualization, and see if I should consider VMWare later.


Thousands of euros -- that must be ESXi you're thinking of. We use that for virtualizing all our build/test machines (hundreds of VMs) across a dozen super-sized physical servers. When each server host is $12k, paying $5k to manage all of them centrally is worth it :-)
VMWare Workstation is much cheaper, but only runs on one box. It does, however, virtualize 3D (for Windows only), which is nice for games testing. There is also a free version called VMWare Player, so if you can find a created VM image that's already what you need, you may be able to just use that. (A blank image that you can install from scratch on may be sufficient!)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!