CCNA R&S (CCNA5.0) Bài lab cấu hình cơ bản Ripv2 và Static route (phần 2)
Nguồn: thietbivienthongbachkhoa.com
Cấu hình trên SITE1:
Router>
Router>en
Router#conf t
Router(config)#hostname SITE1
SITE1(config)#int s0/0/0
SITE1(config-if)#no shut
SITE1(config-if)#description connect to GATE
SITE1(config-if)#ip add 172.16.3.1 255.255.255.0
SITE1(config-if)#exit
SITE1(config)#int s0/0/1
SITE1(config-if)#no shut
SITE1(config-if)#description connect to SITE2
SITE1(config-if)#clock rate 56000
SITE1(config-if)#ip address 172.16.4.1 255.255.255.0
SITE1(config-if)#exit
SITE1(config)#route
SITE1(config)#router rip
SITE1(config-router)#version 2
SITE1(config-router)#no auto-summary
SITE1(config-router)#network 172.16.3.0
SITE1(config-router)#network 172.16.4.0
SITE1(config-router)#exit
SITE1(config)#exit
SITE1#
SITE1#wr
Building configuration…
[[][[]][[][[]]][[][[]][[][[]]]]OK]
SITE1#
Cấu hình trên SITE3:
Router>
Router>en
Router#conf t
Router(config)#hostname SITE3
SITE3(config)#int f0/0
SITE3(config-if)#no shut
SITE3(config-if)#description connect to lan 8
SITE3(config-if)#ip address 172.16.8.3 255.255.255.0
SITE3(config-if)#exit
SITE3(config)#int f0/1
SITE3(config-if)#no shut
SITE3(config-if)#ip address 172.16.7.3 255.255.255.0
SITE3(config-if)#description connect to lan 7
SITE3(config-if)#exit
SITE3(config)#router rip
SITE3(config-router)#version 2
SITE3(config-router)#no auto-summary
SITE3(config-router)#network 172.16.7.0
SITE3(config-router)#network 172.16.8.0
SITE3(config-router)#passive-interface f0/1
SITE3(config-router)#exit
SITE3(config)#exit
SITE3#
SITE3#wr
Building configuration…
[[][[]][[][[]]][[][[]][[][[]]]]OK]
SITE3#
Cấu hình trên ISP:
Vì bài này, chúng ta chưa học NAT. Vì vậy, trên ISP cần trỏ static route vào vùng RIPv2
Router>
Router>en
Router#conf t
ISSP(config)#hostname ISP
ISP(config)#int f0/0
ISP(config-if)#no shut
ISP(config-if)#description connect to DMZ
ISP(config-if)#ip address 200.200.2.5 255.255.255.0
ISP(config-if)#exit
ISP(config)#int s0/0/0
ISP(config-if)#no shut
ISP(config-if)#clock rate 56000
ISP(config-if)#description connect to GATE
ISP(config-if)#ip address 200.200.1.5 255.255.255.0
ISP(config-if)#exit
ISP(config)#ip route 172.16.0.0 255.255.0.0 s0/0/0
ISP(config)#ip route 30.30.30.0 255.255.255.0 s0/0/0
ISP(config)#exit
ISP#
ISP#wr
Building configuration…
[[][[]][[][[]]][[][[]][[][[]]]]OK]
ISP#
Cấu hình định tuyến đã xong:
Kiểm tra bảng định tuyến:
SITE3#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 172.16.8.4 to network 0.0.0.0
30.0.0.0/24 is subnetted, 1 subnets
R 30.30.30.0 [[][[]][[][[]]][[][[]][[][[]]]]120/3] via 172.16.8.4, 00:00:12, FastEthernet0/0
172.16.0.0/24 is subnetted, 6 subnets
R 172.16.3.0 [[][[]][[][[]]][[][[]][[][[]]]]120/1] via 172.16.8.4, 00:00:12, FastEthernet0/0
R 172.16.4.0 [[][[]][[][[]]][[][[]][[][[]]]]120/2] via 172.16.8.4, 00:00:12, FastEthernet0/0
R 172.16.5.0 [[][[]][[][[]]][[][[]][[][[]]]]120/3] via 172.16.8.4, 00:00:12, FastEthernet0/0
R 172.16.6.0 [[][[]][[][[]]][[][[]][[][[]]]]120/3] via 172.16.8.4, 00:00:12, FastEthernet0/0
C 172.16.7.0 is directly connected, FastEthernet0/1
C 172.16.8.0 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [[][[]][[][[]]][[][[]][[][[]]]]120/1] via 172.16.8.4, 00:00:12, FastEthernet0/0
SITE3#
Từ SITE3 ping Gateway DMZ
SITE3#ping 200.200.2.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.200.2.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/20 ms
SITE3#
Kết luận: Topo đã thông về mặt định tuyến
Nguồn: Trung tâm thiết bị viễn thông bách khoa