Community discussions

MikroTik App
 
jonah1810
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 98
Joined: Tue Jul 30, 2019 10:19 pm

OSPFv3 + DHCPV6 Relay Not Routing Correctly

Tue Jun 01, 2021 4:12 am

Hello I'm having difficulties setting up a dhcpv6 relay through ospfv3 and i'm not sure if its a configuration issue or just broken/incompatible as I know ipv6 implementation is far from complete thus far.

I have 2 sites connected by ospf on a vlan called "Fiber Trunk".
(Site 1) Router 1 Is the BGP Router
(Site 2) Router 2 Has Dhcp Clients On 1 Port/Vlan and connects with Router 1 via a different port/vlan
Internet->Router1->Router2->Dhcp Clients
I Have DHCP Clients fed off of a different Port and Vlan with a dhcp-relay called "Level3"

This all works for ipv4 however with ipv6 the routing is wrong. My clients can receive an ipv6 prefix however Router 2 has the wrong routing information. it has routes to router 1 via Fiber Trunk to get to the dhcpv6 clients that are only reachable on Lever3 and router 1 has routes to get to the dhcpv6 clients on router 2 via Fiber Trunk aswell. So the only way packets would be routed is back and forth.

also I have DHCPv6 clients on router 1 with a vlan directly and it works no problem so there is no misconfiguration on the client side.
Router-1:

/ipv6 route print

 0 ADb  dst-address=::/0 gateway=fe80::4a8f:5aff:fe5b:4504%sfp-sfpplus1 gateway-status=fe80::4a8f:5aff:fe5b:4504%sfp-sfpplus1 reachable distance=200 scope=40 
        target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=IPV6-IN 

 1 ADS  dst-address=xxxx:cac0::/56 gateway=fe80::a55:31ff:fe13:f2b1%IPV6 Clients gateway-status=fe80::a55:31ff:fe13:f2b1%IPV6 Clients reachable distance=1 
        scope=30 target-scope=10 

 2 ADC  dst-address=xxxx:cac0::/64 gateway=Fiber Trunk gateway-status=Fiber Trunk reachable distance=0 scope=10 

 3 ADS  dst-address=xxxx:cac0:0:100::/56 gateway=fe80::ba69:f4ff:fe93:8dab%IPV6 Clients gateway-status=fe80::ba69:f4ff:fe93:8dab%IPV6 Clients reachable 
        distance=1 scope=30 target-scope=10 

 4 ADS  dst-address=xxxx:cac0:0:200::/56 gateway=fe80::a55:31ff:feac:a062%Fiber Trunk gateway-status=fe80::a55:31ff:feac:a062%Fiber Trunk reachable distance=1 
        scope=30 target-scope=10 

 5 ADS  dst-address=xxxx:cac0:0:300::/56 gateway=fe80::a55:31ff:feac:a062%Fiber Trunk gateway-status=fe80::a55:31ff:feac:a062%Fiber Trunk reachable distance=1 
        scope=30 target-scope=10 

 6 ADC  dst-address=xxxx:cac0:47::/126 gateway=sfp-sfpplus1 gateway-status=sfp-sfpplus1 reachable distance=0 scope=10 

 7 ADo  dst-address=xxxx:cac0:53::1/128 gateway=fe80::a55:31ff:feac:a062%Fiber Trunk gateway-status=fe80::a55:31ff:feac:a062%Fiber Trunk reachable distance=110 
        scope=20 target-scope=10 ospf-metric=10 

/ipv6 dhcp server binding print

 0 RD xxxx:cac0::/56                                                              0x08553113f2b1                     server1                              bound  
 1 RD xxxx:cac0:0:100::/56                                                        0xb869f4938dab                     server1                              bound  
 2 RD xxxx:cac0:0:200::/56                                                        0x085531933532                     server2                              bound  
 3 RD xxxx:cac0:0:300::/56                                                        0x0855319e292d                     server2                              bound  
 4 RD xxxx:cac0:0:400::/56                                                        0x085531d58f65                     server2                              bound  
 5 RD xxxx:cac0:0:500::/56                                                        0x085531d58efc                     server2                              bound
 
