Current version: 0.1.0
netdog is a small helper program for wicked, to apply network settings received from DHCP. It
generates /etc/resolv.conf
, generates and sets the hostname, and persists the current IP to a
file.
It contains two subcommands meant for use as settings generators:
node-ip
: returns the node's current IP address in JSON formatgenerate-hostname
: returns the node's hostname in JSON format. If the lookup is unsuccessful, the IP of the node is used.
The subcommand set-hostname
sets the hostname for the system.
The subcommand generate-net-config
generates the network interface configuration for the host. If
a net.toml
file exists in /var/lib/bottlerocket
, it is used to generate the configuration. If
net.toml
doesn't exist, the kernel command line /proc/cmdline
is checked for the prefix
netdog.default-interface
. If an interface is defined with that prefix, it is used to generate an
interface configuration. A single default interface may be defined on the kernel command line with
the format: netdog.default-interface=interface-name:option1,option2
. "interface-name" is the
name of the interface, and valid options are "dhcp4" and "dhcp6". A "?" may be added to the option
to signify that the lease for the protocol is optional and the system shouldn't wait for it. A
valid example: netdog.default-interface=eno1:dhcp4,dhcp6?
.
The subcommand write-resolv-conf
writes the resolv.conf, favoring DNS API settings and
supplementing any missing settings with DNS settings from the primary interface's DHCP lease. It
is meant to be used as a restart command for DNS API settings.
This text was generated using cargo-readme, and includes the rustdoc from src/main.rs
.