freebsd-dev/etc/ppp/ppp.linkup.sample
1997-11-18 18:59:57 +00:00

81 lines
2.4 KiB
Plaintext

#########################################################################
#
# Example of ppp.linkup file
#
# This file is checked when ppp establishes a connection.
# ppp searches the labels in this file as follows:
#
# 1) The label that matches the IP number assigned to our side.
#
# 2) The label specified on the command line to ppp.
#
# 3) If no label has been found, use MYADDR if it exists.
#
#
# $Id: ppp.linkup.sample,v 1.11 1997/11/08 20:58:41 brian Exp $
#
#########################################################################
# By default, simply delete any existing default route and add the peer
# as default gateway.
# If you're into sound effects when the link comes up, you can run
# ``auplay'' (assuming NAS is installed and configured).
#
MYADDR:
delete 0
add 0 0 HISADDR
!bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au
# If we've got 192.244.176.32 as our address, then regard peer as a gateway
# to 192.244.176.0 network.
#
192.244.176.32:
add 192.244.176.0 0 HISADDR
# If we are invoked with an argument ``pmdemand'', then
# delete all existing (wrong) routing entries and add the peer IP
# as our default gateway.
# This is vital if you don't already know either sides IP number.
#
# We also want to execute a script on startup. This script can do
# nice things such as kick off "sendmail -q", "popclient my.isp" and
# "slurp -d news". It can be passed MYADDR, HISADDR and INTERFACE
# as arguments too - useful for informing a DNS of your assigned IP.
#
pmdemand:
delete ALL
add 0 0 HISADDR
!bg /etc/ppp/ppp.etherup.pmdemand
# If your minimum call charge is 5 minutes, you may as well stay on
# the line for that amount of time. If we want a 60 second subsequent
# timeout, set your timeout to 300 in ppp.conf and then do this:
#
min5minutes:
!bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60"
# If you want to test ppp, do it through a loopback:
#
# Requires a line in /etc/services:
# ppploop 6671/tcp # loopback ppp daemon
#
# and a line in /etc/inetd.conf:
# ppploop stream tcp nowait root /usr/sbin/ppp ppp -direct loop-in
#
loop:
set timeout 0
set log phase chat connect lcp ipcp command
set device localhost:ppploop
set dial
set login
set escape 0xff
set ifaddr 127.0.0.2 127.0.0.3
set openmode passive
set server /tmp/loop ""
loop-in:
set timeout 0
set log phase chat connect lcp ipcp command
set escape 0xff
allow mode direct