Installing Home Assistant Supervised on Debian 11 - IP address not being assigned

Hi,
Installed HA using this procedure - but I have a problem with the IP address assignment. Once I installed Debian 11, IP is being assigned by my modem without any issues (tried host restart too), but once I install HA and restart the host, it is not being assigned an IP address.

Then I configured a static IP address using the following:
root@NUC01:/home/# cd /etc/network
root@NUC01:/home/# vi interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp0s25
iface enp0s25 inet static
address 192.168.1.230
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 192.168.1.254

IP configured is being assigned by I the machine is not able to resolve DNS queries.
Once I add the following DNS works fine, but this entry is removed on host restart

root@NUC01:/home/# cat /etc/resolv.conf
#Generated by NetworkManager
nameserver 8.8.8.8
  • Is there a particular reason why IP is not being assigned (never had issues with Debian 10)
  • how can is resolve the DNS issue?

thanks!

There are a few ways to prevent resolv.conf is getting overwritten with every restart of the host.

A clean way is by using the resolvconf service:
sudo apt install resolvconf

sudo systemctl enable resolvconf
sudo systemctl start resolvconf

Now check whether the resolvconf service has started correctly:
sudo systemctl status resolvconf.service

If it has started correctly add the nameserver IP addresses of your choice to the resolvconf configuration file “head” :
sudo nano /etc/resolvconf/resolv.conf.d/head

Prepend valid nameservers of your choice below the comments, i.e.:

nameserver 192.168.1.254
nameserver 8.8.8.8

Now run resolv.conf update:
sudo resolvconf --enable-updates
sudo resolvconf -u

Make sure the new nameserver addresses have been added by displaying the contents of /etc/resolv.conf :
sudo cat /etc/resolv.conf

Whenever you want to change or add nameservers just change the file “head” (as above) and re-run:
sudo resolvconf -u

1 Like

thanks for the detailed info … followed this procedure but now the contents of resolv.conf is empty. Do I need to reboot the machine for changes to take effect?

root@NUC01:/# more /etc/resolvconf/resolv.conf.d/head
nameserver 192.168.1.254
nameserver 8.8.8.8

EDIT: after the reboot resolve.conf contains the following

root@NUC01:/home# more /etc/resolv.conf
#Generated by NetworkManager
root@NUC01:/home#
root@NUC01:/home#
root@NUC01:/home#

What is:

sudo ip -c link show

and

sudo nmcli connection

saying?

It looks like you have messed up the network configuration of your install. To tell you more please post the output of the above two commands.

i wouldnt be surprised if i messed it up :joy: but i installed everything from scratch three times following the procedure to the letter.
will return the output this evening because i currently out and i removed port forwarding from my modem and cannot access it remotely. btw thanks for the follow up!

I have the same issue. Everything is ok up until the supervisor install. The only container running is Supervisor and the system gets no IP address.

output below:

root@NUC01:/home/# ip -c link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:ae:ed:72:73:e2 brd ff:ff:ff:ff:ff:ff
3: hassio: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 02:42:af:c5:3b:e9 brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 02:42:34:d2:5b:e3 brd ff:ff:ff:ff:ff:ff
6: vetheea252d@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP mode DEFAULT group default
    link/ether 82:82:62:a5:15:8e brd ff:ff:ff:ff:ff:ff link-netnsid 0
8: vethb5237aa@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
    link/ether b6:ef:e2:e3:52:61 brd ff:ff:ff:ff:ff:ff link-netnsid 1
10: vethfc7f4e6@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP mode DEFAULT group default
    link/ether 8a:8f:30:b6:24:5d brd ff:ff:ff:ff:ff:ff link-netnsid 1
12: veth526c9de@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP mode DEFAULT group default
    link/ether fe:f9:fd:16:ec:a4 brd ff:ff:ff:ff:ff:ff link-netnsid 2
14: veth5bbd3e0@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP mode DEFAULT group default
    link/ether 52:8c:05:62:6b:57 brd ff:ff:ff:ff:ff:ff link-netnsid 3