/ipv6 address print 

 0 DL fe80::2:40b4:756b/64                                  gre-tunnel1                                                                                no       
 1  G xxxx:cac0:47::2/126                                   sfp-sfpplus1                                                                               no       
 2  G xxxx:cac0::1/64                                       Fiber Trunk                                                                                no       
 3 DL fe80::c6ad:34ff:feb6:45a1/64                          sfp-sfpplus1                                                                               no       
 4 DL fe80::c6ad:34ff:feb6:45a2/64                          sfp-sfpplus2                                                                               no       
 5 DL fe80::c6ad:34ff:feb6:45aa/64                          ether8                                                                                     no       
 6 DL fe80::c6ad:34ff:feb6:45a3/64                          bridge1                                                                                    no       
 7 DL fe80::ac47:33ff:fe2a:f477/64                          loopback                                                                                   no       
 8 DL fe80::c6ad:34ff:feb6:45aa/64                          RR MGMT                                                                                    no       
 9 DL fe80::c6ad:34ff:feb6:45a3/64                          IPV6 Clients                                                                               no       
10 DL fe80::c6ad:34ff:feb6:45a2/64                          ZTE MGMT                                                                                   no       
11 DL fe80::c6ad:34ff:feb6:45a2/64                          ZTE Trunk                                                                                  no       
12 DL fe80::c6ad:34ff:feb6:45a6/64                          ether4                                                                                     no       
13 DL fe80::c6ad:34ff:feb6:45a3/64                          Fiber Trunk                                                                                no

/routing ospf-v3 instance print
0 * name="default" router-id=10.255.255.211 distribute-default=if-installed-as-type-2 redistribute-connected=as-type-2 redistribute-static=as-type-2 
      redistribute-rip=no redistribute-bgp=no redistribute-other-ospf=as-type-2 metric-default=1 metric-connected=20 metric-static=20 metric-rip=20 
      metric-bgp=auto metric-other-ospf=auto 
      
 /routing  ospf-v3 interface
 add area=backbone interface=Fiber-Trunk
 
 
 
 
 
 
 
 
 Router 2:
 
/interface vlan
add interface=ether1 name=Fiber-Trunk vlan-id=120
add interface=sfp-sfpplus1 name=Level1 vlan-id=100
add interface=sfp-sfpplus1 name=Level2 vlan-id=200
add interface=sfp-sfpplus1 name=Level3 vlan-id=300
add interface=sfp-sfpplus1 name=MGMT vlan-id=1000

/ipv6 route print
0 ADo  dst-address=::/0 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 1 ADo  dst-address=xxxx:cac0::/56 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 2 ADo  dst-address=xxxx:cac0:0:100::/56 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 3 ADo  dst-address=xxxx:cac0:0:200::/56 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 4 ADo  dst-address=xxxx:cac0:0:300::/56 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 5 ADo  dst-address=xxxx:cac0:47::/126 gateway=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk 
        gateway-status=fe80::c6ad:34ff:feb6:45a3%Fiber-Trunk reachable distance=110 scope=20 target-scope=10 ospf-metric=10 

 6 ADC  dst-address=xxxx:cac0:53::1/128 gateway=MGMT gateway-status=MGMT reachable distance=0 scope=10
 
 /ipv6 address print
  0  G xxxx:cac0:53::1/128                                   MGMT                                                       no       
 1 DL fe80::a55:31ff:feac:a062/64                           Fiber-Trunk                                                no       
 2 DL fe80::a55:31ff:feac:a062/64                           ether1                                                     no       
 3 DL fe80::a55:31ff:feac:a06c/64                           Level2                                                     no       
 4 DL fe80::a55:31ff:feac:a06c/64                           Level3                                                     no       
 5 DL fe80::a55:31ff:feac:a06c/64                           MGMT                                                       no       
 6 DL fe80::a55:31ff:feac:a06c/64                           sfp-sfpplus1                                               no       
 7 DL fe80::a55:31ff:feac:a06c/64                           Level1                                                     no       
 8 DL fe80::a55:31ff:feac:a064/64                           ether3                                                     no 
 
 /ipv6 dhcp-relay
