Jump to content
  • Advertisement
Sign in to follow this  
nifty

Problem with gateway

This topic is 5063 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, I'm using DirectX 9 (October 2004 Release). My OS is Windows XP with ServicePack 2. I'm using sockets (not WinSock) for networking. I've got two internet gateways on my LAN. Both the gateways are connected to different internet ISP's and hence would get different IP addresses. 1. I have a UDP server running on a machine with public-IP-address (say 61.X.X.X) By UDP server, I mean, it will be waiting on recvfrom(...) When it gets a message, I print out the IP address and port of the machine from where it came. I'm able to do this, because, recvfrom returns a <sockaddr> structure. 2. I have a UDP client running on a machine on the LAN on one gateway (say 192.168.1.1) When I send a message to the UDP server (61.X.X.X), the UDP server prints out the public IP address and port number of the machine it came from (say 219.100.100.100:1604) 3. I have a UDP client running on a machine on the LAN on another gateway (say 192.168.1.250) When I send a message to the UDP server (61.X.X.X), the UDP server prints out the public IP address and port number of the machine it came from (say 219.200.200.200:3008) 4. I have a UDP client running on a machine on the LAN on the gateway 192.168.1.250. When I send a message to the 219.100.100.100:1604 (the two machines on the LAN are on different gateways), the message is delivered successfully. And it says that it came from 219.200.200.200:3008. If I send the same message to 219.200.200.200:3008 (the two machines on the LAN are on SAME gateways), then the message doesn't come through, and no error is reported. What I mean to say is that, if I send a message from one machine on the LAN on a gateway <AAA>, to another machine on the LAN on the same gateway <AAA>, through the internet, it FAILS. But it works from different gateways. Is it normal, or is there any way to work around this? Regards Knox. ---------------------------------------

Share this post


Link to post
Share on other sites
Advertisement
There are some firewalls that still have this problem.

The work-around is to send to both the public and the private address of the target, when you start communicating.

The FAQ has some links about this, talking about NAT punch-through and introducer services.

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!