How to assign static address to a computer

When you connect your computer to the network (either with network cable or through wi-fi) it gets assigned with unique IP address which is used to identify it on the network. There are two ways to do the assignment. One way is through DHCP (Dynamic Host Configuration Protocol) when address is dynamically allocated by router. Alternative is a static IP address assignment when computer tells router which IP address it wants to use. DHCP is enough for most of the cases. Also it is the most flexible way of IP address allocation since it doesn't produce conflicts when two devices request the same IP address on the network. But there are certain cases when static assignment is important.

For example if you want to run a game server on your computer you may need to set up port forwarding for it which requires computer to have static address (see "port forwarding" article).

Another case when you need static address is if you decide to run a web server from your home network. When router receives a request for a web page from your web server it needs to know exactly where to forward this request.

Below we describe steps on how to assign static address to a computer (on Windows OS):

  1. Launch Control panel
  2. Select Network and Sharing center

  3. You will see a list of active connections on your computer. Double click on the one which is active (usually you will have just one or two connections - one for cable and one for wi-fi).
  4. 4) Screen with current connection parameters will appear. Click on "Properties" button.

  5. 5) In the list of "This connection uses the following items" select "Internet Protocol Version 4" and click "Properties"

  6. New dialog will pop up where you should type IP address you want to assign to your computer, subnet mask (typically  and your router address as default gateway. To get more details on subnet mask please read In short mask defines which IP addresses could be assigned to hosts within your network.

  7. 7) Press OK on this dialog and dialogs before it. Once it is done your computer will try to reconnect to network with new static IP address. If this address is available connection will be successful. If not you will see an error that this IP address is already in use.