在Cisco IOS中,如何查看OSPFnetworking区域?

假设我在Cisco IOS中使用以下命令configurationOSPF:

router ospf 201 network 10.0.0.0 0.255.255.255 area 10.0.0.0 network 192.168.0.0 0.0.255.255 area 0 

我怎样才能列出已定义的networking区域? 即假设我犯了一个错字,并发出“无networking”的命令,我怎么知道之前input的是什么?

编辑:我跑“show ip ospf”并得到以下输出:

 router#show ip ospf Routing Process "ospf 1" with ID 10.0.0.1 Supports only single TOS(TOS0) routes Supports opaque LSA SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x000000 Number of opaque AS LSA 0. Checksum Sum 0x000000 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 3 Area has no authentication SPF algorithm executed 3 times Area ranges are Number of LSA 23. Checksum Sum 0x0d5411 Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 

但是我没有看到列出的“networking”命令中使用的信息。

要查看当前路由器为您发布路由的区域,可以运行该命令

 sh ip ospf statistics 

这将显示SPFalgorithm运行的区域以及有关该algorithm结果的其他统计信息,Plus会显示路由器上运行的所有ospf进程。

没有networking命令运行之前,您无法看到之前运行的区域。 但是Sirex指出你可以运行

 sh startup-config | s ospf 

要在ospf部分进行更改之前查看configuration是什么(这只能在写configuration之前使用,使用write命令)

所以,我觉得有点愚蠢。 “show run”命令将列出定义的networking区域。

 router# show run .... shutdown ! router ospf 201 log-adjacency-changes router ospf 201 network 10.0.0.0 0.255.255.255 area 10.0.0.0 network 192.168.0.0 0.0.255.255 area 0 ! 

可能有更具体的命令,但至less“show run”的作品。

思科有很多关于OSPF的show命令。 show ip ospf命令及其变体似乎是您所需要的。 请参阅Cisco IOS IP路由: OSPF命令参考


编辑:

根据你的编辑,你似乎没有使用你需要的show ip ospf命令变体。 有许多。 例如, show ip ospf interface命令具有变体,可以通过接口为您提供所需的信息。 你需要看看我提供的链接,找出你想要的命令变种。

sh ip ospf

这是你想要的。 从内部configuration模式,你可以使用'做sh ip ospf'来代替。