Community discussions

MikroTik App
 
sporkman
newbie
Topic Author
Posts: 26
Joined: Thu May 02, 2013 4:37 am

OSPF dropping adjacency every 50S

Wed Dec 30, 2015 9:00 am

I'm stumped on this one. I have a bunch of metro-e circuits between a Cisco ASR-1002-X and some cheap old Cisco switches. I run OSPF (v2) between this gear over the metro-e fabric and all is well.

In attempting the same with the Mikrotik running the latest firmware (6.33.3) I have no problem with establishing the adjacency and seeing the routes (all I really need is default, this is a simple failover), about 50 seconds in, the adjacency drops.

Hello and dead time are matched, there's nothing of note in the logs on either side.

Configs:
/routing ospf interface
add authentication=md5 authentication-key=foobar interface=ether8 network-type=\
    broadcast
add authentication=md5 authentication-key=foobar cost=20 interface=\
    ether1-gateway network-type=broadcast
/routing ospf network
add area=backbone network=x.y.A.a/30
add area=backbone network=x.y.B.a/30
interface GigabitEthernet0/0/2.1061
 encapsulation dot1Q 1061
 ip address x.y.A.b 255.255.255.252
 no ip proxy-arp
 ip access-group blockamplify out
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 7 00024356065B19
 ip ospf network broadcast
 ip ospf dead-interval 40
!
router ospf 1
 router-id x.y.C.a
 nsf cisco
 area 0 authentication message-digest
 passive-interface default
 ...
 no passive-interface GigabitEthernet0/0/2.1061
 network x.y.A.a 0.0.0.3 area 0
 default-information originate always
 
User avatar
pukkita
Trainer
Trainer
Posts: 3037
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: OSPF dropping adjacency every 50S

Wed Dec 30, 2015 12:29 pm

Is there anything in the logs? enable it with debug (system >logging) then monitor what happens previously to that drop and paste it here...

a complete /routing ospf export will be useful too.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
sporkman
newbie
Topic Author
Posts: 26
Joined: Thu May 02, 2013 4:37 am

Re: OSPF dropping adjacency every 50S

Sat Jan 02, 2016 4:54 am

Is there anything in the logs? enable it with debug (system >logging) then monitor what happens previously to that drop and paste it here...

a complete /routing ospf export will be useful too.
The full export is there.

Nothing of note in the logs, other than what looks like a reassociation just around the HELLO timeout. No matter what I adjust the hello interval two, it reliably seems to time out a few seconds after. Obviously both sides match (session won't come up if they don't). I'd like to see more logs, but it seems like the log viewer can only show me about two pages, and with the packet dumps, not much to see.

edit: by using the "echo" option, I pulled some logs via the terminal. Of interest seems to be where the DR/BDR flips for some reason:
echo: route,ospf,debug SEND: Hello MIK -> 224.0.0.5 on ether1-gateway
echo: route,ospf,debug,raw PACKET:
echo: route,ospf,debug,raw     02 01 00 30 C0 A8 09 7C 00 00 00 00 00 00 00 02
echo: route,ospf,debug,raw     00 00 01 10 00 00 60 04 FF FF FF FC 00 1E 02 01
echo: route,ospf,debug,raw     00 00 00 78 D8 DC 70 89 D8 DC 70 8A D8 DC 6F 01
echo: route,ospf,debug,raw     39 EC A7 D4 8A 23 94 23 C7 6B E8 E8 F0 6D A3 C3
[admin@vride MikroTik] > 
  (29 messages discarded)
echo: route,ospf,debug Backup Designated Router changed
echo: route,ospf,debug     old=MIK
echo: route,ospf,debug     new=0.0.0.0
echo: route,ospf,debug Originate Router LSA
echo: route,ospf,debug     area=backbone
echo: route,ospf,debug Deferring LSA origination
echo: route,ospf,debug     type=Router LSA
echo: route,ospf,debug State change on ether1-gateway (MIK) from Backu
p to Designated Router
echo: route,ospf,debug Originate Router LSA
echo: route,ospf,debug     area=backbone
echo: route,ospf,debug Deferring LSA origination
echo: route,ospf,debug     type=Router LSA
[admin@vride MikroTik] > 
echo: route,ospf,debug Recalculating all OSPFv2 intra-area routes
echo: route,ospf,debug Recalculating all inter-area routes
echo: route,ospf,debug     summary-area=backbone
echo: route,ospf,debug Recalculating AS-external routes
[admin@vride MikroTik] > 
echo: route,ospf,debug Recalculating AS-external routes
[admin@vride MikroTik] > 
echo: route,ospf,debug Originate Router LSA
echo: route,ospf,debug     area=backbone
[admin@vride MikroTik] > 
  (217 messages discarded)
echo: route,ospf,debug,raw     5D 2E DE E1 E0 27 72 24
echo: route,ospf,debug Received Link State Request
echo: route,ospf,debug     type=Router LSA
echo: route,ospf,debug     id=192.168.9.124
echo: route,ospf,debug     originator=192.168.9.124
echo: route,ospf,debug SEND: Link State Update MIK -> NOT MIK 
on ether1-gateway
echo: route,ospf,debug,raw PACKET:
echo: route,ospf,debug,raw     02 04 00 40 C0 A8 09 7C 00 00 00 00 00 00 00 02
echo: route,ospf,debug,raw     00 00 01 10 00 00 60 09 00 00 00 01 00 01 02 01
echo: route,ospf,debug,raw     C0 A8 09 7C C0 A8 09 7C 80 00 09 BE 83 B7 00 24
echo: route,ospf,debug,raw     00 00 00 01 D8 DC 70 89 D8 DC 70 8A 02 00 00 14
echo: route,ospf,debug,raw     D3 8C A4 A5 9E 57 7A BB 43 13 BD 7E DA 8D 07 B7
[admin@vride MikroTik] > 
  (2 messages discarded)
echo: route,ospf,debug,raw     02 04 00 40 C0 A8 09 7C 00 00 00 00 00 00 00 02
echo: route,ospf,debug,raw     00 00 01 10 00 00 60 0A 00 00 00 01 00 01 02 01
echo: route,ospf,debug,raw     C0 A8 09 7C C0 A8 09 7C 80 00 09 BE 83 B7 00 24
echo: route,ospf,debug,raw     00 00 00 01 D8 DC 70 89 D8 DC 70 8A 02 00 00 14
echo: route,ospf,debug,raw     6F F2 9D EB 14 5C 6A 19 52 F7 29 44 D8 1C 8B 7E
echo: route,ospf,debug RECV: Link State Acknowledgement <- NOT MIK on ethe
r1-gateway (x)
echo: route,ospf,debug,raw PACKET:
echo: route,ospf,debug,raw     45 C0 00 50 36 FD 00 00 01 59 EE CB D8 DC 70 89
echo: route,ospf,debug,raw     D8 DC 70 8A 02 05 00 2C D8 DC 6F 01 00 00 00 00
echo: route,ospf,debug,raw     00 00 00 02 00 00 01 10 56 7E FD 9F 00 01 02 01
echo: route,ospf,debug,raw     C0 A8 09 7C C0 A8 09 7C 80 00 09 BE 83 B7 00 24
echo: route,ospf,debug,raw     12 59 AD 0D 38 79 A2 F5 05 67 1C 17 1A 50 CF BC
[admin@vride MikroTik] > 
  (112 messages discarded)
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
[admin@vride MikroTik] > 
  (34 messages discarded)
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
[admin@vride MikroTik] > 
echo: route,ospf,debug Recalculating AS-external routes
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/30
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/29
echo: route,ospf,debug Installing an OSPF route in the main routing table
echo: route,ospf,debug     prefix=x/28
[admin@vride MikroTik] > 
echo: route,ospf,debug SEND: Hello MIK.IP -> 224.0.0.5 on ether1-gateway
echo: route,ospf,debug,raw PACKET:
echo: route,ospf,debug,raw     02 01 00 30 C0 A8 09 7C 00 00 00 00 00 00 00 02
echo: route,ospf,debug,raw     00 00 01 10 00 00 60 0B FF FF FF FC 00 1E 02 01
echo: route,ospf,debug,raw     00 00 00 78 D8 DC 70 89 D8 DC 70 8A D8 DC 6F 01
echo: route,ospf,debug,raw     F7 B6 EC 3D 5B A7 AE 3B 32 32 13 D2 3D 99 C4 15
[admin@vride MikroTik] > 

 
User avatar
pukkita
Trainer
Trainer
Posts: 3037
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: OSPF dropping adjacency every 50S

Sat Jan 02, 2016 11:47 am

Basic good practice in OSPF setup is to set a loopback interface (empty bridge) with an unique ip associated to that router not being linked to any specific connected interface, then set that same IP as the Router ID on the OSPF instance.

Set that and check...

You can set the log length on System > Logging Action, Lines parameter.

You can also set the logging to use action disk, so that you can filter by disk in System Logging to just see OSPF.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
sporkman
newbie
Topic Author
Posts: 26
Joined: Thu May 02, 2013 4:37 am

Re: OSPF dropping adjacency every 50S

Fri Jan 15, 2016 2:45 am

Totally unrelated cause - my firewall rule to allow OSPF (the protocol) had an improper source address. Why it kind of worked and timed out, not sure - probably some kind of weird one-way communication plus state timeout or something. Working fine now...

Thanks for the "loopback" tip, had no idea how to create one in RouterOS. Use it all the time on the Cisco side for all manner of things.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6155
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF dropping adjacency every 50S

Fri Jan 15, 2016 11:18 am

It timed out because received hello packets were blocked. You can see it in the logs. RouterOS sends HELLO packets, but does not receive any,
 
User avatar
pukkita
Trainer
Trainer
Posts: 3037
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: OSPF dropping adjacency every 50S

Fri Jan 15, 2016 12:39 pm

Glad you found the cause :D
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum

Who is online

Users browsing this forum: No registered users and 36 guests