lab 4-7 các thông số ospf ở mức interface

9 325 0
lab 4-7 các thông số ospf ở mức interface

Đang tải... (xem toàn văn)

Thông tin tài liệu

Lab 4-7: CÁC THÔNG SỐ OSPF Ở MỨC INTERFACE Mô tả Cisco IOS cho phép nhà quản trị thay thế các thông số của OSPF. Bài thực hành này xét tới ba thông số thường dùng là cost, hello interval và dead interval. Tham số cost đặt chi phí OSPF gởi một gói qua cổng giao tiếp . Mặc định chi phí được tính theo công thức 100.000.000/bandwidth. Như vậy mặc định đối với cổng Ethernet 100 triệu/ 10 triệu = 10. Tham số OSPF cost rất hay dùng trong quản lý luồng. Tham số hello interval là khoảng thời gian tính bằng giây giữa các lần gởi gói hello trên một giao tiếp. Hello interval phải phù hợp trên tất cả các router chạy trên mạng, giá trị này khác nhau tùy theo các loại cổng giao tiếp (broadcast = 10, non-broadcast = 30, point-to-point = 10, và point-to-multipoint = 30) Tham số dead interval là khoảng thời gian tính bằng giây trước khi mất quan hệ router láng giềng khi không nhận được gói hello. Tùy thuộc vào loại mạng, giá trị này khác nhau broadcast = 40, non-broadcast = 120, point-to-point = 40, và point-to-multipoint = 120) Bài thực hành này mô tả cách cấu hình thay đổi các tham số trên, RouterA và RouterB được kết nối serial cấu hình với chi phí 66, gấp hai lần trên kết nối RouterB và RouterC. OSPF hello interval và dead interval đặt là 120 trên cổng giao tiếp nối RouterA và RouterB. Cấu hình RouterA ! hostname RouterA ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ! interface Serial0 ip address 192.1.1.1 255.255.255.0 ip ospf cost 66 ip ospf hello-interval 20 ip ospf dead-interval 120 ! router ospf 64 network 1.1.1.1 0.0.0.0 area 0 network 10.1.1.0 0.0.0.255 area 0 network 192.1.1.0 0.0.0.255 area 0 ! line con 0 line 1 16 line aux 0 line vty 0 4 ! end RouterB ! hostname RouterB ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 no ip directed-broadcast ! interface Serial0 ip address 192.1.1.2 255.255.255.0 ip ospf cost 66 ip ospf hello-interval 20 ip ospf dead-interval 120 clockrate 64000 ! interface Serial1 ip address 193.1.1.2 255.255.255.0 clockrate 64000 ! router ospf 64 network 2.2.2.2 0.0.0.0 area 0 network 192.1.1.0 0.0.0.255 area 0 network 193.1.1.0 0.0.0.255 area 0 ! line con 0 transport input none line aux 0 line vty 0 4 login ! end RouterC ! hostname RouterC ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.0 ! interface Ethernet0 ip address 10.1.1.2 255.255.255.0 ! interface Serial0 ip address 193.1.1.1 255.255.255.0 ! router ospf 64 network 3.3.3.3 0.0.0.0 area 0 network 10.1.1.0 0.0.0.255 area 0 network 193.1.1.0 0.0.0.255 area 0 ! ! line con 0 transport input none line aux 0 line vty 0 4 ! end Kiểm tra Từ RouterA, xem trạng thái cổng bằng lệnh show ip ospf interface s0/0. Chú ý rằng hello và dead interval đã thay đổi và OSPF cost đã thay đổi thành 66. RouterA#sh ip ospf interface s0 Serial0 is up, line protocol is up Internet Address 192.1.1.1/24, Area 0 Process ID 64, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 66 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 20, Dead 120, Wait 120, Retransmit 5 Hello due in 00:00:11 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 2.2.2.2 Suppress hello for 0 neighbor(s) Xem bảng định tuyến trên RouterA bằng lệnh show ip route, chi phí tới cổng loopback trên RouterC (3.3.3.3) là 11, do chi phí để gởi gói ra Ethernet của RouterA là 10 và chi phí gởi gói tới cổng loopback trên RouterC là 1. RouterA#sh ip route Gateway of last resort is not set 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/67] via 192.1.1.2, 00:01:01, Serial0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/11] via 10.1.1.2, 00:01:01, Ethernet0 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0 O 193.1.1.0/24 [110/74] via 10.1.1.2, 00:01:01, Ethernet0 C 192.1.1.0/24 is directly connected, Serial0 Có thể xem trạng thái OSPF trên cổng Ethernet của RouterA và in terface loopback của RouterC bằng các lệnh sau: RouterA#sh ip ospf interface e0 Ethernet0 is up, line protocol is up Internet Address 10.1.1.1/24, Area 0 Process ID 64, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 3.3.3.3, Interface address 10.1.1.2 Backup Designated router (ID) 1.1.1.1, Interface address 10.1.1.1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:07 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 3.3.3.3 (Designated Router) Suppress hello for 0 neighbor(s) RouterC#sh ip ospf loopback 0 Loopback0 is up, line protocol is up Internet Address 3.3.3.3/24, Area 0 Process ID 64, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1 Loopback interface is treated as a stub Host Thay đổi OSPF cost của cổng Ethernet của RouterA thành 200. RouterA#conf t RouterA(config)#int e0 RouterA(config-if)#ip ospf cost 200 Xem bảng định tuyến trên RouterA chú ý rằng route 3.3.3.3 bây giờ đã thay đổi; RouterA sử dùng đường kết nối thông qua cổng serial, có chi phí làa 131, bé hơn chi phí dùng qua cổng Ethernet. RouterA#sh ip route Gateway of last resort is not set 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/67] via 192.1.1.2, 00:00:03, Serial0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/131] via 192.1.1.2, 00:00:03, Serial0 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0 O 193.1.1.0/24 [110/130] via 192.1.1.2, 00:00:04, Serial0 C 192.1.1.0/24 is directly connected, Serial0 Nếu hello interval không trùng nhau trên các router nối trực tiếp trên cùng mạng thì điều gì sẽ xảy ra? Trên RouterA thay đồi hello interval thành 30 giây trên cổng serial. RouterA#conf t RouterA(config)#int s0 RouterA(config-if)#ip ospf hello-interval 30 Xem lại trạng thái router láng giềng OSPF trên RouterA bằng lệnh show ip ospf neighbor, quan hệ router láng giềng đã mất. RouterA#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/DR 00:00:39 10.1.1.2 Ethernet0 RouterA#debug ip ospf events OSPF events debugging is on RouterA# 02:49:18: OSPF: Rcv hello from 3.3.3.3 area 0 from Ethernet0 10.1.1.2 02:49:18: OSPF: End of hello processing 02:49:22: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0 192.1.1.2 02:49:22: OSPF: Mismatched hello parameters from 192.1.1.2 Xem gởi nhận gói hello trên RouterA bằng lệnh debug ip ospf events. Chú ý thông báo RouterA nhận gói OSPF từ RouterB, hello interval không giống nhau. Nếu hello interval và dead interval không giống nhau thì router sẽ không thiết lập được quan hệ láng giềng. . Lab 4-7: CÁC THÔNG SỐ OSPF Ở MỨC INTERFACE Mô tả Cisco IOS cho phép nhà quản trị thay thế các thông số của OSPF. Bài thực hành này xét tới ba thông số thường dùng là cost,. Ethernet 100 triệu/ 10 triệu = 10. Tham số OSPF cost rất hay dùng trong quản lý luồng. Tham số hello interval là khoảng thời gian tính bằng giây giữa các lần gởi gói hello trên một giao tiếp. Hello. RouterA ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ! interface Serial0 ip address 192.1.1.1 255.255.255.0 ip ospf cost 66 ip ospf

Ngày đăng: 16/11/2014, 19:45

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan