Jump to content
  • Advertisement
Sign in to follow this  
Mxlprx

ISP changing IP address

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, let's say a multiplayer server is on a dynamic external IP address behind a NAT router. Now, we have a session with 3 clients also behind a NAT router. The clients and server exchange their external IP addresses to be able to communicate to each other. Now the ISP of the server drops the connection to the net for a moment and then dials in, but now as it has a dynamic IP assignment with a new IP address. The server session however is unable to detect the changed IP address itself. Does anyone have an idea how the server could learn that there is a new external IP and how the information could be propagated to all connected sessions so that the game can go on properly ? Thanks, Martin

Share this post


Link to post
Share on other sites
Advertisement
Well, one possibility would be that each server message includes the server's external IP address. That way.. if the client recieves a different server IP packet identified as the original server, it can quick do some authentication and keep right on chugging.

Share this post


Link to post
Share on other sites
That won't work, as the message being sent won't get through because it hasn't been introduced yet.

You have to re-establish the connection through the third-party introducer. Your connection establishment protocol should then have enough state in it that it can recognize a previous "broken" session, and resume where it left off. To make this more secure, each side can generate a strong random number for the session and send to the other end; the other end then sends this random number when re-establishing the session; the other end verifies that the peer trying to resume actually was the peer that initially ran the session (or someone REALLY good at guessing random numbers :-)

Share this post


Link to post
Share on other sites
There is a simple alternative I guess. You can try www.no-ip.com .Their client runs on linux, windows etc. It's pretty simple, they run a dns service that match the ip on the packets sent by the client running on your machine, so being behind a router doesn't matter if the router is correctly configured to redirect incoming packets but that's another subject.

You can also set the update delay to something low in case you really need it to be real time, their default is 30 seconds IIRC.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!