question

heru avatar image
heru asked

ipv6 on Matchmaker StartGame

I'm testing multiplayer game and it fail to connect to GameServer when using ipv6 network. The problem is, when I call StartGame in Matchmake API it return ServerHostname in ipv4 format. Is it possible to return additional ServerHostname in ipv6 format ?

Matchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Currently, the server info is returned as IPv4. We'll be updating to provide IPv6 info for server in a future update, but please note that this is not yet a requirement from any platform. Apple does do IPv6 compatibility testing, but that has nothing to do with any actual server connections - please see this post for more info on this topic: https://community.playfab.com/questions/3868/do-you-support-ipv6-2.html

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

heru avatar image heru commented ·

thanks brendan, i'll look forward the update, hope it ASAP

0 Likes 0 ·
brendan avatar image brendan heru commented ·

Okay, IPv6 addresses are now returned as part of the Matchmake results. Let us know if you see any issues.

0 Likes 0 ·
dragonfoundry avatar image
dragonfoundry answered

If matchmaking does return an ipv4 address, and your game connects using that IP address, it will likely cause Apple cert to fail (their test network is ipv6-NAT64). You can test whether the game connects over an ipv6 network using the link in Brendan's link. If it does, no worries. If not, you will fail cert.

We had that problem with connections our standalone server - we had to switch to a client-side DNS lookup to ensure that ipv6 networks could connect properly. (our server doesn't have any ipv6 connectivity; the DNS lookup uses the NAT64 system to connect from the ipv6 network to the ipv4 server). You may be able to find a way to synthesize an ipv6 address from the provided ipv4 address; I'm not sure how network-dependent that process is.

(we also looked into making our server truly ipv6 compatible - our AWS architecture meant that was flat-out impossible; PlayFab being a web API might have more luck)

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Actually, the only things Apple will fail you for are the items listed in the linked thread. The fact that the IP Address for a server returned from matchmaking is currently IPv4 is not a cause for failure of certification. What they are checking for is the use of IPv4-only libraries, hard coded IP Addresses, etc. - things that would cause you to fail to be able to connect to the server when the IP Address returned from Matchmake is IPv6.

0 Likes 0 ·
heru avatar image heru commented ·

@dragonfoundry, i've just tested connect using DNS lookup and it work, i can play my multiplayer game over ipv6 network now. Thanks a lot.

@brendan, if it's complicated to return ipv6 address in MatchMake/StartGame API, i think returning Public DNS (IPv4) from AWS EC2 can be a quick and easy solution here.

In the meantime, I have to create a script that automatically adds records to DNS every time there is a new IP Server from MatchMake API.

0 Likes 0 ·
heru avatar image
heru answered

I just found out that AWS EC2 generate Public DNS IPv4 with specific pattern.

Here is what i got :

  1. Region USCentral = ec2-[ipv4].compute-1.amazonaws.com
  2. Region USEast = ec2-[ipv4].compute-1.amazonaws.com
  3. Region EUWest = ec2-[ipv4].compute-1.amazonaws.com
  4. Region Singapore = ec2-[ipv4].ap-southeast-1.compute.amazonaws.com
  5. Region Japan = ec2-[ipv4].ap-northeast-1.compute.amazonaws.com
  6. Region Brazil = ec2-[ipv4].sa-east-1.compute.amazonaws.com
  7. Region Australia = ec2-[ipv4].ap-southeast-2.compute.amazonaws.com

Hope this can help PlayFab community.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

heru avatar image heru commented ·

Sorry, correction for Region EUWest = ec2-[ipv4].eu-west-1.compute.amazonaws.com

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.