描述在Sco OpenServer 5.0.5 下进行PPP拨号所需要的知识和操作步骤.
操作系统说明 Sco Unix OpenServer 5.0.5 路由器的名字 Router 用户名和口令 user/user 路由器的地址 10.154.0.1 loopback地址 10.154.15.1 地址池的地址 10.154.14.1-10.154.14.62 网络掩码说明 255.255.255.192
首先应该熟悉modem 的管理工具:Modem Manager 用来设置 modem。
双击桌面上的 System Administration 图标,选择 Networks,最后选 Modem Manager. 在命令行输入 scoadmin 启动 SCOadmin 选择 "Networks", 再选择 "Modem Manager". 在命令行输入 scoadmin modem manager 。
在Modem Manager中如果选择自动检测,要确保以下的几点:
如果没检测到调制解调器的话,确保modem已经正确连接并且开关是打开的。一些太“古老 ”的或者太新的modem不能被正确检测到,这个时候应该考虑手工添加的方式。
在 Modem Manager中,手工添加modem:
1.从 Modem 菜单中选择Add,选择 Manual configuration,出现 Modem Configuration(modem设置)窗口
2.输入下列信息:3.点击 OK接受上述配置
禁止掉非modem控制的端口并且激活modem 控制的端口
如:#disable ttynn (非modem端口)这里的 "ttynn"可以为 tty1a.
#enable ttynn (modem端口)这里的 "ttynn"可以是 tty1A.
此外,还要确保ttynn为uucp 所有,要进行授权:
# chown -R uucp:uucp /dev/ttynn
用相应的端口号(1A或者2A)替换nn
小技巧测试是否可以拨出
1.# cu -l tty1A dir
2.激活 modem的喇叭,以便可以听到拨号音:
ATM2 (ATM0 关掉.)3.输入下列命令:
ATDT电话号码 。如:ATDT1634.确认modem 可以拨出后,输入~.(一个波浪线加上一个小点) 退出cu
可以手工编辑 /usr/lib/uucp/Systems和 /usr/lib/uucp/Devices文件来达到目的。最好用UUCP Manager/uuinstall软件来完成
在/usr/lib/uucp目录下的 Systems文件包含了uucp所“知道“的系统的列表。并且指明了用于连接到每个系统的设备 和方法 。Devices 文件指明了可用的设备,使用的速度,还有设备可以连接到的端口。
以root 用户登录运行 SCOadmin--〉Networks --〉UUCP Manager 或者是在命令行使用 uuinstall(ADM)命令 菜单如下:
# uuinstall UUCP Administration Utility =========================== 1. Display or update site name 2. Display or update list of remote sites (Systems) 3. Display or update direct- or dial-out lines (Devices) 4. Display or update direct- or dial-in lines (/etc/inittab) 5. Check consistency of UUCP files 6. Test connection with remote site 7. Convert old UUCP files to new format Choose an option (1-7), or q to quit : 1 Display or update site or machine name (/etc/systemid) ====================================================== 1. Display local site name and machine names 2. Update local site name and machine names Choose an option (1-2), or q to quit :q UUCP Administration Utility =========================== 1. Display or update site name 2. Display or update list of remote sites (Systems) 3. Display or update direct- or dial-out lines (Devices) 4. Display or update direct- or dial-in lines (/etc/inittab) 5. Check consistency of UUCP files 6. Test connection with remote site 7. Convert old UUCP files to new format Choose an option (1-7), or q to quit : 2 At a prompt, enter the text followed by <Return>. Use "?"<Return> to get help, "q"<Return> to quit back to the menu, "-"<Return> for an unwanted entry, or just <Return> to keep the default text shown. Display or update list of remote sites (Systems) ================================================ 1. Display the Systems file 2. Add a new site entry 3. Delete a site entry 4. Change a site entry Choose an option (1-4), or q to quit : 2 Site names listed in the Systems file : sosco scolon Which entry do you want to COPY (or <Return> to see all) ? sosco ---------------- Site name : sosco Schedule : Any Device type : ACU Speed range : 2400-9600 Phone number : scz4253502 Expect login : -\r\d-ogin:-\K\d-ogin:-\K\d-ogin: Send login : uusls ----------------这是原来的配置 Site name ? sosco test Schedule ? Any Device type ? ACU Speed range ? 2400-9600 9600 Phone number ? scz4253502 62177722 Expect login ? -\r\d-ogin:-\K\d-ogin:-\K\d-ogin: - ----------------修改的
实际上系统编辑的是 /usr/lib/uucp/Systems文件。
注意最后一行只输入一个小“-”。用户名和密码不在这里输入。
说明:系统本来有两个模版,选择添加的时候会提示你。**建议不要修改原来的模版**, 选择copy为好,还有不要用退格擦去原来的信息,直接在后面填上你的信息就可以了。
之后屏幕显示:New entry is accepted : Site name : yzpp Schedule : Any Device type : ACU Speed range : 9600 Phone number : 6052733 Expect login : - Display or update list of remote sites (Systems) ================================================ 1. Display the Systems file 2. Add a new site entry 3. Delete a site entry 4. Change a site entry Choose an option (1-4), or q to quit : q
修改完后会提示你是否写入文件,选择y.
Changes have been made. These should now be written to the file, or otherwise they will be discarded. Write out to file (y/n) ? y Systems file successfully updated. Use main menu option 5 to check files.
输入q回到主菜单,选择5 测试文件的一致性。通过后选择6,测试uucp的连接。
Choose an option (1-7), or q to quit : 5 Check consistency of UUCP files =============================== This option checks the consistency of the files Systems, Devices, Dialcodes and /etc/inittab, but does not modify them nor attempt any connection. Use main menu option 6 to test connections. Errors are shown on screen, and also saved in the file /usr/lib/uucp/Checklog. Proceed to checking (y/n) ? y Reading the Systems file ... Reading the Devices file ... Reading the Dialcodes file ... Reading the Dialers file ... Reading /etc/inittab file ... Checking the Systems file ... Checking the Devices file ... Checking the Dialcodes file ... Checking /etc/inittab file ... Press <Return> to continue Choose an option (1-7), or q to quit : 6 Test connection with remote site ================================ This option attempts to make a connection to a remote site with uucico, which uses the Systems and Devices files. Its full debug output is shown on screen, and also saved in the file /usr/lib/uucp/Testlog. Site names listed in the Systems file : sosco scolon test Which site do you want to try (or q to quit) ? test
最后会出现一堆的乱码。表示通讯正常。 由于没有输入用户名和密码,乱码会延续下去,切换到另一屏,找到该进程,杀掉即可。 测试还可以使用这个命令:
/usr/lib/uucp/uutry -r -x9 sitename
uucp 配置完成。
SCOAdmin-->Networks-->Network Configuration Manager或者在命令行输入netconfig ; 选择 Hardware-->Add New WAN Connection-->SCO TCP/IP driver-->SCO TCP/IP-->Add ; 选择ppp
可以配置:Dynamic Outgoing Dynamic Incoming Dedicated Manual Outgoing 这里配置的信息和/usr/bin/pppconf这个文件的内容相对应. 选第一个动态拨出就可以
在我们前面,介绍了基本环境,所以这样配置:
注释:Local host name: ppp [ Advanced ] Host IP address: 10.154.14.1 Options... Destination name: Router Destination IP address: 10.154.15.1 Netmask: 255.255.255.192 UUCP destination name: test Number of UUCP retries: Gateway: < > Yes <*> No
用户名和口令在Advanced options中设置
Debug level: < > 0 < > 1 <*> 2 Tag for /etc/pppfilter: Inactivity timeout (minutes): Async. control character map (hex.): Line flow control: <*> none < > xonxoff < > rtscts Protocol field compression: <*> Yes < > No Address-control field compression: <*> Yes < > No IP address negotiation: <*> Yes < > No Old IP address negotiation: < > Yes <*> No Van Jacobson TCP header compression: <*> Yes < > No Old PPP compatibility: < > Yes <*> No Authentication protocol: < > none < > PAP <*> CHAP Authentication timeout (minutes): Local host ID: user Local host password: user
填完后系统会提示重新链接核心。完成后重新启动。
修改/etc/pppauth ,最后一行应该是这样的:
*user user #在下面填入一行 Router user
即路由器的名字和用户的名字,这个修改很关键!其中*代表本地的用户名和密码 没有*的代表远程的路由器的信息
重启后,看一下路由:#netstat -nr #/etc/route add default 10.154.0.1 #ping 10.154.0.1
系统就会自动的拨号了:)
修改/etc/tcp,找到/etc/route add字样的一行 在下面写上存盘退出/etc/route add default 10.154.0.1
#/etc/tcp stop #/etc/tcp start
挂断modem 可以用这个命令:
#ifconfig ppp0 down
重新启用modem可以用这个命令:
#ifconfig ppp0 up
命令 功能描述 uucheck 检查uucp需要的文件和目录。这个命令也检查文件的明显错误。 uulog 显示特定主机日志目录中的日志内容。 uuname 列出你要联接的机器 uustat 显示当前uucp的请求队列或到其它系统的连接的队列的状态。 uutry 调用 uucico 进行调试,将信息保存到/tmp/machine ,并在终端上显示最后的10行。
-x选项改变调试级别(默认第五级)。