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:10 PM   #1
adminphuong
Administrator
 
Avatar của adminphuong
 
Gia nhập: Jul 2009
Trả Lời: 152
Redistribute giữa RIP và IGRP
Redistribute giữa RIP và IGRP



Mô tả

–Router R1, R3 sử dụng IGRP để quảng cáo thông tin định tuyến
–Router R1, R2 sử dụng RIP để quảng cáo thông tin định tuyến
–Router R1 hoạt động như DCE cung cấp xung clock cho R2 và R3
–Từ router R1, R2, R3 ping được hết các địa chỉ trong mạng.

Cấu hình

Router R1
hostname R1
!
enable password vnpro
!
ip subnet-zero
no ip domain-lookup
!
interface Serial0
ip address 9.1.1.1 255.255.255.0
clock rate 64000
!
interface Serial1
ip address 9.1.2.1 255.255.255.0
clock rate 64000
!
router rip
redistribute igrp 10 metric 1
passive-interface Serial1
network 9.0.0.0
!
router igrp 10
redistribute rip metric 128 20000 255 1 1500
passive-interface Serial0
network 9.0.0.0
!
end

Router R2

hostname R2
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
!
interface Serial0
ip address 9.1.1.2 255.255.255.0
!
router rip
network 9.0.0.0
network 10.0.0.0
!
end

Router R3

hostname R3
!
enable password vnpro
!
ip subnet-zero
no ip domain-lookup
!
interface Loopback0
ip address 10.1.2.1 255.255.255.0
!
interface Ethernet0
ip address 9.1.3.1 255.255.255.0
!
interface Serial0
ip address 9.1.2.2 255.255.255.0
!
router igrp 10
network 9.0.0.0
network 10.0.0.0
!
end

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

1. Đặt hostname, cấu hình cho các cổng trên router R1

Router> en
Router# conf t
Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# int Serial0
R1(config-if)# ip addr 9.1.1.1 255.255.255.0
R1(config-if)# clock rate 64000 ← hoạt động như DCE cung cấp xung clock
R1(config-if)# no shut
R1(config-if)# exit

R1(config)# int Serial1
R1(config-if)# ip addr 9.1.2.1 255.255.255.0
R1(config-if)# clock rate 64000 ← hoạt động như DCE cung cấp xung clock
R1(config-if)# no shut

2. Đặt hostname, cấu hình cho cổng trên router R2

Router> en
Router# conf t
Router(config)# hostname R2
R2(config)# no ip domain-lookup

R2(config)#int e0
R2(config-if)# ip addr 10.1.1.1 255.255.255.0
R2(config-if)# no keepalive
R2(config-if)# no shut

R2(config-if)# int s0
R2(config-if)# ip addr 9.1.1.2 255.255.255.0
R2(config-if)# no shut

3. Đặt hostname, cấu hình cho cổng trên router R3

Router> en
Router# conf t
Router(config)# hostname R3
R3(config)# no ip domain-lookup

R3(config-if)# int Ethernet0
R3(config-if)# ip address 9.1.3.1 255.255.255.0
R3(config-if)# no keepalive
R3(config-if)# no shut

R3(config-if)# int s0
R3(config-if)# ip addr 9.1.2.2 255.255.255.0
R3(config-if)# no shut

4. Cấu hình giao thức định tuyến IGRP với AS là 10 trên router R3

R3(config)# router igrp 10 ← kích hoạt quá trình định tuyến IGRP trên router với AS là 10
R3(config-router)# network 9.0.0.0 ← chỉ ra mạng nào sẽ chạy IGRP
R3(config-router)# end
R3#

+ Lưu ý rằng vì IGRP và RIP thuộc dạng classfull nên sẽ tự động thực hiện summarization về địa chỉ classfull lớp A.

5. Cấu hình giao thức định tuyến RIP trên router R2

R2(config)# router rip
R2(config-router)# network 9.0.0.0
R2(config-router)# network 10.0.0.0
R2(config-rputer)# end
R2#

6. Cấu hình giao thức định tuyến RIP và IGRP cho mạng 9.0.0.0 trên router R1

R1(config)# router rip
R1(config-router)# network 9.0.0.0
R1(config-router) router igrp 10
R1(config-router)# network 9.0.0.0
R1(config-rputer)# end
R1#

7. Trên router R1, ta cần đảm bảo rằng RIP updates không gửi sang R3 (chạy IGRP) và đảm bảo IGRP updates từ R3 không gửi sang R2(chạy RIP). Do đó ta cần thực hiện passive interface trên router R1 để đảm bảo không quảng cáo các thông tin update ra mạng ngoài.

R1(config)# router rip
R1(config-router)# passive-interface Serial1  Đảm bảo RIP updates không gửi sang R3
R1(config-router)# router igrp 10
R1(config-router)# passive-interface Serial0  Đảm bảo IGRP updates không gửi sang R2

8. Kiểm tra bảng định tuyến

–Dùng lệnh clear ip route * để xoá toàn bộ route từ bảng định tuyến.

R1# clear ip route *

–Xem bảng định tuyến trên R1 bằng lệnh show ip route.

R1# show ip route
...
Gateway of last resort is not set
9.0.0.0/24 is subnetted, 3 subnets
C 9.1.1.0 is directly connected, Serial0
C 9.1.2.0 is directly connected, Serial1
I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:31, Serial1
R 10.0.0.0/8 [120/1] via 9.1.1.2, 00:00:15, Serial0
R1#

–Xem bảng định tuyến trên R2 bằng lệnh show ip route.

R2# show ip route
...
9.0.0.0/24 is subnetted, 2 subnets
C 9.1.1.0 is directly connected, Serial0
R 9.1.2.0 [120/1] via 9.1.1.1, 00:00:27, Serial0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Ethernet0
R2#

