当前位置: 首页 > 学习 > 电脑学习 > 操作系统 > Solaris > 系统管理 > 正文

设定 Solaris 2 的 ppp

http://www.zk168.com.cn  招考学习网 2006-3-18 12:14:08
-----------------------------------------------------------[交流]-[打印]-[发送]-[收藏]--
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 中
重新开机後, 就大功告成了,
用 "attach nctu"/"detach nctu" 就可以连接/切断与交大 terminal server 的 ppp


NOTE:
Solaris 2.4 的 PPP 没有 implement PAP, 所以若您拨接 SeedNet 的 PPP
请安装 dp(ftp://nctuccca.edu.tw/UNIX/networking/ppp/dp/ )

Bibliography:
1. Peter Block , "Solaris 2.4, PPP and dynamic address"
2. M. Horton, "UUCP mail interchange format standard", 02/01/1986(RFC1137)
3. SunSoft, "TCP/IP Network Administration Guide"
4. W. Simpson, "The Point-to-Point Protocol (PPP)", 07/21/1994.(RFC1661)
5. W. Simpson, "PPP in HDLC-like Framing", 07/21/1994.(RFC1662)


连上 hinet ppp

修改以下档案
/etc/asppp.cf
ifconfig ipdptp0 plumb 192.1.1.10 168.95.4.254 up
#使用 hinet gateways ip 168.95.4.254 your machine is 192.1.1.10
path
interface ipdptp0
inactivity_timeout 120
will_do_authentication pap
pap_id (your id)
pap_password( your password)
peer_system_name hinet
default_route
debug_level 9
negotiate_address on

/etc/resolv.conf
domain hinet.net
nameserver 168.95.192.1
nameserver 168.95.1.1

/etc/nsswitch.conf加入
hosts: files dns

/etc/gateways
norip ipdptp0

/etc/uucp/Systems
hinet Any ACUTEC 38400 4125678

/etc/uucp/Devices
ACUTEC cua/b - Any hayes
#使用 hayes 就不用修改 /etc/uucp/Dialers

我是做了以上的修改就可连上hinet,但不知是否连线速率被影响?
希望你也能连上,在此感谢bbs上的siegfried的帮助,其他在讨论中提供资料的人
谢谢。
-----------------------------------------------------------[交流]-[打印]-[发送]-[收藏]--
最新入库:
 
·实质、过程及意义——阿多尔诺“否定的辩证法”探微
·从Ontology的译名之争看哲学术语的翻译原则
·论马克思主义哲学经典的解释——解释学方法及其在马克
·中国哲学当前的核心与周边问题
·和合学与21世纪文化价值和科技
·中国文化的和合精神与21世纪
·宗教之间理当相互宽容
·上半个世纪的自由主义
·殷周至春秋时期神人关系之演进
·大学之道:构建以“三纲八目”为核心的道德修养体系
相关内容:
 
·环保企业人力资源开发与管理的实证研究————巨龙公
·重油制气污水处理系统(A/O)技术改造
·英美CPA管理模式及其启示
·改造NERA微波公务信道为国产监控信道
·EAStudio让电子商务网站如虎添翼
·基于PB6和ORACLE8开发“劳动信息管理系统”
·巧解Pretty  Park 病毒一例
·CDMA在中国的应用以及向CDMA2000的过度中的问题研究
·SMA施工控制与现场监理
·浅谈改性沥青及SMA路面平整度的控制
网友点评:
 
会员名称:
密码:匿名 ·注册·忘记密码?
评论内容:
(最多300个字符)
  查看评论
友情提醒:
 1.库中的资料大都来自互联网、网友上传、各类书籍,在录入的过程中难免会出现错误,恳请网
 友来信指正!
 2.如果网友在本库中未能找到所需要的材料,请登陆到我们的论坛《招考学习网》版块!
 3.考友想加入招考学习网的编辑部,请发信到XueXiWang#Gmail.com(#改为@)附带个人简历
 4.如需转载请注明出处及作者,谢谢合作!
 5.如果您有更好的建议或意见请EMAIL:XueXiWang#Gmail.com (#改为@)
 6.凡标题中有注有“[NO]”字样均不含答案且答案整理中.
 7.如本库中转载文章涉及版权等问题,请相关网站或作者在两周内发邮件通知(EMAIL:  XueXiWang#Gmail.com (#改为@))我们,我们接到通知后立即删除该文章及链接!
你问我答 更多>>