Community discussions

MikroTik App
 
samsung172
Forum Guru
Forum Guru
Topic Author
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

OSPF - "Flapping" - Bug?

Thu Oct 23, 2014 2:39 am

Im using OSPF to distribute MPLS trough a network.

To do this - i have Connected a bounch of routeres using x.x.x.x/29 to Connect R1 to R2 - and having a loopback to all routeres. I enable MPLS to all Interfaces linking routers together. All "ok".

I have ospf to distribute MPLS labels - also working all ok. Today i see an unknown error - having impact to all Devices.

Lets say i have 100 routers connecting one or another way. Some are Connected to make a "ring" infrastructute. With "spikes". No router should have a static deafult GW - but all is configuerd to have a default gw in ospf - if installed.

All ok. - it seems.

But now - i have started to have som flapping in OSPF. In my mind - OSPF - should alway choose shortest path.......... - But now .- it has started to flap between Main path (shortest) - and backup (none shortest).

Why does this flap ocure? and is this a bug?

for about 10 secound - my R1 have R2 as GW - using ospf over Interface X that link em together. R3 have a link to core - but have a opf cost by about 1500. R1-R2 - say 110 in cost.

Now this two links habe started to "flapping" - say . DO 0.0.0.0 by Interface 1 (cost 110) for some secound - and then - DO - by interface2 (cost 1000 (and something) for some sec - then back to Interface 1.

Why does this happen? Shopuld it not choose the chortest path? and then "stuck" to this? - Why does it "flapping" ?
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 551
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: OSPF - "Flapping" - Bug?

Thu Oct 23, 2014 8:25 am

ros 6.20 ?
 
samsung172
Forum Guru
Forum Guru
Topic Author
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: OSPF - "Flapping" - Bug?

Thu Oct 23, 2014 1:30 pm

Yes - All devises are upgraded to 6.20
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF - "Flapping" - Bug?

Thu Oct 23, 2014 1:40 pm

If one of the links in the path fails then it will switch to different path.
 
samsung172
Forum Guru
Forum Guru
Topic Author
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: OSPF - "Flapping" - Bug?

Fri Oct 24, 2014 1:44 am

Yes - But the link should not "Change" like this. I have made a ospf - debug log - maybe someone can tell me whats going on?

Edit _ Its happening about evry 10 sec.
You do not have the required permissions to view the files attached to this post.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF - "Flapping" - Bug?

Fri Oct 24, 2014 11:24 am

It seems that problem is not on this router but on one of the neighbor routers.
 
samsung172
Forum Guru
Forum Guru
Topic Author
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: OSPF - "Flapping" - Bug?

Sat Oct 25, 2014 4:04 am

It seems that problem is not on this router but on one of the neighbor routers.
problem exist on a bounch of routers- but not all. - Do you have a "Clue" or hint - how to try to find this router?
 
djmitch
just joined
Posts: 7
Joined: Thu Jul 23, 2015 4:07 pm

Re: OSPF - "Flapping" - Bug?

Thu Jul 23, 2015 4:17 pm

Did you manage to fix this issue?

I have a similar setup 14 routers forming 2 loops/rings that look like a figure of 8 to provide backup paths. There are 2 routers on the middle line of the figure of 8 that connect to the top and bottom ring.

All running 6.28. If I close either loop, things go south and I get "wrong master flag" logged in ospf debugs. Currently I run the network with OSPF/MPLS/VPLS. All running fine, until I close either loop/ring.

NBMA mode, jumbo frames and larger MTU in use (consistent around network).

Anyone got the answer?
 
djmitch
just joined
Posts: 7
Joined: Thu Jul 23, 2015 4:07 pm

Re: OSPF - "Flapping" - Bug?

Fri Jul 24, 2015 8:28 am

OK, so I may have final figured this today.

I switched my links to PTP mode which cleared the master flag issue but my network loop would still not stay up.

I took a look at why I could not ping between links (that should be up even if the ring was flapping). I noticed that RSTP was running on a switch that the Mikrotik was connected to and blocking forwarding. I turned RSTP off and the link came up. I checked my other switches and did the same and now both loops appear to be up and running.

My only guess I closed the loop, some packets turned up on an interface the switch did not expect and so it got excited and blocked forwarding. This may explain why things flapped a bit between different links.

I'm going to run like this for a few hours and see how it goes.

I want to change my links back to NBMA (rather than PTP) as PTP still uses multicast. I'm hoping the DB master flag issue will go with the removal of OSPF. Will update when I move things back.

As I run MPLS/VPLS with split horizon, network loops should not be an issue.

Fingers crossed...
 
djmitch
just joined
Posts: 7
Joined: Thu Jul 23, 2015 4:07 pm

Re: OSPF - "Flapping" - Bug?

Mon Jul 27, 2015 2:14 pm

So I closed the loop/ring on the network and turned all wireless links back to NBMA and have left links that are via copper on multicast. I have no db master flag errors and ospf have been running great for 3 days. One link has bounced (power issue) and there were no adverse effects.

For my OSPF, I've used loopback interfaces for the router ID and I also have a few areas in OSPF i.e. a main core 0.0.0.0 and a few spokes that are classed as a new area ID.

I also used the loopback for the MPLS LDP & transport settings. Loopback seems best practice for OSPF ID and also for references in MPLS LDP/transport settings.

The only extra thing I did was add an admin MAC address to the loopback. This gave me confidence that the MAC for the loopback was always consistent (it picks the MAC from a physical interface if an admin MAC is not set - I think).

With VPLS running on top of the MPLS, failover is very fast and sessions don't drop during any sort of failure on 1 link.

This is all running on 6.28.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: OSPF - "Flapping" - Bug?

Tue Jul 28, 2015 5:59 pm

Thanks for updating with your own solution. This helps people who have similar issues.

Did you ever find out where your loop was? RSTP doesn't just freak out and block links for no good reason at all. I agree that you shouldn't need it in a layer3 topology, but if it DID see a loop, that should be something worth investigating.
 
djmitch
just joined
Posts: 7
Joined: Thu Jul 23, 2015 4:07 pm

Re: OSPF - "Flapping" - Bug?

Tue Jul 28, 2015 8:55 pm

Hi ZeroByte,

So, on each site, we have a Ubiquiti ToughSwitch (8 port) and a Mikrotik RB2011.
As a rule, Port 8 on the Toughswitch in linked to Port 8 on the Mikrotik and set as a trunk port. Port 8 on the Toughswitchis configured with VLAN 50 and 51 as Tagged and on Ether 8 VLAN 50 and 51 are added. 50 is management, 51 is customer. We also tag the traffic on the access point and CPE so we have a management connection and a PPPoE/customer connection to all devices. All normal stuff.

Assuming each site has 2 PtP links, Port 1+2 on the tough switch would be VLAN 12 and the ports are set as access/untagged. Port 3+4 would be 34, again, ports are set to access/untagged. These VLANs do not go into the trunk port. Odd port numbers are power i.e. to the wireless bridge and the even port goes to the Mikrotik. In this case, say Ether 2 and Ether 4 went to the toughswitch port 2 and 4. IP addresses are configured on Ether 2 and 4 and this form the PtP /29 link. The switch setup might be different to others but it works and means only 2 devices per hilltop site.

I think the issues occurred when VPLS traffic came to the local VLAN (50 or 51) from another site (after closing the loop), the switch detected a loop and closed the port down on which the traffic was arriving, in this case, one of the wireless units. It would go between different links i.e. RSTP would close ports on different switchs depending on how the network learnt routes.

The bottom line I think is that during the initial re-learning of routes, traffic would arrive from a location RSTP did not expect and it would close the port. Each time the network tried to learn routes, a port would get shutdown/block forwarding.

I've disabled RSTP on all the switches as the chances of a loop locally are small on this type setup. I could enable RSTP on only the VLAN I want it, possibly VLAN 51 - customer as this is bridged (for PPPoE) across the VPLS network. However, I'm using split horizon so RSTP is not needed.

Think I'm correct in saying that....

Hopefully of use to someone else. I did use a lot of notes from other OSPF issues and improved my own setup but this can cause you to think OSPF is the issue when it's an over keen switch that's the real issue....

Who is online

Users browsing this forum: No registered users and 21 guests