core/eth0-static-ip
Configure a static IPv4 address for eth0 using ifupdown.
Preview
You're viewing the Next docs — a rolling preview of in-development changes. The current release docs may differ.Configure a static IPv4 address for eth0 using ifupdown.
Inputs
No artifact inputs.
Parameters
-
address -
Required
Static IPv4 address for eth0.
-
gateway -
Required
IPv4 default gateway.
-
netmask -
Required
IPv4 subnet mask in dotted-decimal form.
Scheduling
-
Priority
-
80000 -
Dependencies
-
None
Higher priorities run first within the selected recipe set unless before or
after constraints require otherwise. Dependencies include other recipes
without ordering them.
Behavior
Writes /etc/network/interfaces.d/eth0. The target system must use ifupdown and name the intended interface eth0.
Example
For example, add the recipe to a layer derived from a compatible base:
recipes = ["core/eth0-static-ip"]
[parameters."core/eth0-static-ip"]
address = "192.0.2.10"
gateway = "192.0.2.1"
netmask = "255.255.255.0"