Allow specifying ethernet interface for OpenThread Border Router

I cannot find a way to specify the network interface to use for OpenThread Border Router.

The container seems to be running in “host” network mode, which is fine, if I can select the ethernet interface to use, because I have a IoS network for IoT garbage to use, but not giving it internet.

A bit of research makes it seem like it’s possible using OTBR_INFRA_IF_NAME environment variable? But that option is not provided via HA.

I checked the container script and I found how it finds which interface to use:

/etc/s6-overlay/s6-rc.d/otbr-agent/run:11:declare backbone_if
/etc/s6-overlay/s6-rc.d/otbr-agent/run:20:backbone_if="$(bashio::api.supervisor 'GET' '/network/info' '' 'first(.interfaces[] | select (.primary == true)) .interface')"
/etc/s6-overlay/s6-rc.d/otbr-agent/run:68:if [ -z ${backbone_if} ]; then
/etc/s6-overlay/s6-rc.d/otbr-agent/run:70:    backbone_if="eth0"
/etc/s6-overlay/s6-rc.d/otbr-agent/run:120:    iptables -t filter -A FORWARD -o ${backbone_if} -j ACCEPT
/etc/s6-overlay/s6-rc.d/otbr-agent/run:122:    iptables -t filter -A FORWARD -i ${backbone_if} -j ACCEPT
/etc/s6-overlay/s6-rc.d/otbr-agent/run:144:    "/usr/sbin/otbr-agent" -I ${thread_if} -B "${backbone_if}" \
/etc/s6-overlay/s6-rc.d/otbr-agent/run:148:        "trel://${backbone_if}"

I would like to be able to change that.

Yes I have two networks in HA.

Hi Gunni,

I have similar setup. Dedicated IoT (IoS :heart:) VLAN that does not communicate with the Internet and „server” VLAN. Two HA interfaces (as I was not able to set the mdns reflector).
IoT HA does not have gateway, but it has IPv6 required by Matter/Thread device.

My primary interface is the „server” one to allow nabu casa & companion app communication.

I have IPv6 communication, dedicated ZBT-1, thread network running, credentials, NAT64.
Unfortunately I’m not able to pair my first matter/thread device.

I’m afraid that wrong interface is being used by OTBR.

Do you know how to check which interface is actually used by the add-on?

Did you find the solution?
Kind Regards,
Kasper

I’m also looking for this, I want to make sure OTBR on my HAOS instance uses my primary network interface (vlan) so it is on the same vlan as my other TBRs. If anyone has any clues on how to either set it or check which one it is using I’d appreciate it.

Hopefully someday this will be supported. The base docker image the add-on is from has it, so it would be nice if we could specify it, even via a manual parameters section vs. the GUI.