Xem bảng định tuyến trên R2 ta thấy R2 không kết nối được với mạng 9.1.3.0/24. Do đó, ta cần cấu hình redistribute trên router R1 để cho phép R2 thấy mạng 9.1.3.0/24.

Redistribution định nghĩa cách thức trao đổi routing updates giữa các giao thức định tuyến khác nhau. Mỗi giao thức định tuyến có cách định nghĩa về metric khác nhau, do đó khi thực hiện redistribution ta cần phải chuyển đổi dạng metric sao cho phù hợp với giao thức định tuyến đó.

9. Để R2 thấy được R3 ta thực hiện redistribute IGRP trong RIP với hop count là 1

R1(config)# router rip
R1(config-router)# redistribute igrp 10 metric 1

10. Để R3 thấy được R2 ta thực hiện redistribute RIP trong IGRP, sử dụng ký tự giúp đỡ ? để hiển thị IGRP metric.

R1(config)# router igrp 10
R1(config-router)# redistribute rip ?
Metric Metric for redistributed routed
route-map Route map reference
R1(config-router)# redistribute rip metric ?
<1-4294967295> Bandwidth metric in Kbits per second
R1(config-router)# redistribute rip metric 128 ?
<0-4294967295> IGRP delay metric, in 10 microsecond units
R1(config-router)# redistribute rip metric 128 20000 ?
<0-255> IGRP reliability metric where 255 is 100% reliable
R1(config-router)# redistribute rip metric 128 20000 255 ?
<0-255> IGRP effective bandwidth metric (Loading) where 255 is 100% loaded
R1(config-router)# redistribute rip metric 128 20000 255 1 ?
<0-4294967295> IGRP MTU of the path
R1(config-router)# redistribute rip metric 128 20000 255 1 1500

11. Sau khi cấu hình, thực hiện clear ip route * và xem lại bảng định tuyến trên router R2. Ping mạng 9.1.3.0 để kiểm tra đã kết nối được với mạng IGRP chưa.

R2# show ip route
9.0.0.0/24 is subnetted, 3 subnets
C 9.1.1.0 is directly connected, Serial0
R 9.1.2.0 [120/1] via 9.1.1.1, 00:00:09, Serial0
R 9.1.3.0 [120/1] via 9.1.1.1, 00:00:09, Serial0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Ethernet0
R2#

R2#ping 9.1.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 9.1.3.1, timeout is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms

12. Xem bảng định tuyến trên router R3. Ping mạng 10.1.1.0 để kiểm tra đã kết nối với mạng RIP chưa.

R3# show ip route
9.0.0.0/24 is subnetted, 3 subnets
I 9.1.1.0 [100/84000] via 9.1.2.1, 00:00:58, Serial0
C 9.1.2.0 is directly connected, Serial0
C 9.1.3.0 is directly connected, Ethernet0
I 10.0.0.0/8 [100/102000] via 9.1.2.1, 00:00:58, Serial0
R3#
R3#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 9.1.3.1, timeout is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms

13. Mở rộng vấn đề hơn, ta thêm một subnet mới vào R3 bằng cách cấu hình interface loopback 10.1.2.1/24 sử dụng IGRP.

R3(config)# int loopback0
R3(config-if)# ip address 10.1.2.1 255.255.255.0
R3(config-if)# router igrp 10
R3(config-router)# network 10.0.0.0

Ban đầu, R3 sẽ không quảng cáo mạng 10.0.0.0 đến router R1 vì R1 chỉ biết đến mạng 10.0.0.0/8 thông qua quảng cáo RIP với AD là 120 từ R2.

R1# show ip route
Gateway of last resort is not set
9.0.0.0/24 is subnetted, 3 subnets
C 9.1.1.0 is directly connected, Serial0
C 9.1.2.0 is directly connected, Serial1
I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:31, Serial1
R 10.0.0.0/8 [120/1] via 9.1.1.2, 00:00:15, Serial0
R1#

Khi IGRP update từ R3 gửi đến R1, bảng định tuyến trên R1 sẽ thay đổi như sau:

R1# show ip route
Gateway of last resort is not set
9.0.0.0/24 is subnetted, 3 subnets
C 9.1.1.0 is directly connected, Serial0
C 9.1.2.0 is directly connected, Serial1
I 9.1.3.0 [100/80225] via 9.1.2.2,00:00:53, Serial1
I 10.0.0.0/8 [100/80225] via 9.1.1.2, 00:00:53, Serial1
R1#

Nguyên do của sự thay đổi này là do R3 sử dụng IGRP nên có AD=100 thấp hơn RIP (AD=120) nên R1 sẽ gửi tất cả các lưu lượng cho mạng 10.0.0.0 qua router R3.

R1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
. . . . .
Success rate is 0 percent (0/5)

R1#ping 10.1.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms

14. Để giải quyết vấn đề này ta cấu hình static route đến R2:

R1(config)# ip route 10.1.1.0 255.255.255.0 Serial0

15. Kiểm tra kết quả thực hiện

R1# show ip route
Gateway of last resort is not set
9.0.0.0/24 is subnetted, 3 subnets
C 9.1.1.0 is directly connected, Serial0
C 9.1.2.0 is directly connected, Serial1
I 9.1.3.0 [100/80225] via 9.1.2.2, 00:00:53, Serial1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
S 10.1.1.0/24 is directly connected, Serial0
I 10.0.0.0/8 [100/80225] via 9.1.1.2, 00:00:53, Serial1
R1#

R1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
! ! ! ! !
Success rate is 0 percent (5/5), round-trip min/avg/max = 16/16/16 ms

R1#pi ng 10.1.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 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à 10:20 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.