Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a laptop running Lubuntu 13.04. I use ssh -X to log into my server and start programs there that I view on my laptop. When I pull the ethernet cable, the laptop switches to WLAN but my ssh -X windows turn black. My IP changes due to the switch, and this disrupts the ssh connection.

My router is unable to give two different MACs the same IP.

So, is it possible to set a fix IP for both wlan0 and eth0?

share|improve this question
up vote 3 down vote accepted

It's impossible to have same IP address on two different interfaces on any network device (computer,router,...) in L3 operation mode (default operation mode of interfaces on computer is L3 mode, as router interfaces).

To have same IP, you must bridge your interfaces.

share|improve this answer

I'm not sure keeping the same IP will help but this might just work:

  1. Connect with cable and set your IP address manually.
  2. Pull the cable and set the the same IP address manually and also change the MAC address to your Ethernet MAC.
  3. Disable DHCP on the WiFi router (I assume that you connect to the same router via cable and wireless).

Setting the IP address can be done in the network manager if you're using a typical Gnome setup.

You don't necessarily have to disable DHCP, my router has options to give DHCP addresses e.g. only above So I can set manual addresses 192.168.1.[2-9] and DHCP addresses will start from In such a situation you could try setting both your wired and wireless IP to

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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