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

Documentation: make dhcp4 & dhcp6 docs match website homepage #373

Closed
wants to merge 1 commit into from
Closed

Documentation: make dhcp4 & dhcp6 docs match website homepage #373

wants to merge 1 commit into from

Conversation

triatic
Copy link

@triatic triatic commented Jun 24, 2023

No description provided.

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @triatic thank you for your contribution to Netplan.

Could you please give some more context on this change? AFAIU the dhcp4 & dhcp6 settings are off by default on the networkd AND NetworkManager backends. so I wonder where this change comes from? What do you mean by "match website homepage"?

TIA.

@triatic
Copy link
Author

triatic commented Jun 26, 2023

Hi @slyon

I have pasted a screenshot of https://netplan.io/ below.

It seems pretty clear that when renderer: NetworkManager is utilised, DHCP is automatically enabled without further configuration.

It could be the homepage is wrong here?

image

@slyon
Copy link
Collaborator

slyon commented Jun 26, 2023

Oh I see. Yes, the senteces on Netplan's website might be a bit unclear here... We should file an issue against this repository instead: https://github.com/canonical/netplan.io/blob/main/templates/index.html

What do you think about the following wording wording?

Configuration

Without configuration, Netplan will not do anything. The simplest configuration snippet (to bring up things via DHCP on workstations) is as follows:

network:
  version: 2
  renderer: NetworkManager

This will make Netplan hand over control to NetworkManager, which will manage all devices in its default way (i.e. any ethernet device will come up with DHCP once carrier is detected).

When individual interface configurations are given, it will not let devices automatically come up using DHCP, but each interface needs to be specified in a file in /etc/netplan/ with its explicit YAML settings for the networkd or NetworkManager backend renderers.

@triatic
Copy link
Author

triatic commented Jun 26, 2023

@slyon that is much more informative. I wasn't even aware that manually specifying interface configurations is what causes DHCP to auto off. This information should also be added to the dhcp4 and dhcp6 sections in the documentation I think.

@slyon
Copy link
Collaborator

slyon commented Jun 26, 2023

@slyon that is much more informative. I wasn't even aware that manually specifying interface configurations is what causes DHCP to auto off. This information should also be added to the dhcp4 and dhcp6 sections in the documentation I think.

Well, I guess it's already in the docs, e.g.

dhcp4 (bool)

Enable DHCP for IPv4. Off by default.

The only special case is the one mentioned on the website, where no interface definitions are given and control is just handed over to NetworkManager.

@triatic
Copy link
Author

triatic commented Jun 26, 2023

"Off by default, unless NetworkManager is the renderer and no interface definitions are given." would work.

Otherwise people assume DHCP is always defaulted to off and must be enabled in an interface definition in every case, unless they had happened to browse https://netplan.io/ .

@slyon
Copy link
Collaborator

slyon commented Jun 28, 2023

"Off by default, unless NetworkManager is the renderer and no interface definitions are given." would work.

Well, strictly speaking yes. But OTOH this snippet is a special case, which should be described elsewhere in the documentation (maybe it is already? I need to search), instead of leaking that information into the dhcp4/dhcp6 settings, as it might confuse people. I'd rather like to keep those as brief as possible.

network:
  version: 2
  renderer: NetworkManager

I'll try to create a PR for the netplan.io website to update the working and search for a place where we could describe that "NetworkManager manages everything" special case.

@slyon
Copy link
Collaborator

slyon commented Jul 10, 2023

I'm closing this in favour of #378

@slyon slyon closed this Jul 10, 2023
slyon added a commit that referenced this pull request Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants