Setting A Static IP For A Computer

2 minute read

Description:

Some Network Admins like to have their workstations set to static IP’s through a certain range. This means that the computer is telling the router that if it will have internet/local access, it will be at a specific address rather than the router just handing it whatever in the DHCP range.

NOTE: It is considered bad practice nowadays to have client computers with static IP’s.

Most admins set servers and networking devices statically in a specific range and all the client computers to DHCP. If a computer must have a static IP, it is almost always done at the server level and not on the actual client (they will be set to DHCP but will have a reservation at the server).

To Resolve:

From the Client:

  1. run => cmd => ipconfig/all. Is it setup statically already or DHCP? Sometimes you may want to place that computers DHCP address as a static IP. Either way, lets set it through the GUI:

  2. Run => ncpa.cpl => Local Area Connection => Right Click => Properties => Internet Protocol Version 4 Properties => Properties.

  3. Change it from “Automatically..” to “Uses the following” and enter them there.

  4. For the primary DNS Server, set it this way:

    • If the computer is on a domain, set the primary DNS to the DC’s IP address and leave the secondary DNS blank.
    • If the computer is on a workgroup, set the primary DNS to the default gateway and the secondary to a public DNS server, I always use 8.8.8.8.
  5. Select “Apply” and “Close” for it to take effect.

Through Command Prompt:

  1. run => cmd =>

    1
    2
    3
    
    netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1  
    netsh interface ip set dns name="Local Area Connection" static 192.168.0.250  
    netsh interface ip add dns name="Local Area Connection" 8.8.8.8 index=2
    
  2. The first netsh command assumes your adapter is named “Local Area Connection” and you want set a “static” IP Address of “192.168.0.100” with the subnet of “255.255.255.0” and a gateway of “192.168.0.1”.

  3. The second netsh command assumes your adapter is named “Local Area Connection” and you want set a “static” IP Address of “192.168.0.250”

  4. The third netsh command assumes your adapter is named “Local Area Connection” and you want set a add a second DNS IP of “8.8.8.8” at index number 2.

  5. Repeat step 4 for each DNS server that you want to set, incrementing the index= number each time.

From the server:

  1. Login to your DHCP server => Open up DHCP Management. Go to leases and convert a lease to a “reservation”. That’s it!

setting-a-static-ip

  1. Another way to add a static IP is to specify an IP Address and use the MAC of the device and add it to the reservations. This is my preferred method for printers.

  2. That is generally best practice to set static IP’s for network devices / key servers only! Computers and printers don’t really need to be up before the DHCP server.

Comments