With 7.0 it is possible to do ppp demand dialling. That's a good addition. But it seems it doesn't mix well with static-routes. Since ifup-post (and hence ifup-routes) ar run from the /etc/ppp/ip-up script, the static routes aren't added until the interface is brought up (except for "defaultroute" if applicable, since that is an option to pppd). It seems to me it would make more sense to do the ordinary static routes when the interface itself is brought up. It appears there is no script run by pppd when the interface is brought up but not dialled, so I assume it would require using some other strategy in the ifup scripts.
Created attachment 11541 [details] my hacked ifup-ppp (from wolverine) that fixes this as well as allowing pppd to detach
I've attached the modified ifup-ppp I'm using (with wolverine now, but it's the same basic thing I did with 7.0) which runs ifup-routes after pppd detaches for demand-dialed interfaces. It still exec's pppd for regular connections. Hope this helps... this issue caused me some grief as well until I figured out how easy it was to fix it. There is one thing which might irk the easily irkable: when ifup-post runs after the connection is made, ifup-routes will try to add the same routes again and fail. ifup-post should check if the device is a demand-dialed ppp device and skip the ifup-routes, but I haven't bothered doing that yet since it doesn't really cause any problems, and I try not to fix what isn't broken.
Created attachment 113599 [details] Patch to ifup-ppp to solve this bug. This bug is still around in fc4test2. I got stuck on it when trying to setup an on demand VPN tunnel from home to my office subnet. I've attached an imho robust patch for ifup-ppp that builds on the suggestions by Göran and Brian. The patch applies to initscripts v6 to v8. In my testing it's not a problem that ifup-routes is run again by ip-up, it's actually necessary. When the connection is "dialed", pppd downs and ups the ppp0 interface causing the initial routes added by ifup-ppp to be removed.
Added, will be in 8.09-1. Thanks!
*** Bug 69659 has been marked as a duplicate of this bug. ***