Lab: Point-to-Point Protocol: N I Dung

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Lab: Point-to-Point Protocol

Nội dung

 Cấu hình định tuyến OSPF

 Cấu hình kết nối WAN qua giao thức PPP

 Cấu hình xác thực PAP, CHAP

Device Interface IP address Subnetmask Gateway


S0/0/0 172.16.1.1 255.255.255.252 -
R1
Fa0/0 192.168.1.1 255.255.255.0
S0/0/0 172.16.1.2 255.255.255.252 -
R2
S0/0/1 172.16.1.5 255.255.255.252 -
S0/0/1 172.16.1.6 255.255.255.252
R3
Fa0/0 192.168.2.1 255.255.255.0
PC1 NIC 192.168.1.10 255.255.255.0 192.168.1.1
PC2 NIC 192.168.2.10 255.255.255.0 192.168.2.1

1. Kết nối Router, PC như hình vẽ

2. Thực hiện Console tới Router bằng cáp console và phần mềm Hyper Terminal
3. Thực hiện các cấu hình cơ bản cho Router: hostname, password, line vty, ip-address ...

4. Kiểm tra thông tin interface


Router R1
R1#show ip inter brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 172.16.1.1 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
Router R2
R2#show ip inter brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 172.16.1.2 YES manual up up
Serial0/0/1 172.16.1.5 YES manual up up
Vlan1 unassigned YES unset administratively down down
Router R3
R3#show ip inter brie
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.2.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 unassigned YES unset administratively down down
Serial0/0/1 172.16.1.6 YES manual up up
Vlan1 unassigned YES unset administratively down down

5. Cấu hình định tuyến trên các router


Router R1
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.1 0.0.0.0 area 0
R1(config-router)#network 172.16.1.1 0.0.0.0 area 0
Router R2
R2(config)#router ospf 1
R2(config-router)#network 172.16.1.2 0.0.0.0 area 0
R2(config-router)#network 172.16.1.5 0.0.0.0 area 0
Router R3
R3(config)#router ospf 1
R3(config-router)#network 192.168.2.1 0.0.0.0 area 0
R3(config-router)#network 172.16.1.6 0.0.0.0 area 0
6. Xem thông tin bản định tuyến
Trên Router R1
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/30 is subnetted, 2 subnets


C 172.16.1.0 is directly connected, Serial0/0/0
O 172.16.1.4 [110/128] via 172.16.1.2, 00:02:37, Serial0/0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O 192.168.2.0/24 [110/129] via 172.16.1.2, 00:01:07, Serial0/0/0

Trên Router R2
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/30 is subnetted, 2 subnets


C 172.16.1.0 is directly connected, Serial0/0/0
C 172.16.1.4 is directly connected, Serial0/0/1
O 192.168.1.0/24 [110/65] via 172.16.1.1, 00:03:25, Serial0/0/0
O 192.168.2.0/24 [110/65] via 172.16.1.6, 00:01:47, Serial0/0/1

Trên Router R3
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/30 is subnetted, 2 subnets


O 172.16.1.0 [110/128] via 172.16.1.5, 00:03:05, Serial0/0/1
C 172.16.1.4 is directly connected, Serial0/0/1
O 192.168.1.0/24 [110/129] via 172.16.1.5, 00:03:05, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0

9. Kiểm tra kết nối giữa các PC


Thực hiện lệnh ping để kiểm tra kết nối giữa các PC
10. Cấu hình PPP trên các interface serial
Kiểm tra encapsulation trên các interface serial nối giữa các router.
R1#show interfaces s0/0/0
Serial0/0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 172.16.1.1/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never

R2#show inter s0/0/0


Serial0/0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 172.16.1.2/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never

R2#show inter s0/0/1


Serial0/0/1 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 172.16.1.5/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never
R3#show inter s 0/0/1
Serial0/0/1 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 172.16.1.6/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never

Mặc định các interface serial có encapsulation là HDLC

Cấu hình thay đổi encapsulation thành PPP


R1(config)#inter s 0/0/0
R1(config-if)#encapsulation pp

R2(config)#inter s 0/0/0
R2(config-if)#encapsulation ppp
R2(config)#inter s 0/0/1
R2(config-if)#encapsulation ppp

R3(config)#inter s 0/0/1
R3(config-if)#encapsulation ppp

11. Cấu hình xác thực PAP trên interface serial giữa R1 và R2
R1(config)#username R2 password ccna
R1(config)#interface s0/0/0
R1(config-if)#ppp authentication pap
R1(config-if)#ppp pap sent-username R1 password ccna

R2(config)#username R1 password ccna


R2(config)#interface s0/0/0
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username R2 password ccna

12. Cấu hình xác thực CHAP trên interface serial giữa R2 và R3
R2(config)#username R3 password ccna
R2(config)#interface s 0/0/1
R2(config-if)#ppp authentication chap

R3(config)#username R2 password ccna


R3(config)#interface s 0/0/1
R3(config-if)#ppp authentication chap

13. Kiểm tra lại thông tin bảng định tuyến và kết nối giữa các PC

You might also like