發布時間: 2018-03-02 14:14:39
組網需求
如圖1所示,RouterA的Serial1/0/0和RouterB的Serial1/0/0相連。
?
用戶希望RouterA對RouterB進行可靠的認證,而RouterB不需要對RouterA進行認證。
配置思路如下:
1.用戶希望進行可靠的認證,對安全的要求較高,所以需要配置CHAP認證且認證方需要配置用戶名。
2.用戶希望進行單向認證,所以僅需要配置RouterA作為CHAP認證的認證方,RouterB作為CHAP認證的被認證方。
操作步驟
配置RouterA
# 配置接口Serial1/0/0的IP地址及封裝的鏈路層協議為PPP。
<Huawei>system-view
[Huawei] sysname RouterA
[RouterA] interface serial 1/0/0
[RouterA-Serial1/0/0]link-protocol ppp
[RouterA-Serial1/0/0]ip address 10.10.10.9 30
[RouterA-Serial1/0/0]quit
# 配置本地用戶及域。
[RouterA] aaa
[RouterA-aaa]authentication-scheme system_a
[RouterA-aaa-authen-system_a]authentication-mode local
[RouterA-aaa-authen-system_a]quit
[RouterA-aaa] domain system
[RouterA-aaa-domain-system]authentication-scheme system_a
[RouterA-aaa-domain-system]quit
[RouterA-aaa]local-user user2@system password
Please configure the login password (8-128)
It is recommended that the password consist of at least 2 types of characters, including lowercase letters, uppercase letters, numerals and special characters.
Please enter password:
Please confirm password:
Info: Add a new user.
Warning: The new user supports all access modes. The management user access modes such as Telnet,SSH, FTP, HTTP, and Terminal have security risks. You are advi sed to configure the required access modes only.
[RouterA-aaa]local-user user2@system service-type ppp
[RouterA-aaa] quit
# 配置PPP認證方式為CHAP、認證域為system。
[RouterA] interfaceserial 1/0/0
[RouterA-Serial1/0/0]ppp authentication-mode chap domain system
# 重啟接口,保證配置生效。
[RouterA-Serial1/0/0]shutdown
[RouterA-Serial1/0/0]undo shutdown
配置RouterB
# 配置接口Serial1/0/0的IP地址及封裝的鏈路層協議為PPP。
<Huawei>system-view
[Huawei] sysname RouterB
[RouterB] interface serial 1/0/0
[RouterB-Serial1/0/0] link-protocol ppp
[RouterB-Serial1/0/0]ip address 10.10.10.10 30
# 配置本地被RouterA以CHAP方式認證時RouterB發送的CHAP用戶名和密碼。
[RouterB-Serial1/0/0]ppp chap user user2@system
[RouterB-Serial1/0/0]ppp chap password cipher huawei123
# 重啟接口,保證配置生效。
[RouterB-Serial1/0/0]shutdown
[RouterB-Serial1/0/0]undo shutdown
驗證配置結果
# 通過命令display interface serial 1/0/0查看接口的配置信息,接口的物理層和鏈路層的狀態都是Up狀態,并且PPP的LCP和IPCP都是opened狀態,說明鏈路的PPP協商已經成功,并且RouterA和RouterB可以互相Ping通對方。
?
上一篇: {華為HCIE-RS}DHCP中繼