[geeks] Bringing up network interface, based on destination
Charles Shannon Hendrix
shannon at widomaker.com
Mon Mar 26 16:42:48 CDT 2007
My network has a PPP gateway and an ethernet gateway to the outside
world.
The ethernet gateway handles most of the traffic and is my default
route, the PPP link handles all of my mail, news, DNS, and some special
traffic via my ISP.
Since the traffic on the PPP link is more intermittent, I'd like to let
the link go down when not busy. My ISP let's me stay up 24/7, but I
thought I'd be courteous if possible, and it also helps now and then to
reconnect for a faster speed.
The only way I can find to bring the interface up is to ping its local
private IP address, which forces it to dial out.
I can't figure out how to bring it up automatically, since it has no
routes assigned to it, and I can't assign routes if it isn't up.
I could sniff packets and script bringing the interface up, but it seems
like there should be an elegant way to do this.
Aside:
A feature I can't wait to see in the future:
% route <destination> <source interface>
For example:
% route add -net <my ISP's network> ppp0
No need for IP addresses, just give the interface, and the kernel fills
in the IP address when it knows it.
It would be useful for a lot of situations, not just PPP.
--
shannon | We are all of us in the gutter, some of us looking at the
| stars.
| -- Oscar Wilde
More information about the geeks
mailing list