- trixie 0.12.1-7
- testing 0.12.1-7
- unstable 0.12.1-8
- experimental 0.12.1-9~exp1
interfaces(5) | File Formats Manual | interfaces(5) |
NAME¶
/etc/network/interfaces - interface configuration database
DESCRIPTION¶
The /etc/network/interfaces file is used to specify how network interfaces are configured. The file is processed by ifquery(8), ifup(8) and ifdown(8) to introspect and change system state.
In most cases, syntax from legacy implementations is supported as well, but that syntax is not discussed in detail here.
FILE SYNTAX¶
The interface configuration database is composed of a series of stanzas. Hash symbols designate comments, which are ignored by the system.
A stanza is a collection of triples, where a triple is a key and value combination that is related to an object. Triples which are not associated with an object are considered to be part of the root of the configuration tree.
All keywords are case-sensitive and are expected to be lower-case.
The following is a simple example of a stanza:
auto eth0 iface eth0
address 203.0.113.2/24
gateway 203.0.113.1
This stanza defines an interface named eth0 which is configured with an address of 203.0.113.2 and gateway of 203.0.113.1.
SUPPORTED KEYWORDS FOR UNASSOCIATED TRIPLES¶
auto object
iface object
source filename
source-directory directory
template object
SUPPORTED KEYWORDS FOR OBJECT TRIPLES¶
Any keyword may be used inside an interface declaration block, but the system will only respond to certain keywords by default:
address address
netmask netmask
point-to-point address
gateway address
link-type link-type
veth-peer-name peer-name
alias alias
requires interfaces...
inherit object
use executor
pre-down command
down command
post-down command
pre-up command
up command
post-up command
Additional packages such as bonding, bridge, tunnel, vrf and vxlan add additional keywords to this vocabulary.
EXECUTORS¶
The use keyword designates that an executor should be used. This system is extendable by additional packages, but the most common executors are:
batman
bond
bridge
dhcp
forward
loopback
ppp
tunnel
vrf
vxlan
wifi
wireguard
Check interfaces-<executor>(5) for further informaton about a given executor and available configuration parameters.
If the auto_executor_selection ifupdown-ng.conf option is enabled, use statements will automatically be added for executors when their configuration statements are present in the interfaces file.
EXAMPLES¶
Configure a bridge interface br0 with bond0 attached to it, which is a failover between eth0 and eth1. This requires the bonding and bridge packages to be installed:
auto br0 iface br0
use bridge
requires bond0
address 203.0.113.2/24
gateway 203.0.113.1 iface bond0
use bond
requires eth0 eth1
bond-mode 802.3ad
bond-xmit-hash-policy layer2+3
Configure a network interface to use DHCP to learn its IPv4 address:
auto eth0 iface eth0
use dhcp
SEE ALSO¶
ifstate(5) ifupdown-ng.conf(5) ifup(8) ifdown(8) ifquery(8) ifctrstat(8) interfaces-batman(5) interfaces-bond(5) interfaces-bridge(5) interfaces-forward(5) interfaces-mpls(5) interfaces-ppp(5) interfaces-tunnel(5) interfaces-vrf(5) interfaces-vxlan(5) interfaces-wifi(5) interfaces-wireguard(5)
AUTHORS¶
Ariadne Conill <ariadne@dereferenced.org>
Maximilian Wilhelm <max@sdn.clinic>
2025-10-13 |