Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 2003 11:20:34 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Per olof Ljungmark <peo@intersonic.se>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ppp: add route but not default
Message-ID:  <20030415102034.GB43442@happy-idiot-talk.infracaninophi>
In-Reply-To: <3E9BBA3E.4060209@intersonic.se>
References:  <3E9BB621.4080802@intersonic.se> <200304150941.41810.will@unfoldings.net> <3E9BBA3E.4060209@intersonic.se>

next in thread | previous in thread | raw e-mail | index | archive | help

--24zk1gE8NUlDmwG9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 15, 2003 at 09:52:30AM +0200, Per olof Ljungmark wrote:
>=20
>=20
> Willie Viljoen wrote:
> >On Tuesday 15 April 2003 9:34, someone, possibly Per olof Ljungmark, typ=
ed:
> >
> >>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 th=
is=20
> >is very easy. Simply put this in /etc/ppp/ip-up
> >
> >#!/bin/sh
> >route add -net 10.0.0.0 10.0.255.4 255.255.255.0
> >
> >Substitute with your own IPs, gateway and netmask, and make sure that=20
> >/etc/ppp/ip-up is executable.
> >
> >It might also be prudent to delete the route in /etc/ppp/ip-down, when t=
he=20
> >link drops.
>=20
> <sigh> had just got userland ppp working. Do I need to start from=20
> 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
/etc/ppp/ppp.linkup:

    papchap:
        add! 123.45.67.89/24 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.

	Cheers,

	Matthew

--=20
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

--24zk1gE8NUlDmwG9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+m9zydtESqEQa7a0RAqwHAJoCrlkv2RlsFVeaMoGdB+ELEoBomgCaA02d
cC+KHotaeW91A/mvU8/XHkc=
=Ge8P
-----END PGP SIGNATURE-----

--24zk1gE8NUlDmwG9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030415102034.GB43442>