Ospf neighbor not accepted due to wrong mask?

Hello,

I am trying to debug an ospf over GRE configuration.

The have the tunnel up an working, and it is possible to exchange traffic
over the tunnel.

We have enabled ospf on both ends, using the tunnel interfaces. The "other end" is not openwrt.
Our end i openwrt. In our end the command trying to show the neighbor router fails.
In the other end it displays as "initializing".

Tcpdumping the helloes we get this

23:26:43.579362 IP (tos 0x0, ttl 58, id 56506, offset 0, flags [DF], proto GRE (47), length 92)
kthgw.sk0bu.amprnet.se > h-155-4-225-195.A444.priv.bahnhof.se: GREv0, Flags [none], length 72
IP (tos 0xc0, ttl 1, id 35620, offset 0, flags [none], proto OSPF (89), length 68)
44.5.7.114 > ospf-all.mcast.net: OSPFv2, Hello, length 48
Router-ID kthgw.sk0bu.amprnet.se, Backbone Area, Authentication Type: none (0)
Options [External]
Hello Timer 10s, Dead Timer 40s, Mask 255.255.255.254, Priority 1
Neighbor List:
44.5.7.115
23:26:43.692541 IP (tos 0x0, ttl 63, id 48718, offset 0, flags [DF], proto GRE (47), length 88)
h-155-4-225-195.A444.priv.bahnhof.se > kthgw.sk0bu.amprnet.se: GREv0, Flags [none], length 68
IP (tos 0xc0, ttl 1, id 36842, offset 0, flags [none], proto OSPF (89), length 64)
44.5.7.115 > ospf-all.mcast.net: OSPFv2, Hello, length 44
Router-ID 44.5.7.115, Backbone Area, Authentication Type: none (0)
Options [External]
Hello Timer 10s, Dead Timer 40s, Mask 0.0.0.0, Priority 1

What differs is that at the openwrt end the Mask is 0.0.0.0, whereas at the other end the Mask is
255.255.255.254 (corresponding to the /31 scope the tunnel adresses have.

The interface in the openwrt end is gre4-kth, and the adresses are 44.5.7.115 Poitopoint 44.5.7.114 netmask 255.255.255.254.
As we have understood, the Mask item should be the network mask of the sender, but in the Hello it displays as 0.0.0.0. , and the Neighbor list is missing.
Do you have any hint of what is wrong here? Ideas how to debug this?

Gullik

Ehat odpf daemon are you using and what is configured for it?

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall

We are using frr / ospfd
</>

frr version 10.2.1
frr defaults traditional
hostname OpenWrt
log syslog
!
password zebra
!
interface br-lan
ip ospf network broadcast
exit
!
interface gre4-kth
ip ospf network point-to-point
exit
!
router ospf
ospf router-id 44.5.7.115
network 44.5.0.0/20 area 0.0.0.0
exit
!
access-list vty seq 5 permit 127.0.0.0/8
access-list vty seq 10 deny any
!
line vty
access-class vty
exit

Read the previous post CAREFULLY. Your "conf*g files" are humanly unreadable.
I do not see a single /31 in your last post.

I would think that netmask /31 is too small to allow ospf to work with. A /31 leaves no room for usable hosts within that subnet.
You may be better off with a netmask of /30.

1 Like