16: veth165cafa@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP mode DEFAULT group default
    link/ether 92:07:fd:6d:3f:ac brd ff:ff:ff:ff:ff:ff link-netnsid 4

root@NUC01:/home/# nmcli connection
NAME UUID TYPE DEVICE
Supervisor enp0s25 953a3915-a261-473e-ac6c-eacd03c6f825 ethernet enp0s25
Supervisor enp0s25 d99e042b-17da-4489-86d7-7400087147c0 ethernet –
Supervisor enp0s25 82b2807a-d1bb-4dd2-b0b0-883cd72ae910 ethernet –
Supervisor enp0s25 defad5d3-7ea2-46de-ab45-b6374311e7a9 ethernet –
Supervisor enp0s25 e67f801e-5469-4957-a184-45336f5cba08 ethernet –
Supervisor enp0s25 d96e1d34-e321-491b-bfcb-f2b06674fd93 ethernet –
Supervisor enp0s25 6dd1cc62-ae5b-4291-bdf1-ce7033e15579 ethernet –
Supervisor enp0s25 418531af-24b0-4971-aaf0-74525710d0d5 ethernet –
Supervisor enp0s25 309662dd-90d6-4bb9-856a-da60a00dbe37 ethernet –
Supervisor enp0s25 bad8b402-ce48-42f2-bd9c-25d98df4495b ethernet –
Supervisor enp0s25 8f075245-9903-45e4-8bc0-07806653636d ethernet –
Supervisor enp0s25 d97c56de-0168-45c6-8243-996d0d0964d9 ethernet –
Supervisor enp0s25 06f770c4-4327-4e6d-b057-537f50276936 ethernet –
Supervisor enp0s25 f8030f05-10e0-445a-bba4-e7827a6aa26b ethernet –
Supervisor enp0s25 3f20220b-b8ff-49e7-96cf-d9b4329a81d1 ethernet –
Supervisor enp0s25 99bda008-d271-42f5-957b-d6ec18d6de62 ethernet –
Supervisor enp0s25 a55196f7-72de-457c-b8c5-ff8b22a4197a ethernet –
Supervisor enp0s25 9894bf67-3cd7-433e-b69f-43dc6863d332 ethernet –

yeah this is very strange … in my opinion it is not accepting any IP assignment through DHCP once Supervisor is installed… had no issues when installed same setup on Debian 10

I did the same install 3-4 months ago on Debian 11.3 and had no issues. I’ve tried multiple fresh installs, different hypervisors, tried different ways and as soon as I install supervisor, no IP.

i think this is a sort of a bug … I hope someone from the dev team will find a workaround for this :slight_smile:

hi again Tamsy, if it will help you i kept a copy of the CLI and output of the commands executed during the last install. if interested to take a look drop me a DM

I’m having the same issue here, I just reinstall HA supervise and after the first reboot after the installation I loose connectivity, my network adapter lose its IP. If I uninstall HA, I regain connectivity. I reinstall it and lose again. I don’t know what todo.

hi… can you connect a display and keyboard to the host and run command nmcli? let me know the output pls

Solution found thanks to help from @Tamsy & @austen (thanks for your help)

when running command nmcli aftrer a reboot noted interface was marked as disconnected!!

the following two commands solved the problem:

Enable interfaces:

nmcli c up $(nmcli -g uuid c)

To enable interface on reboot:

sudo nmcli con mod 'Supervisor enp0s25' connection.autoconnect true
1 Like

Thanks for the assistance @mouthpiec

Glad we got to the bottom of it.

1 Like

Having a similar issue for Supervised on Debian 11 not giving IP’s after reboot. Base on my understanding it will replace /etc/network/interface which make the IP disappears. In my case restoring the original interface did revive the IP’s however that machine will inquire a 2nd IP’s which is really strange. I have been trying to remove the 2nd IP’s without any success.

1 Like

Hi Richard … most probably you will also have issues with DNS.
Have you tried the commands in the post tagged as “Solution” ?

Heem… I have not setup the autoconnect. But after running the firstline and reboot the system I’m now getting the IPs. Thanks

2 Likes

When I return home I will try it, thanks