You are on page 1of 4

Mô hình:

3 PC:
PC1: ip là 172.16.3.10 255.255.255.0 default gateway 172.16.3.1
PC2: ip là 172.16.1.10 255.255.255.0 default gateway 172.16.1.1
PC3: ip là 192.168.2.10 255.255.255.0 default gateway 192.168.2.1
3 switch 2960, 3 router 2811.
các loại cáp dùng trong bài lab này gồm cáp:
cáp thẳng (straight-throungt) nối giữa pc và switch, switch với
router.
cáp serial nối giữa các router với nhau, để có cổng sử dụng serial thì các bạn click trực
tiếp lên router
ở tab Physical có một list các tên tương ứng với các thành phần mở rộng của thiết bị
để thêm vào các khe các bạn có thể kéo bỏ vào thiết bị, nhớ tắt nguồn router nhé.

Bài này hướng dẫn định cách thức xây dựng hệ thống mạng sử dụng định tuyến tĩnh:
static route
nguyên lý hoạt động của static route là một router muốn đi đến một mạng khác nó thì bạn
phải trực tiếp cấu hình chỉ đường đi đến mạng đó cho chính router đó:
ip route network subnetmask nethop

Toàn bộ lệnh sử dụng trong bài:

Router 1:
Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#enable secret viethanit.org
R1(config)#line console 0
R1(config-line)#password viethanit.org
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#password viethanit.org
R1(config-line)#login
R1(config-line)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 1/0
Router(config-if)#ip address 172.16.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#clock rate 64000
Router(config-if)#exit
---------------------------
Router 2:
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#enable secret viethanit.org
R2(config)#line console 0
R2(config-line)#password viethanit.org
R2(config-line)#login
R2(config-line)#exit
R2(config)#line vty 0 4
R2(config-line)#password viethanit.org
R2(config-line)#login
R2(config-line)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/0
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/1
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#clock rate 64000
R2(config-if)#exit
-----------------------------------
Router 3:
Router>enable
Router#configure terminal
Router(config)#hostname R3
R3(config)#enable secret viethanit.org
R3(config)#line console 0
R3(config-line)#password viethanit.org
R3(config-line)#login
R3(config-line)#exit
R3(config)#line vty 0 4
R3(config-line)#password viethanit.org
R3(config-line)#login
R3(config-line)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface serial 1/0
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

Định tuyến tĩnh (basic):


Router 1:
"ở mode configure"
R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2
R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2
R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2
Router 2:
R2(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.1
R2(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.1
Router 3:
R3(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.2
R3(config)#ip route 172.16.2.0 255.255.255.0 192.168.1.2
R3(config)#ip route 172.16.3.0 255.255.255.0 192.168.1.2

khi cấu hình xong nhớ dùng


R1#copy running-config startup-config
để lưu lại cấu hình của router nhé!
thử bài thành quả: ở bất kì pc hay router dùng lệnh ping để kiểm tra kết nối nhé!
chúc các bạn các bạn thành công!

You might also like