Community discussions

MikroTik App
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

v7 IPv6 OSPFv3 not using interface cost

Tue Jan 03, 2023 12:16 am

v7.6

We have noticed an issue on v7.6 and 7.7RC3 where IPv6 OSPF does not seem to use the cost on interfaces when setting up routes.

We have 80+ routers with 2 connections, one to each core with a cost of 20. The cores are also connected to each other with a cost of
5. The cores are then connected to our edge routers with a cost of 10.

IPv4 routing table shows 1 route for each one of our networks in the core, pointing back to the respective router attached to it.

IPv6 shows a route back to the respective router and an OSPFv3 route pointed back to each and every other router. You can imagine how big our routing tables get before OSPFv3 crashes on the core routers. All the alternative routes show up as ECMP. Usually the distance is 110 for the OSPFv3 routes and 0 for the directly attached ones but by using traceroutes, we have noticed half of our traffic is getting redirected across the OSPFv3 routes and not the directly attached ones. That traffic gets stuck bouncing between the wrong routers and the cores until it finally dies. We are not sure what is causing this or how to keep it from happening. Also, when OSPFv3 does crash with too many routes, OSPF crashes also.
Core
/routing ospf instance
add disabled=no name=ospf-v2 router-id=100.78.0.3
add disabled=no name=ospf-v3 router-id=100.78.0.3 version=3
/routing ospf area
add disabled=no instance=ospf-v2 name=ospfv2
add disabled=no instance=ospf-v3 name=ospfv3
/routing ospf interface-template
add area=ospfv2 disabled=no interfaces=LoopBack networks=100.78.0.3/32 passive
add area=ospfv3 disabled=yes interfaces=LoopBack networks=XXXX:XXXX::78:0:3/128 passive
#Crossoconnect to other core
add area=ospfv2 cost=5 disabled=no interfaces=qsfp28-2-1 networks=100.76.0.72/30 type=ptp
add area=ospfv3 cost=5 disabled=yes interfaces=qsfp28-2-1 networks=XXXX:XXXX::76:18:0/112 type=ptp
#Uplink to Edge Router
add area=ospfv2 cost=10 disabled=no interfaces=vlan901 networks=100.77.0.68/30 type=ptp
add area=ospfv3 cost=10 disabled=yes interfaces=vlan901 networks=XXXX:XXXX::77:17:0/112 type=ptp
#Link to customer router
add area=ospfv2 cost=20 disabled=no interfaces=vlan3364 networks=100.77.1.0/30 type=ptp
add area=ospfv3 cost=20 disabled=yes interfaces=vlan3364 networks=XXXX:XXXX::77:64:0/112 type=ptp

Customer router
/routing ospf instance
add disabled=no name=default-v2 out-filter-chain=ospfv2-out router-id=100.78.0.58
add disabled=no name=default-v3 out-filter-chain=ospfv3-out router-id=100.78.0.58 version=3
/routing ospf area
add disabled=no instance=default-v2 name=backbone-v2
add disabled=no instance=default-v3 name=ospf-v3
add area-id=0.0.0.2 disabled=no instance=default-v2 name=ospfv2_2
/routing ospf interface-template
add area=backbone-v2 auth-id=1 auth-key="" cost=10 disabled=no interfaces=LoopBack networks=100.78.0.58/32 passive priority=1
add area=backbone-v2 auth-id=1 auth-key="" cost=10 disabled=no interfaces=vlan3164 networks=100.76.1.0/30 priority=1 type=ptp
add area=backbone-v2 auth-id=1 auth-key="" cost=10 disabled=no interfaces=vlan3364 networks=100.77.1.0/30 priority=1 type=ptp
add area=ospf-v3 disabled=no interfaces=LoopBack networks=XXXX:XXXX::78:0:58/128 passive
add area=ospf-v3 disabled=no interfaces=vlan3164 networks=XXXX:XXXX::76:64:0/112 type=ptp
add area=ospf-v3 disabled=no interfaces=vlan3364 networks=XXXX:XXXX::77:64:0/112 type=ptp
Last edited by Wolfraider on Wed Jan 04, 2023 12:26 am, edited 1 time in total.
 
connectlife
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Tue Jan 03, 2023 10:12 pm

hello we also have problems in ospf3 ipv6. routes re-propagated even if not present in the filters.. the ros sometimes prefers the default route re-propagated by another router, completely ignoring the metrics
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 12:04 am

Yeah, routing filters do not help. We created filters to only allow the PTP and Loopback address but we still receive all routes by all routers.
add chain=ospfv3-out disabled=no rule=\
    "if (dst==XXXX:XXXX::76:29:0/112) { accept }\r\
    \nif (dst==XXXX:XXXX::77:29:0/112) { accept }\r\
    \nif (dst==XXXX:XXXX::78:0:23/128) { accept }\r\
    \nreject"
