Killing Floor

Killing Floor

55 ratings
Setting up a static IP in Windows.
By Nurdle
A quick and hopefully simple guide to setting up your PC with a static IP.
This is useful when it comes to port forwarding and hosting dedicated servers for games (not just Killing Floor).
   
Award
Favorite
Favorited
Unfavorite
Getting Started.
First of all there is some information that you need to gather about your network.
The information that you need should be accessable via your router.
What you are looking for is the Lan DHCP IP Pool.
This may be called something different depending on the manufacturer\firmware of your current router.



As you can see from the image taken from my routers page that my IP Pool starts at 100 and ends at 150.

Now that you know what your current DHCP IP Pool is we can get started on giving your PC a static IP on your network.
Finding your current IP assigned by DHCP.
To start with you need to access CMD prompt...
Start -> All programs -> Accessories -> Command Prompt.
When the Command Prompt opens enter...

ipconfig /all

This will display all information about your network adapters available on your current PC. Scroll through the list until you find your currently active connection.
Find the IPv4 Address and take note of what it is. It should be an IP address inside of your DHCP pool.



You will need more of this information for later. So keep the Command Prompt open.
Deciding on what your static IP will be.
Now that you know what your IP pool is you have to decide what IP you want to assign to your PC.

Here are some things that you have to take into consideration.
  • You cannot use the same IP as your router (Gateway). For most users this is 192.168.1.1.
  • For a static IP to work you have to assign your PC to an IP outside of the DHCP IP pool.

Armed with this knowledge and for the purpose of this guide I'm going to assign my static IP to 192.168.1.2
Changing to a static IP.
Click the Start button and in the search box enter "Network Connections" (without quotes).
In the list that appears choose "View Network Connections".



In the window that opens up right click your active connection and choose "Properties".



In the properties window highlight "Internet Protocol Version 4 (TCP/IPv4)" and then select the properties button or double click.



The next window that opens is where we will be entering all the information we need to give your PC a static IP.



Select "Use the following IP address:"
  • In the IP address box enter the Static IP you want. For me I would enter 192.168.1.2.
  • In the Subnet mask box enter 255.255.255.0. If you are unsure of your Subnet mask refer to the information given to you by "ipconfig /all" in the command prompt under your active connection.
  • In the Default gateway box enter the IP address of the router(Gateway). Usually 192.168.1.1. Again refer to "ipconfig /all"

In the DNS section of the properties page enter your routers IP (gateway) as the preferred DNS. You can leave the alternate box blank.





Select "OK" to save your settings and wait for a short moment. If all goes well you should now be on a static IP.
To check if you are, re-run "ipconfig /all" and check your active connection and see if the IP you entered is now your "preferred" IP.

If you loose your internet connection after this step try rebooting your PC. If it still fails you can easily revert the changes made and attempt to redo your static IP.

Alternative static IP assignment.
Some routers have the option to force a specific IP (static) from within the given DHCP IP pool.
This may be called DHCP IP reservation depending on the manufacturer\firmware.
This is an easier method of assigning a static IP to computers within your network.

First step is to find out what your current MAC address is for your active connection.
Load Command Prompt and enter "ipconfig /all".
Scroll down to your current active connection and look for the "Physical Address", this is your MAC address.



Access your router and find the section about "DHCP IP Reservation".
  1. Enter the details of the MAC address.
    Sometimes you may have a dropdown list of all connected devices on your network. Just choose the correct PC\MAC address from this list.
  2. Enter an IP you want your computer to have.
    The IP you choose has to be within your DHCP Pool. In my case any IP within 100 to 150.
  3. Choose a name for the computer, this makes it easier to identify the computer on your network.



Save and apply these settings.

Next load up Windows Command Prompt and enter the command...

ipconfig /release

This will send a message to your router to release your computer from the DHCP server.
Now enter the command...

ipconfig /renew

This will renew your computers IP from the DHCP server and assign you your new IP entered above. This step can take a moment or two to process so be patient.
Once it's finished run "ipconfig /all" and verify you have been given the correct IP.




Conclusion.
Why go through all this you ask yourself? Why not let DHCP handle my internal IP's?

Simple really. DHCP can assign you a random IP based on certain situations (I'm not gonna waffle on about it you'll just have to trust me on this!)
When this happens any\all port forwardings you have made in the router are now useless and any servers you host, games you play etc. become useless. You're then left with the tedious task of re-doing all your port forward settings.

With a static IP you will always have the same internal IP and so you will only ever have to port forward to that IP and it will never change. This makes life considerably easier.

Hope you find this guide useful.
20 Comments
Vladika 21 Nov, 2020 @ 5:15pm 
Okay, we'll try again tommorow. Thank you very much :lunar2019grinningpig:
Nurdle  [author] 21 Nov, 2020 @ 5:13pm 
Nope don't check LAN when creating a listen server.
Vladika 21 Nov, 2020 @ 5:08pm 
Should i host a LAN fame or internet one?
Vladika 21 Nov, 2020 @ 5:08pm 
Yeah i've done the alt method
Nurdle  [author] 21 Nov, 2020 @ 5:03pm 
yeah hosts port forward.
Nurdle  [author] 21 Nov, 2020 @ 4:52pm 
Been a while since I played KF. If I remember correctly, the Listen server is basically a peer to peer connection (your pc will be host and client). As for "DHCP binding", this is another method of assigning a static IP. Check the "Alternative static IP assignment" in my guide; it's the same as DHCP Binding. You just need to remember/know what IP your router has given you.
Vladika 21 Nov, 2020 @ 4:49pm 
Also, only hosts have to do port forwarding, right?
Vladika 21 Nov, 2020 @ 4:49pm 
Alright. Thanks for quick answer! Friend and i tried to port forward but it didn't work... but i'm quite stubborn. There was "DHCP Binding" option in my router settings so i think i managed to set a static ip... i opened ports that game told me and disabled firewall. Is there anything else i have to do? Should we use LAN/T1 option in kf connection settings? Should i check LAN when creating a listen server?
Nurdle  [author] 21 Nov, 2020 @ 4:37pm 
Yeah it's fully legal. This is just setting your PC on your network to an internal static IP (the IPs your router hands out to pcs on your network). This bypasses the DHCP server part of your router which is what most people get confused about.
Vladika 21 Nov, 2020 @ 3:22pm 
Thanks for the guide! Hope it's okay to comment in 2020 xD Are all of these things legal? ( i don't have a clue about networking lol )