CCNA - Hướng dẫn Cấu hình PPP với xác thực PAP trong WAN



Mô tả và yêu cầu:
PPP hỗ trợ hai loại giao thức là PAPCHAP, nhằm đảm bảo xác thực hợp lệ giữa hai thiết bị trước khi xảy ra việc giao tiếp.

- Cấu hình PPP với xác thực PAP trên Router R1 và R2
- Ping thông từ Router R1 và R2
Lưu ý: PAP sẽ gửi thông tin password ở dạng clear text.

Các bước thực hiện


Bước 1: Cấu hình trên R1 
(Đặt hostname, cấu hình cho các cổng loopback, fastEthernet và serial trên R1, R2)



Code: 

Router> enRouter# conf t
Router(config)# hostname R1
R1(config)# no ip domain-lookup

R1(config)#int s0/1
R1(config-if)#ip addr 192.168.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R1(config-if)#end

Bước 2: Cấu hình trên R2.


Code: 

Router> enRouter# conf t
Router(config)# hostname R2
R2(config)# no ip domain-lookup
R2(config)#int s0/0
R2(config-if)#ip addr 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#end

Bước 3: Kiểm tra trạng thái line trên các cổng.



Bước 4: Cấu hình PPP với xác thực PAP trên Router R1 và R2


Code: 

R1(config)#username bknp password bknp
R1(config)#int s0/1
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#ppp pap sent-username cisco password cisco
R2(config)#username cisco password cisco
R2(config)#int s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username bknp password bknp



Kiểm tra:

- Câu lệnh "ppp pap sent-username bknp password bknp" trên R2 sẽ gửi thông tin này sang R1 phải có câu lệnh "username bknp password bknp" để xác thực thông tin do R2 gửi qua.

- Và cấu hình ngược lại đối với R1 và R2.
- Đây là trường hợp nếu xác thực đúng ta sẽ thấy cổng ở trạng thái UP.

R2#show int s0/0
Serial0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)

- Bây giờ ta hãy thay đổi database local của R2.
R2(config)#username cisco password 123

- Vì PAP chỉ xác thực một lần nên cần phải cho PAP xác thực lại:
R2(config)#int s0/0
R2(config-if)#shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
R2(config-if)#no shut
PPP authentication debugging is on
R2#
Serial0/0 Using hostname from interface PAP
Serial0/0 Using password from interface PAP
Serial0/0 PAP: O AUTH-REQ id 17 len 15
Serial0/0 PAP: Phase is FORWARDING, Attempting Forward
Serial0/0 PAP: I AUTH-REQ id 17 len 15
Serial0/0 PAP: Authenticating peer
Serial0/0 PAP: Phase is AUTHENTICATING, Unauthenticated User
Serial0/0 PAP: O AUTH-NAK id 17 len 26 msg is "Authentication failed"

- Kiểm tra trạng thái của cổng S0/0 của R2
R2#show int s0/0
Serial0/0 is up, line protocol is down (disabled)
Hardware is HD64570
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)

- Thay đổi lại thông tin xác thực:
R2(config)#username cisco password cisco

- Kiểm tra trạng thái của cổng S0/0 của R2
R2#show int s0/0
Serial0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)

Post a Comment

Mới hơn Cũ hơn