• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

在solaris7和solaris8上配置高速拨号zt

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 25次 | 进入软件测试论坛讨论

领测软件测试网
(转载请著名出处www.chinatnt.com)
这些步骤用于配置solaris7和solaris8上V90 MODEM的高速拨入和高速拨出
配置solaris的高速拨出
该步骤用于配置solaris和modem拨出到远程主机;即使要配置拨入,也要先做此配置。

1、配置串行口用于拨出:
  # admintool  &
  选择Browse菜单,从下拉菜单中选择Serial Ports,如果串行口连接在A口,则选择a开始的行;
  如果串行口连接在B口,则选择b开始的行;选择Edit菜单,从下拉菜单中选择Modify,修改如下
  域:  
  Template:    Modem - Dial out Only
  Baud Rate:   9600
  点击OK,选择close,关闭admintool。
2、测试与MODEM的通讯:
  使用tip命令与MODEM通讯。
  如果MODEM连接到第一个接口,使用如下命令:
  # tip  /dev/cua/a
  如果MODEM连接到第二个接口,使用如下命令:
  # tip  /dev/cua/b
  此时,将显示:
  connected
  如果显示:
  All ports busy
  则意味着串行口配置不正确,也许是拨入替代了拨出,或许是与某些与端口的通讯问题。
  再敲入:
  ATZ
  此时,将显示:
  OK
  如果无反映,则表示连接电缆可能有问题,至少要检查2-2 3-3脚的连接。
  再敲入:
  ATI4
  此时,大多数MODEM将显示当前设定。QXCOMM MODEM的类似命令,可以是AT&V AT&V1。
  再敲入:
  ~.   (Enter + ~ + .)
  可退出tip连接。
3、设置MODEM的DTE速度:
  编辑/etc/remote文件,在该文件起始处添加一行,如果MODEM连接到第一个串口,该行如下:
  modem:dv=/dev/cua/a:br#38400
  如果MODEM连接到第二个串口,该行如下:
  modem:dv=/dev/cua/b:br#38400
  其中的波特率可根据MODEM的最大速率来设置。可以从波特率115200开始,依次设置38400、
  19200或9600,来确定最高的速度。
4、测试与MODEM的高速通讯:
  此时还是使用tip命令,不过其对象采用的是/etc/remote里的新设置项的名字:
  # tip  modem
  connected
  ATI4                # 显示MODEM的当前设置,不同的MODEM命令不同;QXCOMM的命令是AT&V1
  此时要检查如下的设置是否正确,并做相应的设置:
    &B1    Fixed serial port rate
&C1    Normal Carrier Detect (CD) operation
&D2    Normal DTR operations
&H1    Hardware flow control using Clear To Send (CTS)
&N0    Connection (DCE) speed determined by negotiation
 with the remote modem to the highest usable speed
&R2    Received data to computer only on RTS
  例如要改变变量&B的值为1,可用AT&B1即可,依次类推。
  最后,用如下命令写入设置值的改变,并退出tip:
  AT&W
  ~.
5、检查设备文件的许可:例连接串口B时,
  # ls -l /dev/cua/b
  lrwxrwxrwx   1 root  root  32 Jun 27 22:14 /dev/cua/b -> ../../devices/isa/asy@1,2f8:b,cu
  # ls -lL /dev/cua/b
  crw-------   1 uucp  tty  106,131073 Dec 13 17:16 /dev/cua/b

  对于 /dev/cua/b:

  # chmod 777 /dev/cua/b
  # chown -h root /dev/cua/b
  # chgrp -h root /dev/cua/b
  对于连接目的文件:

  # chmod -R 600 /dev/cua/b
  # chown uucp /dev/cua/b
  # chgrp tty /dev/cua/b

  到此时,solaris的高速拨出配置完成。
6、拨号远程系统:
  如果有远程系统可以接受远端的MODEM拨入,则使用如下命令:
  # tip modem
  connected
  ATDT1234567                 # 对远端系统号码1234567进行拨号
  如果远端主机使用数字终端设备,例如ISP使用的设备时,显示可能如下:
CONNECT 45333/ARQ/V90/LAPM/V42BIS
Welcome to Kempston Networks
login:
  如果远端主机使用也是V90 MODEM,则最佳可能的速度是33.6Kb/s,显示可能如下:
CONNECT 31200/ARQ/V34/LAPM/V42BIS
Welcome to Kempston Networks
login:
  并非所有MODEM都显示连接字串,当无显示时,可多敲一次回车键,可触发显示login提示符。


配置solaris的高速拨入
该步骤用于配置solaris和modem接受远程拨入;要配置拨入,必须先配置上述拨出步骤。
1、设置串行口属性:
  此时需用admintool重置相应的串口,template 应设置为Modem - Bidirectional 或者 
  Modem - Dial in Only,并选择适当DTE速度。
  一般情况下,应独立设置DTE的速度项,此时:
  # vi  /etc/ttydefs
  在该文件的末尾添加如下行:
  modem:38400 -parenb cs8 -clocal hupcl:38400 -parenb cs8 -clocal hupcl crtscts::modem
  可根据对MODEM设定的速度值,来相应的改变上述行的波特率值。
