|
PPP也就是點(diǎn)到點(diǎn)協(xié)議是IETF推出的點(diǎn)到點(diǎn)類型線路的數(shù)據(jù)鏈路層協(xié)議。該協(xié)議不是專有協(xié)議,可以互聯(lián)不同廠商設(shè)備,支持多協(xié)議、提供可選的身份認(rèn)證服務(wù)、可以以各種方式壓縮數(shù)據(jù)、支持動(dòng)態(tài)地址協(xié)商、支持多鏈路捆綁等。 一、PAP:密碼口令驗(yàn)證協(xié)議,全稱:Password Authentication Protocol。PAP是兩次握手認(rèn)證協(xié)議,在鏈路首次初始化時(shí),被認(rèn)證端首先發(fā)起認(rèn)證請(qǐng)求,向認(rèn)證端發(fā)送用戶名和密碼信息進(jìn)行身份認(rèn)證。密碼口令以明文發(fā)送,所以安全性較低。PAP支持單項(xiàng)和雙向認(rèn)證,認(rèn)證流程圖和單、雙向認(rèn)證。 二、CHAP:挑戰(zhàn)握手認(rèn)證協(xié)議,全稱:Challenge Handshake Authentication Protocol。CHAP通過(guò)三次握手驗(yàn)證被認(rèn)證端的身份,在初始鏈路建立時(shí)完成,為了提高安全性,在鏈路建立之后周期性進(jìn)行驗(yàn)證。CHAP比PAP更安全,因?yàn)镃HAP不在線路上發(fā)送明文,而是發(fā)送經(jīng)過(guò)MD5過(guò)的隨機(jī)數(shù)序列。CHAP支持單向和雙向認(rèn)證。 三、配置過(guò)程: hostname R_A interface Serial2/0 ip address 192.168.1.1 255.255.255.0 encapsulation ppp ppp pap sent-username R_A password 0 123 clock rate 64000 R_A(config-if)#ip address 192.168.1.1 255.255.255.0 R_A(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial2/0, changed state to up Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R_B R_B(config)#username R_A password 0 123 R_B(config)#interface s3/0 R_B(config-if)#encapsulation ppp R_B(config-if)#ppp authentication pap R_B(config-if)#ip address 192.168.1.2 255.255.255.0 R_B(config-if)#no shutdown 在路由器R_A上: R_A#debug ppp authentication PPP authentication debugging is on Serial2/0 Using hostname from interface PAP Serial2/0 Using password from interface PAP Serial2/0 PAP: O AUTH-REQ id 17 len 15 Serial2/0 PAP: Phase is FORWARDING, Attempting Forward %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up 在路由器R_B上: R_B#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 2/4/6 ms 最后需注意用戶名、密碼信息與路由器的對(duì)應(yīng)關(guān)系;認(rèn)證端、被認(rèn)證端之間的信息對(duì)應(yīng)關(guān)系;認(rèn)證信息大小寫敏感;修改配置后,若未生效,嘗試重啟端口。 |
|
|
來(lái)自: ldjsld > 《電腦手機(jī)及電子技術(shù)》