* tom <[EMAIL PROTECTED]> [010319 12:55]: > Under normal conditions when you insert the pcmcia card into a box > that already has one present you get a routing table with two > entries for default network gateways. Something like this: > > Destination Gateway Genmask > 0.0.0.0 192.168.0.1 255.255.255.0 <<--This is a Network > Card > 0.0.0.0 192.168.1.1 255.255.255.0 <<--This is a PCMCIA > card
Maybe I'm missing something, but these are default gateways. When you insert a pcmcia card with no default gateway, and for example "NETWORK=192.168.2.0", you get a network route like this (netstat -rn): Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 In this way, only the packets going to 192.168.2.0 net are routed to this interface. > At approximately line 125 there is: > test "$GATEWAY" && /sbin/route add default gw $GATEWAY metric 1 > I have modified that into two lines as follows: > > test "$GATEWAY" && test "$NETWORK" $$ /sbin/route add $NETWORK gw > $GATEWAY metric 2 > test "$GATEWAY" && test ! "$NETWORK" $$ /sbin/route add default gw > $GATEWAY metric 2 So this is your problem: you have defined a GATEWAY and a NETWORK; why, if you don't want a default gateway on this interface?. Cheers, -- David

