Description
This article describes how to adjust interface’s subnet mask in OSPF setup where interfaces involved in negotiation have different subnet masks.
Solution
Interface subnet mask must be the same on both interfaces that are negotiating OSPF adjacency. Subnet mask is exchanged in Hello packets and in case that the subnet mask does not match, adjacency will not be formed.
Problem with different subnet mask can be seen usually if OSPF is running over site-to-site IPSec tunnel.
Simply said, if one wants to force OSPF to use different subnet mask, follow below config:
# config router ospf
config ospf-interface
edit "port2"
set interface "port2"
set prefix-length 21
next
end
It will not change the subnet mask in output of 'get router info ospf interface'
But in Hello packet, subnet mask will be changed to /21.
Change the prefix-length on the device with wider subnet mask so the prefix-length will match with the device that has narrower mask.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.