I know this is a silly question.
But back in the day I added a second IP to my Home Assistant, probably a day where the fogs around the brain weren’t so thick
So it shows:
But I can’t for the life of me remember where or how I set that up.
If I grep in ‘etc’ for anything like the IP or the interface name enp, nothing shows up
How on earth did I manage to do that?
The HA is set up as a VM under proxmox (Homeassistant OS). There is only one NIC in the VM.
Ok, so it’s nmcli I used back then, ssh into HA, then issue ‘login’ to go to the host’s environment, and with nmcli con show I can see the three connections.
So I guess I it’s the enp0s18.60 I need to remove.
If I look under /etc/NetworkManager/system-connections I can see the files, but I can’t remove them, I get a message that it’s read-only file system.
Ah, it’s the /root that was readonly (tried to move the config to /root).
So now it’s just deleted, I hope it works after a reboot of the host
Finally, cleaned up.
Now the Network interface shows the right config, and the ‘static’ / ‘dynamic’ reflects what is set in the GUI.
So the procedure was
- Open console for host, I did that in PVE
- When it shows ha >
- Enter login
- cd /etc/NetworkManager/system-connections
- Remove all files EXCEPT default
Not sure what the ‘Supervisor xxx’ files do in conjunction with the default, as HA recreates the Supervisor file for the config made in the GUI (and it still has the ‘default’ file.
Hi @fribse thank you for your post.
I must admit I am not very good at Linux/Proxmox/HAOS but have found my way around.
I face the following scenario:
The following setup which worked for me:
Raspberry PI4 which is connected to my main LAN on 192.168.0.5 via network cable, static IP lease from Unifi controller. I also enabled Wifi on the Raspberry PI and connected it to a wifi network that is bound on my secondary LAN and allocated an IP of 10.1.1.5. I run HAOS 10.5
I currently have two LANs setup on the Unifi Controller:
Main LAN1:
- Gateway: 192.168.0.2
- Subnet: 255.255.255.0
- DHCP Range 192.168.0.100-192.168.0.254
- Broadcast IP 192.168.0.255
Secondary LAN2:
- VLAN ID: 200
- Gateway: 10.1.1.2
- Subnet: 255.255.255.0
- DHCP Range 10.1.1.100-10.1.1.254
- Broadcast IP 10.1.1.255
Home Assistant is obviously working for devices on LAN1 via 192.168.0.5:8123 and for other devices connected to LAN2 via 10.1.1.5:8123.
The reason for doing this: I myself am on Wifi1/LAN1 and staff is on Wifi2/LAN2. Both user groups should be able to access the same HOAS instance, but staff should not interfere with any device on LAN1. The setup works perfectly fine and I have had no issues with this procedure.
I have now installed a new Intel NUC with PROMOX 8. Machine is super powerful but by default PROXMOX only supports static IP on network card, and Wifi is not something that can be enabled via GUI, only by amending the etc/networking config file.
I think I now have two solutions to replicate my above working setup on the PI4 (which I want to retire, as the replacement with the NUC is so much more powerful):
Option A): Setup Wifi with PROXMOX. According to their wiki page it is not the best idea as some accesspoints don’t like to authenticate withe the Linux bridge.
Option B): Configure a second IP address to the Proxmox network card from my LAN2, and then somehow also tell HAOS that this second IP address/range can be used for HAOS.
Let’s focus on Option B:
Here is my current output of /etc/network/interfaces
auto lo
iface lo inet loopback
iface enp86s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.18/24
gateway 192.168.0.2
bridge-ports enp86s0
bridge-stp off
bridge-fd 0
#
iface wlo1 inet manual
and /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.18 pve.intelnuc123 pve
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Here is the output from PROMOX shell showing current network adapters configured:
root@pve:~# ip -br -c addr show
lo UNKNOWN 127.0.0.1/8 ::1/128
enp86s0 UP
wlo1 DOWN
vmbr0 UP 192.168.0.18/24 fe80::4a21:bff:fe57:11a9/64
tap100i0 UNKNOWN
root@pve:~# ip a s vmbr0
4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 48:21:0b:57:11:a9 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.18/24 scope global vmbr0
valid_lft forever preferred_lft forever
inet6 fe80::4a21:bff:fe57:11a9/64 scope link
valid_lft forever preferred_lft forever
As can be seen, the NUC runs on 192.168.0.18:8006 and HAOS is configured as 192.168.0.238:8123.
Would you or anyone else please help me with how to amend/configure the Proxmox network settings in order to add a secondary static IP address ie 10.1.1.18 for example to the NUC network card and then be able to use a secondary address for HAOS ie 10.1.1.238:8123 from the VLAN2 ?
If any information is missing, happy to provide. I am also comfortable editing the proxmox network setting files via shell and to configure YAML on HAOS, just not a hardcore linux expert ;-).
Thanks,
Martin
I think I found the solution:
1) Add VLAN Interface to NUC
On Proxmox I modified the vmbr0 interface to be “VLAN aware” and I added the second VLAN interface as follows in /etc/network/interfaces
auto vmbr0
iface vmbr0 inet static
address 192.168.0.18/24
gateway 192.168.0.2
bridge-ports enp86s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
iface wlo1 inet manual
auto vmbr0.200
iface vmbr0.200 inet static
address 10.1.1.18/24
the GUI reflects these settings as well.
Both Proxmox web interfaces of the NUC are now available at:
http://192.168.0.18:8006 and also at
http://10.1.1.18:8006
2) Add network adapter to VM HAOS
On Proxmox VM HAOS under network I added the network device with VLAN tagging:
3) Configure static IPs for both adapters in HAOS
Within HAOS under Settings/System/Network there are now two network adapters, for each of them I set the respective static IP addresses. Alternatively leave on DHCP range.
Note the tabs:
4) Configure adapter for integrations
Within HAOS under Settings/System/Network scroll down on that page and select both (if needed) networks/subnets/VLANs for devices to be used for integrations.
5) Unifi Network Confirmation
Double check under Unifi Network that the same HAOS instance with two different IPs from the various subnets is available.
Then go to browser and check that the web interface of the HAOS is now available at:
http://192.168.0.19:8123 and also at
http://10.1.1.19:8123
Overall not so complicated, just needed to get my head around it.
Definitely a solution for anyone that needs to add multiple IP addresses from various subnets to PROXMOX and then apply them as adapters in Home Assistant.
Martin