How can I force a static IP in Windows 7?

9

1

Windows 7 is not letting me force a static IP. even after setting the IP, Windows 7 still assigns it's own IP. I am simply trying to setup a NAS system in which I need to set my IP to a certain address. So I am only connected to a switch which connects to the NAS.

Seth

Posted 2011-07-20T14:32:51.397

Reputation: 103

How are you trying to set it? – Nixphoe – 2011-07-20T14:35:11.100

Um, through adapter settings – None – 2011-07-20T14:37:40.007

Anyone care to add an upvote so he can post a screenshot of his IPCONFIG/ALL? (once you are over 10 rep, you can edit your question and post a screenshot, or you can just post the results in the question. – KCotreau – 2011-07-20T15:09:01.753

@Kcotreau done! – Nixphoe – 2011-07-20T15:10:57.293

Thanks guys. This had to be forced with netsh. Dont know if you can replicate, appears win7 doesn't like to give you what you want unless you're connected to a gateway of some sort. – Seth – 2011-07-20T16:02:37.800

Answers

6

Try the command line and see if you have better luck:

netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1 

Nixphoe

Posted 2011-07-20T14:32:51.397

Reputation: 566

Is this the right syntax? I get errors in this format... – Seth – 2011-07-20T15:15:28.587

You can do a 'netsh interface ip set address /?' in the command line and it'll show you if it's correct. Just double checked it on my win7 box and it looks to be correct. – Nixphoe – 2011-07-20T15:21:03.513

Thanks Nixphoe, worked after a few tries. Not sure why this is made so complicated anymore. – Seth – 2011-07-20T16:00:47.457

I think this is a work around. Or a symptom of an issue. This might have corrected your problem, but I have a feeling that something else is going on. – Nixphoe – 2011-07-20T16:04:19.810

Agreed. Not sure what would tie that process down. No real stringent network applications on this laptop, or no 3rd party firewalls/security apps etc. No domain, simple workgroup. – Seth – 2011-07-20T16:09:25.190

7

Because a picture is worth 1000 Unicorn Dollars:

Go to "Network and Sharing Center" > "Local Area Connection" > "Properties" > "Internet Protocol Version" > "Properties" > Set a static IP here. Then "OK", "Apply" and "OK" again.

enter image description here

If this doesn't work try connecting your computer stright into the NAS (will need a crossover cable or gigabit network connections in both the NAS and computer).

tombull89

Posted 2011-07-20T14:32:51.397

Reputation: 6 533

1I've already stated I made the changes here. Should I have asked how to disable autoconfiguration? I have connected directly as well, the point is contained in my original question, WINDOWS 7 WILL NOT TAKE MY STATIC IP – None – 2011-07-20T14:50:20.500

Sorry, I'd started getting the info together before I saw the comment was posted. Yes, though. – tombull89 – 2011-07-20T14:52:27.707

no sweat :-) appreciate the comment though – None – 2011-07-20T14:54:00.313

I am stunned this issue isn't flaming boards across the internet. I came here to bypass naysayers and find someone who is without question on this. – None – 2011-07-20T14:56:36.333

You're not part of a network or a domain, are you? Admin setting may prevent you from changing network settings. – tombull89 – 2011-07-20T14:57:36.130

No not at all this is as vanilla as it can get man – Seth – 2011-07-20T15:04:56.530

"I am stunned this issue isn't flaming boards across the internet. I came here to bypass naysayers and find someone who is without question on this." Cause this ain't SlashDot. – surfasb – 2011-07-20T23:48:30.237

2

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

Do the same process for refreshing the TCP/IP. Type the following commands:

netsh interface ipv4 reset
netsh interface ipv6 reset
ipconfig /flushdns

Then reboot the computer. Once it's back up, go to your LAN adapter settings in the Control Panel, and try to set the Static IP information again.

pizzel

Posted 2011-07-20T14:32:51.397

Reputation: 21

1

I ran into this recently under Windows 7 and used the GUI to assign a static IP address to an interface, but it was still being additionally auto-assigned a link-local 169.254.xxx.xxx address. This stopped after I rebooted the system, however.

I suspect the DHCP service got confused and:

  • didn't correctly identify the interface as having a static IP,
  • kept trying to assign it a DHCP address, and
  • kept auto-assigning it the link-local address as a fallback.

If this was the problem, configuring a static IP via the GUI and via netsh might both work equally well.

user38983

Posted 2011-07-20T14:32:51.397

Reputation: 407

0

If you set a static IP like that you will get a static IP. You must be setting the wrong adapter or have some 3rd party software overwriting your settings (Also make sure that you are not using alternate configuration). Autoconfiguration only applies when you have dhcp enabled.

try running ipconfig /all at the command prompt and put up the result

JamesRyan

Posted 2011-07-20T14:32:51.397

Reputation: 1 591

-1

Try the following steps:

(1) First off, go to device manager and uninstall and reinstall nic drivers and then try to assign static IP.

if the above fails try next step.

(2) Run - type lusrmgr.msc - group - Network Configuration Operators - check whether the account name is there in the list, in case you don't find the name, Add it and try to assign IP once again.

Inquisitive Minds

Posted 2011-07-20T14:32:51.397

Reputation: 7