Connect 2 computers with same IP to same server?

dogwithrabiez

Distinguished
Feb 28, 2010
13
0
18,510
I'm having a problem with my router/games. Whenever my brother and I both try to play a game on the same server, one or both of us will disconnect with a "network error".

We're running on the same router, and so there's an IP conflict problem or something, I'm not exactly sure what to call it.

I've already tried setting the UPnP on, and setting one computer on the DMZ, but we still can't connect to the same server, and sometimes not even different ones.

Any suggestions?
 
The problem is that both of you are behind a NAT router.

A NAT router maps the single public IP address provided by your ISP (e.g., 209.157.4.3) to a local IP address space (e.g., 192.168.1.x) and uses its firewall to protect your internal network from Internet threats. It works great until you have a need to allow unsolicited INBOUND network traffic (e.g., online gaming). A game will require one or more ports to be opened and forwarded to the correct machine on your local network.

There are two ways to handle port forwarding. The first is to use the port forwarding feature of your router (i.e., manually). The other is to use UPnP (Universal Plug N Play), which if you didn’t manually open and forward ports and it works when using a single PC/game console, is probably how it’s working at the moment. UPnP allows the game itself to open the ports it needs on the router’s firewall and forwarded them to itself.

But there’s a catch. Any given port can only be forwarded to ONE machine. So each time one of you attempts to use the same game (and by definition the same ports) from different PCs/gaming consoles, it reconfigures the port forwarding in favor of the new player. And back and forth you go in a vicious circle, each kicking the other out of the game.

That’s just a limitation of living behind a NAT firewall. Of course, if you each had your own public IP and router, that would resolve the problem. But that’s not typically an option from your ISP (or if it is, it will result in additional fees).

NOTE: In order to accommodate multiple players behind a NAT router, some games will allow you to change the default ports. Thus you could each have your own unique port configuration and not step all over each other. Other games may allow you to reconfigure the game to minimize (if not eliminate) the need to open ports. It’s usually some setting that changes the NAT type (open, moderate, strict). However, there’s a downside; this invariably limits the features available.


 

dogwithrabiez

Distinguished
Feb 28, 2010
13
0
18,510
Wait, just so I'm getting this right, even if I forward my ports and/or set UPnP on, I'm not going to be able to play both at the same time?

I tried setting UPnP on before. Didn't work. Strangely enough though, we were able to play once with the router set on default settings(meaning UPnP off and firewall on), but were unable to any other time.

Does Bad Company 2 allow the port changing?
 


If you have two machines behind a NAT router that both require the same ports to be opened and forwarded, you can't do it. Period, no way, no how. There's simply no way to disambiguate traffic received at the router's firewall on port "X" and decide which of those two machines the traffic should be forwarded to.

When port forwarding, the port # is essentially a proxy for a local IP address (port 2190 = 192.168.1.100, port 3188 = 192.168.1.45, etc.). But once you add a second machine, unless you can use different ports, you’re stuck.

And no, you can’t use port forwarding for one machine and place the other in the DMZ. Put yourself in the position of the router. Given traffic at port X, should it be forwarded to the machine designated in the port forward, or dumped into the DMZ? There’s no way for the router to decide. So the traffic for that port will ALWAYS be forwarded to the machine w/ the port forward. And pretty soon everything’s a mess. The machine w/ the port forward is getting its own traffic AND traffic intended for the other machine, meanwhile the other machine is completely starved!

You face the same dilemma ANYTIME you need to support services behind your NAT router. Imagine two ppl in your home wanting to setup their own web servers. The default port is 80. However, only ONE of you can use that port. The other must use something different (81, 8080, 8081, whatever). Fortunately that easily solved since a web server will always give you the option to change its default port assignment.

As I said, you *might* be able to either change the ports used by the game or change the NAT type (and that would almost surely limit your features). Unfortunately, I know nothing about BC2 in this regard.
 

dogwithrabiez

Distinguished
Feb 28, 2010
13
0
18,510
I'm just curious then, how were we able to play at the same time for certain games at certain times? We were able to play L4D and L4D2 together at certain times(though others it simply disconnected), and another time we got BC2.

 


Because the inbound port is probably not needed all the time. It's only needed *some* times, for specific functions/features during game play. I can’t tell you which ones specifically because I didn’t design the game, but for example, maybe another player wants to talk to you and initiates a chat request over that port, or maybe you need it if you intend to host the game. If you happen not to require/use those features, then you can get away w/ it for some period of time. But eventually you’ll do something that does require the port and then get whacked. IOW, it’s a bomb with a lit fuse of undetermined length. It will eventually go off. Just can't say when for sure.

That’s why I said that sometimes you can change the NAT type in the game so that the port is never used. In my example w/ chat or hosting, I might be able to continue using the game w/ multiple players behind the NAT router by changing the NAT type. But of course, I will lose access to the chat and hosting features as a result.
 

dogwithrabiez

Distinguished
Feb 28, 2010
13
0
18,510
I'm currently using a Belkin wireless G+ router(but I'm connected through ethernet), do you know if it's possible to change the NAT type temporarily for this? It's a rather old router.

Also, I was browsing around other places, and it said certain routers can separate the packets automatically and whatnot, is this possible?
 
When I say you may be able to change the NAT type, I'm not referring to the router. I’m talking about the game itself.

Remember, I’m not a gamer so I’m not an expert in how all these particular games/consoles handle issues regarding NAT routers. I’m sure it varies widely from system to system. But let me give an example w/ the PS3, something I’ve done a little reading on.

IIRC, the PS3 supports three different types of NAT; 1, 2, and 3. NAT1 is the least restrictive. You’re assumed to be connected directly to the modem. All the gaming consoles features are available. NAT2 is for when you’re behind a NAT router. Most of the gaming console features are available w/ some exceptions. NAT3 is most restrictive and you will lose access to more features, maybe even to the point you consider it unplayable.

IOW, we’re not talking about how to change the router to be more compatible w/ the game (which there’s nothing you can do anyway), but how to change the game to be more compatible w/ the router. Your game *may* (and that’s a big *MAY*) have something similar, but I really have no way of confirming whether it does or doesn’t (I suspect it’s more likely is does NOT than does).


 

INAP

Distinguished
Jan 22, 2012
3
0
18,510


Alright, thanks. So in summary, it's pretty much impossible unless I get a separate IP address?



I'm responding to this question because static ip's will let you put a different ip on every machine, so will this help the situation? If every machine has it's own ip address different from the others then everything will be fine right?
 

You need a unique Internet IP address for each PC, i.e., your ISP has to provide one IP address per system. Using static IPs on the LAN won't help.
 

INAP

Distinguished
Jan 22, 2012
3
0
18,510
I was on the phone with my ISP for 3 and 1/2 hrs but we still got nowhere but he was the one who ran the static IP's for me, so what steps should I take now? Thanks for the help, I've been working on this for about a week now.
 

INAP

Distinguished
Jan 22, 2012
3
0
18,510



I was on the phone with my ISP for 3 and 1/2 hrs but we still got nowhere but he was the one who ran the static IP's for me, so what steps should I take now? Thanks for the help, I've been working on this for about a week now.
 

Were both PCs at your end connected to the Internet through a switch connected to the modem? In order to use static IP addresses at your end, you also have to manually configure them. Each PC has to have a valid Internet IP address and not an address like 192.168.0.x. As an example, 216.134.22.33 for the first PC and 216.134.22.34 for the second one. If your PCs still are connected to the Internet through a router, then you have only one Internet IP address, not one for each PC.