Must two S series switches be on the same network segment to set up an OSPF neighbor relationship

2

Question: Must the interfaces on two ends of an OSPF link be on the same network segment and the mask digits on the neighboring interfaces be consistent?

Answer: When two S series switches are establishing an OSPF neighbor relationship, the interfaces on the broadcast network, NBMA network, or P2MP network must be on the same network segment and the mask digits on the neighboring interfaces must be consistent. The limitations do not apply to interfaces on a P2P network. On an OSPF P2P network, if the link-layer protocol is PPP, OSPF neighbors with IP addresses on different network segments can be in the Full state and correctly calculate routes. However, if the link-layer protocol is not PPP (for example, HDLC), devices with IP addresses on different network segments cannot establish an OSPF neighbor relationship. Through PPP negotiation, the local device can obtain the IP address of the remote device and have a route to the remote device without extra configuration.

Other related questions:
Can an OSPF neighbor relationship be established if the network types of the two S series switches are different
Question: Can a Full neighbor relationship be established if the network types of the two ends of an OSPF link are different? Answer: Yes. For example, two devices are interconnected through an Ethernet link. On one end of the link, the default broadcast network type is adopted. The other end is configured as OSPF peer-to-peer (P2P). Neighbor relationship can be established between these two devices, which reach the Full state by exchanging their Link State Databases (LSDBs). However, no route can be learned because OSPF devices need LSDBs to construct a Shortest Path Tree (SPT). The LSDBs, however, are problematic. That is, the link-state advertisements (LSAs) generated by one end consider the peer a broadcast neighbor, while the other end considers its peer a P2P neighbor. Therefore, no SPT can be constructed correctly and the Shortest Path First (SPF) algorithm cannot calculate the right routes either.

On a square-shaped network, OSPF neighbor relationships cannot be set up on P2P interfaces of S series switches. Why
Question: Four devices in the same VLAN form a square-shaped network and the type of their interfaces is P2P. Why cannot the devices establish OSPF neighbor relationships? Answer: A Hello packet, as a multicast packet, sent by a device is transmitted within the entire VLAN since interfaces of the devices are in the same VLAN. P2P interfaces do not check masks, so when another device receives the Hello packet, it immediately establishes a neighbor relationship. However, the device neglects Hello packets sent by the other two devices since a P2P interface can only establish one neighbor relationship at a time. This causes the neighbor status of each device remaining Init. A sends a Hello packet, and B receives the packet �?A considers B as its neighbor. B sends a Hello packet, and C receives the packet �?B considers C as its neighbor. C sends a Hello packet, and D receives the packet �?C considers D as its neighbor. D sends a Hello packet, and A receives the packet �?D considers A as its neighbor. Therefore, the devices cannot establish Full OSPF neighbor relationships.

Prevent an S series switch from setting up an OSPF neighbor relationship with a device connecting to an interface on the switch
Run the silent-interface command on an interface of an S series switch supporting OSPF. Then the switch cannot set up an OSPF relationship with the device connecting to the interface. To enable OSPF on many interfaces while disabling OSPF neighbor relationship establishment on most interfaces, run the silent-interface all command and then run the undo silent-interface command to enable OSPF neighbor relationship establishment on specified interfaces.

Do I have to ensure that interfaces on the two ends of the link are on the same segment and have the same masks during the establishment of the OSPF neighbor relationship
The interfaces on the broadcast network, Non-Broadcast Multi-Access (NBMA) network, and point-to-multipoint (P2MP) network must be on the same network segment and the mask digits on the neighboring interfaces must be consistent. The point-to-point (P2P) network does not have this restriction.

Why is the setup of an OSPF neighbor relationship between S series switches on a broadcast network slow
On a broadcast network, when two devices establish a 2-Way OSPF neighbor relationship, they elect the DR and BDR. Generally, the DR and BDR are elected after the Waiting timer expires, and the default value of the Waiting timer is 40s. Therefore, the setup of a Full OSPF neighbor relationship requires about 1 minute. Advertising a route to a loopback interface is useless. This is because a loopback interface cannot connect to a physical network, and traffic to a network segment cannot be routed to a loopback interface.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top