interfaces(5)
π interfaces(5) β the File Formats Manual one, bestie π
okay so this is the page for /etc/network/interfaces, from interfaces(5) in the File Formats Manual. buckle up, it's actually so good.
β¨ NAME β¨
/etc/network/interfaces β the interface configuration database πΈ
π¦ DESCRIPTION π¦
The /etc/network/interfaces file is the place where you tell the system how your network interfaces get configured. it's read and acted on by ifquery(8), ifup(8) and ifdown(8) β those three use it to peek at system state and to actually change it. so like, it's not decorative, it's doing real work π
ngl, in most cases syntax from legacy implementations is supported too?? but the manpage is like "we're not getting into that here," so we're not either. periodt.
π FILE SYNTAX π
The interface configuration database is made of a series of stanzas. hash symbols (#) mark comments, and the system just ignores those. π
A stanza is a collection of triples, and a triple is a key + value combo that's related to an object. triples that aren't associated with an object are considered part of the root of the configuration tree. it's giving tree structure, iykyk π³
β οΈ All keywords are case-sensitive and are expected to be lower-case. don't get cute with the capitals bestie, the parser will simply not know her.
here's a simple little baby stanza example:
auto eth0
iface eth0
address 203.0.113.2/24
gateway 203.0.113.1
so this stanza defines an interface named eth0, configured with an address of 203.0.113.2 and gateway of 203.0.113.1. iconic. π
β¨ SUPPORTED KEYWORDS FOR UNASSOCIATED TRIPLES β¨
these are the ones that live at the root of the config tree, no object attached:
autoobject β says that object should be automatically configured by the system when appropriate. very "handle it for me" of you π«Άifaceobject β starts a brand new declaration for object. any child keyword associated with the declaration gets stored inside object. this is the main character keyword honestly πsourcefilename β includes the file filename as configuration data. shell wildcards can be used here! seewordexp(3). πsource-directorydirectory β includes the files in directory as configuration data.templateobject β starts a new declaration for object, just likeifacedoes, EXCEPT that object is defined as a template. π§
π SUPPORTED KEYWORDS FOR OBJECT TRIPLES π
so technically any keyword may be used inside an interface declaration block?? but the system will only respond to certain keywords by default. here's the list, bestie:
addressaddress β associates an IPv4 or IPv6 address in CIDR notation with the parent interface. if an IP address is given without a prefix length, a givennetmaskattribute is used if present. if neither a prefix length nor a netmask are given, a/24or/64prefix length is presumed for IPv4 / IPv6, as of compatibility reasons to classic ifupdown. πnetmasknetmask β associates a fallback netmask with the parent interface, for addresses that don't have a CIDR length set. this option is for backwards compatibility and should not be used in new deployments. girl it's legacy, let her rest πpoint-to-pointaddress β sets the given IPv4 address as the peer address on the interface. this setting only takes effect for the IPv4 address familiy and only makes sense in combination with a/32netmask. for compatiblity with ifupdown and ifupdown2,pointopointis an alias for this parameter.gatewayaddress β associates an IPv4 or IPv6 address with the parent interface for use as a default route (gateway). usually you give this once for IPv4 and once for IPv6 (in a Dual-Stack setup). β¨link-typelink-type β denotes the link-type of the interface. when set todummy, the interface is created as a virtual dummy interfaces. when set toveth, the interface is created as virtual veth interface (pair).veth-peer-namepeer-name β denotes the name of the veth peer interfaces. if not set, the kernel will name the veth peer interface asvethN, withNbeing an integer number.aliasalias β sets the given alias on the interface.requiresinterfaces... β designates one or more required interfaces that must be brought up before configuration of the parent interface. interfaces associated with the parent are taken down at the same time as the parent. it's giving "we come as a package" π«Άinheritobject β designates that the configured interface should inherit configuration data from object. normally object must be a template.useexecutor β designates that an executor should be used. see the EXECUTORS section for more info on executors πpre-downcommand β runs command before taking the interface down.downcommand β runs command when the interface is taken down.post-downcommand β runs command after taking the interface down.pre-upcommand β runs command before bringing the interface up.upcommand β runs command when the interface is brought up.post-upcommand β runs command after bringing the interface up.
Additional packages, such as bonding, bridge, tunnel, vrf and vxlan, add additional keywords to this vocabulary. so if you installed extra stuff, expect extra vocabulary, bestie π
π₯ EXECUTORS π₯
The use keyword designates that an executor should be used. this whole system is extendable by additional packages, but the most common executors are:
batmanβ the interface is a B.A.T.M.A.N. adv. mesh interface. configuration of B.A.T.M.A.N. adv. interfaces requires thebatctluntiliy to be installed.bondβ the interface is a bonded interface. configuration of bonded interfaces requires thebondingpackage to be installed.bridgeβ the interface is an ethernet bridge. configuration of ethernet bridges requires thebridgepackage to be installed. πdhcpβ use a DHCP client to learn the IPv4 address of an interface.forwardβ configures forwarding settings on the interface.loopbackβ designates the interface as a loopback device.pppβ designates the interface as a PPP device. configuration of PPP interfaces require thepppand probably thepppoepackages to be installed.tunnelβ the interface is a tunnel. configuration of tunnels requires thetunnelpackage to be installed on Alpine Linux.vrfβ the interface is a VRF. configuration of VRFs requires thevrfpackage to be installed.vxlanβ the interface is a Virtual Extensible LAN (VXLAN) tunnel endpoint.wifiβ the interface is a Wi-Fi (IEEE 802.11) client interface. configuration of the WiFi client interface requires thewireless-toolspackage to be installed. thewpa_supplicantpackage must also be installed to connect to hotspots using WPA-based security. πΆwireguardβ the interface is a Wireguard VPN tunnel endpoint.
Check interfaces-<executor>(5) for further informaton about a given executor and available configuration parameters. π
and!! 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. that's the automation slay of it all π
π EXAMPLES π
Example one: 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
Example two: configure a network interface to use DHCP to learn its IPv4 address:
auto eth0
iface eth0
use dhcp
look at her go ππ
π 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>
and that's the whole page bestie!! this version of interfaces(5) is dated 2025-10-13, and yeah it's the same interfaces(5) from the File Formats Manual you started with. no cap, go configure something iconic π
β¨π
π¦ where this page comes from
- ubuntu resolute: ifupdown-ng 0.12.1-8 Β· MIT-like
- ubuntu stonking: ifupdown-ng 0.12.1-8 Β· MIT-like
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms