e7c52139aa
NetworkManager is quite capable to do automatic interface configuration. NetworkManager will by default try to auto-configure any interface with no configuration. It will use DHCP for IPv4 and Router Advertisements to decide how to initialize IPv6. It will most likely do it just as good, or better than the dhcp-all-interfaces.sh script. Since dhcp-all-interfaces clean out all ifcfg files in 60-remove-cloud-image-interfaces it means NetworkManager will by default attempt auto configuration for all interfaces. This change add's and environment variable: DIB_DHCP_NETWORK_MANAGER_AUTO (default: false) When DIB_DHCP_NETWORK_MANAGER_AUTO is set to `true` only the NetworkManager config will be written. The dhcp-all-interfaces service will not be installed. Hence dhcp-all-interfaces will not write any config files, allowing NetworkManager to just do it's thing. Change-Id: Id6f8d6aaaf52a78175bb6c065ec88274c364834e
42 lines
1.7 KiB
ReStructuredText
42 lines
1.7 KiB
ReStructuredText
===================
|
|
dhcp-all-interfaces
|
|
===================
|
|
Autodetect network interfaces during boot and configure them for DHCP
|
|
|
|
The rationale for this is that we are likely to require multiple
|
|
network interfaces for use cases such as baremetal and there is no way
|
|
to know ahead of time which one is which, so we will simply run a
|
|
DHCP client on all interfaces with real MAC addresses (except lo) that
|
|
are visible on the first boot.
|
|
|
|
On non-Gentoo based distributions the script
|
|
/usr/local/sbin/dhcp-all-interfaces.sh will be called early in each
|
|
boot and will scan available network interfaces and ensure they are
|
|
configured properly before networking services are started.
|
|
|
|
On Gentoo based distributions we will install the dhcpcd package and
|
|
ensure the service starts at boot. This service automatically sets
|
|
up all interfaces found via dhcp and/or dhcpv6 (or SLAAC).
|
|
|
|
Environment Variables
|
|
---------------------
|
|
|
|
DIB_DHCP_TIMEOUT
|
|
:Required: No
|
|
:Default: 30
|
|
:Description: Amount of time in seconds that the systemd service(or dhclient)
|
|
will wait to get an address. Should be increased in networks such as
|
|
Infiniband.
|
|
:Example: DIB_DHCP_TIMEOUT=300
|
|
|
|
DIB_DHCP_NETWORK_MANAGER_AUTO
|
|
:Required: No
|
|
:Default: false
|
|
:Description: When NetworkManager is detected, and this is set to true the
|
|
dhcp-all-interfaces service will not be installed. Only the NetworkManager
|
|
configuration will be added. NetworkManager is quite capable to do automatic
|
|
interface configuration. NetworkManager will by default try to
|
|
auto-configure any interface with no configuration, it will use DHCP for
|
|
IPv4 and Router Advertisements to decide how to initialize IPv6.
|
|
:Example: DIB_DHCP_NETWORK_MANAGER_AUTO=true
|