Community discussions

MikroTik App
 
connectlife
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

RoS 7.6 OSPFv3 IPv6 and Filter BUG

Fri Jan 06, 2023 4:34 pm

Hello, I inform you that I have detected a series of BUGs on ROS 7.6 concerning filters and IPv6.

OSPF3 over IPv6 installs learned routes into the routing table without any sense. Suppose we have 4 routers with the same cost and priority and all 4 participate in OSPF on the backbone area 0.0.0.0.

R1 advertises, for example, a loopback IP (100:127::1) to other routers. On the other routers' routing table, the route 100:127::1 is sometimes taken from the correct router (R1) and other times it is learned from neighboring routers. Example, R2 instead of having the route learned from R1 has it from R4 etc etc.

Interface costs, and priorities are the same for ALL routers.
This leads to anomalous behavior of IPv6 with OSPF3

Another BUG found is related to filters, assuming to use:

if (dst in 154.xx.xx.0/24 && distance == 1) {set ospf-ext-type type2; accept}
if (dst in 154.xx.xx.0/24 && distance == 2) {set ospf-ext-type type1; accept}

Basically I tell OSPF to redistribute the route 154.xx.xx.0/24 to type 2 if its distance in the routing table is 1 and to type 1 if its distance is 2.

Suppose you have 2 BNG routers that distribute subnet to EDGE routers:

154.xx.xx.10/32 distance 1 on BNG 1
154.xx.xx.10/32 distance 2 on BNG 2

On the EDGEs the route 154.xx.xx.10 should arrive from BNG 1 in type2 and in type1 from BNG2

The type1 ALWAYS WINS despite the IDENTICAL metrics, weights, costs and priorities. This is obviously wrong, TYPE2 should win..
Last edited by connectlife on Fri Jan 06, 2023 4:39 pm, edited 1 time in total.
 
connectlife
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: RoS 7.6 OSPFv3 IPv6 and Filter BUG

Fri Jan 06, 2023 4:37 pm

Mikrotik, here is the ticket number: SUP-103634
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: RoS 7.6 OSPFv3 IPv6 and Filter BUG

Fri Jan 06, 2023 4:47 pm

OSPF can distribute only best route. There is no way that route with distance 2 is also active at the same time when route with distance 1 is active. So OSPF always distributes the first route. When the first route becomes inactive route with distance 2 will become best and will be redistributed and the second filter rule will match.
 
connectlife
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: RoS 7.6 OSPFv3 IPv6 and Filter BUG

Fri Jan 06, 2023 6:09 pm

Hi mrz that's not how OSPF 3 behaves in ROS 7.6

We had the configuration checked by Alessandro Campanella, an Italian tranier who also confirmed the presence of anomalous behavior

Version 2 behaves as you described, best path wins, in version 3 NO. There are other open reports (SUP-103238) from other users..

Test with the filter rule that I put above. We use it on our BNGs to advertise customer subnets from the master or slave line to the EDGEs. Through Radius we decide the distance that is inserted in the BNG, the BGN must then announce it to the EDGE through the filter rule. The BNG that has the route as distance 1 will announce it to the EDGE in TYPE2, the BNG that has the route as distance 2 will announce to the EDGE in TYPE1.. Here the TYPE1 always wins, regardless...

We have temporarily solved it like this:

if (dst in 154.xx.xx.0/24 && distance == 1) {set ospf-ext-metric 10; accept}
if (dst in 154.xx.xx.0/24 && distance == 2) {set ospf-ext-metric 100; accept}

But the most serious thing is OSPF3 with IPV6.. I had to create ALL static rules between EDGE, loopback, BNG etc.. Now it works but it is unthinkable to keep a static configuration instead of using OSPF3...
 
connectlife
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: RoS 7.6 OSPFv3 IPv6 and Filter BUG

Fri Jan 06, 2023 10:13 pm

I add more details that I also shared with Mikrotik support:

The report concerns 2 BUGS but mrz's answer seems to be related only to filters. Let's skip the filters for now and focus on the OSPF 3 problem in IPv6.

We have 3 routers that do EBGP with our transits, the routers are called R1, R2, R3. Each router does iBGP with the others, to have a FULL MESH network

These routers distribute the default route ::/0 to 2 BNG (PPPoE Server serving our customers' XDSL lines).

Therefore, 3 default routers should arrive on the PPPoE Servers coming respectively from R1, R2, R3 in ECMP (all routers on all interfaces have priority 1 and cost 1)

Sometimes all 3 default routes arrive at the BNGs with OSPF Metric 2 (therefore the route arrives from the router that transmits it), other times only 1 arrives, on other occasions 2 out of 3 arrive with metric 3 (therefore relaunched by some other router).

Every time I enable, disable the instance the behavior is different. The same thing goes for Loopback routes:

R1: 100:127::1
R2: 100:127::2
R3: 100:127::3
BNG1: 100:127::7
BNG2: 100:127::8

For example, on BNG 1 route 100:127::1 comes from R2, sometimes from R3 and rarely from R1. It also happened that R1's loopback reached R2 from BNG2!! This also creates a routing loop that knocks out the IBGP V6 session between the routers involved.

When there is the problem OSPF is active and the routers appear in the neighbors in FULL state, therefore the adjacencies are established correctly

We use the same method in OSPF 2 for IPv4 and it works fine, same VLANs, same parameters, same interfaces with same cost. In IPv4 the default routes 0.0.0.0/0 arrive from the respective R1,R2,R3, all the loopbacks with metric 2 arrive and the point / point interface specially created as gateway

I can share all the configurations with you if it helps and you can't simulate the problem
 
Linux64
just joined
Posts: 3
Joined: Wed Oct 07, 2020 6:27 am

Re: RoS 7.6 OSPFv3 IPv6 and Filter BUG

Wed Oct 25, 2023 6:53 am

Is this still an issue with the latest routeros (7.11.2 as of this post)?

Who is online

Users browsing this forum: No registered users and 23 guests