1.按照拓撲圖配置好兩臺路由器的接口IP地址;
2驗證路由器之間的連通性;
3.配置PPP協議:

方法一,PAP雙向驗證: Router(config)#hostname R1 //設置主機名為R1 R1(config)#username R2 password cisco //建立用戶R2,密碼cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp //用PPP封裝 R1(config-if)#ppp authentication pap //PPP驗證方式為pap R1(config-if)#ppp pap sent-username R1 password 0 cisco //發送用戶名R1, 密碼cisco Router(config)#hostname R2 R2(config)#username R1 password cisco R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp authentication pap R2(config-if)#ppp pap sent-username R2 password 0 cisco 使用ping命令驗證連通性。(注意,這里在R1上發送的用戶名和密碼必須和在R2上建立的 用戶名密碼一致) 方法二,使用PAP單向認證:(驗證方R1—被驗證方R2) Router(config)#hostname R1 R1(config)#username R2 password cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication pap Router(config)#hostname R2 R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp pap sent-username R2 password 0 cisco |
使用ping命令驗證連通性。(注意,這里在R1上發送的用戶名和密碼必須和在R2上建立的用戶名密碼一致)
方法二,使用PAP單向認證:(驗證方R1—被驗證方R2) Router(config)#hostname R1 R1(config)#username R2 password cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication pap Router(config)#hostname R2 R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp pap sent-username R2 password 0 cisco |
使用ping命令驗證連通性。
方法三,使用CHAP雙向認證: Router(config)#hostname R1 R1(config)#username R2 password cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication chap Router(config)#hostname R2 R2(config)#username R1 password cisco R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp authentication chap |
使用ping命令驗證連通性。
方法四,CHAP單向認證:(驗證方R1—被驗證方R2) Router(config)#hostname R1 R1(config)#username R2 password cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication chap Router(config)#hostname R2 R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp chap hostname R2 R2(config-if)#ppp chap password 0 cisco |
使用ping命令驗證連通性。


