Re: At a loss figuring out if an IP is on LAN or INET
- From: "Terry Olsen" <tolsen64@xxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 08:22:57 -0600
I don't see where the TCP vs. UDP issue comes in. Both have the source
address in the packet.
What source address is in the packet? The local, private IP? or the public
internet IP?
Maybe I just don't understand the problem. I can sorta see issue in
p2p swarming apps like BitTorrent or Kazaa where a third server needs
to keep lists of distributable IP addresses and the sender address might
not match the distributable address.
In this case though, it doesn't look like that's happening. So why
can't a node receiving a packet simply reply to the sender, without the
issue of embedding a user-defined IP address in the data.
Ok. I'm talking to multiple peers, some inside and some outside my router.
If I send out my private IP (192.168.0.14) to all peers as a return address,
then only those INSIDE my router will be able to respond. If I send out my
public internet IP to all peers, only those OUTSIDE my router will be able
to respond. I need to send the appropriate return IP address to each peer
determined by their location relative to 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.
That's going to break on any internal network with routing. In other
words, on anything larger than a very trivial home network.
I don't think I have to worry about this at all. Since I don't control the
corporate firewall at work (port forwarding & such), I wouldn't be able to
communicate outside the company boundaries anyway. I would simply send my
local IP (10.x.x.x) to all other peers.
.
- Follow-Ups:
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Chris Chilvers
- Re: At a loss figuring out if an IP is on LAN or INET
- References:
- At a loss figuring out if an IP is on LAN or INET
- From: Terry Olsen
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Terry Olsen
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- At a loss figuring out if an IP is on LAN or INET
- Prev by Date: Re: At a loss figuring out if an IP is on LAN or INET
- Next by Date: Re: At a loss figuring out if an IP is on LAN or INET
- Previous by thread: Re: At a loss figuring out if an IP is on LAN or INET
- Next by thread: Re: At a loss figuring out if an IP is on LAN or INET
- Index(es):
Relevant Pages
|
Loading