MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Windows 7 Static IP

with 120 comments

There are some subtle changes between Windows 7 and either Windows XP and Windows Vista. Since I use virtualization (with VMWare Fusion) extensively to test environments, I seem to go through this drill too often. By the way, I upgraded to VMWare Fusion 3 before testing the production releases of Windows 7.

The easiest Windows 7 installation uses DHCP. That’s what I did before patching the OS, installing virus protection software, and installing a few tools and program. Then, I change from a dynamic IP to static IP address and add a meaningful name to the C:\Windows\System32\Drivers\etc\hosts file. Here are the steps to set a static IP address on Windows 7:

WindowsControlPanel7

  1. Assuming that you’re in the Category view, you should navigate to the Control Panel, choose Network and Internet, and then click Network and Sharing Center. This is the window that you should see (click image to enlarge it):

NetworkSetup1

    Click the Local Area Connection to begin configuring your static IP address.

NetworkSetup2

  1. From the Local Area Connection Status window, click the Details button to see your existing connection details (most likely DHCP). If you’re running this in VMWare Fusion, the 172.16.153.129 is the first IP address allocated. You should note the default gateway and DNS server IP address, which should always be 172.16.153.2. Click the Close button when you’ve made note of those IP addresses for subsequent steps.

NetworkSetup3

  1. Back at the Local Area Connection Status window, click the Properties button. It will show you the Local Area Connection Properties dialog. Click on the Internet Protocol Version 4 (TCP/IPv4) in the item box of the dialog window.

NetworkSetup4

  1. Click the Use the following IP address radio button and enter the appropriate values for your static IP address. The default gateway and DNS server are generally different but are the same when you’re using NAT addressing inside VMWare.

NetworkSetup5

You should be completed now. If you test the connection, Windows 7 raises and error but everything works after you reboot the operating system.

Written by maclochlainn

November 26th, 2009 at 9:34 pm

120 Responses to 'Windows 7 Static IP'

