HDLC和 PPP的实验
生活随笔
收集整理的這篇文章主要介紹了
HDLC和 PPP的实验
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
HDLC和 PPP的實驗
????HDLC,高級數據鏈路控制(High-Level Data Link Control或簡稱HDLC),是一個在同步網上傳輸 數據、面向比特的數據鏈路層協議,它是由國際標準化組織(ISO)根據IBM公司的SDLC(Synchronous Data Link Control)協議擴展開發而成的.本次實驗重在ppp,所以這個HDLC就簡單說明,你可以通過這個來了解HDLCHDLC
????PPP,(Point-to-Point Protocol點到點協議)是為在同等單元之間傳輸數據包這樣的簡單鏈路設計的鏈路層協議。這種鏈路提供全雙工操作,并按照順序傳遞數據包。設計目的主要是用來通過撥號或專線方式建立點對點連接發送數據,使其成為各種主機、網橋和路由器之間簡單連接的一種共通的解決方案。ppp
????實驗TOP:
????實驗步驟:
??A.配置HDLC,
??????
????R1(config)#int s1/1
????R1(config-if)#encapsulation hdlc
B.PPP認證和配置
?? 1.pap單向認證
??????我們先做一個pap單向認證
R1(config)#int s1/1
R1(config-if)#encapsulation ppp
R2(config)#int s1/0
R2(config-if)#en
R2(config-if)#encapsulation ppp
R2(config-if)#exit
R2(config)#username cisco password 123
R2(config)#int s1/0
R2(config-if)#ppp authentication pap
現在我們可以看到;
R1由于沒有配置pap認證,所以接口down掉
下面來在R1的接口上配置發送到R2的pap認證...
R1(config)#int s1/1
R1(config-if)#ppp pap sent-username cisco password 123
我們可以看到接口會up上來,我們show ip int bri看看
我們ping一下看看吧
到這里我們就完成了pap的單向認證了,
??2.pap雙向認證
????在上面的實驗基礎上我們加上:
R1(config)#username cisco password 456
R1(config)#int s1/1
R1(config-if)#ppp authentication pap
可以看到接口已經down掉了,因為R1現在需要認證了,R2沒有到R1的認證,所以會down掉,
????在R2上面配置認證:
現在接口up了,這樣pap的認證實驗就完成了
??3.chap認證
??我們配置R2
R2(config)#int s1/1
R2(config-if)#en
R2(config-if)#encapsulation ppp
R2(config-if)#exi
R2(config)#use
R2(config)#username R3 password 123
R2(config)#int s1/1
R2(config-if)#ppp authentication chap
??我們發現R2的接口s1/1down掉了,并且ping不通的
??配置R3:
R3(config)#int s1/0
R3(config-if)#en
R3(config-if)#encapsulation ppp
R3(config-if)#exi
R3(config)#use
R3(config)#username R2 password 123
R3(config)#int s1/0
R3(config-if)#ppp authentication chap
這里已經配置好了雙向認證的,在這里說明
路由器R2認證到R3的user一定要是R3路由器的名字
以下是我debug ppp authenication得到的:
Jan 16 23:53:29.395: Se1/0 PPP: Authorization required
Jan 16 23:53:29.819: Se1/1 PPP: Authorization required
Jan 16 23:53:29.947: Se1/1 CHAP: O CHALLENGE id 69 len 23 from "R2"
Jan 16 23:53:29.951: Se1/1 CHAP: I CHALLENGE id 75 len 23 from "R3"
Jan 16 23:53:29.971: Se1/1 CHAP: Using hostname from unknown source
Jan 16 23:53:29.971: Se1/1 CHAP: Using password from AAA
Jan 16 23:53:29.971: Se1/1 CHAP: O RESPONSE id 75 len 23 from "R2"
Jan 16 23:53:30.199: Se1/1 CHAP: I RESPONSE id 69 len 23 from "R3"
Jan 16 23:53:30.207: Se1/1 CHAP: I SUCCESS id 75 len 4
Jan 16 23:53:30.215: Se1/1 PPP: Sent CHAP LOGIN Request
Jan 16 23:53:30.227: Se1/1 PPP: Received LOGIN Response PASS
R2#
Jan 16 23:53:30.239: Se1/1 PPP: Sent LCP AUTHOR Request
Jan 16 23:53:30.243: Se1/1 PPP: Sent IPCP AUTHOR Request
Jan 16 23:53:30.255: Se1/1 LCP: Received AAA AUTHOR Response PASS
Jan 16 23:53:30.259: Se1/1 IPCP: Received AAA AUTHOR Response PASS
Jan 16 23:53:30.263: Se1/1 CHAP: O SUCCESS id 69 len 4
Jan 16 23:53:30.275: Se1/1 PPP: Sent CDPCP AUTHOR Request
Jan 16 23:53:30.287: Se1/1 PPP: Sent IPCP AUTHOR Request
Jan 16 23:53:30.307: Se1/1 CDPCP: Received AAA AUTHOR Response PASS
????HDLC,高級數據鏈路控制(High-Level Data Link Control或簡稱HDLC),是一個在同步網上傳輸 數據、面向比特的數據鏈路層協議,它是由國際標準化組織(ISO)根據IBM公司的SDLC(Synchronous Data Link Control)協議擴展開發而成的.本次實驗重在ppp,所以這個HDLC就簡單說明,你可以通過這個來了解HDLCHDLC
????PPP,(Point-to-Point Protocol點到點協議)是為在同等單元之間傳輸數據包這樣的簡單鏈路設計的鏈路層協議。這種鏈路提供全雙工操作,并按照順序傳遞數據包。設計目的主要是用來通過撥號或專線方式建立點對點連接發送數據,使其成為各種主機、網橋和路由器之間簡單連接的一種共通的解決方案。ppp
????實驗TOP:
????實驗步驟:
??A.配置HDLC,
??????
????R1(config)#int s1/1
????R1(config-if)#encapsulation hdlc
B.PPP認證和配置
?? 1.pap單向認證
??????我們先做一個pap單向認證
R1(config)#int s1/1
R1(config-if)#encapsulation ppp
R2(config)#int s1/0
R2(config-if)#en
R2(config-if)#encapsulation ppp
R2(config-if)#exit
R2(config)#username cisco password 123
R2(config)#int s1/0
R2(config-if)#ppp authentication pap
現在我們可以看到;
R1由于沒有配置pap認證,所以接口down掉
下面來在R1的接口上配置發送到R2的pap認證...
R1(config)#int s1/1
R1(config-if)#ppp pap sent-username cisco password 123
我們可以看到接口會up上來,我們show ip int bri看看
我們ping一下看看吧
到這里我們就完成了pap的單向認證了,
??2.pap雙向認證
????在上面的實驗基礎上我們加上:
R1(config)#username cisco password 456
R1(config)#int s1/1
R1(config-if)#ppp authentication pap
可以看到接口已經down掉了,因為R1現在需要認證了,R2沒有到R1的認證,所以會down掉,
????在R2上面配置認證:
現在接口up了,這樣pap的認證實驗就完成了
??3.chap認證
??我們配置R2
R2(config)#int s1/1
R2(config-if)#en
R2(config-if)#encapsulation ppp
R2(config-if)#exi
R2(config)#use
R2(config)#username R3 password 123
R2(config)#int s1/1
R2(config-if)#ppp authentication chap
??我們發現R2的接口s1/1down掉了,并且ping不通的
??配置R3:
R3(config)#int s1/0
R3(config-if)#en
R3(config-if)#encapsulation ppp
R3(config-if)#exi
R3(config)#use
R3(config)#username R2 password 123
R3(config)#int s1/0
R3(config-if)#ppp authentication chap
這里已經配置好了雙向認證的,在這里說明
路由器R2認證到R3的user一定要是R3路由器的名字
以下是我debug ppp authenication得到的:
Jan 16 23:53:29.395: Se1/0 PPP: Authorization required
Jan 16 23:53:29.819: Se1/1 PPP: Authorization required
Jan 16 23:53:29.947: Se1/1 CHAP: O CHALLENGE id 69 len 23 from "R2"
Jan 16 23:53:29.951: Se1/1 CHAP: I CHALLENGE id 75 len 23 from "R3"
Jan 16 23:53:29.971: Se1/1 CHAP: Using hostname from unknown source
Jan 16 23:53:29.971: Se1/1 CHAP: Using password from AAA
Jan 16 23:53:29.971: Se1/1 CHAP: O RESPONSE id 75 len 23 from "R2"
Jan 16 23:53:30.199: Se1/1 CHAP: I RESPONSE id 69 len 23 from "R3"
Jan 16 23:53:30.207: Se1/1 CHAP: I SUCCESS id 75 len 4
Jan 16 23:53:30.215: Se1/1 PPP: Sent CHAP LOGIN Request
Jan 16 23:53:30.227: Se1/1 PPP: Received LOGIN Response PASS
R2#
Jan 16 23:53:30.239: Se1/1 PPP: Sent LCP AUTHOR Request
Jan 16 23:53:30.243: Se1/1 PPP: Sent IPCP AUTHOR Request
Jan 16 23:53:30.255: Se1/1 LCP: Received AAA AUTHOR Response PASS
Jan 16 23:53:30.259: Se1/1 IPCP: Received AAA AUTHOR Response PASS
Jan 16 23:53:30.263: Se1/1 CHAP: O SUCCESS id 69 len 4
Jan 16 23:53:30.275: Se1/1 PPP: Sent CDPCP AUTHOR Request
Jan 16 23:53:30.287: Se1/1 PPP: Sent IPCP AUTHOR Request
Jan 16 23:53:30.307: Se1/1 CDPCP: Received AAA AUTHOR Response PASS
轉載于:https://blog.51cto.com/jiayes/150704
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的HDLC和 PPP的实验的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自动增加asp元件及onclick
- 下一篇: Excel组件DCOM配置