B(config)#router ospf 100 B(config-router)#network 10.1.1.2 0.0.0.0 area 0 B(config-router)#network 192.168.1.2 0.0.0.0 area 0
C(config)#router ospf 100 C(config-router)#router-id 255.255.255.255 C(config-router)#network 192.168.1.3 0.0.0.0 area 0
OSPF的配置不多说了,在A上我们把RoutrID设置为0.0.0.1;在B上我们不做RouterID设置;在C上我们设置RouterID为255.255.255.255。等OSPF邻居建立完毕,可以使用命令#show ip ospf neighbor查看OSPF的邻居表。
A#show ip os neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.1.2 0 FULL/ - 00:00:36 10.1.1.2 Serial1/0
B#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 255.255.255.255 0 FULL/ - 00:00:37 192.168.1.3 Serial1/1 0.0.0.1 0 FULL/ - 00:00:30 10.1.1.1 Serial1/0