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

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?




.



Relevant Pages

  • Re: NAT and ISA server
    ... Subnet mask ... This is what I have set in the DNS as well as the dns zones: ... when I disable the ISA server control from services it works. ... >> internal network internet access. ...
    (microsoft.public.windows.server.general)
  • Re: File sharing trouble
    ... > can ping the access point, and are online, however, they can not ping each ... Subnet mask: 255.255.255.0 ... If this laptop is already capable of reaching the Internet then you ...
    (microsoft.public.win2000.general)
  • Re: NAT and ISA server
    ... Subnet mask ... DNS-COX's DNS numbers ... The only problem I have now is I can't get other computers on the ... >> now we have to connect to a server in order to go out on the internet. ...
    (microsoft.public.windows.server.general)
  • Re: Internet Problem
    ... mean they have different host IP addresses but the same for subnet mask and ... with winsock on the computer and you can use the command netsh int ip reset ... I'm trying to setup a computer to use the internet throught a Ethernet ... With lan settings I have tried ticking on/off automatically detect ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Cant get connected to the internet w RHL9
    ... > configured your NIC with the correct IP, DNS, Subnet mask and Gateway ... > you should be able to connect directly to the internet like on any other ...
    (alt.os.linux.redhat)