RouterB#
注意这里的参数192.168.0.0 0.0.255.255;代表查找192.168.0.0里的任何接口,并把它们放到区域0里
RouterC的配置如下:
RouterC(config)#no router eigrp 10
RouterC(config)#no router igrp 10
RouterC(config)#no router rip
RouterC(config)#router ospf 64999
RouterC(config-router)#network 192.168.4.0 0.0.0.255 area 0
RouterC(config-router)#network 192.168.5.0 0.0.0.255 area 0
RouterC(config-router)#^Z
RouterC#
Verifying OSPF Configuration
使用show ip route命令来验证下,如下:
RouterA#sh ip route
(略)
O 192.168.30.0/24 [110/65] via 192.168.20.2, 00:01:07, Serial0/0
(略)
注意上面的O代表OSPF,AD为110,度为65
其他的一些验证命令:
show ip ospf:显示每条或所有ODPF进程的相关信息,包括RID,区域信息,SPF信息和LAS计时器信息等,如下:
RouterA#sh ip ospf
Routing Process “ospf 132” with ID 192.168.20.1
(略)
如上可知道RID为192.168.20.1.即router的最高的那个IP地址
show ip ospf database:显示拓扑数据库信息,如下:
RouterA#sh ip ospf database
OSPF Router with ID (192.168.20.1) (Process ID 132)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.20.1 192.168.20.1 648 0x80000003 0x005E2B 3
(略)
show ip ospf interface:
1.接口IP地址信息
2.区域的分配信息
3.进程ID
4.RID
5.网络类型
7.优先级(priority)