Search Unity

Multiplayer Connection Problem

Discussion in 'Multiplayer' started by balder, Nov 22, 2009.

  1. balder

    balder

    Joined:
    Aug 24, 2009
    Posts:
    9
    Hi everybody,
    I am working on a multiplayer Game involving up to 6 players:

    - Running my own MasterServer(0.1.0) on an Amazon EC2 machine (public IP and ports under control, MasterSever stable... so far so good)

    However I am having 2 scenarios where connection is troublesome:

    Scenario 1 - Server (initiator, Private IP): ConnectionTest = PrivateIPNoNATPunchthrough.

    Under this circumstances, I don't expect any (out of local network) client to be able to connect to the Server(Initiator) but... the point is that clients within the same network wont connect either!!!!

    Question_1: is this behavior expected or normal?
    Question_2: In cases where the router does not allowed Punchthrough... Is using a proxy the only alternative to offer connectivity among players?

    Scenarion 2 - Server (initiator, Private IP): ConnectionTest = PrivateIPHasNATPunchThrough.
    Looking at the MasterServer Logs I can see that Facilitator and MasterSever register the Server (initiator) in different ports (usually consecutive) and same IP.
    Under these circumstances Clients (private IP, out of local Network) fail to connect...

    Question_1: is this a case of Symmetric NAT... and therefore the reason why connections fail?
    Question_2: If not... How should I debug this network Problem (is there any procedure to actually verify why the connection fails?)
    Question_3: what types of NAT can Unity MasterServer handle (and which ones can't)?
    Question_4: If the popular opinion is that server (initiator) router NAT is the problem.. how can I solve it: phone call to the ISP, alternative workarounds?

    Any information/suggestions on the issue would be... well... would be a lifesaver.

    Thanx a lot!
    Balder
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1) Thats normal if you tell it to do so.
    But you can as well tell it to not use it and it should work within lan

    2) Potentially, but it can just as well be no option at all, that depends on how stupid / smart the router is actually.



    Scenario 2:

    1) symmetric nat makes no sense for games and UDP where packets without a stable connection pass both ways so pretty surely no.
    I would guess its more related to some setting on the router / software firewall / actual code in question that sets up the facilitator, master server, connection tester.


    2) you could go to the network setting and put it on high debug level, potentially that will help you.

    3) Games (!Cluster backend) normally use full cone NAT as you need two way data travel in and out. But only if the router is not set to a that high security that NAT will just fail at all as no explicit forwarding rule for UDP port XY exists

    4) If it is a router, its the users problem to solve it.
    If it is just a bridge, you can basically scrap it as the ISP will tell you to read your contract you signed which with a few exceptions, does not allow you to host any permanent service on home connections at all. Using different hardware won't help as the port lock likely happens on the ISPs end, not yours