Assign IPv6 addresses to 2 network interfaces

Hello !

I build echo sample with USB-NET and IEEE802.15.4  support

Also to prj conf I have added CONFIG_NET_IF_MAX_IPV6_COUNT=2

Here : 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/networking/overview.html

"

  • Multiple Network Technologies. The Zephyr OS can be configured to support multiple network technologies at the same time simply by enabling them in Kconfig: for example, Ethernet and 802.15.4 support. Note that no automatic IP routing functionality is provided between these technologies. Applications can send data according to their needs to desired network interface.

    "

I think this kind of configuration are legal and have some level of support.

Via network manager I can see current configuration.

And how I assign global address and different features for both interfaces.

One Network interface can  be 6LoWPAN compatible other - not.

But I haven't find own configuration options for each interface.

Next one able to assign only one address

CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2"

# 6loWPAN support
CONFIG_NET_IPV6=y
CONFIG_NET_IPV6_FRAGMENT=y
CONFIG_NET_6LO_CONTEXT=y
CONFIG_NET_MAX_6LO_CONTEXTS=10

I can see "Note that no automatic IP routing functionality is provided between these technologies.". And I assume if 2 different interfaces have own addresses, I can create routing table on the Linux Host what route packets to one or other one interface if need.

Or what is good sample for router what can be implemented under Zephyr ?

Regards,

Eugene

Parents Reply Children
Related