Re: At a loss figuring out if an IP is on LAN or INET



I'm curious, why do you need to do this? The remote host should already
know how to respond to you. If you're sending an IP to a third host
that distributes the IP (like many P2P networks), then using the IP
address to determine local vs. remote isn't going to help you, because
you'll have conflicts with identical addresses.

There should not be any identical addresses. I am writing a P2P application
that communicates via UDP (as an experiment, I know UDP isn't reliable for a
chat application). I want to be able to communicate with other peers both
inside and outside my router. Since there is no TCP connection from which to
read the remote IP address, when one peer sends a message to another, it
also sends the return IP address. So I need to be able to determine if the
peer is inside or outside my router so I know which IP address to send as
the return address. I won't be sending my "192.168.x.x" address to anyone
outside my router, and I should not received a private IP from anyone
outside my router.

I believe I understand now how to get the "network address" by AND'ing the
Subnet Mask with with each IP and comparing the results. I'm going to try
that.


.



Relevant Pages

  • Re: Still WRT54G probs
    ... Works OK mostly...better since SSID changed, ... > Wireless Network Connection, with a little bar graph at top right ... not router or other ... When you view available networks when you are NOT connected... ...
    (alt.internet.wireless)
  • Re: One Gateway, Two Networks
    ... PS - Yes, Doug you're right, they only have four LAN ports and a telephone ... Netgear DG824M gateway router. ... folders on our networks, but now we we'll be sharing, I'd rather set us up ...
    (microsoft.public.windowsxp.network_web)
  • Re: probably an easy routing question, so please help
    ... plugged into the same gigabit switch as Server B in Block 2 and they ... from a 10Mb link to the router and the computers are both hooked into ... not run out the 10Mb port to the router with all of its traffic, ... nodes in the two networks you don't own. ...
    (comp.dcom.sys.cisco)
  • Re: One Gateway, Two Networks
    ... Netgear DG824M gateway router. ... folders on our networks, but now we we'll be sharing, I'd rather set us up ... computers to LAN ports on the first additional router. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Static vs. Dynamic IP
    ... computers, giving the illusion of static addresses. ... It's possible to restrict networks like this but IME it would be ... my two computers to my own router. ... Perhaps it's a bridge between the fixed and the wireless networks. ...
    (uk.singles)

Loading