network-data¶
A map of ssh public keys to install for the root user
This is a named set of key/value pairs. All data elements are strings. When entering numbers like vlan id or other single number values, these must be quoted as strings.
This allows for the create of a named network with additional information about the network. Known supported keys within a network are:
name
= the name of the network again (same as key)dhcp
= yes/no/true/false as a string. Remember to quote true or false.vlan
= VLAN ID number - Remember to quote numbers.mtu
= MTU for this network - Remember to quote numbers.gateway
= IPv4 Gateway addressnetmask
= IPv4 Netmaksaddress
= IPv4 Address - In some cases, this will NOT be required. DNS lookups...interface
= a comma separated list of interfaces to used e.g. eth0,enp0s3 - if needed. (Seeinterfaces
Note section below for additional details)routes
= a list of route objectsdns-servers
= a list of dns-servers (though generally this is specified with the dns-servers parameter)bond-name
= The name of the bond to create.bond-interfaces
= A comma separated list of interfaces to add to the bond.bond-miimon
= The mii monitor in milliseconds of the bonded interfaces should use.bond-mode
= The mode the bonded interfaces should use. This must be the string forms, e.g.802.3ad
bond-lacp-xmit-hash
= The LACP XMIT Hash method This must be the string forms, e.g.encap3+4
bond-lacp-rate
= Should LACP usefast
orslow
modesbond-mac
= The MAC address to set for the bond. THIS SHOULD NOT BE USED WITHOUT DUE CONSIDERATIONbond-inteface-macs
= A comma seperated list of mac addresses to set on the bond-interfaces. THIS SHOULD NOT BE USED WITHOUT DUE CONSIDERATIONdebug-network-config
= if set to something, sledgehammer will stop to debug initial networking in stage1
Leave the element out if not needed.
The vlan and mtu will be applied on top of the bond, if the bond is specified.
The all
network can be used to define things that should apply to all networks. This is meant for dns-servers
and routes currently.
For example:
all: # Special non-network to hold global-level things of routes and dns-servers
routes:
- network: 20.20.20.0
gateway: 192.168.2.1
netmask: 255.255.255.0
interface: eth1
dns-servers:
- 8.8.8.8
- 8.8.4.4
prov:
name: prov
dhcp: yes
routes:
- network: 10.10.10.0
gateway: 192.168.1.1
netmask: 255.255.255.0
interface: eth0
prod:
name: prod
dhcp: no
gateway: 10.2.3.1
netmask: 255.255.255.0
address: 10.2.3.15
stor:
name: stor
dhcp: no
gateway: 10.3.3.1
netmask: 255.255.255.0
address: 10.3.3.15
vlan: "2335"
interface: "eth0,enp0s3"
{
"all": {
"dns-servers": [
"8.8.8.8",
"8.8.4.4"
],
"routes": [
{
"gateway": "192.168.2.1",
"interface": "eth1",
"netmask": "255.255.255.0",
"network": "20.20.20.0"
}
]
},
"prod": {
"address": "10.2.3.15",
"dhcp": false,
"gateway": "10.2.3.1",
"name": "prod",
"netmask": "255.255.255.0"
},
"prov": {
"dhcp": true,
"name": "prov",
"routes": [
{
"gateway": "192.168.1.1",
"interface": "eth0",
"netmask": "255.255.255.0",
"network": "10.10.10.0"
}
]
},
"stor": {
"address": "10.3.3.15",
"dhcp": false,
"gateway": "10.3.3.1",
"interface": "eth0,enp0s3",
"name": "stor",
"netmask": "255.255.255.0",
"vlan": "2335"
}
}
!!! note Interfaces Naming Information
Network interface names will change depending on the booting situation and specific kernel and
kernel compiled options in use at the time of boot.
The list is for handling naming issues where the NIC interface name may change depending on the
booting environment. The first interface name in the comma separated list that is found on the
system is used.
For Virtual Media ISO boot, the initial Stage 1 of Sledgehammer will iterate the NIC interfaces
as `eth0`, `eth1`, etc. Stage 2 boot of Sledgehammer will iterate them (for example) as `eno1`,
`eno2`, etc. Subsequently installed Linux distros may iterate them yet again, differently.
Here is a valid example of the different names potentially found on a Dell server (Sledgehammer
Stage 1, Sledgehammer Stage 2, Ubuntu 24.04):
- `eth1,eno2,enp1s0f1`