Sign in to follow this  
nifty

Problem with gateway

Recommended Posts

nifty    122
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
hplus0603    11356
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this