Các câu lệnh show:
show ip protocols
show ip ospf
show ip ospf interface
show ip ospf neighbor
show ip route
Nên cấu hình priority trước khi cấu hình OSPF!
Router có Priority cao nhất sẽ là DR, nhì là BDR, còn lại là DROther
- Default Priority là 1
- Router có Priority bằng nhau thì Router có Router-ID cao nhất là DR
Lưu ý: Priority=0 thì Router sẽ không tham gia bình bầu DR/BDR
Cách 1: Đổi priority
R1(config)#interface F0/1
R1(config-if)#ip ospf priority 100
R1(config-if)#end
R1# write
R2(config)#interface F0/1
R2(config-if)#ip ospf priority 50
R2(config-if)#end
R2# write
R3(config)#interface F0/1
R3(config-if)#ip ospf priority 1
R3(config-if)#end
R3# write
Cách 2: đổi Router-ID
router ospf 100
router-id 211.1.1.1
exit
Cách 3: Cấu hình Interface Loopback
Switch>en
Switch#conf t
Switch(config)#int range e0/0 - 2
Switch(config-if-range)#switchport
Switch(config-if-range)#end
Switch#write
ip 192.168.1.11/24 192.168.1.1
ip 192.168.2.22/24 192.168.2.1
ip 192.168.3.33/24 192.168.3.1
en
conf t
hostname R1
int f0/0
no sh
ip add 192.168.1.1 255.255.255.0
exit
int f0/1
no sh
ip add 200.1.1.1 255.255.255.248
exit
do wr
en
conf t
hostname R2
int f0/0
no sh
ip add 192.168.2.1 255.255.255.0
exit
int f0/1
no sh
ip add 200.1.1.2 255.255.255.248
exit
do wr
en
conf t
hostname R3
int f0/0
no sh
ip add 192.168.3.1 255.255.255.0
exit
int f0/1
no sh
ip add 200.1.1.3 255.255.255.248
exit
do wr
router ospf 100
network 200.1.1.0 0.0.0.7 area 0
network 192.168.1.0 0.0.0.255 area 0
exit
do wr
router ospf 100
network 200.1.1.0 0.0.0.7 area 0
network 192.168.2.0 0.0.0.255 area 0
exit
do wr
router ospf 100
network 200.1.1.0 0.0.0.7 area 0
network 192.168.3.0 0.0.0.255 area 0
exit
do wr
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
200.1.1.3 1 FULL/DROTHER 00:00:39 200.1.1.3 FastEthernet0/1
201.2.2.2 1 FULL/BDR 00:00:31 200.1.1.2 FastEthernet0/1
R1#
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
200.1.1.3 1 FULL/DROTHER 00:00:37 200.1.1.3 FastEthernet0/1
211.1.1.1 1 FULL/DR 00:00:37 200.1.1.1 FastEthernet0/1
R2#
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
201.2.2.2 1 FULL/BDR 00:00:36 200.1.1.2 FastEthernet0/1
211.1.1.1 1 FULL/DR 00:00:33 200.1.1.1 FastEthernet0/1
R3#
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
200.1.1.0/29 is subnetted, 1 subnets
C 200.1.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O 192.168.2.0/24 [110/20] via 200.1.1.2, 00:02:44, FastEthernet0/1
O 192.168.3.0/24 [110/20] via 200.1.1.3, 00:02:44, FastEthernet0/1
R1#
» Tin mới nhất:
» Các tin khác: