How to switch between network interfaces?

From: Piers Kittel (edinfo-list_at_biased.org)
Date: 04/30/04

  • Next message: David Blundell: "Re: Cyrus imapd 2.2?"
    Date: Fri, 30 Apr 2004 18:25:35 +0100
    To: debian-user@lists.debian.org
    
    

    Hello all,

    I have a HP Omnibook 500 laptop, with Debian 3.0r2 testing - and to
    access the internet/intranet, I use a WLAN card, but occasionally I plug
    it into the wired network to transfer big sized files, but each time I
    do that, I edit the interfaces file, comment out the wlan0 enteries,
    remove the comments commenting out the eth0 enteries then restart
    networking - isn't there an automatic way of doing that?

    Also as I have a dhcp server on the internal net, both interfaces are
    set to get an IP from the server - and the IP address is the same for
    both interfaces. No problem in itself, but if I have the eth0 interface
    enabled in the /etc/networking/interfaces file - it will hang there
    trying to find the dhcp server, while the network cable is unplugged.

    I also find even when I get eth0 enabled and on the network, the laptop
    still recieves files through the wlan card, until I physically remove
    the card then it'd switch over directly to the wired interface.

    So:

    1) Is there anyway for the computer to automatically enable and then
    switch over to eth0, and disable wlan0 when the network cable is plugged
    in? If not, is there a quick way to do all this? And same the other
    way round, i.e. automatically enable and switch over to wlan0 and
    disable eth0 when the network cable is unplugged?

    2) Is there a way for the laptop to detect if the wired cable is
    unplugged then it'd bypass or "disable" the eth0 interface at bootup so
    preventing the dhcp client trying to find an IP via eth0?

    Thanks very much for your help in advance

    Cheers - Piers

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: David Blundell: "Re: Cyrus imapd 2.2?"

    Relevant Pages

    • Re: ifconfig command shows only loopback device.
      ... Services that expect an accessible network interface will be started before the interface is accessible. ... Look at the Hardware tab to make sure the interfaces were detected, then delete any interfaces in the Interfaces tab and recreate them. ... after running modprobe e1000 ifconfig returns eth0. ...
      (RedHat)
    • Re: no network connection
      ... > # The loopback network interface ... > iface eth0 inet dhcp ... I commented out the "auto eth0" line and rebooted. ... 'man ifconfig' to see how to check the status of your interfaces. ...
      (Debian-User)
    • Re: Network questions
      ... iface eth0 inet static ... network 192.168.0.240 ... gateway 192.168.0.241 ... With the existing interfaces file, only one interface eth0 comes up. ...
      (Ubuntu)
    • custom network intefaces during boot for Debian
      ... Here is a script modification for /etc/init.d/networking in Debian so ... that your list of network interfaces can be reconfigured during boot. ... I have a laptop with a lan based eth0 and a wifi based eth1. ...
      (Debian-User)
    • Problems with VLAN and Adaptec DuraLink NIC
      ... I have now tried to configure 802.1q VLAN interfaces on each of these ... vconfig add eth0 200 ... suspect the network driver for the Adaptec DuraLink has a bug in VLAN ...
      (comp.os.linux.networking)