歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix教程 >> SCO Openserver 5撥號詳解

SCO Openserver 5撥號詳解

日期:2017/2/27 17:41:46   编辑:Unix教程

操作系統: SCO 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 Manager管理工具

首先應該熟悉modem 的管理工具:
Modem Manager用來設置modem.

雙擊桌面上的System Administration 圖標,選擇 Networks,最後選 Modem Manager.
在命令行輸入scoadmin啟動 SCOadmin 選擇 "Networks", 再選擇 "Modem Manager".
在命令行輸入 scoadmin modem manager
-----------------------------------------
安裝調制解調器

1.自動檢測調制解調器
在Modem Manager中如果選擇自動檢測,要確保以下的幾點:

1.確保modem已經連接上了並且是打開的(上電的)
2.從 Modem菜單種選擇添加,繼續選擇 Automatic detection.
3.選擇modem連接的 serial port , 或者選擇 Any讓系統檢查所有的串口.
4.選擇 OK開始查找 modem.當連接modem的串口被檢測的時候 ,modem 上的指示燈會閃爍數秒鐘。該過程中 Modem Manager檢測相應的串口,並生成檢測到的modem的清單。
5.檢測完成的時候,選擇要添加的modem,點擊OK添加。

如果沒檢測到調制解調器的話,確保modem已經正確連接並且開關是打開的。一些太“古老”的或者太新的modem不能被正確檢測到,這個時候應該考慮手工添加的方式。
------------------------------------------

手工添加modem

在 Modem Manager中,手工添加modem:
1.從 Modem 菜單中選擇Add,選擇 Manual configuration,出現 Modem Configuration(modem設置)窗口
2.輸入下列信息:
-----------------------------------
Modem vendor (modem提供商)
選擇你的modem的制造商,如果沒有列出,選擇標准的modem類型即可

Modem model (modem類型)
輸入modem類型,如果在上面選擇了標准modem類型,選擇標准modem就可以了

Line speed (bps)
輸入串行線速,默認的是38,400bps,建議不要選擇太高,以免出現不必要的麻煩。
如果不行的話考慮使用9600bps,這是串行的默認速度,比較穩妥一些。

Modem port
選擇modem 連接的端口(tty1A或者tty2A)

Answer mode (應答模式)
撥出選擇off,如果接受撥如的話選擇on
----------------------------------
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電話號碼 。如:ATDT163
4.確認modem 可以撥出後,輸入~.(一個波浪線加上一個小點) 退出cu

設定uucp連接

可以手工編輯 /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 配置完成。


接下來配置ppp驅動

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這個文件的內容相對應.
選第一個動態撥出就可以


在我們的例子中:

路由器的名字:Router
用戶名/ 口令:user/user
路由器的地址:10.154.0.1
loopback地址:10.154.15.1
地址池的地址:10.154.14.1-10.154.14.62
網絡掩碼: 255.255.255.192

所以這樣配置:
---------------------------------------------------------
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

注釋:local host name 可以任意填
host IP address 設置成路由器地址池中的地址之一
Destination name 填入路由器的名字
Destination IP address 路由器回環地址
UUCP destination name uucp目標名字寫前面自己添加的那個
netmask也要填寫正確
----------------------------------------------------------------

用戶名和口令在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 選項改變調試級別(默認第五級)。


Copyright © Linux教程網 All Rights Reserved