How do I discover my public IP Address?

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

Posted 2010-01-23T07:27:29.450

Reputation: 595

Question was closed 2010-01-23T11:22:42.740

Grrrrrr, classes of IPs are antiquated and aren't used anymore. Everything is CIDR now. – MDMarra – 2010-01-23T08:29:06.387

Wait, so your ISP assigns you an IP address like 192.168.1.2, or is that just the IP address of your network interface inside your network (found using ipconfig)? – Josh Hunt – 2010-01-23T08:29:29.647

Answers

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

Posted 2010-01-23T07:27:29.450

Reputation: 306 093

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.

John T

Posted 2010-01-23T07:27:29.450

Reputation: 149 037

"No WAN IP is being assigned to your PC at all." this is not exactly accurate, i know quite a few folks here in rural areas on a backhaul wireless network where the WAN address equals the local IP address. and certain routers offer a feature called IP passthrough. – None – 2010-01-23T11:29:24.020

2@Molly, he indicated his network has the address 192.168.1.2, which is a private address. I never said "A WAN IP address is NEVER assigned to your PC", you have to read things entirely before making comments. It is entirely true. – John T – 2010-01-23T19:52:11.597

+1 for whatismyip.org - lightweight and does it's job! and dead on with your answer... As for "IP Passthrough", it is simply NAT which is disabled which "passes through" IP Addresses. @John T Never heard of PAT - going to do a bit of reading! – William Hilsum – 2010-01-24T02:33:41.060

I'm observing technical details. while John's answer is correct it is not entirely impossible to have a public IP address assigned to a PC. – None – 2010-01-24T02:48:40.430

4@Wil @Molly Keep comments related to this question and answer. I have removed/edited comments. – Troggy – 2010-01-24T09:16:54.297

3

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

pkaeding

Posted 2010-01-23T07:27:29.450

Reputation: 1 420

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

Posted 2010-01-23T07:27:29.450

Reputation: 277

tracert will show your router's private address, something like 192.168.X.X. – John T – 2010-01-23T07:55:20.477