Point-to-PointProtocol,PPP

PPP協定內容包括三個主要部分
封裝(Encapsulation)
連結層控制協定(LinkControl Protocol,LCP)
網路層控制協定(Network ControlProtocols,NCPs)

PPP的主要特點
1.能被使用在模擬電路上
2.能封裝多個路由協議(被動路由)
3.提供錯誤檢測

OSI的模式中的第二層
Layer 2 encapsulation types
HDLC \ PPP \ Frame Relay


支持IPV6的二層協議
PPP \ Frame Relay PVC

有效的WAN 連接方法
PPP / HDLC / ATM

What can a network administrator utilize by using PPP Layer 2?
B:compression 壓縮
C:authentication 驗證
E:multilink support 多重支持

使用ppp
(config-if)#encapsulation PPP

ex:設定serial0介面使用ppp,且ip為192.72.70.142/24
(config)#int serial 0
(config-if)#encapsulation PPP
(config-if)#ip address 192.72.70.142 255.255.255.0
(config-if)#no shutdown

使用ppp認證
(config-if)#ppp authentication < chap|pap>
ps:需以雙方的主機名稱新增user,且password兩邊需設相同

ex:用chap連到對方router的主機名稱,密碼為cisco
taipei(config)#username elan password cisco
taipei(config)#int se0
taipei(config-if)#ppp authentication chap 
elan(config)#username taipei password cisco
elan(config)#int se0
elan(config-if)#ppp authentication chap

ps:若兩邊無法建立連線,極可能是username/password不正確
ps:
先試pap,若不行在試chap,順序可調換
(config-if)#ppp authentication pap chap

啟用ppp compression
(config-if)#compress [predictor|stac]
用軟體方式壓縮,且很耗效能
Compression有stacker(堆疊器)與predictor(預測器)

檢視連結上被丟棄的資料,並預防訊框迴路
(config-if)#ppp quality percentage
Error detection有Quality與Magic Number選項可協助

啟用mutlilink
(config-if)#ppp multilink
Cisco IOS 11.1版後支援,可提供負載平衡

PPP Callback
Cisco IOS 11.1版後支援,Cisco路由器可以作為回覆client或回覆server

(config-if)#ppp ?
pap   Set PAP authentication parameters
authentication   Set PPP link authentication method

.....

#debug ppp nengotiation
兩邊開始建立連線時,會顯示PPP封包的傳輸狀態,可看ppp相互溝通的情形

#debug ppp authentication
可顯示網路中兩部路由器間所進行的chap,pap認證流程

畫面大致如下
PPP authentication debugging is onSe0 PPP: Phase is AUTHENTICATING by both
Se0 CHAP: 0 CHALLENGE id 112 len 25 from "router3"
Se0 CHAP: I CHALLENGE id 113 len 25 from "router1"
Se0 CHAP: O RESPONSE id 112 len 25 from "router3"
Se0 CHAP: I RESPONSE id 113 len 25 from "router1"
Se0 PPP: Sent CHAP LOGIN Request
Se0 PPP: Received LOGIN Response PASS

#debug ppp packet
顯示PPP的封包被傳送與接收,會顯示低階封包內儲存資料直接傳送的結果

http://systw.net/note/af/sblog/more.php?id=114
arrow
arrow
    全站熱搜

    鵝 發表在 痞客邦 留言(0) 人氣()