How to set the same static IP address for LAN and wifi interfaces on a Win7 laptop?

12,420

First of all, I don't know the answer to your question. I've looked at the settings and don't see a way to do it.

But I also think it is a bad idea. In setting your wifi and ethernet interfaces to the same IP you are fooling the other devices on your network. Apparently this has worked fine for you on Linux, but you really aren't supposed to do this so I would suggest avoiding it.

Share:
12,420

Related videos on Youtube

AniDev
Author by

AniDev

Updated on September 18, 2022

Comments

  • AniDev
    AniDev over 1 year

    When I'm at my desk at home, I connect to my network through my Ethernet LAN port. Sometimes however I have to get up and move my computer around (such as to connect it to a TV in another room), so I disconnect the Ethernet and enable the wifi. My problem however is that I want both the LAN and wifi interfaces to have the same static IP address in my network. Everything worked perfectly on Linux: I could set both interfaces to the same IP, same subnet mask, same default gateway, and same DNS provider. If I had Ethernet connected and wifi enabled at the same time, I would get martian packet messages in the system log, so I would just use the physical switch on the laptop to disable the wifi interface until I needed it.

    However, recently I've been configuring a new laptop that runs Windows 7. I wanted to do the same thing as I could do on Linux on the other laptop. After setting the static IP address, subnet mask, gateway and DNS for the Ethernet interface, I tried to do the same thing for the wifi interface, but I got first the warning that another interface already has the same IP address, and then I got the message about multiple default gateways as being intended to provide redundancy. I dismissed both warnings (No, then Yes) and clicked Close. But when I opened up the properties for the wifi interface again, the IP address and subnet mask fields were blank. Everytime I enter them, they are blank when I reopen the properties page. The Ethernet interface's properties page still has the same information.

    So basically my question is, how can I set this up properly without Windows blanking out the settings for the wifi interface? If it can work properly in Linux, why can't it work here?

    • Admin
      Admin almost 12 years
      Do you run into the issue if the etherent interface is disabled when you set the wireless static?
    • Admin
      Admin almost 12 years
      No, the wifi interface retains the IP address settings if the ethernet interface is disabled in network connections, but then I cannot enable the ethernet interface again (after clicking enable, the "enable" action become "disable" which usually means the interface has been enabled, but it is still disabled and clicking "disable" does nothing), not even after disabling the wifi (both physically and through network connections). Also, the ethernet interface loses its default gateway, so I need to reconfigure that.
    • Admin
      Admin almost 12 years
      Yikes. Hate to ask, but have you checked to see if you have the latest network drivers installed?
    • Admin
      Admin almost 12 years
      So the only way I am able to now re-enable the ethernet interface (after disabling wifi physically and through network connections) was by running network diagnosis, and this time it seems to have the correct default gateway. So it seems the solution to the problem is disabling ethernet to use wifi, then disabling wifi and running network diag to use ethernet again... now it seems both wifi and ethernet remember the settings correctly, but when i enable wifi, it doesn't set the ip address correctly (I get the 169 default address) even though it has been configured properly.
    • Admin
      Admin almost 12 years
      I did a Windows update and ran the HP software for updates and it updated some of the drivers, but I'll check again.
    • Admin
      Admin almost 12 years
      So I guess there really isn't a way to do this, and to try to hack around causes major glitching, so I'll just use different IPs and accept Tom's answer. Thanks to Josh and the others for trying to help.
  • Iszi
    Iszi almost 12 years
    As long as you're not simultaneously using both interfaces on the same IP, how is this a bad idea? If anything, I would think it would make it easier on the other devices on your network.
  • AniDev
    AniDev almost 12 years
    I know that generally setting the same IP address for different devices is a bad idea, but then how do I go about accessing the same computer through the same address whether on LAN or wifi? I've tried messing with hostnames, but it doesn't always work.
  • ganesh
    ganesh almost 12 years
    It is often a bad idea because most devices cache MAC information. When you switch interface but keep the same IP a router might still try to send information for that IP to the MAC of the old NIC. That will fail. It will likely keep trying that MAC until the ARP cache expires. (Which is about 30 seconds on windows 7, but which could be much longer on other devices).
  • AniDev
    AniDev almost 12 years
    That's a good point, and while 30 seconds isn't too long of a wait, it certainly isn't a good way of doing things. That being said, how else can I easily switch between Ethernet and wifi without having to configure multiple IP addresses for same laptop? Is there no way, say, to force an ARP update for all computers on the network?
  • Tom
    Tom almost 12 years
    I would say that there is no good way to switch 'seamlessly' between wifi and ethernet, where seamlessly means that you maintain your network connections. In theory, you could play all sorts of tricks, e.g. even overriding the wifi mac to make it the same as the eth mac, but I just think that will be more pain then it is worth.
  • AniDev
    AniDev almost 12 years
    Well I guess it seems there really isn't a way to do this, and trying to hack around causes the drivers to glitch up, so I'll just mark this the answer and set two different IP addresses for each interface. Thanks to all those who tried to help me with this.