Skip to content

Disabling IPv4 causes problems with default components #3920

Closed as not planned
@gittygitnice

Description

@gittygitnice

Describe the issue you are experiencing

Disabling IPv4 in the settings of Home Assistant (Settings->System->Network) and leaving only IPv6 enabled doesn't disable IPv4 completly. Two virtual network interfaces of Home Assistant ("docker0" and "hassio") still get private IPv4 addresses from the Class B range assigned (as can be seen in the attached screenshot). This leads to problems as other components like SSDP pick up these addresses, try to work with them and throw an error message ("[Errno 101] Network unreachable") in the log as the main NIC no longer handles IPv4 addresses.

I first posted about this issue here: StevenLooman/async_upnp_client#259. At that time it wasn't clear what causes the problems.

Image

What operating system image do you use?

ova (for Virtual Machines)

What version of Home Assistant Operating System is installed?

15.1

Did the problem occur after upgrading the Operating System?

No

Hardware details

Running HA OS in Proxmox 8.3

Steps to reproduce the issue

  1. Disable IPv4 and leave only IPv6 enabled in the settings of Home Assistant. Restart the system.
  2. The command "ip a" shows that two virtual network interfaces still get assigned IPv4 addresses.
  3. The log shows the error "[Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=22 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=22, family=2, type=2, proto=0, laddr=('0.0.0.0', 52238)>", repeating every ten minutes, as SSDP picks up the private IPv4 addresses and tries to work with them which no longer is possible.
    ...

Anything in the Supervisor logs that might be useful for us?

-

Anything in the Host logs that might be useful for us?

In the log files we can see that SSDP is trying to use the two assigned IPv4 addresses

2025-03-05 22:57:55.453 DEBUG (MainThread) [async_upnp_client.advertisement] Start listening for advertisements
2025-03-05 22:57:55.453 DEBUG (MainThread) [async_upnp_client.ssdp] Creating socket, source: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'fe80::XYZ', ('fe80::XYZ', 0, 0, 2)), target: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'ff02::c%2', ('ff02::c', 1900, 0, 2))
2025-03-05 22:57:55.453 DEBUG (MainThread) [async_upnp_client.advertisement] Binding socket, socket: <socket.socket fd=34, family=10, type=2, proto=0, laddr=('::', 0, 0, 0)>, address: ('', 1900)
2025-03-05 22:57:55.454 DEBUG (MainThread) [async_upnp_client.advertisement] Start listening for advertisements
2025-03-05 22:57:55.454 DEBUG (MainThread) [async_upnp_client.ssdp] Creating socket, source: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '172.30.32.1', ('172.30.32.1', 0)), target: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '239.255.255.250', ('239.255.255.250', 1900))
2025-03-05 22:57:55.454 DEBUG (MainThread) [async_upnp_client.advertisement] Binding socket, socket: <socket.socket fd=33, family=2, type=2, proto=0, laddr=('0.0.0.0', 0)>, address: ('', 1900)
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.advertisement] Start listening for advertisements
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.ssdp] Creating socket, source: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'fe80::XYZ', ('fe80::XYZ', 0, 0, 4)), target: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'ff02::c%4', ('ff02::c', 1900, 0, 4))
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.advertisement] Binding socket, socket: <socket.socket fd=36, family=10, type=2, proto=0, laddr=('::', 0, 0, 0)>, address: ('', 1900)
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.advertisement] Start listening for advertisements
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.ssdp] Creating socket, source: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'fe80::XYZ', ('fe80::XYZ', 0, 0, 3)), target: (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_DGRAM: 2>, 17, 'ff02::c%3', ('ff02::c', 1900, 0, 3))
2025-03-05 22:57:55.455 DEBUG (MainThread) [async_upnp_client.advertisement] Binding socket, socket: <socket.socket fd=37, family=10, type=2, proto=0, laddr=('::', 0, 0, 0)>, address: ('', 1900)
2025-03-05 22:57:55.456 DEBUG (MainThread) [async_upnp_client.advertisement] Start listening for advertisements
2025-03-05 22:57:55.456 DEBUG (MainThread) [async_upnp_client.ssdp] Creating socket, source: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '172.30.232.1', ('172.30.232.1', 0)), target: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '239.255.255.250', ('239.255.255.250', 1900))

and fails:

2025-03-04 18:06:06.231 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=37 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=37, family=2, type=2, proto=0, laddr=('0.0.0.0', 52388)>
2025-03-04 18:06:06.231 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=40 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=40, family=2, type=2, proto=0, laddr=('0.0.0.0', 56494)>
2025-03-04 18:16:06.232 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=37 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=37, family=2, type=2, proto=0, laddr=('0.0.0.0', 52388)>
2025-03-04 18:16:06.232 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=40 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=40, family=2, type=2, proto=0, laddr=('0.0.0.0', 56494)>

System information

No response

Additional information

Are the IPv4 addresses for the two virtual network interfaces internally needed by Home Assistant? Otherwise it would be helpful if they are disabled when disabling IPv4 in the settings as they cause problems otherwise. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions