1# $FreeBSD: src/share/examples/ppp/ppp.conf.span-isp.working,v 1.2.2.4 2003/05/03 21:35:06 keramida Exp $
2# $DragonFly: src/share/examples/ppp/ppp.conf.span-isp.working,v 1.2 2003/06/17 04:36:57 dillon Exp $
3
4# This is a working example of ppp.conf.span-isp that uses ppp connections
5# to the same machine through 3 null-modem serial cables.
6#
7#    cuaD03  <-> cuaD04
8#    cuaD01  <-> cuaD06
9#    cuaD00  <-> cuaD07
10#
11# with gettys running on cuaD04, cuaD06 and cuaD07.  The gettytab entry
12# for these devices has a pp= capability that references a script that
13# says:
14#
15#    #! /bin/sh
16#    tty=$(tty)
17#    exec /usr/sbin/pppin -direct isp-in-${tty#${tty%?}}
18#
19# The whole thing is brought up with these commands:
20#
21#    ppp -b isp1
22#    ppp -b isp2
23#    ppp -b isp3
24#
25# Something rather strange happens here.
26# If you connect to the vpn-in diagnostic socket with ``pppctl
27# /var/run/ppp/vpn-in'' and do a ``show links'', only a single link shows up.
28# If you connect to the vpn diagnostic socket (which is created in
29# ppp.linkup.span-isp.working, you see three links.  This is because inetd
30# is told to ``wait'' for ppp to finish and the receiving ppp gets to
31# handle all incoming packets on the first descriptor.
32#
33# This is why enabling LQR won't work - VPN-IN has magic number problems,
34# fails to reply to LQRs and the VPN invocations end up shutting down.
35#
36# If anyone can come up with a better way of doing PPP over UDP I'd be
37# interrested to hear it.  Currently, the server doesn't connect() or
38# bind().... but the client connect()s.  Is there any other way ?
39#
40#          Answers on a postcard please ! (to brian@Awfulhak.org)
41#
42
43default:
44  set speed 115200
45  set device /dev/cuaD00 /dev/cuaD01 /dev/cuaD03
46  set dial
47  set login
48  set redial 3 5
49  set timeout 0
50  enable lqr
51  set lqrperiod 15
52
53isp1:
54  set authname "isp1name"
55  set authkey "isp1key"
56
57isp2:
58  set authname "isp2name"
59  set authkey "isp2key"
60
61isp3:
62  set authname "isp3name"
63  set authkey "isp3key"
64
65
66vpn:
67  set enddisc LABEL
68  set speed sync
69  set mrru 1500
70  set mru 1504			# Room for the MP header
71  set authname "vpnname"
72  set authkey "vpnkey"
73  add! default HISADDR
74  disable deflate pred1 lqr
75  deny deflate pred1
76
77vpn1:
78  rename 1
79  set device 127.0.2.7:ppp/udp
80
81vpn2:
82  rename 2
83  set device 127.0.2.6:ppp/udp
84
85vpn3:
86  rename 3
87  set device 127.0.2.4:ppp/udp
88
89
90vpn-in:
91  set enddisc label
92  set speed sync
93  set mrru 1500
94  set mru 1504			# Room for the MP header
95  enable chap
96  disable lqr
97  set ifaddr 127.0.0.2 127.0.0.3
98  set server /var/run/ppp/vpn-in "" 0177
99
100
101isp-in-7:
102  set ifaddr 127.0.2.7 127.0.3.7
103
104isp-in-6:
105  set ifaddr 127.0.2.6 127.0.3.6
106
107isp-in-4:
108  set ifaddr 127.0.2.4 127.0.3.4
109