D o   XXXX:XXXX::76:10:0/112  fe80::ce2d:e0ff:fedc:48bb%vlan3126       110
D o   XXXX:XXXX::76:10:0/112  fe80::2ec8:1bff:fe37:668b%vlan3128       110
D o   XXXX:XXXX::76:10:0/112  fe80::a55:31ff:fedf:9935%vlan3130        110
D o   XXXX:XXXX::76:10:0/112  fe80::2ec8:1bff:fe37:6a69%vlan3136       110
D o   XXXX:XXXX::76:10:0/112  fe80::2ec8:1bff:fe37:665e%vlan3127       110
D o   XXXX:XXXX::76:10:0/112  fe80::ba69:f4ff:feba:85e8%vlan3133       110
D o   XXXX:XXXX::76:10:0/112  fe80::a55:31ff:fedf:7a54%vlan3132        110
D o   XXXX:XXXX::76:10:0/112  fe80::764d:28ff:fe36:e9c3%vlan3134       110
D o   XXXX:XXXX::76:10:0/112  fe80::a55:31ff:fedf:8583%vlan3135        110
DAc   XXXX:XXXX::76:10:0/112  vlan3110                                   0
DIoH  XXXX:XXXX::76:17:0/112  vlan903                                  110
DAc   XXXX:XXXX::76:17:0/112  vlan903                                    0
DIoH  XXXX:XXXX::76:18:0/112  qsfp28-2-1                               110
DAc   XXXX:XXXX::76:18:0/112  qsfp28-2-1                                 0

FYI, this is how the IPv4 routes show up. They do not show all the duplicate routes advertised by OSPFv3
DAc 100.76.0.20/30 vlan3105 0
DAc 100.76.0.28/30 vlan3107 0
DAc 100.76.0.40/30 vlan3110 0
DAc 100.76.0.68/30 vlan903 0
DAc 100.76.0.72/30 qsfp28-2-1 0
DAc 100.76.0.80/30 vlan3120 0
 
connectlife
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 12:37 am

I see that I'm in good company then.. have you already reported to Mikrotik? we use OSPF to announce the default router from EDGE to BNG and core routers. it happens that the default route to the BNG comes from the cores that have a higher cost than the weight that the route directly from the EDGE has. but the thing works randomly, sometimes the route comes from the edges.. we also use vlans, I was thinking of some conflict perhaps due to the link local address.. on ospf2 this doesn't happen and everything works but on ospf3 we had to for now turn it off and use static routes...

we also found a bug on filters that affects both ospf2 and 3 related to the metric. in practice ros at the same cost prefers an ospf type1 route compared to a type2.. I will also report this to Mikrotik
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 12:56 am

SUP-103238

yeah, we advertise a default gateway from our EDGE to the cores. For right now we have made the decision to disable IPv6. Honestly, I am about ready to order a set of Junipers for the core. The only reason I didnt was they were backordered for so long.
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 1:20 am

Just noticed, the cores CCR2216 are the only ones with the messed-up routing tables. The customer routers look fine.
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 1:45 am

last update for tonight lol

ospf-type is unknown for all the bad routes
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::ce2d:e0ff:fedc:48bb%vlan3126 immediate-gw=fe80::ce2d:e0ff:fedc:48bb%vlan3126 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::2ec8:1bff:fe37:668b%vlan3128 immediate-gw=fe80::2ec8:1bff:fe37:668b%vlan3128 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::a55:31ff:fedf:9935%vlan3130 immediate-gw=fe80::a55:31ff:fedf:9935%vlan3130 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::2ec8:1bff:fe37:6a69%vlan3136 immediate-gw=fe80::2ec8:1bff:fe37:6a69%vlan3136 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::2ec8:1bff:fe37:665e%vlan3127 immediate-gw=fe80::2ec8:1bff:fe37:665e%vlan3127 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::ba69:f4ff:feba:85e8%vlan3133 immediate-gw=fe80::ba69:f4ff:feba:85e8%vlan3133 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::a55:31ff:fedf:7a54%vlan3132 immediate-gw=fe80::a55:31ff:fedf:7a54%vlan3132 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::764d:28ff:fe36:e9c3%vlan3134 immediate-gw=fe80::764d:28ff:fe36:e9c3%vlan3134 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
D o   dst-address=XXXX:XXXX::76:10:0/112 routing-table=main gateway=fe80::a55:31ff:fedf:8583%vlan3135 immediate-gw=fe80::a55:31ff:fedf:8583%vlan3135 distance=110 scope=20 target-scope=10 ospf-metric=51 ospf-type=(unknown)
 
connectlife
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 9:57 am

You define a point to point network for each ospf3 adjacency?
 
bernardthomas
just joined
Posts: 2
Joined: Wed Jan 04, 2023 10:00 am

Re: v7 IPv6 OSPFv3 not using interface cost

Wed Jan 04, 2023 10:02 am

With each ospf3 adjacency, you're defining a new point-to-point network, right? basketball stars
 
User avatar
Wolfraider
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Jul 15, 2015 8:06 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Thu Jan 05, 2023 10:17 pm

correct
 
connectlife
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: v7 IPv6 OSPFv3 not using interface cost

Fri Jan 06, 2023 4:38 pm

I also opened a ticket: SUP-103634

viewtopic.php?t=192253

Who is online

Users browsing this forum: No registered users and 17 guests