I have a Linux laptop running Ubuntu 12.04. I would like to be able to seamlessly transition from using eth0 to wlan0. When I say "seamlessly", I would like, for example, to be on wifi only with an ssh connection established to somewhere on the internet, plug in my ethernet cable, disconnect my wifi card, and still have my ssh connection established. Similarly, I would like be able to do all of the previous while grabbing a file with curl.

(Another use case: have multiple wifi cards connected to an AP, be able to remove all but one and maintain ssh sessions, etc. The application would be to provide redundancy in the case of unreliable wifi cards)

I am aware of ethernet bonding, is that what I am after in this case?

If this is not possible, would it be possible to explain why?

Note: I have already seen the following: Wired to wireless bridge in Linux Bridging my laptop's wireless and wired adaptors But they appear to be different use cases.

Thanks for the help!

  • 2
    Just applies for SSH, but perhaps you should look into mosh. It works pretty much exactly as you say. – ssmy Nov 21 '13 at 1:01
  • I use mosh already :) but I need this to work for other protocols, so that's why I included the curl use case as well! Cheers! – cat pants Nov 21 '13 at 18:38
  • In your linux terminal, run this command: modinfo <your-wifi-driver> | grep ‘depend’. If the output includes mac80211, it means infrastructure mode is supported and hostapd should work. – Prahlad Yeri Dec 7 '13 at 17:37
  • To find <your-wifi-driver>, issue: lspci -k | grep -A 3 -i “network” – Prahlad Yeri Dec 7 '13 at 17:38

If I understand your question properly, this isn't possible in mainline Linux because the implementation of a specification called MultiPath TCP hasn't been widely adopted.

As I understand it, Linux will only allow a TCP connection to send data over one interface. While it is well documented that interfaces can be merged (see linuxlive), Linux will only manage which interface connections use, not individual network packets.

But there is hope! A fairly current set of kernel modifications, called MPTCP Linux, runs on Linux 3.11. Since you're running Ubuntu, you're doubly lucky - they have a custom Apt repository, with instructions at their Wiki page. You'd have to use a newer kernel, though.

| improve this answer | |
  • I started using Debian over Ubuntu, but hopefully – cat pants Mar 7 '14 at 22:57
  • @catpants Their Apt repository supports Debian too. As a historical sidenote, if we were using a modern protocol like SCTP instead of the 70's era protocols TCP and UDP, this wouldn't actually be a problem since it supports multihoming natively. A shame that nobody uses it. – new123456 Mar 7 '14 at 23:19

Giving the same IP address to both interfaces works.

| improve this answer | |

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.