![ospf配置实验_休闲](https://s2.51cto.com/attachment/201104/165831731.jpg?x-oss-process=image/resize,m_fixed,w_1184)
1.在R11上建立Loopback接口:
Lo:10.10.10.10/24
2.接口IP=192.168.YX.X/24
二。启动OSPF
1。宣告
2。查看路由表,邻居表,拓扑表(sh ip ospf data)
3。查看DR,管理距离值?
三、
1。修改R12/R13做为DR
R11(config-if)#no sh
R11(config-if)#ip add 192.168.21.1 255.255.255.0
R11(config-if)#int l
% Incomplete command.
R11(config-if)#ip add 10.10.10.10 255.255.255.0
R11(config-router)#netw 192.168.21.1 0.0.0.255 area 0
R11(config-router)#net 10.10.10.10 0.0.0.0 area 0
R11(config-router)#exit
R12(config-if)#no sh
R12(config-if)#ip add 192.168.21.2 255.255.255.0
R12(config-if)#int f0/0
R12(config-if)#no sh
R12(config-if)#ip add 192.168.32.2 255.255.255.0
R12(config-if)#exit
R12(config)#router ospf 100
R12(config-router)#net 192.168.21.0 0.0.0.255
% Incomplete command.
% Incomplete command.
R12(config-router)#net 192.168.32.0 0.0.0.255 area 0
R13(config-if)#no sh
R13(config-if)#ip add 192.168.32.3 255.255.255.0
R13(config-if)#int l 0
R13(config-if)#ip add 30.30.30.30 255.255.255.0
R13(config-if)#no sh
R13(config-if)#exit
R13(config)#router ospf 100
R13(config-router)#net 192.168.32.3 0.0.0.255
% Incomplete command.
R13(config-router)#net 30.30.30.30 0.0.0.0 area 0
*Mar 1 01:08:29.731: %SYS-5-CONFIG_I: Configured from console by console
R12#sh ip ospf nei
10.10.10.10 0 FULL/ - 00:00:34 192.168.21.1 Serial1/1
30.30.30.30 1 FULL/DR 00:00:37 192.168.32.3 FastEthernet0/0
R12#sh 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
C 20.20.20.0 is directly connected, Loopback0
C 192.168.21.0/24 is directly connected, Serial1/1
10.0.0.0/32 is subnetted, 1 subnets
O 10.10.10.10 [110/65] via 192.168.21.1, 00:00:17, Serial1/1(管理距离值)
C 192.168.32.0/24 is directly connected, FastEthernet0/0
30.0.0.0/32 is subnetted, 1 subnets
O 30.30.30.30 [110/11] via 192.168.32.3, 00:00:17, FastEthernet0/0
R12#sh ip ospf data
10.10.10.10 10.10.10.10 29 0x8000000A 0x004182 3
20.20.20.20 20.20.20.20 49 0x80000010 0x002874 3
30.30.30.30 30.30.30.30 939 0x80000008 0x00701F 2
192.168.32.3 30.30.30.30 934 0x80000003 0x00CE9B
1。修改R2做为DR(根据邻居表能够看出R13为dr)
R12(config-router)#router-
R12(config-router)#router-id 40.40.40.40
Reload or use "clear ip ospf process" command, for this to take effect
Reset ALL OSPF processes? [no]: y
R13#
*Mar 1 01:13:28.103: %OSPF-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 01:13:28.575: %OSPF-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from LOADING to FULL, Loading Done
R12(config-if)#ip ospf auth
R12(config-if)#ip ospf auth
R12(config-if)#ip ospf authentication-k
*Mar 1 01:18:08.667: %OSPF-5-ADJCHG: Process 100, Nbr 30.30.30.30 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R12(config-if)#ip ospf authentication-k
R12(config-if)#ip ospf authentication-key cisco
R13(config-if)#ip ospf auth
R13(config-if)#ip ospf auth
R13(config-if)#ip ospf authentication-k
R13(config-if)#ip ospf authentication-key cisoc
R13(config-if)#
*Mar 1 01:18:07.835: %OSPF-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R11(config-if)#ip ospf net bro
R11(config-if)#
*Mar 1 01:19:29.363: %OSPF-5-ADJCHG: Process 100, Nbr 20.20.20.20 on Serial1/1 from FULL to DOWN, Neighbor Down: Interface down or detached
R12(config-if)#ip ospf net bro
R12(config-if)#
*Mar 1 01:19:44.799: %OSPF-5-ADJCHG: Process 100, Nbr 10.10.10.10 on Serial1/1 from EXSTART to DOWN, Neighbor Down: Interface down or detached