2、配置串行口用于拨入:
  # admintool &
  选择Browse菜单,从下拉菜单中选择Serial Ports,如果串行口连接在A口,则选择a开始的行;
  如果串行口连接在B口,则选择b开始的行;选择Edit菜单,从下拉菜单中选择Delete,以删除
  该端口上的服务配置,确认删除后,重新选择该端口,并选择Edit菜单,从下拉菜单中选择Modify,
  修改如下域:  
  Template:    Modem - Bidirectional
  Detail:          Basic
  Service Enable:  选择
  Terminal Type:   vt100
  Baud Rate:   other                 # 输入/etc/ttydefs中添加行的第一项,modem
  点击OK,选择close,关闭admintool。 
  
  此时,可用如下命令检查串口已经被正确设置:
  # pmadm -l
    PMTAG  PMTYPE SVCTAG *** S ID       <PMSPECIFIC>
    zsmon  ttymon  ttya  u    root     /dev/term/a b - /usr/bin/login - 9600 ldterm,ttcompat login:  - - n  #
    zsmon  ttymon  ttyb  u    root     /dev/term/b b - /usr/bin/login - modem ldterm,ttcompat login:  - vt100 n  #Modem - Bidirectional   
  如果想要在login提示符之前显示欢迎信息,则可以建立如下的文件:
  # echo "Welcome to Kempston Networks" > /etc/issue
3、检查设备文件的许可:例连接串口B时,
  # ls -l /dev/term/b
  lrwxrwxrwx   1 root  root  29 Jun 27 22:14 /dev/term/b -> ../../devices/isa/asy@1,2f8:b
  # ls -lL /dev/term/b
  crw-------   1 root sys 106,  1 Dec 17 12:09 /dev/term/b

  如果不具备上述属性,则:

  对于 /dev/term/b:

  # chmod 777 /dev/term/b
  # chown -h root /dev/term/b
  # chgrp -h root /dev/term/b
  对于连接目的文件:

  # chmod -R 600 /dev/term/b
  # chown root /dev/term/b
  # chgrp sys /dev/term/b
4、设置MODEM为自动应答呼叫:
  # tip modem
  connected
  ATS0=1
  AT&W
  ~.
  此时系统配置为可接受高速拨入了。


配置solaris的PPP拨入
1、检查PPP软件包是否已经安装:
  # pkinfo | grep ppp

  在Solaris 8中,上述显示应包含如下行:

  system SUNWapppr PPP/IP Asynchronous PPP daemon configuration files
  system SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service
  system SUNWpppk PPP/IP and IPdialup Device Drivers

  在Solaris 7中,上述显示应包含如下行:

  system SUNWpppk Solstice PPP Device Drivers
  system SUNWapppu PPP/IP Asynchronous PPP daemon and PPP login service
  system SUNWapppr PPP/IP Asynchronous PPP daemon configuration files

  如果安装的是64bit 的Solaris 7 或 8,则应包含如下行:

  system SUNWpppkx PPP/IP and IPdialup Device Drivers (64-bit)

  如果没有上述包,则可用pkgadd安装:
  对于Intel (x86) Solaris 8:

  插入标有"Solaris 8 Intel Platform Edition Software CD 2 of 2"的CD,并敲入:

  # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWpppk
  # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWapppu
  # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWapppr
  对于64-bit Solaris 8:
  # pkgadd -d /cdrom/sol_8_ia_2/Solaris_8/Product SUNWpppkx

  对于SPARC Solaris 8:

  插入标有"Solaris 8 SPARC Platform Edition Software CD 2 of 2"的CD,并敲入: 

  # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWpppk
  # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWapppu
  # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWapppr
  对于64-bit Solaris 8:
  # pkgadd -d /cdrom/sol_8_sparc_2/Solaris_8/Product SUNWpppkx

  对于Intel (x86) Solaris 7:

  插入Intel Solaris 7 CD,并敲入:

  # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWpppk
  # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWapppu
  # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWapppr
  对于64-bit Solaris 7:

  # pkgadd -d /cdrom/sol_7_x86/s2/Solaris_2.7/Product SUNWpppkx

  对于SPARC Solaris 7:

  插入SPARC Solaris 7 CD and type:

  # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWpppk
  # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWapppu
  # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWapppr
  对于64-bit Solaris 7:
  # pkgadd -d /cdrom/sol_7_sparc/s0/Solaris_2.7/Product SUNWpppkx

  如果碰巧有(commercial) server edition of Solaris 7 或Solaris 8, 
  不要安装 选项 Solstice PPP 产,它将停止打包的aspppd运行。
2、选择PPP连接的IP地址:
  选择至少两个空闲的IP地址,分别用于PPP连接的服务器端和客户端,该两个IP地址必须与服务器
  固有IP地址位于同一个网段。
  这里假设此两个IP地址如下,服务器端192.168.1.50 客户端192.168.1.51
  如果有多于一个客户端,则其IP地址也要选出,这里可以是192.168.1.52