add dhcp-server=xxxx:cac0::1%Fiber-Trunk interface=Level3 link-address=\
    fe80::a55:31ff:feac:a06c name=Level3
   
   /routing ospf-v3 instance print
 0  * name="default" router-id=0.0.0.0 distribute-default=never redistribute-connected=as-type-2 redistribute-static=no 
      redistribute-rip=no redistribute-bgp=no redistribute-other-ospf=no metric-default=1 metric-connected=20 metric-static=20 
      metric-rip=20 metric-bgp=auto metric-other-ospf=auto 
   
   /routing ospf-v3 interface
add area=backbone interface=Fiber-Trunk


Thank you in advance for any help
-Jonah
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Tue Jun 01, 2021 4:36 am

Hello I'm having difficulties setting up a dhcpv6 relay through ospfv3 and i'm not sure if its a configuration issue or just broken/incompatible as I know ipv6 implementation is far from complete thus far.
I believe the DHCPv6 relay feature was not designed for prefix delegation, so it doesn't add routes as far as I am aware. My understanding is that it was implemented only as a method for those who needed IA_NA with MikroTik, since there is no built in support for IA_NA.

You will probably have to do this without the relay.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Tue Jun 01, 2021 11:46 am

RouterOS has a simple relay implementation it does not track bindings and in this case it is not possible to reliably add routes to bound prefixes. To install routes, relay must become smarter and track all requests and store its own lease/binding information similar as server, that is the plan for the future.
 
jonah1810
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 98
Joined: Tue Jul 30, 2019 10:19 pm

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Thu Jun 03, 2021 12:30 am

Thank you both for the information! I will just use the less centralized approach of having Router 2 as the server. I am hoping ipv6 gets developed a lot further in v7.
 
michaels
just joined
Posts: 12
Joined: Fri May 17, 2019 8:02 pm

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Mon Jun 27, 2022 11:02 pm

I hope that this function will be implemented.
Because of this missing function, we had to use another manufacturer for our BNGs :cry:
We use central Kea DHCP servers for IPv6 prefix delegation to our customers.

Feature request
When a prefix delegation option is found by the relay agent, the
relay agent extracts the information about the prefix that is being delegated and inserts an IPv6 static route
matching the prefix delegation information onto the relay agent. Future packets destined to that prefix via
relay will be forwarded based on the information contained in the prefix delegation. The IPv6 static route is
then left in the routing table until the prefix delegation lease time expires or the relay agent receives a release
packet from the client releasing the prefix delegation.
 
erotel
just joined
Posts: 3
Joined: Wed Jun 28, 2017 9:59 am

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Mon Nov 28, 2022 3:07 pm

RouterOS has a simple relay implementation it does not track bindings and in this case it is not possible to reliably add routes to bound prefixes. To install routes, relay must become smarter and track all requests and store its own lease/binding information similar as server, that is the plan for the future.

Any progress? Is the approximate release known? I miss this feature when deploying ipv6.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Wed Feb 08, 2023 10:48 am

Also wanted to bump this to the top and ask about dhcpv6 relay + prefix delegation and dynamic route injection. Any idea when this might be added?
 
erotel
just joined
Posts: 3
Joined: Wed Jun 28, 2017 9:59 am

Re: OSPFv3 + DHCPV6 Relay Not Routing Correctly

Tue Sep 12, 2023 3:19 pm

It looks like this feature will never be implemented

Who is online

Users browsing this forum: No registered users and 20 guests