路由配置ospf的问题

来源:百度知道 编辑:UC知道 时间:2024/06/25 16:16:50
我配置了个ospf但是查询显示我没有启动,那位帮我解释下原因?
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int e0/0
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#rou
Router(config)#router ospf 2
Router(config-router)#network 192.168.1.0 0.0.0.255 a
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#exit
Router#show
*Mar 1 00:32:44.491: %SYS-5-CONFIG_I: Configured from console by co
Router#show ip ospf nei
Router#show ip ospf neighbor
%OSPF: Router process 1 is not running, please configure a router-id
%OSPF: Router process 2 is not running, please configure a router-id
Router#
Router#
这是我的所有配置,哪位高手帮我找下原因。。。

好无厘头的答复``````
真正原因是OSPF没有找到邻居,也就是说现在你的ospf还没有真正的运行起来.你配置的接口是E0/0,也就是说你的ospf运行在一个BMA(广播型多路访问)的结构下,在BMA结构下,ospf进程会根据ROUTER-ID来选择DR/BDR.如果你的网络中只有一台OSPF路由器的话,那么他是没有邻居的,你使用show ip ospf nei这条命令将不会看到任何结果.
所以说,你现在看到的结果是正常的.想看到neighbor,那就再启动一台路由器,再启动一个ospf进程,都配到AREA 0里面,这时候就能相互看到对方的状态了.

Router#show ip ospf neighbor
%OSPF: Router process 1 is not running, please configure a router-id
(路由进程没有运行,请配置一个路由器ID)
解决办法如下:
Router(config)#router ospf 2
Router(config-router)#router-id 100.100.100.100(这个地址可以随便起!)
Router(config-router)#network 192.168.1.0 0.0.0.255 a
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#exit

Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
加到router ospf 2进程里的应该是192.168.1.2 0.0.0.255网段

好久没有在用CISCO的产品了。不过我现在用都是在HTTP下面配置的。你可以先开通HTTP服务。
在WEB页面下面直接修改就可以了。