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

Re: PCMCIA routing



David Reviejo wrote:
> 
> * 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
> > 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?.
> 

I don't want a default gateway on this interface, but I need a
gateway defined for the network 192.168.2.0/24.

I'll go back and review it again.  But when I had no GATEWAY
defined and a NETWORK defined, I got the wrong routing table.
Part of the problem is that I already have a default gateway
defined on another interface on this machine.
This particular box is not an end computer but a router box
between four networks.  One of them being a Wireless network -
hence the pcmcia configuration.



Reply to: