When configureing laptops, typically we have 2 cards in the laptop. One 
is a wired 10/100 connectio, and the other is a wireless card.

When a user is in thier office they use the wired card, wireless access 
points are not available in offices/labs. But when they walk to an 
conference room, or "special area's" on campus they'd like to have the 
wireless card "just work".

Basically from the users perspective they should not care what interface 
is working. Both cards should be pluged in at all times, and 
internet/lan access should just work. Also, if the wired card is plugged 
in, the default should be to use the wired connection and ignore the 
wireless card. As soon as they unplug their wired connection the 
wireless card should take over and everything should "fall back" without 
any intervention from the user.

This is possible with a some simple changes to the ifup script. And will 
work even better with some options turned on in the kernel.

In the ifup script "ip route add default via ${GATEWAY}" and "ip route 
add default dev ${REALDEVICE}" need to be changed to: "ip route add 
default via ${GATEWAY} equalize" and "ip route add default dev 
${REALDEVICE} equalize". Basically we need the default rout to be able 
to switch.

This is the change needed for static address. (it gets messy for dynamic)

Note, the primary interface (the wired card or eth0) can be set to 
equalize and the other interface can be a regular (no equalize). This is 
how we currently set up the laptops. since eth0 (wired) is the "first 
default route" it will get all the traffic, but when it's link goes down 
the wireless card will take over. Since the wireless card is not 
equalized (it's dynamic and dhcp does not pass the equalize statement) 
it will remain default once it switched over. So we tell users when they 
get to thier office to remove the wireless pcmcia card can reinsert 
after they pluyg thier laptops back in. (this is the same behavior that 
windows 2000 has, once the secondary interface takes over it won't go 
back till reboot - or removing and reinserting the card - so this isn't 
a "big deal").

There is also some stuff in sysctl.conf that needs to be set.
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.route.gc_timeout = 10

the gc_timeout will insure that when the fallback does happen the route 
cache does not try to timeout all over again with the route that is down.

If you guys know how to hook into a dhcp client to pass equalize to the 
default route then having a laptop (or desktop) with mutiple default 
routes will failover very nicely! :)

Currently I manually modify /ets/sysctl.conf and 
/etc/sysconfig/network-scripts/ifup myself... but I think it's a great 
feature to add to mandrake 9.0 as default....

-- 
Bryan Whitehead
SysAdmin - JPL - Interferometry Systems and Technology
Phone: 818 354 2903
[EMAIL PROTECTED]


Reply via email to