Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable support for IPv6 #355

Closed
alexbarcelo opened this issue Feb 11, 2018 · 20 comments
Closed

Enable support for IPv6 #355

alexbarcelo opened this issue Feb 11, 2018 · 20 comments
Labels

Comments

@alexbarcelo
Copy link

The hassio bridge network doesn't has the IPv6 network stack enabled.

"Culprit" seems to be the line at hassio/docker/network.py, in particular the parameter enable_ipv6=False in the method _get_network.

Enabling is not as straightforward as puting there True because to set up correctly IPv6 a subnet should be specified. And that subnet is typically provided by the user (if the user is doing globally routable addresses, which is a likely scenario in IPv6 environments).

I haven't come up with a proposal on how to address that. I was open to suggestions (if a PR is feasible and appreciated, I can work on that) or some workaround tips otherwise (if there are any).

@Fubi95
Copy link

Fubi95 commented Feb 27, 2018

Go to the HomeAssistant Config file under component http and add server_host: "::0"

@alexbarcelo
Copy link
Author

@Fubi95 yeah, I added that to the documentation. Note that the homeassistant container is not part of the hassio bridge, as that container uses host network mode and thus works correctly with IPv6 if the host has IPv6.

However, the problem I found is for the addons, which typically use the hassio bridge which --when created-- has an explicit disable of ipv6.

I have abandoned this route, as it started to seem (at least to me) painful and cumbersome. And Docker itself has no clean semantics and features for IPv6 stack of containers IMHO. So not sure if it is worth having this issue opened, as I don't know if it will benefit anybody in the short term.

@donnib
Copy link

donnib commented Nov 6, 2018

@alexbarcelo I would love to expose my hassio on IPv6 but as far as i understand it's not possible now, correct ?

@alexbarcelo
Copy link
Author

@donnib You can expose hassio to IPv6 because, as I said, that container is not part of the hassio bridge. According to my comment (which I honestly don't remember at all) I updated something in the documentation, probably related to the @Fubi95 comment.

That will expose hassio to IPv6, but will not work for any other container in the hassio environment. That was my use case, and was not supported. ATM I am using vanila dockerized hass, so you should try it yourself /shrug

@alexbarcelo
Copy link
Author

(see https://www.home-assistant.io/components/http/ > server_host)

@donnib
Copy link

donnib commented Nov 14, 2018

@alexbarcelo the doc says explicitly : "Don’t use option server_host on a Hass.io installation!" so i still don't know how to do this

@alexbarcelo
Copy link
Author

alexbarcelo commented Nov 14, 2018 via email

@pvizeli
Copy link
Member

pvizeli commented Nov 14, 2018

I'm open to merging PRs for that but that is no simple task and need a lot of tests and also PRs on another repository to make it working overall instance.

@alexbarcelo
Copy link
Author

Sorry if it came out as passive aggressive, wasn't my intention, I was in a hurry.

IMHO given my previous experience, Hass.io is phenomenal for easy deployment on typical use cases, specially for non-techie users. Using IPv6 doesn't seem to fit that scenario. IPv6 networks are cumbersome and is very difficult to provide a default behavior one-fits-all that is actually useful. And lots of IoT gadgets are not IPv6 ready, so everything should be dual stack, and to be honest, dual stack feels not so useful right now.

With more perspective (from when I started the issue), I think that it is too soon to give support for IPv6 --I feel it would be a waste of efforts given the current IPv6 ecosystem.

@pvizeli
Copy link
Member

pvizeli commented Nov 14, 2018

I agree

@donnib
Copy link

donnib commented Nov 15, 2018

@pvizeli @alexbarcelo
My use case was to allow Hass.IO to be accessed from the outside world when i have Carrier Grade NAT otherwise that won't be possible. I think this case is still valid for many users that they don't have a public IPv4 address. Maybe this case is simpler than what you are worried about. Please correct.

@alexbarcelo
Copy link
Author

alexbarcelo commented Nov 15, 2018 via email

@donnib
Copy link

donnib commented Nov 16, 2018

@pvizeli do you know why it's not recommended to use server_host ?

@troykelly
Copy link

IMHO given my previous experience, Hass.io is phenomenal for easy deployment on typical use cases, specially for non-techie users. Using IPv6 doesn't seem to fit that scenario. IPv6 networks are cumbersome and is very difficult to provide a default behavior one-fits-all that is actually useful. And lots of IoT gadgets are not IPv6 ready, so everything should be dual stack, and to be honest, dual stack feels not so useful right now.

With more perspective (from when I started the issue), I think that it is too soon to give support for IPv6 --I feel it would be a waste of efforts given the current IPv6 ecosystem.

It is too late for any platform or product to not be fully embracing IPv6.
IPv6 is no different to IPv4. IPv6 is no more confusing, cumbersome, difficult or any other descriptor that is being thrown around than IPv4 was.
It is becoming common place - especially for major ISP's in the USA.

What is difficult (in my experience) is docker networking and IPv6. But that shouldn't hinder the implementation of IPv6 for Home Assistant/Hass.io.

@TheZoker
Copy link

I Germany many ISPs only offer dslite, where you have a public IPv6 but no IPv4. So if I want to use HA outside my network, I need to use IPv6.
Adding the ::0 value to the server_host does work for me. So why is it not recommend to use it with hassio?

And I agree, that IPv6 is the future and it should be supported as soon as possible (not only Hassio, but all applications in general).

@stale
Copy link

stale bot commented Apr 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2019
@stale stale bot closed this as completed Apr 23, 2019
@troykelly
Copy link

This really should stay open.
IPv6 support is exceptionally important

@codyc1515
Copy link

Can we please re-open this? To the people saying it’s too soon for IPv6, it’s been 26 years.

@agners
Copy link
Member

agners commented Jan 31, 2024

@codyc1515 just to be clear, on a host level Home Assistant Supervisor supports IPv6: The Core runs in host network mode, as well as Add-on which have host network enabled. Those can directly communicate using IPv6. Also the Supervisor supports setting IPv6 addresses through its network configuration setting.

What currently is missing is IPv6 support for the internal isolated hassio network, and add-ons which use this network option (as opposed to host network). This is planned and tracked with #2133.

@codyc1515
Copy link

Thanks for clarifying. I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants