设定 Solaris 2 的 ppp
Solaris 2 的 asppp (asynchronous ppp) 使用到不少 UUCP 的设定档
如果你对 UUCP 有一定的概念, 那再好不过了 (关於 UUCP 请参见 RFC 976, 1137) 底下将以交大的 Terminal Server 为例 示 Solaris 2 ppp 的使用方法 0. 请先确定你的系统有 UUCP 与 PPP > pkginfo | egrep "PPP|UUCP" 所得结果当是: application SUNWapppA Dial-up PPP Administration system SUNWapppr PPP/IP Asynchronous PPP daemon configuration files system SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service system SUNWbnur Networking UUCP Utilities, (Root) system SUNWbnuu Networking UUCP Utilities, (Usr) system SUNWpppk PPP/IP and IPdialup Device Drivers 1. 设定 /etc/uucp/Systems 并用 cu -d -L 来测试之 例如,我的 /etc/uucp/Systems 内容是这麽写的: nctu Any ACU 38400 730600 oice: 6\n 用 : cu -d -L nctu 来看看拨号与选择 ppp 是否正常 (交大 terminal server 的选择画面最後一个字是 choice: 选项 6 是 ppp) 如果你的是接在 com1, 还得改一改 /etc/uucp/Devices 2. 在 /etc/gateways 中加入 norip ipdptp0 告诉 routed 说不要用 RIP(Routing Information Protocol, 参见 RFC 1058, 1723) 3. 把 /etc/nsswitch.conf 中写的是 hosts: files 请改为 hosts: files dns 4. 在 /etc/resolv.conf 中加入适当的 nameserv 例如交大的 server 是: nameserver 140.113.1.1 domain nctu.edu.tw 5. 在 /etc/hosts 中加入 0.0.0.0 void 140.126.1.1 nctu # address 随便写, 反正 ppp 会帮你设出正确值 6. 写好 /etc/asppp.conf, 我的 asppp.conf ifconfig ipdptp0 plumb void nctu down path inactivity_timeout 120 interface ipdptp0 peer_system_name nctu default_route 7. 写个如下的 shell script, 把它叫 "attach", 挑个你喜欢的地方放 #!/bin/sh detach $1 ifc_cmd=`egrep "^ifconfig.*$1" /etc/asppp.cf` ifc=`echo $ifc_cmd | awk '{print $2}'` ifconfig $ifc up route add default $1 1 >/dev/null ping $1 8. 写个如下的 shell script, 把它叫 "detach", 挑个你喜欢的地方放 #!/bin/sh ifc_cmd=`egrep "^ifconfig.*$1" /etc/asppp.cf` ifc=`echo $ifc_cmd | awk '{print $2}'` if [ -n "`ifconfig -a | grep $ifc`" ] then ifconfig $ifc down id=`ps -e | grep aspppd | awk '{print $1}` if test -n "$id" then kill -1 $id fi ifconfig $ifc unplumb fi eval $ifc_cmd exit 0 把 attach 与 detach 所在的目录加进你的 $PATH 中 上一篇:Solaris 中调整 SCSI 参数的方法 下一篇:login之前的画面设定 更多相关文章
|
推荐文章
精彩文章
|