*
Login 
  Wednesday, September 08, 2010  * Static IP Address  
  Navigation 

Dynamic vs. Static IP Addresses
How to set a static IP address on a machine in your network
(Recommended for your game server)


By default, most routers and residential internet connections are set to use DHCP.   In geek, this is "Dynamic Host Configuration Protocol", but in plain language, this means that IP addresses are assigned to equipment automatically, and this also means that the IP address is "dynamic" and subject to change automatically.   The alternative is a "static" IP address, meaning that it will not change.

Note:  The following is very basic, and written from experience with the Linksys and DLink routers.  Your router may differ from what is explained here, so if confused, please try our forum for help.

Internet IP address (WAN / Wide Area Network)

With most residential internet connections, the internet IP address is dynamic, and therefore changed by the ISP (Internet Service Provider) at various times as they see necessary.  Running a server from home on a dynamic IP means that you need to announce to everyone when your IP address changes because they will no longer see your server if it changed.  It can be frustrating at times because you have to monitor this constantly to watch for IP address changes.   In many cases, at least here in the U.S., to get a static IP address, you will have to pay more for the service.

When you install a router with a dynamic internet IP address, you just connect the router and it will get the IP address from your ISP automatically, populating the WAN (wide area network) settings on your router.   The ISP will assign an IP for your equipment (your internet or WAN IP) and it will also assign a gateway address, subnet mask, and at least two DNS addresses (all look like IP addresses  000.000.000.000). 

If you had a static IP address with your ISP, you would have to enter all of the settings on the router before connecting the router to the internet.  Typically, it is all done for you automatically.... dynamically.   Ask your ISP for information on obtaining a static IP.

Is it necessary to have a Static IP Address (WAN) to run a game server?  No, not at all.   All you would need to do is monitor the IP, and when it does finally change, you just need to tell others of the new address.   A static IP is really nice to have, but not required.  

This shows your current IP address.
robtex 

Local or internal network IP address (LAN / Local Area Network)

On your internal network (between the router and your computers, or LAN / Local Area Network), the process works very much the same as on the internet or WAN.  By default, most routers are set to run with DHCP when you turn them on.   The IP addresses are assigned automatically by the router on each computer or item of equipment attached to the router (dynamic IP).   For most people on home networks, this is wonderful because you do not need to worry about any of the settings, or even care what an IP address is.

However, when you are running a machine such as a game server, DHCP can cause headaches because IP addresses change.  Since you need to open ports on a router for it to communicate properly with the internet, and the settings are loaded by the machine IP address, each time the IP changes, you need to remember to go back in and fix the port settings.   This can happen each time any equipment is reset or powered off and on, and it can be really frustrating. 

To get around this, a server should have a "Static" IP address, an address that doesn't change even after you power down and power up again.  You can set this in your local network easily.   You can disable DHCP on the router, but I would not recommend this since it would mean that you must setup the network connections on all machines manually.    You can leave DHCP enabled, and just set a static IP address on specific machines like a server, and DHCP would continue to function with other machines.

To set a static IP address on a PC, you will need to go in and change network connections.  The following guide will describe how to do this on Windows XP Professional, but other versions of windows and operating systems should be similar. 

Setting a static IP address (LAN)

1.  Gather the necessary information first.
You will need to know some key information before getting started.  You can get all of the data you need from your router, if it is already connected to the internet / network.   Login to your router. 

(1a.)  When you browse to your router to login, you use an address of the router such as http://192.168.X.XXX.   This 192.168.... number is your "gateway" address for your LAN, or Local Area Network and will be needed in steps below.  It is most likely something like 192.168.0.1 or 192.168.1.1 or very similar, possibly 192.168.1.2.

(1b.)  Once you login to your router, you should find a screen with WAN connection or WAN Status information (WAN = Wide Area Network or the internet).    It should display a WAN IP address for you (your internet IP), and also a subnet mask, Internet gateway address, and at least two DNS addresses.   Each will look similar to an IP address, but you need to write them all down.   (The gateway address here is different from the gateway address mentioned in (1a) above.)

(1c.)  There should also be a screen in your router with DHCP settings.    In here, there will be a field with a DHCP starting range.  In most routers by default, this is set to 100, and this is the starting number for LAN IP addresses the router will assign dynamically.  

Example:    Assume that the LAN gateway address, as mentioned in (1a) above is 192.168.1.1, and the DHCP range or starting number is 100.   This means that when the first PC is connected to the router, the PC will be assigned an IP address 192.168.1 from the gateway, and 100 from DHCP, making the full address 192.168.1.100.   The next machine to get connected would be assigned the address of 192.168.1.101, and the next would be 192.168.1.102 and so on.  

(1d.)  To determine what addresses you can use for static IP addresses on your local network, you just need to know the gateway address on your router (LAN Gateway, or the address of the router), and the lowest number for IP addresses used by DHCP.   In the example above, the gateway is 192.168.1.1 and DHCP starts at 100.   This means, you can use addresses between the two or from 2 to 99.   Again, as in my example, addresses 192.168.1.2 through 192.168.1.99 would be available for static addresses.  You do not need to assign numbers in sequence, you can pick any number in the range available.

2.  Assigning the Static IP to a PC  (Win XP Pro)

(2a).   Access your network settings.  
Start, Control Panel,  Network and Internet Connections, Network Connections

Control Panel

Network and Internet Connections

Network Connections

In the image here, there is one connection icon.   You may have a few connection icons, depending on your system and the equipment attached, but you will need to change the connection that is for your internet connection.  It may say local connection or internet.

(2b.)  Right click on the internet connection icon and you will get a small menu window as displayed in the image below.   Then click on Properties, which will open up a new window.

Right Click on the Connection Icon for your PC.

(2c).  After you click on the properties option as in the image above, the window will pop up as in the image below. 
Click once on the "Internet Protocol (TCP/IP)" setting to highlight it, as shown in the image below, and then click on the "Properties" button.

(2d.)  By default, the settings would show as in this image below.  The button is selected to "Obtain an IP address automatically", which means that the PC getting the IP address as assigned by the Router (or ISP).   The same is true for the DNS, to "Obtain DNS server address automatically:    This is how it is set for a Dynamic address / DHCP.

(2e.)   To set the static address, click on the button next to "Use the following IP address"

Enter the data based on your own settings!

default gateway.  In this example image below, the default gateway or router address is 192.168.1.1 but your address could be slightly different.  For default gateway, you would use the same address that you use to access your router.    

IP address.   This would be an address where the last section of the address would be higher than the gateway address, but lower than the starting range for DHCP.   As in the example mentioned in 1d above.    In my example here, I have used 51 for my address.    

For subnet mask, the address would be the same as obtained from your router in step 1b above.

Then, click on the button for "Use the following DNS server addresses" and enter the two DNS addresses that you obtained from your router in step 1b above.   The DNS addresses are required for internet connectivity, and these addresses are specific for your internet service, assigned by your ISP.   The numbers in the image below are only examples.

Once you have completed the setting on this section, click OK, and then click OK on the other windows, exiting network connections.   Windows XP will reset your internet settings immediately, based on what you input.   It may take a moment or two to process the changes, so let windows finish the process completely.

3.  Check the settings

Test your connections by using your browser.  If you can browse the web, the process was performed successfully.  

You can check your settings by displaying your IP address anytime.   In windows, click on Start, then RUN, and a small box will display with a field for "open".  In the field type  CMD and press OK, and a command prompt screen will display as in the example below.

In the window, type ipconfig as you see in this picture, and then press Enter.

After you press enter, it will display your IP address as in this image below.   Here you can see the IP address as assigned to the machine, the subnet mask for the lan, and the Default Gateway address, which is the router address.

Type exit in the window to close it... and you are done.

You now have a static IP address on the machine that will not change unless you change it yourself. 

If this was a gaming server, now go into your router and make sure the port settings are adjusted to reflect the static IP address you assigned to the machine and you will be finished.

That is all.

Copyright ©© 2002-2010 TMMworld
*
Powerd by TMMworld Dot Net Services   Terms Of Use   Privacy Statement