Jump to content

Get Both WAN & LAN IP Addresses..?


 Share

Recommended Posts

_GetIP

Remarks

This only returns the Public IP address of a computer or network (i.e. the

public IP on the WAN link of your NAT router). The address is determined by

accessing an external IP discovery web site like checkip.dyndns.org or

www.whatismyip.com.

Search the forums for some WMI methods of getting the active LAN IP since the @IPAddress info might not be the info that you want.

@IPAddress1

IP address of first network adapter. Tends to return 127.0.0.1 on some computers.

@IPAddress2

IP address of second network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress3

IP address of third network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress4

IP address of fourth network adapter. Returns 0.0.0.0 if not applicable.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...