Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


9. Configuring IP Routing Protocol RIP, RIP v2, EIGRP, OSPF, VLSM Routing

Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 11-08-2009, 11:00 PM   #1
adminphuong
Administrator
 
Avatar của adminphuong
 
Gia nhập: Jul 2009
Trả Lời: 152
Giao thức định tuyến RIP
Giao thức định tuyến RIP




Mô tả & yêu cầu

–Lab này cấu hình định tuyến IP dùng địa chỉ mạng lớp B (131.108.0.0/16), với subnet mask lớp C (255.255.255.0 hay /24).
–Cấu hình giao thức định tuyến RIP trên R1 và R2 để từ router ping được tất cả địa chỉ trên mạng.

Cấu hình
R1
!
hostname R1
!
interface loopback0
ip address 131.108.4.1 255.255.255.0
exit
!
interface loopback1
ip address 131.108.5.1 255.255.255.0
exit
!
interface loopback2
ip address 131.108.6.1 255.255.255.0
exit
!
interface Ethernet0
ip address 131.108.1.1 255.255.255.0
no shutdown
no keepalive
exit
!
interface Serial0
ip address 131.108.3.1 255.255.255.0
clock rate 64000
no shut
exit
!
router rip
network 131.108.0.0
!
end

R2
!
hostname R2
!
interface loopback0
ip address 131.108.7.1 255.255.255.0
exit
!
interface loopback1
ip address 131.108.8.1 255.255.255.0
exit
!
interface loopback2
ip address 131.108.9.1 255.255.255.0
exit
!
interface Ethernet0
ip address 131.108.2.1 255.255.255.0
no shutdown
no keepalive
exit
!
interface Serial0
ip address 131.108.3.2 255.255.255.0
no shut
exit
!
router rip
network 131.108.0.0
!
end

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

1. Đặt hostname, cấu hình cho các cổng loopback, Ethernet và Serial trên R1 và R2.

Đặt hostname

Router(config)#hostname R1
R1(config)# _

Router(config)#hostname R2
R2(config)# _

Xác định thiết bị nào là DCE và DTE:

R1#show controllers S0
Interface Serial0
Hardware is PowerQuiCC MPC860
DCE V.35, no clock
...

R2#show controllers S1
HD unit 0, idb = 0xFBDB0, driver structure at 0x1020C8
buffer size 1524 HD unit 0, V.35 DTE cable
cpb = 0x1, eda = 0x483C, cda = 0x4850
...

Cấu hình địa chỉ IP cho các cổng của R1

R1(config)#interface loopback0
R1(conig–if)# ip address 131.108.4.1 255.255.255.0

R1(config–if)#interface loopback1
R1(conig–if)# ip address 131.108.5.1 255.255.255.0

R1(config–if)#interface loopback2
R1(conig–if)# ip address 131.108.6.1 255.255.255.0
R1(conig–if)# exit

R1(config)#interface Ethernet0
R1(conig–if)#ip address 131.108.1.1 255.255.255.0
R1(conig–if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
%LINK-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
R1(conig–if)#no keepalive
R1(conig–if)# exit

R1(config)#interface Serial0
R1(conig–if)#ip address 131.108.3.1 255.255.255.0
R1(conig–if)#clock rate 128000
R1(conig–if)#no shut

Tương tự đối với R2

R2(config)#interface loopback0
R2(conig–if)# ip address 131.108.7.1 255.255.255.0

R2(config)#interface loopback1
R2(conig–if)# ip address 131.108.8.1 255.255.255.0

R2(config)#interface loopback2
R2(conig–if)# ip address 131.108.9.1 255.255.255.0

R2(config)#interface Ethernet0
R2(conig–if)#ip address 131.108.2.1 255.255.255.0
R2(conig–if)#no shutdown
R2(conig–if)#no keepalive
R2(conig–if)# exit

R2(config)#interface Serial1
R2(conig–if)#ip address 131.108.3.2 255.255.255.0
R2(conig–if)#no shut

2. Kiểm tra bảng định tuyến IP trên các router

R1# show ip route
...
Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnets
C 131.108.6.0 is directly connected, Loopback2
C 131.108.5.0 is directly connected, Loopback1
C 131.108.4.0 is directly connected, Loopback0
C 131.108.3.0 is directly connected, Serial0
C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route
...
Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnets
C 131.108.9.0 is directly connected, Loopback2
C 131.108.8.0 is directly connected, Loopback1
C 131.108.7.0 is directly connected, Loopback0
C 131.108.3.0 is directly connected, Serial1
C 131.108.2.0 is directly connected, Ethernet0

3. Chạy giao thức định tuyến RIP trên cả hai router

R1(config)#router rip
R1(config–router)#network 131.108.0.0
R1(config–router)#end
R1#copy run start ← lưu cấu hình vào NVRAM

R2(config)#router rip
R2(config–router)network 131.108.0.0
R2(config–router)#end
R2#copy run start

Xem quá trình cập nhật định tuyến trên router

R1#debug ip rip
RIP protocol debugging is on

R1#debug ip rip events
RIP event debugging is on

4. Xem lại bảng định tuyến trên R1 và R2

R1# show ip route
...
Gateway of last resort is not set

131.108.0.0/24 is subnetted, 5 subnets
R 131.108.9.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
R 131.108.8.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
R 131.108.7.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
C 131.108.6.0 is directly connected, Loopback2
C 131.108.5.0 is directly connected, Loopback1
C 131.108.4.0 is directly connected, Loopback0
C 131.108.3.0 is directly connected, Serial0
R 131.108.2.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
C 131.108.1.0 is directly connected, Ethernet0

R2# show ip route
...
Gateway of last resort is not set
131.108.0.0/24 is subnetted, 5 subnets
C 131.108.9.0 is directly connected, Loopback2
C 131.108.8.0 is directly connected, Loopback1
C 131.108.7.0 is directly connected, Loopback0
R 131.108.6.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
R 131.108.5.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
R 131.108.4.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
C 131.108.3.0 is directly connected, Serial1
C 131.108.2.0 is directly connected, Ethernet0
R 131.108.1.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1

5. Kiểm tra hoạt động bằng ping các mạng ở̀ xa (tất cả các lệnh ping phải thành công)

R1#ping 131.108.9.1
R1#ping 131.108.8.1
R1#ping 131.108.7.1
R1#ping 131.108.2.1

R2#ping 131.108.4.1
R2#ping 131.108.5.1
R2#ping 131.108.6.1
R2#ping 131.108.1.1

Ví dụ ping thành công

R1#ping 131.108.9.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 131.108.9.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms
__________________
Theo: Viet Professionals Co. Ltd. VnPro ®

adminphuong vắng mặt   Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:17 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.