Subscribe to comments with RSS or TrackBack to 'Windows 7 Static IP'.

  1. Will those steps be the same if I’m using a wireless connection?

    anonymous

    4 Dec 09 at 9:49 pm

  2. Generally, wireless IP addresses are allotted as DHCP addresses, but you’ll need to determine the range of wireless IP addresses that are available as static IP address, then you’ll need to define the use in the DNS server.

    maclochlainn

    4 Dec 09 at 10:20 pm

  3. Hi,

    I am troubleshooting with the connection using static IP address. I found on your last picture, that there are the Valid Static IPs only to 127??? Is that right?
    Because my internet provider gave me the IP ended by 228. Is there a problem or you can think of something else? Note: I don’t have problem to connect with my Win2000 and Linux-Ubuntu. Also the adapter is working, at work I am using Dynamic IP and there is everything fine…thanks a lot.

    Roman

    8 Dec 09 at 12:43 pm

  4. It’s hard to figure out what you need from what you’ve written. Can you do the following and post the results as a followup comment?

    1. Change the network settings back to DHCP.
    2. Reboot the server.
    3. When the server is back online, open a command shell (Run cmd.exe).
    4. Run this command, and put the results in a comment:

    C:\> IPCONFIG /ALL

    This is the part of the output that would help me identify what you may require in your settings:

    Windows IP Configuration
     
       Host Name . . . . . . . . . . . . : WIN-BIX95J1IL3W
       Primary Dns Suffix  . . . . . . . :
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : localdomain
     
    Ethernet adapter Local Area Connection:
     
       Connection-specific DNS Suffix  . : localdomain
       Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
       Physical Address. . . . . . . . . : 00-0C-29-59-59-E2
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : fe80::e95e:2afc:3a3c:6a68%10(Preferred)
       IPv4 Address. . . . . . . . . . . : 192.168.251.131(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Lease Obtained. . . . . . . . . . : Tuesday, December 08, 2009 6:07:06 PM
       Lease Expires . . . . . . . . . . : Tuesday, December 08, 2009 6:37:08 PM
       Default Gateway . . . . . . . . . : 192.168.251.2
       DHCP Server . . . . . . . . . . . : 192.168.251.254
       DNS Servers . . . . . . . . . . . : 192.168.251.2
       Primary WINS Server . . . . . . . : 192.168.251.2
       NetBIOS over Tcpip. . . . . . . . : Enabled

    This uses 192.* because it’s single NAT’d, and the VMWare Fusion default. As a note, the posting refers to a range in the 172.* range because that’s how VMWare Fusion maps IP addresses in a double NAT’d situation. Double NAT assignments like this occur in VMWare Fusion most frequently when the host’s IP address (Mac OS X) is in the 192.* subnet.

    – The range for static IP addresses is: 172.16.153.3 to 172.16.153.127
    – The range for dynamic IP addresses is: 172.16.153.128 to 172.16.153.255

    An alternate subnet configuration for a single NAT for most ISP DHCPconfigurations would have the following ranges with a 192.* subnet.

    – The range for static IP addresses is: 192.168.0.3 to 192.168.0.127
    – The range for dynamic IP addresses is: 192.168.0.128 to 192.168.0.255

    Look forward to hearing from you.

    maclochlainn

    8 Dec 09 at 7:22 pm

  5. The properties of the IPv4 is disabled in my windows !

    how can i enable it ??

    dmha

    27 Jan 10 at 2:45 pm

  6. If you navigate to the Control Panel, Network and Internet, and Network Connections, you should see a Local Area Connection icon. Click on that icon, it launches the Local Area Connection Status dialog. Click the Details … button and you’ll get the Network Connection Details dialog. In this dialog, you should see that you have either a IPv4 Default Gateway or IPv6 Default Gateway. If you have an IPv4 IP address, you should have properties for it. My guess is that you’re using an IPv6 gateway, which means you should set the properties for the IPv6. The interesting thing is that even if you’re not using the other protocol, the Properties dialog shouldn’t be disabled. Are you the Administrator account on the machine or a delegated user?

    maclochlainn

    28 Jan 10 at 12:33 am

  7. I have three hard-wired computers connected to a Westell 327W and it reports two of them properly, but it thinks that the third has a static IP address. IPCONFIG/ALL (for each machine) that DHCP is enabled and they all use the same DNS and DCHP server.

    What is wrong?

    Thanks.

    Pete

    14 Mar 10 at 6:38 pm

  8. Have you checked the hdcpd.conf file on your router? You can check this post for how to add a static IP address configuration in a VMWare Fusion hdcpd.conf file. It’s very similar. If you find one of the machines defined with a static port in that configuration file, you can remove the lines and restart the router to see if a new dynamic port is assigned.

    Alternatively, you could have a long license setting. That would make it appears it’s static when it’s cycle time is always less than the allocated DCHP license.

    maclochlainn

    14 Mar 10 at 7:07 pm

  9. Thank you excellent! It worked!

    Doina

    6 Jul 10 at 1:41 pm

  10. Somebody asked for the command-line syntax. You can check your existing interfaces by using this command:

    netsh interface ipv4 show interfaces

    It should return something like this:

    Idx     Met         MTU          State                Name
    ---  ----------  ----------  ------------  ---------------------------
      1          50  4294967295  connected     Loopback Pseudo-Interface 1
     11          10        1500  connected     Local Area Connection

    You can reset a static IP address with two commands if you want to also reset the DNS server. You only need the first command if you’re resetting only the IP address and leaving the DNS server value unchanged. I used the same IP values as the GUI examples in the original post.

    netsh interface ipv4 set address "Local Area Connection" static 176.16.153.87 255.255.255.0 gateway 176.16.153.2
     
    netsh interface ipv4 add dnsserver="Local Area Connection" address=176.16.153.2 index=1

    maclochlainn

    22 Aug 10 at 5:36 pm

  11. Hello. I have a problem setting this up. My IP and default gateway start with 145. DHCP server starts with 217. And I have two DNS servers one with 145. and one with 217. but the third parts of my DNS servers(numbers after the second dot) don’t match with my default gateway’s/IP’s. I’m not sure how to set this up. Could you help me please. Thank you in advance.

    Peho

    8 Sep 10 at 3:54 am

  12. Have you tried pinging the IP nodes to see if they’re reachable? I first ping from your local machine to the gateway, and then from your local machine to the DNS server. It is possible that they can exist on different subdomains. Since it doesn’t work, this where I’d start. Feel free to post results with a followup question.

    ping nnn.nnn.nnn.nnn

    maclochlainn

    8 Sep 10 at 5:39 pm

  13. i have a batch file which ran good for setting static IP in XP. but the same is not working in Win7. what i need to do? the batch file has the following code.

    netsh int ip set address name = "Local Area Connection" source = static addr = 115.109.202.54 mask = 255.255.255.224
    netsh int ip set address name = "Local Area Connection" gateway = 115.109.202.33 gwmetric=1
    netsh int ip set dns name = "Local Area Connection" source = static addr = 202.54.29.5
    netsh int ip add dns name = "Local Area Connection" addr = 202.54.12.164

    Anil

    10 Sep 10 at 7:04 am

  14. Can I put any numbers in the IP address field or there are specific ones?

    Igo Ras

    26 Sep 10 at 3:01 pm

  15. Wikipedia has a nice article on the general topic of IP addresses.

    maclochlainn

    26 Sep 10 at 6:04 pm

  16. IP of my PC is changed to static while on LAN; but how can I reset my IP to the previous network settings?

    simar samra

    12 Oct 10 at 8:34 am

  17. Simar, Was the previous setting a DHCP setting? If you refer to Step #5 in the post, you can check the Obtain an IP address automatically radio button to reset it to a dynamic IP setting. In this case a shell script is best to set and reset it. If I have time, I’ll try to generate a sample for you next week.

    maclochlainn

    13 Oct 10 at 9:34 pm

  18. I am setting up 2 Win7Pro laptops on a wireless network. Both will connect to the Cisco access point, but have no internet access. I can log-in to the wap. Though I set up and use static ip’s, when I check ipconfig, I see that autoconfiguration is enabled (ipv4) and an address has been assigned. I suspect the lan doesn’t recognize the addresses making the internet inaccessible. They both work fine over a wired connection. Can autoconfig be turned off?

    Don

    18 Oct 10 at 6:16 am

  19. Solved. Unlike XP, Win7 will not allow duplicate settings for gateway and ip in the wired & wireless adaptors. I went into the lan connection settings and selected ‘obtain ip automatically’, which then removes all of my static info.

    Don

    18 Oct 10 at 8:09 am

  20. why 172.16.153.129 ? can i use 192.168.1.115 ?

    sarn

    13 Nov 10 at 8:39 am

  21. If your subnet is 192.168.1, yes.

    maclochlainn

    13 Nov 10 at 10:36 am

  22. thank you so much for your help, after searching forever on google this fixed my problem

    chris hough

    17 Dec 10 at 5:54 pm

  23. Your write up is well done. As MS hides things more and more (they all do but MS wins the prize), it was hard to find the correct place to enter the static information – so thanks.
    I put in the correct static ip address, gateway, dns addresses, and updated the host file with the gateway and machine itself (no dns there). I rebooted many times – each time FAILURE.
    Ping says that the gateway in unreachable and the “Network and Sharing Center” shows “no network available” for IPV4 or IPV6 (I use 4). I have an SMC router (old) and use wired ethernet with several hubs as my cable modem is not in the house. The hub/switch I connect this PC to shows flashing lights enough to prove that I am “hitting” it and the light goes off when the box is off.

    I put back the VERY OLD XP box that I am replacing and all works fine (same config and IP). When the Windows 7 does tests, it says my gateway broadband modem is unreachable – “restart it and try again”. While that is NOT the case (other boxes see it fine), I did try restarting the modem and router just in case. The actual ethernet config is to a hub using bnc to another hub which connects to the smc router which connects to the cable modem. Perhaps this weird linkage bothers Windows 7, but it has bothered no other OS.

    I have had no problems using Linux and/or Sun boxes ever. Nor have I had problems with Windows 2000 or Windows XP. I am ready to abandon Windows 7 after 4+ hours trying to get this beast to work. I have an XP release that should work. I wanted the new box (my wife’s) to use the newest software and it looks nice, but if I cannot connect to the world – tis useless.

    :=[

    Ray Holme

    18 Dec 10 at 7:46 am

  24. When you updated the /etc/hosts file, did you use: (a) localhost and an IP address; or (b) hostname and an IP address? It should work with the former but the later requires name resolution. Do you have DNS server? Alternatively, did you define the hostname and IP address in your router?

    You might find this post useful, where I’ve by-passed a DNS configuration by modifying the DHCP file to map IP address.

    maclochlainn

    18 Dec 10 at 11:45 am

  25. I normally set up the hosts file like in Unix/Linux – e.g.

    127.0.0.1 localhost
    192.168.101.114 hawkmtn
    191.168.101.1 gateway

    where hawkmtn is the pc’s name; that is how I also did it on the prior XP box. I am not clear what you want me to try, but I will try a few scenarios (what the heck! – this has been VERY time consuming so far.

    Ray

    18 Dec 10 at 2:22 pm

  26. Tried many hosts file configurations.
    127.0.0.1 localhost
    then
    127.0.0.1 hawkmtn

    my IP with localhost combos – each of these 3
    a) localhost # alone
    b) localhost hawkmtn
    c) hawkmtn localhost

    rebooted each time – command window always pings me fine (by ip – did not try name, probably should have)

    cannot ping the gateway (host unreachable)
    gateway pings fine from another (linux) box

    :=[[[
    ” (tears in eyes)

    Ray

    18 Dec 10 at 3:43 pm

  27. Here’s a quick check list:

    1. Set the machine up first as a DHCP connection, and verify that you can connect to through the router to the Internet.
    2. Check the subnet value when that’s working, and the Gateway that it’s using. Ping the gateway from a command-line shell too.
    3. Then, enter the subnet you discovered and the gateway IP address. Enter a hostname or machine name for the computer through the Windows 7 interface for a machine name, and make sure that and the IP address are in the etc/hosts file. Verify that the IP is in the range of IP addresses for the subnet.

    If this doesn’t work, could you post the results. I’ll try to help you with it.

    maclochlainn

    18 Dec 10 at 4:49 pm

  28. OK, I re-configured my SMC router to support DHCP as a server giving it a range for 150-199 (left other addresses as fixed; IP range 192.168.101.xxx, with router/gate at 1, my linux box 101, and “target” for this PC of 114). I also used the MAC address (from IPV4 hardware screen address hopefully) to map this windows 7 box to…150 in the router.
    Rebooted Windows 7 box and set DHCP client as you suggested, got wierd address AND thinks I am public (109.254.111.191 using ipconfig ??); commented out the “hawkmtn …114 line in ../drivers/etc/hosts) and rebooted; still unhappy so ran net+share diag which says “waterford is not a valid IP address” (waterford is now the name of the adapter).
    Sometimes I run diag (net+share) and it reassigns the address to the …114 address (???); rerun and back to the …191 address). At points (not reproducible – I have tried so many things in what order? and yes I try to write them down), I have made the network and sharing screen LOOK better – it appeared to be connected but I never could ping the gateway by name or IP; nor could I ever get to the net (google is my testcase).

    Things get better when I stumbe into making it a private network, but it is hard to find the screen to do this; and it does not stick over a reboot (frequent test to make sure). I think I only got to set private when I was using static IP (which I tried again with 114 and 150). Back to DHCP —

    I see the packets hitting the hub (light flashes); know the box internet hardware works (was my linux box for a year), and the 114 address works fine if I plug the same cat5 cable into the old XP box (still works but dog slow).

    Rather than waste all this space on your blog page, please send me an email address. I will be happy to post the final results (or you can if you like) – assuming it works. I will try for 2 more days and then bail back to XP on tuesday – this is too much pain.

    Summary:
    a) think the network needs to be private but cannot
    set this easily (I have stumbled across it twice)
    and when I do – does not stick over boot
    b) cannot EVER ping the gateway on my private net
    c) DHCP is NOT getting a proper address from SMC
    – this address looks the same as before I
    reconfigured the SMC (gateway==router)
    d) best results (so far
    – making net+share screen better)
    – have been done with fixed IPs
    – still never got to net even when it looked good

    posted my more private email address as I read it more

    Ray

    19 Dec 10 at 9:47 am

  29. While waiting, I tried a couple things. First rebuilt system from the distribution CD – No changes – original comes up with wild IP address. Tried all tests again – failed (DHCP, fixed). Then figured it was either the driver file on the media was bad or PUNT. Downloaded new nvm62_64.sys file using linux, sneaker netted using ext. disk to PC. Renamed original driver, installed newer smaller driver and rebooted. Same results again. Renamed new driver and put back distributed original. So now PUNT or XP (I have run out of ideas).

    Ray

    19 Dec 10 at 1:49 pm

  30. The only thing left is the Windows firewall and/or some other security setting that I am hitting. Windows seems to think I am a public network and whenever I try to change to private, I fail either immediately or lose the info. on reboot. I should be a home or work private network (really home is right, but I have more devices than most home nets). There is only one gateway/router to the outside, and the SMC provides firewall protection (albeit old). Hope you have some clue as I have reached wit’s end. Have tried DHCP (get wrong IP from where?); fixed at addr I used to use; and fixed at the address that the SMC is programmed to provide for the MAC address of the PC.

    Ray

    20 Dec 10 at 6:31 am

  31. Having seen nothing from you in a couple days and no email for direct contact as I suggested, I will only say that I have screenshots and a quick summary. I highly suspect some security settings (firewall? or ??) on the Windows box is stopping it talking to the SMC gateway/router. Both DHCP from SMC and fixed IP fail absolutely for this box (and no other OS). The screenshots I have from network and sharing are VERY different that yours and could be a big clue but I cannot solve the indicated problems.
    In deference to the help you have given, I will post the final outcome if I can solve this. Feel free to remove this and all the other un-moderated comments as they are serious overkill for someone else to read.

    Ray

    21 Dec 10 at 8:07 am

  32. Ray,

    It’s the holiday season and I’ve got a daughter starting university in January. I’ve not been around to reply.

    If Windows doesn’t see the only networking option for DHCP as your router, there’s something wrong. It looks like the DHCP assigned IP game from your Internet provider. Dependent on what you’ve done on the router this could be a pass-through. Did you run tracert to see how the machine is connecting to the Internet?

    tracert oracle.com

    You appear to have a great grasp of networking but let me ask a couple quick wiring questions. The router is the only connection to the Internet service provider? The Intranet port connects to a wireless router, switch, or hub? The machine that’s not connecting uses wireless or a wire to which of the intermediaries provided earlier? Can you also post the result of the tracert?

    maclochlainn

    21 Dec 10 at 10:47 am

  33. I have been around forever – I tell grand children I pre-date dinosaurs. Used Unix since 1985, so networking is easy. My home (was office, now retired) net has 1 cable modem connected to an SMC barracuda router/firewall connected to one hub/switch which has a couple turned off computers on it. Then an OLD bnc cable runs to two other hub/switches which each have 2-3 devices on them (mostly off most of the time, not all computers). 2 devices + one computer (linux) are on all the time. I do not use wireless. I will try the tracert but can tell you now – it is NOT connecting to the internet at ALL, it cannot even see the gateway with a ping (SMC). Several friends who are more MS people than I am (I am not a fan!) have helped and the bottom line is that the on board nvidia on board chip and the router do NOT get along with Windows 7 – packets go out, but VERY little comes in (mostly 0; stats show and lights show activity). I am trying an ethernet board today and if that fails – back to XP. Will report results. By the way, there are a lot of documented problems with Windows 7 and routers on the web (mostly wireless). Yuletide best wishes. :=[

    Ray

    23 Dec 10 at 6:52 am

  34. tracert mumbled something about not knowing oracle.com (no surprise as it could not get to DNS)

    The third ethernet board installed had a Windows 7 drive installed. It worked. Thanks for all your help.

    Ray

    23 Dec 10 at 10:19 am

  35. Post Mortem:
    Windows 7 Home Premium seems to be shipped with a bad driver for NVIDIA’s on board chip set. I could not get it to work right with DHCP or fixed IP. Putting in a supported Ethernet board solved the problem for both.

    However, I would NOT recommend fixed IP for home networks unless you own the IP and are direct connected to the modem (Windows 7 and a private router firewall works unless you like being on a PUBLIC UNIDENTIFIED network).

    Finally I re-configured the router to support DHCP and had it assigns one address based on the MAC address of the board. This was the ONLY way I could get the network type to stay stable over a boot and be a named home network; otherwise I ended up with a public unidentified network every time (and the security settings there are horrid for a private net).

    Happy Holidays to all – it works!

    Ray

    24 Dec 10 at 11:23 am

  36. […] När jag nu äntligen tagit mig tid att sätta mig med det fick jag lära mig något helt nytt. För den som råkat ut för samma problem (och för att komma ihåg det själv) visar jag hur jag fått det att fungera. Jag hittade lösningarna i ett par poster om skrivaranslutning till Windows 7 och att ange en statisk IP-adress i Windows 7. […]

  37. Hello,

    I have set a static IP for my desktop and it works fine until I reboot (can be days, weeks, etc.). Then the default gateway IP has to be re-entered. It has gone back to blanks. Any reason why it doesn’t remain as I enter it?

    I am using static IP 192.168.1.140, and default gateway of 192.168.1.1

    Thanks.

    Larry

    5 Jan 11 at 9:33 pm

  38. Larry,

    I’m not sure there’s enough about your system to know for sure what’s going on. Do you enter your IP address in the dialog noted above in step #5? Have you configured your C:\WINDOWS\System32\Drivers\etc\hosts file with a line that maps your machine to that IP address?

    maclochlainn

    6 Jan 11 at 12:47 am

  39. Thanks for the reply.
    Yes, I use the step #5 dialog. No, I haven’t configured the C:\WINDOWS\System32\Drivers\etc\hosts files with a line that maps my machine to that IP address. Not sure I know how to do that. I appreciate any help you can provide.

    Larry

    Larry

    6 Jan 11 at 6:56 am

  40. Hi,

    I have a laptop,windows 7, static ip is set up at work, when go home, plug into cable modem and settings change back to DHCP. Is their anyway to not lose the settings for static ip? Thanks.

    Lisa

    Lisa

    6 Jan 11 at 9:44 am

  41. I added the following entry in the hosts file:
    192.168.1.1 localhost

    No change. When I reboot, the default gateway still gets cahnged back to blanks. All other entries remain correct.

    Larry

    7 Jan 11 at 4:44 pm

  42. Here’s a sample hosts file for Microsoft Windows:

    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
     
    127.0.0.1       localhost
    192.168.0.9     localhost
    192.168.0.9     mclaughlin11g mclaughlin11g.techtinker.com

    maclochlainn

    7 Jan 11 at 5:25 pm

  43. This is a guess but I suspect that at work DNS maps your hostname to a specific IP address. At home, your machine defaults to the address set by the cable modem.

    When you’re at work, you should navigate and see if you’re configured as DHCP or as a static IP address. Please let me know if this is a good guess or not?

    maclochlainn

    7 Jan 11 at 5:32 pm

  44. I am using this machine only at home. The default never changes yet it gets blanked out nonetheless. If I change to DHCP as opposed to static IP, the default remains set at 192.168.1.1 after a reboot.

    Very aggrevating !

    Thanks for your help. I will keep tinkering.

    Larry

    8 Jan 11 at 8:10 am

  45. When I try to access the P: Drive it says there is no connection. How can I restore this connection on Windows XP?

    Thank you.

    Stephanie

    10 May 11 at 9:54 am

  46. Stephanie,

    click the start window, right click on “My computer” left click “Map network drive”, then type”\\servername\share” if you do not know/remember these ask your domain administrator (assuming you are on a domain such as in a corporate office job)

    Lucas

    9 Jun 11 at 12:14 pm

  47. […] 8 Minutes Ago Try this link – Windows 7 – Set up with a Static IP Address. Or this one – Windows 7 Static IP   CPU-Z | GPU-Z Free Software Database, a growing collection of Freeware that has been […]

  48. Just what I was looking for – thanks!

    Ross Lennox

    14 Jul 11 at 2:29 am

  49. […] Moving To Sky Broadband Unlimited Follow this guide: Set Static IP Address in Windows 7 Use the following values in step 5: ip address: 192.168.0.50 subnet mask: 255.255.255.0 default […]

  50. I forgot to mention that I’m using xampp server (I know, it is said to be so easy to install and all). Local works but not network for my browser, is it because I need to make my IP static?

    Later all and enjoy!

    Anonymous

    28 Aug 11 at 1:49 am

  51. You don’t have to have to set a static IP address but you do need to set a hostname that maps to your DNS server allocated IP address.

    maclochlainn

    28 Aug 11 at 11:58 am

  52. thank you kindly sir, will work on that. :)

    Whitewidow

    28 Aug 11 at 10:12 pm

  53. Hola, me gustaria saber si me puede conceder una buena configuracion de IP para windows 7, osea los digitos del IP y DNS,

    Muchas gracias…

    Luis Caraballo

    1 Oct 11 at 12:53 am

  54. This helped a lot!
    Now i got my own ip, and it doesn’t change when i restart my computer!

    unknowd

    17 Oct 11 at 9:38 am

  55. Hey, I’m using a wireless connection. Are these steps the same as the ones listed? If not could you list how I can change my static IP with a wireless connection?
    Thank you very much …

    Joe

    9 Nov 11 at 9:16 pm

  56. Yes, they should work … but you should also allocate the IP to your machine. I’ve a close example that works for VMWare in this blog post.

    maclochlainn

    9 Nov 11 at 9:44 pm

  57. Hello,

    I’m desesparating searching a way to force my home computer to systematically go to the OpenDNS dns server in order to use remote parental control.

    I’ve started by changing manually the DNS IP address declaration by my son knows how to change the DNS setting through the TCP/IPv4 properties… So I tried to define an automatic windows task to run the “netsh int ip add dns name” command but it is not very efficient (change every 5 minutes only and a black box appears each time when running the .bat script…). So I’m looking to either use SNMP if the DNS address is in MIB-2 (I’m not sure yet) – or reading the messages in this forum to use the host file.

    Is there a simple way to configure the DNS server address to use in the host file (that would supersede any “manual” configuration) ?

    Thanks a lot for any advice.

    Fred

    28 Nov 11 at 2:14 pm

  58. Hi, ive completed everything besides the final part where you type in the Preferred DNS server. Im confused whether to make it the same as my Default gateway or different. and if different what should i change it to? thank you!

    Nick

    30 Nov 11 at 6:23 pm

  59. If you’re doing this on a home network, then the gateway is typically synonymous with the DNS server. In a production environment, the DNS server would be different IP address.

    maclochlainn

    30 Nov 11 at 7:48 pm

  60. I’ve tried all that you mentioned, and I’m still getting the AutoConfig enabled. How can I kill this via CLI?

    I’m connecting to one particular Cisco switch that forces this:

    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    IPv4 Address. . . . . . . . . . . : ***.***.***.6(Duplicate)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Autoconfiguration IPv4 Address. . : 169.254.240.87(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.0.0
    Default Gateway . . . . . . . . . :
    NetBIOS over Tcpip. . . . . . . . : Enabled

    Really banging my head on this one….

    KGonsalves

    1 Dec 11 at 10:32 am

  61. It appears that DHCP timed out. It can be an ARP error, an autoconfig problem, or DHCP is misconfigured.

    maclochlainn

    1 Dec 11 at 2:33 pm

  62. I borrowed a laptop from work this weekend, and now upon returning it this morning, it is reading Limited connectivity. It is Windows7, I have rebooted the wifi router. IPv4 and IPv6 both read no connectivity. I don’t want to have broken a work computer – what did I do and how can I fix it?

    Julie

    12 Dec 11 at 10:16 am

  63. I’d guess you just need to reset it to a DHCP address.

    maclochlainn

    12 Dec 11 at 12:57 pm

  64. Sir
    in my problem college wifi has full signal strength but it showing yellow “!” mark with no internet access message.before this i accessed the internet without any problem.PLEASE PLEASE PLEASE help what can i do.

    Nitish

    15 Dec 11 at 7:57 am

  65. when i ran DW WLAN card utility and diagnostic test showed internet ip ping failed.wt is the reason??

    Nitish

    15 Dec 11 at 8:00 am

  66. @maclochlainn: My dad asked me to fix his laptop’s wireless connection. At home our router uses DHCP but in his office they use static IPs. So when we’re at home I turn on DHCP everytime and at his office someone sets the static IPs everytime.

    Is there a way so that we don’t have to do this again and again? Something like 2 wireless profiles for home and office that you could just enable and disable? Thanks!

    Maw

    22 Dec 11 at 6:00 pm

  67. It’s most likely his stored profile where the IP address is stored. I’d guess they’re using a deployment/management software that overwrites settings when he logs in to the network. If so, disabling that would make the computer unable to connect at the office. That’s probably not desired.

    The easiest way to fix it, is write a batch shell script to reset it to DHCP. Then, provide your dad with a shortcut to your script.

    maclochlainn

    22 Dec 11 at 7:10 pm

  68. […] using a static IP address configure the C:\Windows\System32\drivers\etc\hosts file […]

  69. I have a problem. Whenever I pull up the details of my network, where there should be just the single IPv4 DNS Server, I have three servers. Should I just have my computer obtain the DNS servers automatically, or should I set the first server as the primary, the second server as the alternate, and ignore the third server?

    Will

    26 Jan 12 at 2:21 am

  70. In Windows, you generally have the Preferred DNS server and the Alternate DNS server. If the preferred server isn’t available, network resolution goes through the alternate DNS server. Configuring beyond the two requires stepping below the interface and that’s discourage for all but advanced users.

    maclochlainn

    26 Jan 12 at 12:27 pm

  71. When I clicked ok at the end of the last step, it had this one warning/alert and I didn’t want to click yes until I found out what it meant because I’m definitely not a tech person. Are you aware of this and/or know what this means?

    Stevie jonathan

    3 Feb 12 at 5:02 pm

  72. I’m not sure what you mean by warning, it would help me answer your question if you provided it.

    maclochlainn

    4 Feb 12 at 12:48 am

  73. Well it says “warning multiple gateways are intended to provide redundancy to a single network (such as intranet or the internet). They will not function properly when the gateways are on two separate, disjoint networks (such as one on your intranet and one on the Internet). Do you want to save this configuration?” as I said I’m not really a tech person so I want to know what it means before I click yes.

    Stevie jonathan

    4 Feb 12 at 3:56 pm

  74. Stevie, Are you trying to configure a second Network Interface Card (NIC)? Also, are you trying to set different gateways for each NIC card?

    maclochlainn

    4 Feb 12 at 6:31 pm

  75. No. Thanks so I’ll click yes and be on my way. Bye

    Stevie jonathan

    5 Feb 12 at 11:44 am

  76. […] تنظیماتی انجام بدم؟ نحوه ست کردن ای پی در ویندوز سون Set Static IP Address in Windows 7 | MacLochlainns Weblog شما بجای اعداد موجود در شکل راهنما اینها رو بزنید در […]

  77. Someone please help,
    I just purchased a AGFA Sherpa 43i Large format printer. It uses static ip ethernet. I can’t get it to talk to my computer, i’ve tried everything. Do i need to change some settings under LAN configuration button????

    rob

    1 May 12 at 2:29 am

  78. Interesting, Here it is two years after graduating and I stumbble upon your blog. Not quite what I was looking for but thought I would say hey.

    Hope all is well up north.

    Anthony

    10 May 12 at 3:25 pm

  79. Also stumbled upon your blog and your suggestions seem to help folks like me. I am frustrated with the lack of support I am getting from the US Air Force “Technical Support” people. I don’t think they really care very much. Up until last Sunday, I could access (via a Linksys router and cable modem) a VPN with the laptop supplied by the USAF. Worked fine. We had a power outage Sunday night, and can’t get thru since. I can use IE if I bypass the proxy server. I can also get into the VPN if I cable directly into the cable modem. What could the power outage have done to the wireless router? Is it fixable?

    Tripp

    14 May 12 at 8:36 am

  80. hello,

    I am using IP address 192.168.1.* with subnet 255.255.255.0. I am unable to connect. It is displaying Error Mark on network icon and saying ‘unspecified network’. I am using it for SCADA station.
    can any one help.

    sachin

    17 May 12 at 1:52 am

  81. Hi , I am using the Wireless Network Connection . can u please say the steps corresponding to that .
    Thanks ,
    Sathesh

    sathesh

    7 Jul 12 at 1:21 am

  82. Hey,

    When I was trying to set up a static IP address, the default IP address, subnet mask, default gateway and DNS server boxes were all empty.

    I entered my own static ip address and the other information I got from the ipconfig, and proceeded, some errors showed up but I continued because I thought I could change the settings back to default anyways. On that point I lost internet connection, so it didn’t work. Then I tried to put the settings back to default by emptying all the boxes, like how it was before.

    It didn’t work, I also tried to enter the information i got from the ipconfig with the real ip address, not the static of course, it didnt work either. What should I do now?

    I am just a Dutch 16 year old girl who wanted to set up a MineCraft server, so I’m sorry for my language use.

    Melanie

    14 Jul 12 at 5:35 pm

  83. You did fine. If you look at the screen shot for Step #5, click the Obtain an IP address automatically. It resets your computer to automatically get an IP address from your service provider.

    You shouldn’t have to reboot your system or open a command shell. However, if it isn’t resetting, you can do the following as a privileged user (the Administrator):

    You release current IP configuration settings with the following:

    C:\> ipconfig /release

    This tells the computer to go get a new set of IP addresses:

    C:\> ipconfig /renew

    Hope this helps.

    maclochlainn

    15 Jul 12 at 12:27 am

  84. Hi to all,
    I bought my computer preloaded with Windows7 basic edition. My instructor advise me to run Oracle/SQL Plus I needed to upgrade to Windows Professional. Is that true?
    My computer is four months old and has been sluggish every since he loaded this OS.

    Please help!!!!!!!!

    Keshia Scott

    5 Aug 12 at 8:43 pm

  85. An alternative would be to run Virtual Box and put the Windows Professional in it.

    Another alternative would be to open your services and make Oracle a manual service. This means it only runs when you need it. Oracle 11g XE takes a small footprint but Oracle 11g a large memory footprint. You can get to services by typing this run command:

    services.msc

    maclochlainn

    6 Aug 12 at 12:11 am

  86. I have a similar problem with connecting windows 7 desktops together using a 10/100 SMC Mini-hub. Windows XP was a snap, but windows 7 is difficult.

    Trying to setup a “static IP” on each workstation (192.168.1.5 — 192.168.1.7) Gateway = 192.168.1.1, no DNS server. I cannot not any ping workstations on the hub.

    Any help would be appreciated.

    Ron

    21 Aug 12 at 8:10 am

  87. Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
     
    C:\Documents and Settings\server>IPCONFIG /ALL
     
    Windows IP Configuration
     
            Host Name . . . . . . . . . . . . : sjtsg-8e07a387f
            Primary Dns Suffix  . . . . . . . :
            Node Type . . . . . . . . . . . . : Unknown
            IP Routing Enabled. . . . . . . . : Yes
            WINS Proxy Enabled. . . . . . . . : No
     
    Ethernet adapter Local Area Connection:
     
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
            Physical Address. . . . . . . . . : 74-EA-3A-85-29-FC
            Dhcp Enabled. . . . . . . . . . . : No
            IP Address. . . . . . . . . . . . : 192.168.0.1
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : 192.168.0.0
            DNS Servers . . . . . . . . . . . : 193.108.252.50
                                                193.108.252.51
     
    Ethernet adapter Local Area Connection 2:
     
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : VIA Rhine II Fast Ethernet Adapter
            Physical Address. . . . . . . . . : 00-40-63-FB-33-C1
            Dhcp Enabled. . . . . . . . . . . : No
            IP Address. . . . . . . . . . . . : 41.210.169.222
            Subnet Mask . . . . . . . . . . . : 255.255.255.252
            Default Gateway . . . . . . . . . : 41.210.169.221
            DNS Servers . . . . . . . . . . . : 193.108.252.50
                                                193.108.252.51

    PLEASE HOW CAN I CONFIGURE OTHER COMPUTERS TO ACCES THIS SERVER, I HAVE FIVE COMPUTERS TO CONNECT AND THEY ARE USING WINDOWS SEVEN

    Geri

    17 Sep 12 at 6:56 am

  88. Assuming you don’t have a DNS server, you can put the machine names and IP addresses in the hosts file. Then, file resolution of IP addressing takes over.

    maclochlainn

    17 Sep 12 at 4:32 pm

  89. Not very helpful unfortunately. I would say that 99.97% are using wireless, so you lost me at step 1.

    NK

    5 Dec 12 at 10:23 pm

  90. The first step is the same whether you’re on a wire or wireless. That leaves me curious why you didn’t find it useful.

    maclochlainn

    7 Dec 12 at 4:46 pm

  91. Hi. We have a laptop with hard wired ethernet adapter and a wireless adapter. We setup the static ip address
    for the hard wired adapter just fine as per your instructions. Running Windows 7.
    The static IP address does not “take” as shown by ipconfig. It is still being assigned by some magic hand.
    If we then hard wire the adapter to a router the static
    address is assigned correctly. However, when we then hard wire the adapter to a switch the static IP is being overridden by the magic hand. We have 2 laptops with this problem. The first was permanently fixed by connecting to the router, but the second just won’t take the static IP address. Any ideas? Thank you.

    MQ

    20 Dec 12 at 8:39 am

  92. MQ, Are the hostname values mapped to your DNS server?

    maclochlainn

    20 Dec 12 at 11:42 am

  93. I have never messed with the host file on Windows. Always had to on unix. You asked about hostname. Where/how should I look it up?

    MQ

    20 Dec 12 at 2:12 pm

  94. Drop down to command shell and type this:

    echo hostname

    The host file is found:

    C:\Windows\system32\drivers\etc\hosts

    What do you have in the hosts?

    maclochlainn

    20 Dec 12 at 4:07 pm

  95. c:\>FOR /F "usebackq" %i IN (`hostname`) DO SET MYVAR=%i
     
    c:\>SET MYVAR=MarkLap
     
    c:\>
     
    The laptop I am typing on is MarkLap. It had the same static IP problem, but it was permanently fixed when it was wired into the router. I will not have access to the problem laptop for 2 weeks, but I am researching possible solutions. Other Windows 7 laptops which the group is using assign the static IP without any problems.  Thanks for your help. MarkLap host file
     
    <pre lang="text">
    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
     
    # localhost name resolution is handled within DNS itself.
    #	127.0.0.1       localhost
    #	::1             localhost

    Here’s a message I found today which may fix the problem. I have not examined all the command details yet.

    Make sure that both the Obtain IP and DNS are on Auto.

    Then do a WinSock and TCP/IP Refresh.

    Type Cmd in the Start Search text box.

    Press Ctrl-Shift-Enter keyboard shortcut to run a Command Prompt as an Administrator. Allow elevation.

    Type netsh winsock reset in the Command Prompt , and then press the Enter key.

    Do the same process for refreshing the TCP/IP just replace the typed command with.

    netsh interface ipv4 reset press Enter

    netsh interface ipv6 reset press Enter

    ipconfig /flushdns press Enter

    Restart your Computer.

    MQ

    20 Dec 12 at 4:28 pm

  96. MQ, Try adding this to the bottom of your hosts file if the IP fits in your subdomain:

    192.168.0.9     hostname_value hostname_value.company_value.type_of_company

    If the following values are set:

    • hostname value: juno
    • Company value: samsonite
    • Type of company: com

    With the foregoing values, the line would be as follows:

    192.168.0.9     juno juno.samsonite.com

    Hope that helps.

    maclochlainn

    21 Dec 12 at 3:53 pm

  97. […] setarea adresei statice de IP a la dispozitie aceste tutoriale […]

  98. f.y.i. there is no such thing as “Network and Internet” settings.

    There’s Internet Options or Network and Sharing.

    Fred

    5 Jan 13 at 5:14 pm

  99. There is no local area connection shown on my screen.
    There is no IP address 172.16.153.2
    You do not indicate whether to run this in VMware fusion or not.

    You might consider clarifying at least the first several steps. I certainly cannot use the instructions.

    Fred

    5 Jan 13 at 5:23 pm

  100. I have a 2wire router and wanted to know if and how I can run my wireless system and also setup a static ip address to run my home camera security system. Do I need an aditional router to complete this or can I do it on the same router, or do I just need one static ip address to run both my computers and security syetem. If I do this will my wireless still work on all my other computers.

    Thanks

    steve

    10 Jan 13 at 9:28 am

  101. Fred, I added a screen shot of the Windows 7 default Control Panel, and you can see that the Network and Internet is an option. It’s the Category view.

    maclochlainn

    15 Jan 13 at 11:36 pm

  102. The post was written using Version 3 of VMWare Fusion. Several things have changed between Version 3 and 5 as to IP address numbers used. The suggestion in the posting was to first confirm the IP address by configuring a DHCP IP first. Did you do that from Step #3?

    maclochlainn

    15 Jan 13 at 11:52 pm

  103. It depends on if your security system is software or hardware. I’d suggest you check the security system’s vendor web site.

    maclochlainn

    16 Jan 13 at 12:12 am

  104. I have some confusion Plzz help me to clear as don’t know much about networking..

    I want to access a web application on computer that is part of a private network. The network has 15 to 20 comps having Ip’s of range 192.168.1.xx.

    I want to assign a static ip address provided by my ISP(Internet Service Provider), to the computer hosting my web application so that i can access my web app. from any where using a internet connection.

    Please let me know wats the procedure.

    Ashish

    Ashish

    17 Jan 13 at 12:32 am

  105. I’m having some problems. I’ve done pretty much everything by the book. I got my ipv4 and entered it and everything, but when I go to check my IP, it doesn’t change! Why? Here are my details:
    IPv4 Address :198.168.0.11
    Subnet: 255.255.255.0
    IPv4 Gateway: 192.168.0.1

    Dave

    24 Jan 13 at 8:14 am

  106. hello when i strat my pc i am not able to connect to internet. once the computer is on need to diagonise the problem in properties. i am using windows7 . when i start pc the error message for internet is cannot find ip . pls give the solution for this.

    zia

    1 Feb 13 at 10:31 pm

  107. What do you find when you run ipconfig from the command-line?

    maclochlainn

    1 Feb 13 at 11:56 pm

  108. […] There are some subtle changes between Windows 7 and earlier releases […]

  109. Thanks! Easy to follow guide, my net works now!

    harry

    12 Jul 13 at 1:35 pm

  110. I just spent a lo0t of time because I lost my internet connection. After reading about man web sites how to fix it I ended up here. The information greatly expanded my knowledge of ip address and how and where to set them. None of the solutions worked and I reviewed how I got to no internet connection, related to my ip address that was not being assigned correctly by my router. I had added a switch, and taken it out when the problem started. Then I moved things around and finally I pulled out my cable tester.

    My cable had lost one pair of the four pairs. I changed my cable and everything was back to working. Putting the switch in required me moving a cable and that cable failed when moved.

    TEST your cable before spending hours on everything else.

    Harry Samuel

    13 Jul 13 at 10:42 pm

  111. […] using a static IP address […]

  112. hi!

    my network connection details

    DHCP Enabled Yes
    IPV4 Address 192.168.0.106

    IPv4 Default gateway 192.168.0.1

    pls let me know wat to do!!!

    prashant patil

    16 Aug 13 at 10:55 pm

  113. Prashant, I don’t know what you’ve done. Have you followed the post instructions? What fails?

    maclochlainn

    16 Aug 13 at 11:29 pm

  114. I have no idea what I’m doing… I’m running a wireless connection to my laptop, but I just want to set up a server to play a game with a friend… And in order to play said game, I need a static IP. If you could give me any help at all, that would be amazing.

    Greg

    20 Aug 13 at 5:10 pm

  115. Whether the connection is wireless or not shouldn’t matter. You just need to determine the default gateway, and then determine you can typically assign a static IP in the range of the gateway. For example, if your gateway is 192.0.0.1 then you should be able to use 192.0.0.11 as your static IP address.

    maclochlainn

    20 Aug 13 at 6:59 pm

  116. Hi,
    I recently got windows 7 professional installed on my laptop. Whenever I am trying to connect to any ISP either through LAN or through a wireless router, the ethernet is not obtaining the ip address automatically although in the TCP/Ip prpoerties it has been set to “OBTAIN AN IP ADDRESS AUTOMATICALLY” ..it is only detecting static ip.What do think the problem is? and how do I solve it?

    Abhijnan

    22 Aug 13 at 3:54 am

  117. Abhijnan, Does the router support DHCP?

    maclochlainn

    22 Aug 13 at 12:07 pm

  118. […] to private static IP which are out of DHCP range (Again, configurable in Mio Box). For a look, Set Static IP Address in Windows 7 | MacLochlainns Weblog Summary: DHCP Server aka a Router feature to most simple networking case is like your parents, […]

  119. So, this didn’t work for me through wireless. I’m very Internet savvy, and have set up static ip for my two gaming systems and my wife and my Android devices and they work splendidly. But I tried this and added my laptop using one of the remaining static ip slots and it didn’t work. I tried all remain slots. Couldn’t connect me. Any thoughts?

    Bobby

    24 Jan 14 at 3:49 pm

  120. Bobby, Are you trying to have multiple network connections? Like, one DHCP and the other a static IP?

    maclochlainn

    25 Jan 14 at 11:16 pm

Leave a Reply