0

I want to set a static IP address for one network adapter. I have all the settings for IPv4 set to static. When I run ipconfig /all in command prompt I get this as the settings for the adapter:

enter image description here

The address that I want is 192.168.7.1 you can see that the settings have partly taken effect however the computer is still assigning the automatic IP as the preferred one and making the IP that I want the "Duplicate". Why?

How do make windows assign the IP that I want without it making the one the auto configured IP the preferred one?

I don't want to disable auto configuration as described here as it would turn auto configuration off for all network adapters, not just the one that has to be static.

5
  • This shows that the address 192.168.7.1 is already in use by your router, hence when you try to use the same address on your Windows machine it is flagged as duplicate. Dec 25, 2016 at 23:05
  • The only other place would be on the device that it's connected too but thats what i need the computer to talk too Dec 25, 2016 at 23:07
  • Hmm? Your router (Default Gateway) is already using that address. You can't assign the same address to interfaces on two different devices and expect them to communicate. They need distinct addresses on the same subnet. Dec 25, 2016 at 23:09
  • Hmm, well i just changed it to 7.2 and it worked gonna try and SSH into it if that works i'm going to feel really stupid :( Dec 25, 2016 at 23:10
  • Yeah that worked... ups :/ you should put that as the answer bellow (since it fixed the problem). Thanks for the super quick response :D Dec 25, 2016 at 23:12

2 Answers 2

0

The screen shot shows that the router in your setup is already using the address 192.168.7.1, so when you attempt to set the same address statically on your windows machine, it detects the address conflict and overrides your choice by using a link-local address in the 169.254.* block (which does not allow you to connect to anything on your LAN).

Note that the same thing could have happened with any other device on your network and it would be less obvious, because the other address would not conveniently appear in your ipconfig /all output.

Set your address to any non-conflicting address on the same subnet and you should be fine. When you use static addressing (or a mix of dhcp and static), it is important to be cognizant of all addresses used by devices on your network to avoid conflicts.

0

Setting a static IP address is fine, but there are normal conventions to it. One being a router is going to be the first in the range of IP addresses you are using, which is normally the 192.168.1.1. The range is determined of course by the subnet mask, which for most home networks should only be 255.255.255.0. I also mention convention because most AT&T routers will us the last IP of 129.168.1.254

So if you truly "wanted" your device to have that address you would first need to change the internal IP address of your router. Then you could set the devices IP to that, and not before otherwise you have network packet ambiguity

8
  • The conventions might apply to routers and other networking equipment that is at edge or infrastructure part of the network but there are two computers that are linked directly to each other. Having a dynamic address between them would only complicate things so the configuration is only shared between those computers and isolated from the rest of the network so their settings shouldn't matter :) Dec 25, 2016 at 23:16
  • if you need a single direct connection I would also set the subnet mask to 255.255.255.252 and obviously give the IP addresses a different range than the default of 192.168.1.0, so as not to confuse the PC you have multiple network cards in, make sure you use a crossover cable, and I would assume make the PC that is possibly sharing its connection of the rest of the infrastructure as the default gateway to the other PCs settings
    – Edward
    Dec 25, 2016 at 23:26
  • Also a possible add to the selected answer, you can have a set of the IP range that you want dedicated only for static IPs. In which case it best to remove those from the DHCP pool of the router handling that job.
    – Edward
    Dec 25, 2016 at 23:31
  • Possibly (with regard to the IP change) it would help with possible conflicts but there isn't another network to connect to. The computer has a bunch of other computers connected to it all with a dedicated connection to the main computer and nothing else. They can't go to the Internet and shouldn't be able to talk to anything but the main computer, I guess there air gapped in a way :) Dec 26, 2016 at 9:36
  • Are you saying you have a network card with a wire on the main computer connected to all other computers; when you say dedicated connection?
    – Edward
    Dec 26, 2016 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.