Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

When I have Wireless enabled and plug in my Ethernet cable, the wireless connection stays active, even when the wireless and wired connections are through the same network.

I'm aware of this question that tells how to disable it, but I want to know why this isn't Ubuntu's default behavior or why Ubuntu does not have an option in its settings to allow for this.

The only reason I can imagine to keep the wireless connection active is to be able to reach other LAN devices on that network, but that argument doesn't hold when the wireless and wired connections are with the same network. Another reason may be so that you don't lose precious seconds when unplugging your Ethernet, but I doubt this is a valid argument because removing Ethernet mostly means you are moving to another place and most people don't use their PC when moving.

share|improve this question
    
i'm using Ubuntu 12.10 and there, wireless is disabled, as soon as an wired connection is detected. I now have to use both at the same time, but don't see any way to do this. Does anyone know, how i can enable wifi, when the network cable is connected? Network Manager does an rfkill, so an ifconfig wlan0 up doesn't work, also an nmcli nm wifi on and rfkill unblock all doesn't work. Any suggestions? – user143266 Mar 25 '13 at 12:56

To put it simply, your wired network card and your wireless card are two different cards. Therefore, you have two different possible connections. Since it can connect to both of them, it doesn't assume that you want it any other way.

As for why one would use both network connections, there are a number of reasons:

  1. Network stability - no loss of connection when one or the other goes out, as long as both don't go out at the same time. This also allows you to keep things that require internet access for one reason or another from being disconnected (just because you're not actively typing or surfing the Internet, doesn't mean you have zero use for the Internet while in transit).
  2. Load balancing - advanced usage may be able to allow for things like gaming over the wired connection, and downloads over the wireless, keeping both from slowing to a crawl unless they tax the common connection point (the router, incoming connection, etc).
  3. Maintain Internet access when using a VPN connection - VPN connections often cut off your access to the Internet. One way around this is to simply use one connection for the VPN, and the other for Internet.
share|improve this answer
3  
Ubuntu doesn't do load balancing itself and I think very little applications do it themselves either; VPN usage is not the default use case. So at least the Ubuntu settings should allow for this as a setting, and in my opinion disabling wireless when wired should be default. What's the reason they don't have this as an option? I'll change my question to this. – Steven Roose Mar 11 '13 at 20:53

I agree with @Shauna, but, if you want to set your system up so that wired and wireless are never on at the same time, and, if you are command-line literate, read man 5 interfaces, especially:

IFACE OPTIONS
       The following "command" options are available for every family and method.  Each of these options can be given multiple times in a single stanza, in which case the
       commands are executed in the order in which they appear in the stanza.  (You can ensure a command never fails by suffixing them with "|| true".)

       pre-up command
              Run command before bringing the interface up.  If this command fails then ifup aborts, refraining from marking the interface as configured, prints an  error
              message, and exits with status 0.  This behavior may change in the future.

       up command

       post-up command
              Run  command  after  bringing the interface up.  If this command fails then ifup aborts, refraining from marking the interface as configured (even though it
              has really been configured), prints an error message, and exits with status 0.  This behavior may change in the future.

       down command

       pre-down command
              Run command before taking the interface down.  If this command fails then ifdown aborts, marks the interface as deconfigured (even though it has not  really
              been deconfigured), and exits with status 0.  This behavior may change in the future.

       post-down command
              Run  command after taking the interface down.  If this command fails then ifdown aborts, marks the interface as deconfigured, and exits with status 0.  This
              behavior may change in the future.

       There exists for each of the above mentioned options a directory /etc/network/if-<option>.d/ the scripts in which are run (with no  arguments)  using  run-parts(8)
       after  the option itself has been processed. Please note that as post-up and pre-down are aliases, no files in the corresponding directories are processed.  Please
       use if-up.d and if-down.d directories instead.
share|improve this answer

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.