ppp: add route but not default

Willie Viljoen will at unfoldings.net
Tue Apr 15 00:42:20 PDT 2003


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 10.0.0.0 10.0.255.4 255.255.255.0

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.

Will

-- 
Willie Viljoen
Freelance IT Consultant

214 Paul Kruger Avenue, Universitas
Bloemfontein
9321
South Africa

+27 51 522 15 60
+27 51 522 44 36 (after hours)
+27 82 404 03 27 (mobile)

will at unfoldings.net


More information about the freebsd-questions mailing list