wireless networking - How do I switch from ethernet to WIFI (and vice versa) without losing connection?

07
2014-07
  • antass

    I there a way to switch between ethernet and WIFI connections without losing connection?

    I am downloading a huge file via Firefox without an option to resume.

  • Answers
  • Nevin Williams

    Generating a 'no route to host' error is the primary cause of reset TCP connections. To avoid this, there cannot be an instant where both interfaces are down. Also, there cannot be an instant when both interfaces are without an IP address, and a default route must remain in place at all times.

    Make sure both your interface adapters are up, and have unique IP addresses.

    Make sure default route is either not exclusive to a particular interface, or is present for both interfaces. On my Mac:

    Internet:
    Destination        Gateway            Flags        Refs      Use   Netif Expire
    default            192.168.2.1        UGSc            5        4     en0
    default            192.168.2.1        UGScI           0        0     en1
    

    The second route is marked I for Inactive.

    When I want to switch from en0 (wired) to en1 (wifi), I change the interface order in my System Preferences, putting WiFi above Ethernet. I then check my network traffic stats to confirm that traffic is going over WiFi, in both directions. I can then disconnect my Ethernet.

    Using the same principles, this method will allow you to switch interfaces on other OSes:

    Both interfaces must not go down at the same time and a valid default route has to always be in place.

    This implies that both interfaces have to have their own unique IP addresses pre-assigned before switching.


  • Related Question

    wireless networking - Can "universal wifi adapters" be connected to a switch instead of a end device?
  • EricSchaefer

    I have been looking at "universal wifi adapters" (ethernet in/wifi out, looks like ethernet from the client side but speaks wifi) like the netgear wnce2001 for bridging the ethernet from a switch to another room via wifi. The product specs of those devices only talk about devices like video game consoles and TVs, but not about switches.

    Would they work with switches or are they hardwired to talk to only one device? What else could I use to connect my switch wireless to my wifi router, apart from "powerline" stuff?


  • Related Answers
  • sawdust

    A WiFi adapter like the Netgear WNCE2001 is also called an access point operating in client mode. Typically the AP can only support one client device on the wired end, so a switch cannot be connected.

    A wireless router (or an AP with routing features) operating in wireless bridge mode will provide the functionality you're asking for. You may have to use alternate firmware like DD-WRT if the stock firmware doesn't offer that mode. See a similar question/answer here

  • user184879

    the WNCE2001 DOES indeed act like a bridge as I have it connected to a 24 port switch (via WIFI) Works like a charm.

    It does work, just not stated officially anywhere

  • trurl

    If this device is a wireless bridge, you can connect whatever device you like to it, even a switch (and other devices to the switch). If you need vlan-tagging or multicast you may run into some problems, but most likely you don't need those features at home (exception: IPTV).