当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
ppp-on脚本代码共享
发布时间:2010/9/7 15:20:55 来源:城市学习网 编辑:ziteng
  前面我们有文章提及过内核PPP的编制,也讲解过Linux下PPP的设置内容。那么这里我们则补充一下ppp-on脚本内容。那么不多说,具体代码如下:
  =================================================================
  #ppp-on 脚本
  #!/bin/sh
  TELEPHONE=*99***1#
  LOCAL_IP=0.0.0.0
  REMOTE_IP=0.0.0.0
  NETMASK=255.255.255.0
  DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
  exec /bin/pppd debug lock modem nocrtscts /dev/ttyS1 9600 \
  asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
  noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
  =================================================================
  #ppp-on-dialer
  #!/bin/sh
  exec /bin/chat -v \
  TIMEOUT 3 \
  ABORT '\nBUSY\r' \
  ABORT '\nNO ANSWER\r' \
  ABORT '\nRINGING\r\n\r\nRINGING\r' \
  '' \rAT \
  'OK-+++\c-OK' ATH0 \
  TIMEOUT 30 \
  OK ATDT*99***1# \
  CONNECT '' \
  ================================================================
  # options
  /dev/ttyS1
  9600
  debug
  kdebug 7
  nocrtscts
  modem
  auth
  -chap
  noipdefault
  defaultroute
  user john_doe
  lock
  ================================================================
  #pap-secrets
  # Secrets for authentication using PAP
  # client server secret IP addresses
  john_doe * "" *
  ================================================================
  #chap-secrets
  # Secrets for authentication using CHAP
  # client server secret IP addresses
  ================================================================
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved