network 10.28.0.0 0.0.255.255 area 28
network 10.212.0.0 0.0.255.255 area 212
network 0.0.0.0 255.255.255.255 area 0
Is area0 being chosen preferentially
Area 28 and area 212 can be interconnected with area 0 through ABR
Even if they are not in the same area, 10.28.0.0 and 10.212.0.0 can still be connected to each other
If I change the area 0 to Network 2.0.0.0 0.0.1.255 area 0, will this address affect the interconnection between 10.28.0.0 and 10.212.0.0
Router ospf 110
Router ID 1.1.1.1
Do these two have to exist simultaneously
Hello @我的小驴子吖
OSPF does not prefer Area 0 because of the wildcard statement! It simply matches each interface against the most specific network command, so your 10.28.0.0/16 interface goes to area 28, 10.212.0.0/16 goes to area 212, and everything else falls into area 0.
Area 28 and 212 can reach each other only because your router is an ABR connected to area 0, and if you replace the broad area-0 command with a specific network 2.0.0.0 ... and no interfaces fit that range, the router will loose its Area0 connection, stop being an ABR, and area 28 and 212 will no longer interconnect...
As concerned, the router id 1.1.1.1, it is just an identifier; it doesn't need to match any interface or network...The network statements controle which interfaces run OSPF and in which area. These 2 things exist independently and does not need to match.
Hello @我的小驴子吖
Yes, OSPF only become active on an interface if you explicitly enable it, either by matching the interface’s IP address with network statement under the OSPF process or by configuring ospf directly on the interface with ip ospf /process area /id command.
If the interface doesn't match a network statement and you haven’t applied OSPF under the interface, OSPF will not run on that interface...
Router ospf 110
network 10.28.0.0 0.0.255.255 area 28
network 10.212.0.0 0.0.255.255 area 212
network 2.0.0.0 0.0.1.255 area 0
Do I still need to write router OSPF 110 under the port after finishing this, or can it take effect without being applied under the port, or do I need to perform other operations to make OSPF 110 take effect
答: 在OSPF中,区域0(骨干区域)在路径选择上并没有绝对的“优先权”。 路径选择的优先顺序是基于OSPF的路由器类型和区域结构,而不是简单地“优先选择区域0”。具体规则如下:
结论: 区域0本身不被“优先”,但所有跨区域的流量都必须流经它,这使得它至关重要。
答:是的,可以互相连接。 这正是多区域OSPF设计的目的。只要区域28和区域212都正确地连接到骨干区域(区域0),并且有ABR在它们和区域0之间交换路由信息,那么这两个不同区域的网络就可以互相通信。
答:这个修改本身完全不会影响区域28和区域212之间的互联。 解释如下: OSPF的 network命令的作用是启用路由器接口参与OSPF进程。它告诉路由器:“哪些接口上启用OSPF,以及这些接口属于哪个区域。”
关键点: 区域28和区域212的互联,取决于连接这些区域的ABR(区域边界路由器) 是否有接口在区域0中,并且与骨干区域建立了邻接关系。
警告: 将配置从 0.0.0.0 255.255.255.255改为 2.0.0.0 0.0.1.255风险极高。如果ABR上没有IP地址落在 2.0.0.0/23范围内的接口,那么它的所有接口都将不再属于区域0,导致它失去与骨干区域的连接。这将立即中断区域28和区域212之间的通信,因为违反了“所有区域必须与骨干区域直接相连”的原则。
答:不是必须的,但它们通常一起配置,并且有明确的依赖关系。
总结:
所以,在您的配置中,它们“必须”同时存在,才能构成一个稳定、可预期的OSPF配置。只输入 router-id而不先输入 router ospf 110是不可能的。