[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compaq with docking station - 2 network interfaces



I'm trying to set up a Compaq laptop as a Debian 2.2 workstation on my work
network. The laptop has a docking station with a network card in it, and a
PCMCIA network card. I want to set things up so that if the machine is
docked, I can use the docking station card, whereas if it is undocked, I can
use the PCMCIA card.

The machine has a static IP address allocated, which I want to use
regardless of which card is in use (obviously, I will never connect both
interfaces at once).

I can set up the interfaces manually, with a little fiddling. I have edited
/etc/pcmcia/network.opts (for the PCMCIA card) to reflect my network
settings, and I have added an entry for eth0 to /etc/network/interfaces (for
the docking station card).

If I boot normally, with the PCMCIA card connected, everything is fine and I
see the network. If I then do the following

    cardctl eject
    [ switch the cable from the PCMCIA card to the docking station ]
    modprobe ne io=0x300 # The docking station card's module
    ifup eth0 # The interface allocated to the D.S. card

everything is fine on the new card.

But if I leave the PCMCIA card inserted when I modprobe, the docking station
gets eth1, and the ifup leaves things locked - presumably related to the
fact that I have two cards with the same IP address allocated, even though
only one is active.

Is there any way I can get this lot to work? I also have problems if I put
the ne card in /etc/modules - the PCMCIA card locks up, which is an IO
address conflict according to the PCMCIA HOWTO. I can exclude address ranges
to get things working, but as I still have duplicated IP addresses, I don't
think that will work too well.

The best solution I can think of so far is to add a new script to
/etc/init.d which does the following

   1. modprobe for the ne card
   2. If it's not there, leave the PCMCIA card as the network, else
      2a. remove the module again
      2b. eject the PCMCIA network card
      2c. re-probe the ne card
      2d. ifup eth0 (the ne card is now on eth0)

But that's HORRIBLY messy. Surely there is a better way?

Any help would be VERY gratefully received.

Paul Moore.

PS Some points - hardware changes aren't possible, this is an old machine
rescued for use as a Unix terminal, with no support from the hardware
infrastructure people. Also, using DHCP isn't an option, as that causes
nasty name resolution problems with our network :-(



Reply to: