Skip to content

static_ip.conf

Calin Crisan edited this page Sep 16, 2022 · 4 revisions

File Location And Role

The file lives at /data/etc/static_ip.conf. It can be provisioned using /boot/static_ip.conf and uses /etc/static_ip.conf as a default.

If the file is present at all, values defined by it are used to control the static IP configuration of the system.

File Format

This is a simple shell script that should contain only NAME="value" lines. The file is sourced by the network init script.

Available Variables

STATIC_IP

If set, will assign the defined static IP to the first enabled network interface. Remaining enabled connections will use DHCP.

The format is the following: ip/mask (e.g. 192.168.1.16/24).

STATIC_IP_<iface>

If set, will assign the defined static IP to the given network interface. The complete, uppercase network interface name must be used, such as STATIC_IP_ETH0.

The format is identical to STATIC_IP.

STATIC_GW

If set, will be used as the default gateway (e.g. 192.168.1.1).

STATIC_DNS

If set, will be used to set the DNS server (e.g. 8.8.8.8).

Clone this wiki locally