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