Trên router R1, cấu hình RIP: R1#configure terminal R1config#router rip R1config-router#version 2 fa0/0 fa0/0... Trên route R1 và R2, cấu hình tránh trôi theo con trỏ chuột khi hiện các
Trang 1RIP, Backup - Restore IOS
A Cấu hình cơ bản:
1 Cấu hình PC-Linux:
IP: 192.168.1.1/24
GW: 192.168.1.254
2 Cấu hình PC-Linux_2:
IP: 192.168.3.1/24
GW: 192.168.3.254
3 Cấu hình router R1: fa0/0: 192.168.1.254/24, fa0/1: 192.168.2.1/24
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
4 Cấu hình router R2: fa0/0: 192.168.3.254/24, fa0/1: 192.168.2.2/24
R2#configure terminal
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.3.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/1
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
5 Từ PC-Linux: dùng lệnh ping để kiểm tra các kết nối:
ping 192.168.1.1
ping 192.168.1.254
ping 192.168.2.1
Các lệnh ping sau sẽ bị fail:
ping 192.168.2.2
ping 192.168.3.254
ping 192.168.3.1
6 Trên router R1, cấu hình RIP:
R1#configure terminal
R1(config)#router rip
R1(config-router)#version 2
fa0/0
fa0/0
Trang 2R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config)#exit
7 Trên router R2, cấu hình RIP:
R2#configure terminal
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.3.0
R2(config)#exit
8 Từ PC-Linux: dùng lệnh ping để kiểm tra các kết nối:
ping 192.168.1.1
ping 192.168.1.254
ping 192.168.2.1
ping 192.168.2.2
ping 192.168.3.254
ping 192.168.3.1
9 Trên route R1 và R2, cấu hình tránh trôi theo con trỏ chuột khi hiện các thông báo:
R1#configure terminal
R1(config)#line console 0
R1(config-line)#logging synchronous
10 Trên route R1 và R2, tắt chế độ phân giải tên miền (domain-lookup):
R1#configure terminal
R1(config)#no ip domain-lookup
11 Lưu lại cấu hình trên router R1 và R2:
R1#copy running-config startup-config
B Thực hành trên thiết bị thực (làm trên lớp):
1 Lắp đặt và cấu hình máy tính, router ở phần A nêu trên
2 Cài đặt TFTP Server trên máy PC2
3 Lưu lại IOS hiện tại của router R2 vào TFTP server trên máy PC2:
R2#ping 192.168.3.1
Type escape sequence to abort
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms
R2#show flash
System flash directory:
File Length Name/status
3 33591768 c1841-advipservicesk9-mz.124-15.T1.bin
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[33847587 bytes used, 30168797 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
R2#copy flash: tftp:
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 192.168.3.1
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]?
Writing
c1841-advipservicesk9-mz.124-15.T1.bin !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 33591768 bytes]
33591768 bytes copied in 20.327 secs (1652000 bytes/sec)
Trang 34 Giả sử file IOS trên router bị hư hoặc bị mất ( dùng câu lệnh delete flash:tên_file_IOS )
R2#delete flash:c1841-advipservicesk9-mz.124-15.T1.bin
Delete filename [c1841-advipservicesk9-mz.124-15.T1.bin]?
Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]
R2#reload
5 Tiến hành load file IOS đã lưu ở bước 1 -> bỏ vào router, trên router R2:
rommon 1 > set
rommon 2 > IP_ADDRESS=192.168.3.254 -> địa chỉ IP port fa0/0
rommon 3 > IP_SUBNET_MASK=255.255.255.0 -> subnet mask
rommon 4 > DEFAULT_GATEWAY=192.168.3.254 -> default gateway
rommon 5 > TFTP_SERVER=192.168.3.1 -> Địa chỉ TFTP server
rommon 6 > TFTP_FILE= c1841-advipservicesk9-mz.124-15.T1.bin -> tên file cần nạp
Bắt đầu quá trình nạp bằng lệnh tftpdnld:
rommon 7> tftpdnld
Invoke this command for disaster recovery only
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y -> chọn yes
Receiving c2600-is-mz.113-2.0.3.Q from 10.10.3.1
!!!!!.!!!!!!!!!!!!!!!!!!!.!!
File reception completed
Khởi động lại router
rommon 8>reset
*** THE END ***