General A guide to your IP address
Reply
A guide to your IP address
A guide to your IP address

What is an IP address?
You can think of an IP address as being similar to the address on a house. There different levels to an address that become more specific as you go, lower levels need the higher levels for context. For example a house may be in Altlanta, on 5th street, house number 5945. The lower level, 5945 is meaningless without the Atlanta or 5th street. An ip address is the same way, but is a combination of 4 numbers, 0-255 sperated by periods(e.g. 209.0.1.72). This literally points to a computer or device on a network. "Network," can refer to the internet or your home network; it all works similar.

Internal vs. External IP
Your computer or your router has an address on the internet. This is your external IP. If you have a network then you will have an internal set of IP addresses for all of your local devices. Meaning your router will have an IP on the internet. This IP will be used to contact any device on your network when the connection is coming from the internet. An example of this would be a chat server, on port 2000 that you have setup on one computer. In this example we will say your routers IP address on the internet is 209.0.1.72, and on your internal network the computer running the chat server has an IP of 192.168.0.100. If someone across the country tries to connect to 192.168.0.100 it would point them to a computer on their network so instead they need to point to your external IP address of 209.0.1.72. The router will see someone connecting on port 2000... but it wont know what computer to forward the connection to. So in setting up a system like this you would go into your router and setup port forwarding. The rule would basically say, if someone connects to you (the router) on port 2000, forward them to the computer at 192.168.0.100. This closes the loop and allows them to connect to your chat server.

If you do not have a home network and your PC is connected directly to the web, then your external IP, and the IP of your computer are identical. You would just give them 209.0.1.72, and when they type that into their chat client it would directly connect to your computer where the chat server is waiting for them.

Finding your Internal IP
As described above, in order to have an internal IP you have to have a home network. If you don't have a home network using the steps to find Internal or External IP will yield the same IP address.

Click the start menu. For windows 7 and vista type "cmd" in the search bar, and run cmd.exe when it pops up. For prior versions of windows click run, and type "cmd", then hit enter. You should now have a DOS prompt. Type "ipconfig" and hit enter. This will list your internal IP address. It will most likely look like 192.168.?.?.

Finding your External IP
If you don't have a home network or are directly hooked to the internet you can use ipconfig as described above to find your external address. Alternatively, going to
http://www.whatismyip.com/
will always display your external IP no matter what your setup is.

HUB vs. Router
Hubs are pretty uncommon now days, but you may still have one of these. A HUB does NOT create a home network. Think of it like a splitter for cable television. It just replicates the single signal coming in the house and shoots it out to every PC that is connected. A router sends traffic to specific computers; it has a brain, a HUB does not. If you think you have a HUB instead of a router follow the steps above to check Internal and External IP. If they are the same number you might be on a HUB. If you plan on running any networking tools across more than 1 computer then you might have issues with your setup.

Internal IP addresing
By default most routers use DHCP. DHCP basically means that when a computer connects to the router the router decides what IP address to give to the computer. Usually its the next available address after 192.168.0.1. So first computer is 192.168.0.2. This is usually a convenient thing for most web surfers but when using network applications it means the internal IP addresses of computers can chaotically change with system reboots. The range of IP addresses can sometimes be customized by editing your router settings.

One alternative is to have windows request a certain IP from the router. One small downside is this is not centralized control and not every device connecting to your router is able to do this which can sometimes cause conflicts. Imagine you set your desktop to use 192.168.1.2. Now your computer is turned off and you walk into the house with your iPhone on. Your iPhone connects to the wireless and requests an IP address. The router, not having any idea that your PC wants 192.168.1.2 when its turned back on may hand that address to the phone since it is the next available. Now when your computer is booted it requests the same address, your router sees the conflict and hands it 192.168.1.3 instead, or has some other screwey behavior like booting your phone from the network. One solution to this is to use an address at the upper end of the available numbers. For example if you only have 2 devices then 192.168.1.9 should never be automatically assigned to everything and would be safer to use. Use this article to help you:
http://www.ehow.com/how_4393725_static-ip-address-win-xp.html

The method I prefer and use requires a router with this feature available. Some routers have firmware that can be refreshed to add this feature but firmware flashing can destroy a router if you aren't careful (and sometimes if you are). Refer to your router manufacturer for information about this. The method uses a table of devices mac addresses and the IP you want it to have. Every device that hooks up to wired or wireless network has a unique Mac Address. If your device has two network cards each network card will have a unique Mac Address. The benefit of this is it is centralized and the router handles it all. This makes it more efficient at overcoming unanticipated conflicts.

For all of these examples refer to the documentation from your routers manufacturer. If you think you can handle it, do a google for something like "Netgear router default IP". Then type that IP address into the address bar of your browser; you should get a login box. Now search for something like "Netgear default username and password". Type that login/pw and you should be in your router banging around.

Localhost
In the situation where your chat server is running on the same exact computer that you are running the chat client on you can connect to localhost in most scenarios. In place of an IP you can type "localhost" (sometimes), or "127.0.0.1". Both values basically point a computer right back to itself.
Wed Dec 08, 2010 11:18 am
Project Lead
General A guide to your IP address
Reply