Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Virtual Machine Configuration

Posted on 2011-02-16
16
978 Views
Last Modified: 2013-11-16
A friend of mine and I are considering starting up a small hosting business where we will be primarily focusing on allowing people to host game servers on virtual machines that all reside on a single server. If two people were hosting the same game, on the same port, how would we route the traffic to the corresponding virtual server while still utilizing the same port?
0
Comment
Question by:nmanley
  • 8
  • 8
16 Comments
 
LVL 4

Accepted Solution

by:
gmooney7 earned 500 total points
ID: 34912588
It is a non issue, since each virtual machine will have its own ip(s).....so you can have an instance on each vm run on the same port, they will be running on different ip's.
0
 

Author Comment

by:nmanley
ID: 34912595
I understand that. They will all be "local" IPs though. We do not have the capital for multiple static WANs.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34912600
On another note, if you have multiple game instances on a single vm, you can do nat translation on your router.  This will still require you have to multiple ip's available, but you will be able to redirect traffic destined for the same port on different ip's, to the same vm on other ports than the default.

Let me know if you need clarification.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:gmooney7
ID: 34912607
If you have a single ip, then you will not be able to do it.  

1 application per port per ip
0
 

Author Comment

by:nmanley
ID: 34912731
By single IP do you mean single WAN or single LAN? They will all have unique LAN IPs of course but not unique WANs.
0
 

Author Comment

by:nmanley
ID: 34913057
To expound a bit - I'll make an example.

With 5 different domains all hosting a similar, but independent server.

Let's call them www.domain1.com, www.domain2.com, etc. The port used is hard-coded into the client, not difficult to change - but a hassle none-the-less.

Each domain/server is owned by a different group/company/person/whatever. Rather than making the players/servers go through the hassle of changing the ports on the client/server configuration, is there a way to have all of the games come through the same port, on the same internet line, but route to the different corresponding server on the internal network?

players connecting to domain1.com on port 12345 go to port 12345 on internal ip 192.168.1.101
players connecting to domain2.com on port 12345 go to port 12345 on internal ip 192.168.1.102
etc, yet all going to the same WAN address.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34913080
Someone else may have an idea, but as far as I know, this can't be done.  Somehow the packets would have to be tagged coming from the client, and your router would have to know how to deal with the tags. This functionality does not exist in a router as far as I know, because it would have to work at layer 4 or above.  

Name based hosting of web servers is similar, but the webserver knows which content to send based on the http header.  But we're still talking one server, answering on one port, 80.

So, I don't think  you can do it like you want, but someone else may have an idea.
0
 

Author Comment

by:nmanley
ID: 34913112
Hrm. That was kinda where the idea started as - name based hosting of web servers.

We currently have a few sites hosted on our server, and one of the mentioned game servers. We were just trying to thing of ways to appeal to the potential customers. Requiring that they configure their servers differently than defaulted, and requiring that their players do the same with the client isn't a very appealing aspect for a paid service.
0
 

Author Comment

by:nmanley
ID: 34918112
Also, it is still technically one server as far as the router is concerned...it'd be multiple VMs.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34918144
Yes, but the VM's will have their own ip's, mac addresses, etc.  They are different servers as far as the router is concerned.
0
 

Author Comment

by:nmanley
ID: 34918502
In that case then, what if there was an initial server which grabbed the initial packet, checked it for a particular domain, flagged the incoming ip and sent all requests by that ip on that port to the appropriate server.

So the first packet/set of packets is scanned for a domain and then all future requests are forwarded to the appropriate vm until a disconnect packet is sent, at which time, it removes it from the list.

Not sure how programming/processing intensive this would be, but just an idea.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919092
This could work with the right code.  It would essentially be a proxy.

But the expense of writing this complex code would be cheaper than leasing a block of ip's?

Your application couldn't support some type of game browser similar to gamespy or other in game browser that could query a service on your server, and then let the client know which port to connect to?
0
 

Author Comment

by:nmanley
ID: 34919305
We wouldn't be able to have an in-game browser because the client would be connecting to a different customer's server. We would not want a client to be aware that they are connecting to a server that handles multiple game servers. Essentially we are looking for a way to set up a routing method similar to virtual hosts with Apache except the services accepting the request would be different based on where it was routed. I guess the only way I can think of to achieve this without leasing a block of IPs would be to write a program that works as Apache does in redirecting packets based off header information. Do you have any other ideas or suggestions?
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919325
That is the extent of what I know you might try.

I'm not a programmer by trade, so I can't be of much help on the coding side of things.
0
 

Author Comment

by:nmanley
ID: 34919521
Do you think it would be possible to set up a DNS server of sorts that reads the global request based off hostname and redirect it locally?
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919638
I don't see why not.  It wouldn't have to be a dns server, but the client would have to send the hostname along in its packets. The proxy server that distributes the traffic would have to recognize the tag, create new packets with a new destination port and send it on to the server.
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question