ppp: add route but not default

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Apr 15 03:20:48 PDT 2003

On Tue, Apr 15, 2003 at 09:52:30AM +0200, Per olof Ljungmark wrote:
> Willie Viljoen wrote:
> >On Tuesday 15 April 2003 9:34, someone, possibly Per olof Ljungmark, typed:
> >
> >>I am setting up a wan ppp link to a remote place and wonder how to
> >>(automagically) add a route when the link is up that is *not* the
> >>default route?
> >
> >
> >If you are using real ppp (pppd, not a userland implementation), then this 
> >is very easy. Simply put this in /etc/ppp/ip-up
> >
> >#!/bin/sh
> >route add -net
> >
> >Substitute with your own IPs, gateway and netmask, and make sure that 
> >/etc/ppp/ip-up is executable.
> >
> >It might also be prudent to delete the route in /etc/ppp/ip-down, when the 
> >link drops.
> <sigh> had just got userland ppp working. Do I need to start from 
> scratch with pppd?

No.  Userland ppp(8) has an almost identical mechanism using the
/etc/ppp/ppp.linkup and /etc/ppp/ppp.linkdown files to trigger actions
on change of state of the ppp link.  The syntax is much the same as
the ppp.conf file, but you probably want something like this in

        add! HISADDR

The ppp(8) man page and the many excellent examples in
/usr/share/examples/ppp will get you started.

Plus I'd take issue with the characterisation of kernel space pppd as
the "real" PPP.  My experience has been that userland ppp(8) is
considered the way to go for most normal uses, and that it is more
actively maintained than the kernel pppd.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030415/a77416bd/attachment.bin

More information about the freebsd-questions mailing list