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

Re: PCMCIA routing

* tom <tallison@telocity.com> [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
>   <<--This is a Network
> Card
>   <<--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=", you get a network route like this (netstat -rn):

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0

In this way, only the packets going to 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?.


Reply to: