Re: At a loss figuring out if an IP is on LAN or INET
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Fri, 28 Apr 2006 06:47:31 +0200
Terry,
AFAIK are there three ranges reserved for internal use
10.x.x.x
150.x.x.x
192.168.x.x
If I am not completely wrong than the first two should therefore be enough.
Cor
"Terry Olsen" <tolsen64@xxxxxxxxxxx> schreef in bericht
news:ug3WninaGHA.4116@xxxxxxxxxxxxxxxxxxxxxxx
I'm writing an app that communicates with computers both inside and
outside my router. So I need to determine by the remote host's IP address
if I need to send them my LAN IP or my Internet IP. Someone suggested
AND'ing the IP and my Subnet Mask but I come up with this:
My IP: 192.168.0.14
Mask: 255.255.255.0
Result: 192.168.0.0
Should I just compare the first two octets? Or are there situations where
this would provide incorrect results?
.
- Follow-Ups:
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Grumpy Aero Guy
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Cor Ligthert [MVP]
- 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
- At a loss figuring out if an IP is on LAN or INET
- Prev by Date: Re: Function call problem
- Next by Date: Re: At a loss figuring out if an IP is on LAN or INET
- Previous by thread: 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
|