Skip to content

static_ip.conf

Calin Crisan edited this page Jun 3, 2017 · 4 revisions

File Location And Role

The file can be found at /data/etc/static_ip.conf. At first boot, it is created from the template file /boot/static.conf, if present, or otherwise from /etc/static.conf, if present.

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 adapter, in this order: wlan0 and eth0. If both wireless and ethernet connections are enabled, the ethernet connection will always use DHCP.

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

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