3、建立主机文件列表:
  # vi /etc/hosts
  加入如下项:
 192.168.1.50 ppp_server # PPP dial-in server
 192.168.1.51 ppp_client1 # First PPP dial-in client
 192.168.1.52 ppp_client2 # Second PPP dial-in client
 192.168.1.53 ppp_client3 # Third PPP dial-in client
 ...
4、建立一至多个拨入用户:
  # admintool &
  建立拨入用户:ppp_hy   ppp_tl  ...;
  用户UID GID任意;
  Login Shell中选择other, 输入/usr/sbin/aspppls;
  取消Create Home Dir项,同时输入:/tmp
  确认即可。
  再用passwd 命令对用户ppp_hy  ppp_tl设立口令。
5、配置用于拨入的asppp:
  # vi  /etc/asppp.cf
  添加如下内容:
  ifconfig  ipdptp0  plumb  ppp_server  ppp_client1  up  netmask  +
  path
  ipcp_async_map 0  # Use async control character map 0
  inactivity_timeout 0  # No inactivity timeout
  interface ipdptp0  # Use point-to-point interface 0
  debug_level 9  # Full logging
  peer_system_name ppp-hy # Name of the dial-in user
  peer_ip_address ppp_client1 # IP address to be given to the client

  对于第二个拨入用户, 添加如下内容:
  ifconfig  ipdptp1  plumb  ppp_server  ppp_client2  up  netmask  +
  path
  ipcp_async_map 0  # Use async control character map 0
  inactivity_timeout 0  # No inactivity timeout
  interface ipdptp1  # Use point-to-point interface 0
  debug_level 9  # Full logging
  peer_system_name ppp-tl # Name of the dial-in user
  peer_ip_address ppp_client2 # IP address to be given to the client   
  
  依次类推。
6、添加proxy 的ARP项,设置包转发:
  # ifconfig -a | grep ether   # 首先找到solaris服务器的ether地址
  建立/etc/rc2.d下的脚本文件,例:S99proxy,其内容如下:
     /usr/sbin/ndd -set /dev/ip ip_forwarding 1
  /usr/sbin/arp -s ppp_client1 0:50:4:21:3c:80 pub
  /usr/sbin/arp -s ppp_client2 0:50:4:21:3c:80 pub
  # chmod 744 /etc/rc2.d/S99proxy
  该脚本将在S47asppp脚本启动后自动启动。
7、建立PPP的log文件:
  # touch /var/adm/log/asppp.log
8、抑制发送RIP包:
  # echo "norip ipdptp0" > /etc/gateways
  # echo "norip ipdptp1" >> /etc/gateways
9、测试PPP拨入:
  启动脚本:
  # /etc/init.d/asppp stop
  # /etc/init.d/asppp start
  # tail -f /var/adm/log/asppp.log
  将显示:   
  20:15:07 Link manager (6374) started 21/12/99
  20:15:07 parse_config_file: Successful configuration
  表示启动成功。
  此时,可以把/etc/asppp.cf中的debug_level的值设置为5:
  debug_level 5  # Log all uucp chat script info

配置Windows 95 和 98 拨号到Solaris系统:
1、建立一个拨号连接,拨号用户名和口令如solaris系统里所设,除了需设置拨号后显示终端窗口外,
  其它设置无需改变。
2、双击此连接,将会显示终端窗口,输入用户名、口令后,点击继续,即可建立该PC机与服务器
  的连接,在此基础上可运行telnet、ftp、xterm等。
3、可建立一个脚本文件,以替代终端窗口输入,而直接建立ppp连接,文件内容如下:
  proc main
waitfor "ogin:"
transmit $USERID
transmit "<cr>"
waitfor "word:"
transmit $PASSWORD
transmit "<cr>"
  endproc

  文件名为:xxxxxx.scp
4、在拨号属性中,选择“安全”,取消登录后终端显示,而选择采用脚本文件即可!

 仙人俅 回复于:2003-08-03 13:56:31
蜘蛛的东西总是让人受益无穷!

 guchengman 回复于:2003-08-03 20:18:14
[quote:02c235ef4c="南非蜘蛛"](转载请著名出处www.chinatnt.com)
这些步骤用于配置solaris7和solaris8上V90 MODEM的高速拨入和高速拨出
配置solaris的高速拨出
该步骤用于配置solaris和modem拨出到远程主机;即使要配置拨入,也要先做此配置..........[/quote:02c235ef4c]     
太好了,总想对串口搞些什么,现在可以试试罗。     
www.chinatnt.com这个网站该如何进啊!!!!!!!!!!

 清茶淡淡 回复于:2003-08-03 22:38:23
[quote:976ac768eb="guchengman"]    
太好了,总想对串口搞些什么,现在可以试试罗。     
www.chinatnt.com这个网站该如何进啊!!!!!!!!!![/quote:976ac768eb]   
俺也想问这个问题
 ops:  ops:

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网