Issue of the topic:
My setup has bound 5 different IPv4 addresses to eth0, namely:
192.168.2.4/24
192.168.2.40/24
192.168.2.41/24
192.168.2.42/24
192.168.2.43/24
The first one (192.168.2.4/24) is always active whereas the other 4 depend on the running state of another package.
So it is crucial for me to configure openHAB to use the primary address (192.168.2.4/24) to avoid changing firewall rules depending on the running state of a unrelated software package.
Log of startup:
[INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
[WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.2.42
[WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.2.41
[WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.2.40
[WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.2.4
[INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.2.43:8080
[INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.2.43:8443
[INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
To me it looks like DashboardService binds to the last IP address found in the list.
This is the current config of eth0:
$ ip addr
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:11:32:70:a7:ab brd ff:ff:ff:ff:ff:ff
inet 192.168.2.4/24 brd 192.168.2.255 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.2.40/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.2.41/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.2.42/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.2.43/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::211:32ff:fe70:a7ab/64 scope link
valid_lft forever preferred_lft forever
I have tried to configure the primary address in the Configuration->System->Network Settings but this also lead to the same result (all IP addresses are in the same subnet).
Is there a way to resolve the problem?
Thanks a lot in advance!
Kind regards
Hi @Benjy,
thanks for the suggestion.
Indeed I have tried this, see my original post:
I have tried to configure the primary address in the Configuration->System->Network Settings but this also lead to the same result (all IP addresses are in the same subnet).
It would be the solution if the 5 addresses were in different subnets. But in my case they are in the same subnet.
Hi @Dim,
indeed it is. The remote device (AVM FRITZ!Box 6490) checks for allowed connections based on addresses and this is the only way to have 4 concurrent connections.
Unfortunately that also didn’t help. The log message still states that the DashboardService bound to the wrong address.
But meanwhile I discovered that this log message (“Started dashboard at http://192.168.2.43:8080”) is leading into the wrong direction.
In fact openHAB uses tcp6 on my setup, see netstat output:
So the connection is established to the right address despite of the different message log.
For me this is fine!
Thanks for all your help in this matter.
Kind regards