1

Possible Duplicate:
Getting my IP address?

The connection provided to me by my ISP works on DHCP and it assigns a Class C (LAN) IP address to my Network adapter automatically. for example :

192.168.1.2

I know that once a device, any device connects to internet needs a unique (WAN) IP address. I want to know which (WAN) IP is being assigned to my PC when I connect to internet/browse.

Mr-Right
  • 595

4 Answers4

6

I want to know which (WAN) IP is being assigned to my PC when I connect to internet/browse.

No WAN IP is being assigned to your PC at all. It is being assigned an internal IP address by the device giving DHCP leases, most likely your router. When your computer wants to access the internet, it communicates through your border network device, which is probably the modem given to you by your ISP. External sites see your IP as the one assigned to your modem, no matter which node sends out data from your network. You can see that IP address on a site like whatismyip.org.

This is not technically NAT, which a lot of people confuse it with, but PAT (port address translation). Incoming data uses an ephemeral port number to reach your computer unless configured otherwise.

3

The easiest way to get your external IP address is to use a site like the aptly named http://www.whatismyip.com/

pkaeding
  • 1,490
1

It's your router that has the outside IP address, since it's the one that's directly in your ISP's network. This address is shared by all the computers in your home, which are all contained in a separate internal network where internal IP addresses are granted by the router acting as DHCP master. The router acts as a gateway, since your internal home network is otherwise completely cut off from the rest of the world.

When connecting to the exterior, the router acts as your agent and establishes the connection for you, shuttling requests and data between your computer and the outside computer. That means that when connecting to the outside, ALL your internal computers seem to the Internet at large to have the same IP address, which is actually that of your router.

The site What is my IP address will tell you your IP address and explain all the involved concepts.

harrymc
  • 498,455
0

I second pkaeding's suggestion.

Alternatively, you could run a tracert, and the first router that is returned should be your "external IP/WAN IP" as you refer to it.

jefflunt
  • 277