Multiple interfaces in the same time

I do not belive HAOS can bond network interfacesm so you wll have to use another installation type for that.

Active on same network would not make sense for HAOS, since this would only realy be usefull with two services that are hardcoded to the same port, but have the option to bind to a specific network interface.

Active on different networks is just stupid.
Use the router for that instead and set up the correct NAT’ing (portforward), which give better control anyway.

I need active active on two different networks. And it works like that for a short period of time. I suppose there is something in the background that disables and enables one network.
No, it is not stupid, I can’t join those networks they are physically separated.

If HA is on both networks, then they will not be physically separated.
If both networks have internet access, then they will not be physically separated.
Trying to segment networks by moving them to different (V)LANs and then use HA as a router is like closing the window but leaving the front door unlocked and open.

1 Like

One has internet and one does not. I do not plan to use hass as a router, it has one leg in lan 1 and one leg in lan 2. I want to control the devices from lan 1 from lan 2. Basically I want to serve only the webserver in lan 2, nothing else.
I repeat, it is working for a few seconds. I would like to know why it is disabled afer that time.

The webserver will be served on both nets, because that is HA and that means it is a router.

No, routers are much more than devices that are connected to two networks.

@bogdan see if this is any help

If you use Proxmox you can define more than one interface for your VM. And then in HA it will be displayed like this.

@FriedCheese thank you, I have tried that already, but for me it is a little different, I have both Connected. I think something is disabling the traffic trough the second lan and not the port itself. I will check it further.
@doubleUS yes, it is the same for a PC, I can see all the NIC’s there. I have 3 entries there, double port network card and one onboard lan port. But configuring that will not change anything.

OK, managed to clarify this. It’s all related to the metrics… the metrics on the second card is way higher than the first one, probably to force the traffic trough the first one, so changing the metrics with a lower value closer to the first one will “enable” traffic on the second one as well.
for example:

ip route add default via 192.168.1.1 dev enp0s18 metric 5

That should have no effect.
Metrics are used to determine what interface is used and it is all or nothing, so the one with the lowest metric will always be used as long as it is active.
It is not a percentage or weighted setting.

1 Like

Well for me it works… you should try it and let me know why it works

Only reason why it should work would be due to misconfigured interfaces, so multiple interfaces where set up to same subnet.

I’ve been using two interfaces for more than a year but it is seeing more issues recently with sensors not being available. I can’t say whether it is due to changes in HA or just that i’m now relying more on HA and seeing it more.

I run on a HA yellow with current versions. My main interface is ethernet but it is also connected to another through wifi. The two subnets are of course different.

I often do the same from a windows laptop and can access devices on both nets.

When i lose connections to the sensors HA can’t ping them either. But often it will show a single reply and then a timeout afterwards.

This morning HA could’nt ping a sensor and the only thing i needed to do was save the network configuration again (changed a setting back and forth so the save button was active)

I understand now that it is not the recommend way to do things but with a “simple” home router that network division (called lan and guest) was what were possible and predates HA by years (keeping the kids gaming rigs of my work network and limit their bandwidth were the original cause.)

I’ve disabled IPv6 on both HA, router and access points. and tried with both locked addresses trough DHCP and setting them manually. I’ve also tried with the gateway of the wifi sat to that of the lan. The UI will not let me remove the gateway.

From the CLI i’ve just manually deleted the default route with ~ route del default gw 192.168.4.1 wlan0 so that there is only one default route but i suspect the metric of the remainging default route is to low and might catch traffic meant for the wlan interface… But i can’t figure out why is is’ent consistent … i.e either working or not…

@majland I have used it for a while on two lan’s but as you said there are some issues from time to time, so in the end I gave up and changed the network configuration to obtain the same result.

1 Like

The problem is after you delete the default GW route it gets recreated on the next DHCP request. Another issue is that there is no option in HASS to specify which interface is the primary one or/and set the gateway metric in order to influence their default GW route ordering.

1 Like

You are missing a lot of setup necessary to run with that configuration.
HA is relying a lot on auto-discovery and auto-configuration protocols, like mDNS, SSDP, ZeroConf and uPNP just to mention a few.
These needs to be configured for multi-homed setups too and that is not something HA is set for, if the current software for these protocols even allow it.
mDNS can be somewhat handled by running your own DNS service internally and manually enter every single device.
The others are harder and might even require broadcast reflectors, which is normally a router thing. You are actually running HA in a router role with your setup, but HA have no router software.
HA should be run with a single network and then your router can be set up to handle the routing between your different nets. If you want it perfectly then you also need a router that can reflect the different broadcast protocols between those nets, which the cheaper ones can’t.

This is incorrect. Having two network interfaces on two different subnets is a simple multi homing setup and nothing to do with routing. No config is asking HASS to provide routing between those two subnets, all protocols should work independently on both interfaces in their dedicated subnets.

1 Like

A router is a simple multi homing setup too.
The routing you look at is data coming in on one interface and then being treated with some rules and maybe then go out on another.

HA in this setup is doing the same with the data HA is working with.
Your view is just too narrow to see it.

Nothing wrong with my view. To enable routing on linux systems you need to set ip_forward kernel parameter to 1 which HASS will not do because well it does not want to be a router. What you are probably talking about is rp_filter property and the way linux handles packets in case of multiple interfaces (by default the IP belongs to the host not to the network interface) which is not routing. One might want set this to 0 depending on their network setup.

No, I talk about what the definition of a router is, not a specific implementation of one.