/share/examples/ppp/ppp.conf.span-isp.working

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 107 lines · 91 code · 16 blank · 0 comment · 0 complexity · e53ea14c1927443b3cc943bab9fe0418 MD5 · raw file

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