常見問題 登入
搜尋 個人資料
會員列表 會員群組
登入檢查您的私人訊息
會員註冊
Soalris 2.x 的 PPP 之設定
發表新主題   回覆主題
UnixCafe 首頁 » Solaris BBS » Soalris 2.x 的 PPP 之設定
上一篇主題 :: 下一篇主題  
發表人 內容
juan
Site Admin


註冊時間: 2004-03-31
文章: 54
來自: Taiwan

 發表 發表於: 星期三 四月 21, 2004 11:47 pm    文章主題: Soalris 2.x 的 PPP 之設定
引言回覆

發信人:freedom@csie.nctu.edu.tw (Tan Koan-Sin)
日期:23 May 1996 08:49:31 GMT
標題:Soalris 2.x 的 PPP 之設定
信群:tw.bbs.comp.unix 看板:
代號:<4o18qr$5rv@news.csie.nctu.edu.tw>
組織:Taiwan

設定 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 中
重新開機後, 就大功告成了,
用 "attach nctu"/"detach nctu" 就可以連接/切斷與交大 terminal server 的 ppp

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)


PS. Solaris 2.x 的 PPP 不支援 PAP, 所以若你的 ISP 要求 PAP 請由
ftp://nctuccca.edu.tw/UNIX/networking/ppp/dp
ftp://nctuccca.edu.tw/UNIX/networking/ppp/ppp 底下的東西

--
有南威之容,乃可以論其淑媛
有龍泉之利,乃可以議其斷割

_________________
This is Juan (https://juan.tw)
I'd like to be a teardrop,
To be born in your eye,
To live my life on your cheek,
And on your lips to die.
 回頂端 »
檢視會員個人資料 發送私人訊息 參觀發表人的個人網站 雅虎訊息通 MSN Messenger ICQ 號碼
從之前的文章開始顯示:   
UnixCafe 首頁 » Solaris BBS » Soalris 2.x 的 PPP 之設定
發表新主題   回覆主題 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
You cannot attach files in this forum
You cannot download files in this forum




Solaris phpBB theme/template by Jakob Persson
Copyright © Jakob Persson 2003



Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group
正體中文語系由 phpbb-tw 維護製作