Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a laptop runnung 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
add comment

2 Answers 2

up vote 2 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
add comment

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 192.168.0.10. So I can set manual addresses 192.168.1.[2-9] and DHCP addresses will start from 192.168.1.10. In such a situation you could try setting both your wired and wireless IP to 192.168.1.5.

share|improve this answer
add comment

Your Answer

 
discard

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.