IPv6 routing samples

Hello !

I have taken echo server sample as base (USB-NET and  ipv6 only config )

and would like ti add border router ( if need ) and few static routes to other interfaces to this sample.

But looks like not so many samples for routing exists in SDK. Everything around OpenThread and etc.

I assume I can add to it second network interface ( serialized on network core or serial UART or virtual ?)

and after that all IPV6 packets for is not addressed to current node ( CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" ) can  be routed to than interface.

Route rules need to be added as well.

Or what is routing principles in current ipv6 stack ?

I hope I should be able to configure 6LO layer for that second interface.

Can you suggest configuration for this kind of framework in case of assembling from Zephyr modules ?

Regards,

Eugene

Parents
  • Hello Eugene,

    and thank you for your patience with this.

    I can see that some of your inquiries were answered by my colleague in this ticket. I will not address them in this answer.

    and after that all IPV6 packets for is not addressed to current node ( CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" ) can  be routed to than interface.

    If you want routing from a device in one network to a device on the other network you have to implement how this routing works yourself.

    A possible starting point is to use the format of the IPv6 packets to categorize which network interface they should be forwarded to. This depends on whether the structure of the packets in your proprietary radio is different from the packet structure of Ethernet packets.

    what is routing principles in current ipv6 stack ?

    The routing is done by Thread, specifically OpenThread in nRF Connect SDK. The Thread specification may be of help to you. You can download it for free from the Thread Group here.

    Let me know if I overlooked anything.

    Best Regards,
    Maria

Reply
  • Hello Eugene,

    and thank you for your patience with this.

    I can see that some of your inquiries were answered by my colleague in this ticket. I will not address them in this answer.

    and after that all IPV6 packets for is not addressed to current node ( CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" ) can  be routed to than interface.

    If you want routing from a device in one network to a device on the other network you have to implement how this routing works yourself.

    A possible starting point is to use the format of the IPv6 packets to categorize which network interface they should be forwarded to. This depends on whether the structure of the packets in your proprietary radio is different from the packet structure of Ethernet packets.

    what is routing principles in current ipv6 stack ?

    The routing is done by Thread, specifically OpenThread in nRF Connect SDK. The Thread specification may be of help to you. You can download it for free from the Thread Group here.

    Let me know if I overlooked anything.

    Best Regards,
    Maria

Children
  • Hello Maria !

    My case is different. I just need to create static routing table where 2 interfaces are in use.

    I can see in Zephyr route capabilities are hidden.

    in ncs/v2.2.0/zephyr/subsys/net/ip/Kconfig

    NET_ROUTE and NET_ROUTING are hidden.

    I have enabled those and able to include hidden headers by using lines:

    #include <zephyr/../../subsys/net/ip/ipv6.h>

    #include <zephyr/../../subsys/net/ip/nbr.h>

    #include <zephyr/../../subsys/net/ip/route.h>

    and practice with APIs 

    net_ipv6_nbr_add()
    net_route_add()
    And from host what is connected to USB_NET ethernet I try to route packets to 2nd interface ( own radio driver).
    But no idea if it possible with current IPV6 stack, routing is hidden last 4 years and it should be some reason about it.
    Regards,
    Eugene
  • Hi Eugene,

    This is out of scope from what we can provide support for and is a question better suited for Zephyr. Please contact them either from the contact form here, or at one of the links they provide (mailing lists or Discord). I think Discord is the preferred way to ask for help.

    Best Regards,
    Maria

Related