Download

Problems with Carrier Grade Nat (CGN) - Help me Brainstorm!

Hey everyone,

We have been working on a multiplayer flight shooter for the last couple of months. We are very close to release and during closed beta testing we have run across a strange package loss problem with some of the clients. We are using Gamesparks but we can’t get much of a response from them, so i need you all to brainstorm as to what may be happening and how we can solve it.

Basically what’s happening is this:

  • Two players(number of players is irrelevant, it happens with any number of players) launch the game, and then connect to Gamesparks without a problem.
  • They start a deathmatch, GS finds and matches the players, and then start the match.
  • 1 to 8 seconds later(random) one of the players stops sending and receiving some of the packages. They can send&receive pawn location, rotation, fire input, but they no longer update time or send&receive damage.

We’ve come to the conclusion that this is happening only for the users who have Carrier Grade Nat (CGN) IP. Once they switch to static IP or change their network they can play like everyone else.

Has anyone ever run into or heard of this kind of a problem before? What can be possible workarounds to fix this on our end?

Thanks in advance for every input!

Dear Jacky,

Hiii there!

My first reaction was:

What makes you think it has anything to do with your code or the UE4 side of things, sounds like a gamespark issue.

My second reaction came after reading this:
“They can send&receive pawn location, rotation, fire input, but they no longer update time or send&receive damage.”

That is really odd!

If it was purely a gamespark networking issue, wouldn’t you lose all connection, not just a partial loss?

And if it was purely an issue of UE4 + gamespark, wouldn’t it not just work at all?!

So therefore the possibility exists that there is in fact some issue in your network code, which brings with it the great hope that you can solve it :slight_smile:

So I ask:

What is the difference in your network code between the values that do keep updating and the ones that don’t?

Have you tried creating a bunch of new network replicating variables in various classes and replicate various ways, like direct rep via Server->Client functions (RPC calls) and repnotify, different types, etc. to see if there’s any pattern in which vars stop replicating?

I cannot dismiss the case that it is something wrong in your own netcode since since it is only a partial loss of connection, which again is really quite odd.


**NetConnection.h**

Because it is a partial loss you should be able to use a custom engine version and track what is going on in the network connection (see NetConnection.h and NetConnection.cpp)

Just start logging stuff and see what's happening :)

♥

Rama

Hi Jacky,

I’m sorry feel you have not received an adequate response from GameSparks. Could you please link me the ticket number, forum link or the name you submitted the support request under and I can look into this for you.

Clare

@Jacky by any chance are u using gamesaprk’s relaTime Multiplayer solution ?

Thanks @Rama ! :slight_smile:


Thanks @Gamesparks_Clare , we handled the problem and informed the support. Apparently using UDP fixed the problem with CGN users. My only complaint on your side would be the lack of documentation still. We accidentally(in a Unity tutorial…) saw how to choose TCP/UDP to send packets.

@Muzaheed , yes, we are using Gamespark’s Realtime plugin.

Glad to hear you got it sorted @Jacky
We’re always working to improve our documentation. I shall add your suggestion to my list for the team anyhow.