An IP address is like a telephone number that any computer can use to find any other computer in a network. All networked computers have IP addresses. Most have a static ip, that is, they don't change (for instance, at the time of writing, Google is 74.125.45.100, and typing http://74.125.45.100/ into your browser will take you straight to Google. That is Google's "public IP", aka. "external IP" (one of them), behind their NAT are probably thousands of separate machines, each with different "private" IP's (probably static, or more likely a mix of dynamic and static IP's), 192.168.1.1, 192.168.1.2, etc., we don't see those. But some IP's do change..
Home computers, by default, are set to get their private IP address dynamically from your gateway device (router), via dhcp, In other words, the router supplies a private IP address for your computer to use, temporarily (your router is probably doing NAT, too, and needs your computer to have an IP address, so it knows where to send your data packets). However, dhcp is not an ideal setup; if there is any interruption in the computer's network connexion to the router (you reboot your PC, for instance), a compleately new IP address may be assigned1.
For general (beginner's) use, dhcp is just fine, because it's easier; generally works "out of the box", requiring no configuration at all. But if you want to do more; run servers, p2p applications, interesting communication devices, etc, you'll be creating port forwarding/NAT rules on your router, to direct incoming traffic to a particular computer (the one running the server), and if you want those rules to be effective past your next reboot, you will need to get a static IP on your computer, so that the incoming data packets can still find you. Imagine the fun your friends and family would have contacting you if your telephone number changed every day!
okay, let's do it!
Okay, so you understand why you need to get a static IP, (apart from the obvious "cuz I want to forward my ports!") it's time to move on to the how part. "Private" IP addresses usually begin with 192.168** and must be on the same "subnet" that the router is on, in other words, 192.168.1.something, and NOT 192.168.4.something. Only the last number will be different from the address of your router which by default (at least for Voyager routers), lives at 192.168.1.1. 192.168.0.1 is also common. ** There are other private ranges, too, but most people don't need to know about those, 192.168.1.something is what most folk use, and though thousands of millions of machines in the world have 192.168.1.something as their private IP address, they don't interfere with each other because they are behind NATs and other gateways; from the outside, we only see the public IP address, aka. "external IP". HOWEVER, if your router uses 192.168.0.something, or 10.0.0.something, or something else from the private IP ranges.. 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 ..then don't hesitate to use THAT instead of the 192.168.1.something addresses I use in my examples, that's what most routers use, but not all. Do check. The best way to know what subnet your router uses, and thereby which IP to use, is to look and see what IP it has currently assigned to your computer. In Windows, it's in the Support tab of the connexion's Status dialog. A netstat command will get you the same information (and more) on most platforms, perhaps netstat -n. Your router's web interface will likely have all this information, too. If your router has USB, it has probably already grabbed 192.168.1.2 for the USB connexion, so that leaves you with any number between 192.168.1.3 and 192.168.1.254 to use for your private computers to use as static IP's, one unique number per machine. Remember to disable dhcp in your router before you start assigning static IP's.
For general (beginner's) use, dhcp is just fine, because it's easier; generally works "out of the box", requiring no configuration at all. But if you want to do more; run servers, p2p applications, interesting communication devices, etc, you'll be creating port forwarding/NAT rules on your router, to direct incoming traffic to a particular computer (the one running the server), and if you want those rules to be effective past your next reboot, you will need to get a static IP on your computer, so that the incoming data packets can still find you. Imagine the fun your friends and family would have contacting you if your telephone number changed every day!
okay, let's do it!
Okay, so you understand why you need to get a static IP, (apart from the obvious "cuz I want to forward my ports!") it's time to move on to the how part. "Private" IP addresses usually begin with 192.168** and must be on the same "subnet" that the router is on, in other words, 192.168.1.something, and NOT 192.168.4.something. Only the last number will be different from the address of your router which by default (at least for Voyager routers), lives at 192.168.1.1. 192.168.0.1 is also common. ** There are other private ranges, too, but most people don't need to know about those, 192.168.1.something is what most folk use, and though thousands of millions of machines in the world have 192.168.1.something as their private IP address, they don't interfere with each other because they are behind NATs and other gateways; from the outside, we only see the public IP address, aka. "external IP". HOWEVER, if your router uses 192.168.0.something, or 10.0.0.something, or something else from the private IP ranges.. 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 ..then don't hesitate to use THAT instead of the 192.168.1.something addresses I use in my examples, that's what most routers use, but not all. Do check. The best way to know what subnet your router uses, and thereby which IP to use, is to look and see what IP it has currently assigned to your computer. In Windows, it's in the Support tab of the connexion's Status dialog. A netstat command will get you the same information (and more) on most platforms, perhaps netstat -n. Your router's web interface will likely have all this information, too. If your router has USB, it has probably already grabbed 192.168.1.2 for the USB connexion, so that leaves you with any number between 192.168.1.3 and 192.168.1.254 to use for your private computers to use as static IP's, one unique number per machine. Remember to disable dhcp in your router before you start assigning static IP's.

..which is a clever screencap, showing you just how to get there. When you're done, okay everything to close all the dialogs. It's smart to use 192.168.1.3 as your address, especially if you plan to use any of the ready-made script kicking around here. I you are plugging your computers into a network switch (Good Idea!), it's also smart to plug each machine into its corresponding CAT-5 socket, router (192.168.1.1) into the first, 192.168.1.3 into the third, and so on, so you can see which is which at-a- glance. Mac OS X..

What you need is in the "Network" dialog of the System Preferences, and will look something like this.. Simply click the drop-down menu for "Show", and choose "Built-in Ethernet" to get that screen, enter all the details as above. Click "Apply Now", and you're done! Did you notice that on the Mac, you enter the Router's address into a space labelled as "Router", whereas, on Windows, you enter it into a space labelled "Default Gateway"? But then, the space for DNS servers is clearer in the Windows box. Seems we all still have a lot to learn from each other. Linux.. This probably isn't necessary, most Linux users know how to alter this stuff, but I suspect one or two may not. Usually you need to edit some plain text file (as root). On some Linux systems, the settings will be in /etc/rc.d/rc.inet1 (or whatever interface you are using), or possibly /etc/network/interfaces. I guessitmight look something like this..

Usually, your distro will have a utility for setting up your network, and one of the first things it will ask you, after you tell it you want "manual" and not "automatic" configuration, is what IP address to assign to the machine. It's usually called something like "Network Configuration", or "inet configurator" or whatever. you'll find it! In a shell you can probably do "netconfig", "netcfg", "Ifconfig", "neat", or "netset" (depending on your distro). Same story for UNIX, Solaris, BSD, etc.. The Router..
Many routers allow you to create something called a "static lease". Essentially, this ties a MAC address (the physical address of your network card, theoretically unique to your card) to a particular IP address. This has many advantages. Firstly, you don't have to mess with ANY of your computer's network settings, ever. Because the router is always going to dole out the exact same address to that computer, the usual DHCP settings will work fine. Your computer asks for any address, and always gets given the exact same one. It's not possible to give many specifics, because each router is different, but I can tell you that if you use IPCop as your gateway (A Very Good Idea), it's as simple as clicking one of connexions in the "Current dynamic leases" list, and pressing "Create fixed lease", in the DHCP server page. Two clicks, and you're set for life! You even can reinstall your computer's operating system, reboot, and there's your static IP again! That's it!
From now on, your machine will always be reachable at your chosen address. NAT rules will be permanent, and you can dabble in all sorts of interesting and esoteric communications devices, servers and p2p applications. If you have a few computers on your private network (LAN), you might want to consider giving them all names to go with their permanent addresses, so you can reach them by typing "workshop" or something into a telnet session/web browser/whatever. You could telnet to your router by simply doing telnet router, for instance. If you develop web sites, this is near essential. See here for more details. If you like, you can leave feedback (I thought it was about time this page had comments of its own - folk are coming straight here from the search engines, and it's getting popular!). If this page didn't help you, tell me about it! Have fun! ;o) (or notes.. If you were actually wondering how to get a static IP for your whole internet connexion; aka. external IP, aka. "WAN IP"; perhaps to run some live web site or interesting server from your home or office, well, that's not something we mere mortals can do from our side of the router. You will need to talk to your ISP. Note: Not all ISP's offer this service, and those that do will usually charge a premium. However.. Most people do not need this! Even those that think they do, or have been told they do. Instead, perhaps you simply need to.. Get yourself a no-ip.com address, and a DUC!
Note: DynDNS no longer offer a free service to new customers, so unless you want to pay for your DNS redirection, I recommend no-ip.com, freedns.afraid.org, or zoneedit.com, instead. Note, too: you can always get your current external IP address, a-la "what's my IP", except in plain text, right here. Very handy for automatic shell scripts, and more. Right now, it's 24.176.148.145. references: 1. This is very similar to the way you get a new external IP whenever you dial-up to the internet (some folks still do that) or disconnect your ADSL for a few minutes2 (less scrupulous net citizens use this "feature" regularly!). 2. Although it's usual to get a new external IP when you reconnect your DSL, it's not guaranteed. With some ISP's it happens rarely, with others you need to disconnect for a few minutes or more, with some ISP's, you always get a fresh IP with each connect, no matter how quickly you do it.
One thing is certain, though; unless you are paying them for a static IP, your current external IP address will change! 3. Remember, your external IP, and your local computer's IP, are two totally separate things (well, in this context). Almost no one needs a static IP for their external connexion, but almost everyone who wants to run peer-to-peer applications, ftp servers, and so on, will need a static IP for their local computer. The former is supplied by your ISP, the latter is down to you. Useful Links.. Your current external IP Your current external ip address, in plain text. Always avaliable. Handy for scripting. "Last IP" addon for IPCop What was your external IP before you reconnected your DSL? Handy. Port probe My handy port probe - instantly check if your server or p2p app is receiving connexions. Angry IP scanner Highly useful free IP scanner - handy for finding lost puters and routers on your LAN. DNS, Wiki-Style Comprehensive article about the magic of the Domain Name System. FAQ.. What is an IP Mask? And how do they work? The IP Mask simply describes which parts of an IP address are not going to change. IP addresses are currently 32 bit, expressed as four sets of 8-bit numbers (0-255), or "octets". Simply, 255 means none of the bits can change, 0 means all of the bits can change (it can also be any number in between). What sometimes confuses, is that IP Masks can be expressed in two different ways.. IP: 192.168.0.
