Having experienced a long standing OSPF issue where Mikrotik does not re-establish ospf neighbor state=full but instead gets stuck
at state=exchange,
Manual intervention of disabling ospf instance and enabling ospf instance changes ospf neighbor state=full solves the issue,
I am looking looking for a script that will detect ospf neighbor state keywords like “exchange”, etc.
and will disable ospf instance and enable ospf instance
Of course I would be much happier if a solution was found to prevent this from happening in the first place but failing that
automated solution to the effect is second best solution for me?
How do I include all interfaces (Wlan + Ether) when checking ospf neighbor state= ??
{
:if ([/routing ospf neighbor find state="Exchange"] = "") do={
:log warning "OSPF neighbor Exchange found !!"}
How do I script to pick state=“Full” or state=“Exchange” or state=“2-way” or state=“init” from below ?
[admin@mikrotik] /routing ospf neighbor> print
0 instance=mikrotik router-id=192.168.1.2 address=192.168.0.22
interface=wlan1 priority=5 dr-address=0.0.0.0 backup-dr-address=0.0.0.0
state="Full" state-changes=17 ls-retransmits=0 ls-requests=0 db-summaries=0
adjacency=1h45s
1 instance=mikrotik router-id=192.168.1.100 address=192.168.0.18
interface=ether1 priority=5 dr-address=192.168.0.18
backup-dr-address=192.168.0.17 state="Full" state-changes=6 ls-retransmits=0
ls-requests=0 db-summaries=0 adjacency=3d8h48m58s