.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "interfaces" "5" "2024-05-06" .PP .SH NAME .PP \fB/etc/network/interfaces\fR - interface configuration database .PP .SH DESCRIPTION .PP The \fB/etc/network/interfaces\fR file is used to specify how network interfaces are configured.\& The file is processed by \fBifquery\fR(8), \fBifup\fR(8) and \fBifdown\fR(8) to introspect and change system state.\& .PP In most cases, syntax from legacy implementations is supported as well, but that syntax is not discussed in detail here.\& .PP .SH FILE SYNTAX .PP The interface configuration database is composed of a series of stanzas.\& Hash symbols designate comments, which are ignored by the system.\& .PP A stanza is a collection of triples, where a triple is a key and value combination that is related to an \fBobject\fR.\& Triples which are not associated with an \fBobject\fR are considered to be part of the root of the configuration tree.\& .PP All keywords are case-sensitive and are expected to be lower-case.\& .PP The following is a simple example of a stanza: .PP .nf .RS 4 auto eth0 iface eth0 address 203\&.0\&.113\&.2/24 gateway 203\&.0\&.113\&.1 .fi .RE .PP This stanza defines an interface named \fBeth0\fR which is configured with an address of \fB203.\&0.\&113.\&2\fR and gateway of \fB203.\&0.\&113.\&1\fR.\& .PP .SH SUPPORTED KEYWORDS FOR UNASSOCIATED TRIPLES .PP \fBauto\fR \fIobject\fR .RS 4 Designates that \fIobject\fR should be automatically configured by the system when appropriate.\& .PP .RE \fBiface\fR \fIobject\fR .RS 4 Begins a new declaration for \fIobject\fR.\& Any child keyword associated with the declaration will be stored inside \fIobject\fR.\& .PP .RE \fBsource\fR \fIfilename\fR .RS 4 Includes the file \fIfilename\fR as configuration data.\& .PP .RE \fBsource-directory\fR \fIdirectory\fR .RS 4 Includes the files in \fIdirectory\fR as configuration data.\& .PP .RE \fBtemplate\fR \fIobject\fR .RS 4 Begins a new declaration for \fIobject\fR, like \fBiface\fR, except that \fIobject\fR is defined as a \fBtemplate\fR.\& .PP .RE .SH SUPPORTED KEYWORDS FOR OBJECT TRIPLES .PP Any keyword may be used inside an interface declaration block, but the system will only respond to certain keywords by default: .PP \fBaddress\fR \fIaddress\fR .RS 4 Associates an IPv4 or IPv6 address in CIDR notation with the parent interface.\& If an IP address without a prefix length is given a given \fInetmask\fR attribute is used if present.\& If neither a prefix length nor a \fInetmask\fR are given a /24 or /64 prefix length is presumed for IPv4 / IPv6 as of compatibility reasons to classic ifupdown.\& .PP .RE \fBnetmask\fR \fInetmask\fR .RS 4 Associates a fallback netmask with the parent interface for addresses which do not have a CIDR length set.\& This option is for backwards compatibility and should not be used in new deployments.\& .PP .RE \fBpoint-to-point\fR \fIaddress\fR .RS 4 Sets the given IPv4 \fIaddress\fR 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 /32 netmask.\& For compatiblity with ifupdown and ifupdown2, \fIpointopoint\fR is an alias for this parameter.\& .PP .RE \fBgateway\fR \fIaddress\fR .RS 4 Associates an IPv4 or IPv6 address with the parent interface for use as a default route (gateway).\& This usually is given once for IPv4 and once for IPv6 (in a Dual-Stack setup).\& .PP .RE \fBlink-type\fR \fIlink-type\fR .RS 4 Denotes the link-type of the interface.\& When set to \fIdummy\fR, the interface is created as a virtual dummy interfaces.\& When set to \fIveth\fR the interface is created as virtual veth interface (pair).\& .PP .RE \fBveth-peer-name\fR \fIpeer-name\fR .RS 4 Denotes the name of the veth peer interfaces.\& If not set the kernel will name the veth peer interface as \fIvethN\fR with N being an integer number.\& .PP .RE \fBalias\fR \fIalias\fR .RS 4 Sets the given alias on the interface.\& .PP .RE \fBrequires\fR \fIinterfaces\fR.\&.\&.\& .RS 4 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.\& .PP .RE \fBinherit\fR \fIobject\fR .RS 4 Designates that the configured interface should inherit configuration data from \fIobject\fR.\& Normally \fIobject\fR must be a \fBtemplate\fR.\& .PP .RE \fBuse\fR \fIexecutor\fR .RS 4 Designates that an executor should be used.\& See \fIEXECUTORS\fR section for more information on executors.\& .PP .RE \fBpre-down\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR before taking the interface down.\& .PP .RE \fBdown\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR when the interface is taken down.\& .PP .RE \fBpost-down\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR after taking the interface down.\& .PP .RE \fBpre-up\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR before bringing the interface up.\& .PP .RE \fBup\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR when the interface is brought up.\& .PP .RE \fBpost-up\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR after bringing the interface up.\& .PP .RE Additional packages such as \fBbonding\fR, \fBbridge\fR, \fBtunnel\fR, \fBvrf\fR and \fBvxlan\fR add additional keywords to this vocabulary.\& .PP .SH EXECUTORS .PP The \fBuse\fR keyword designates that an \fIexecutor\fR should be used.\& This system is extendable by additional packages, but the most common executors are: .PP \fBbatman\fR .RS 4 The interface is a B.\&A.\&T.\&M.\&A.\&N.\& adv.\& mesh interface.\& Configuration of B.\&A.\&T.\&M.\&A.\&N.\& adv.\& interfaces requires the \fBbatctl\fR untiliy to be installed.\& .PP .RE \fBbond\fR .RS 4 The interface is a bonded interface.\& Configuration of bonded interfaces requires the \fBbonding\fR package to be installed.\& .PP .RE \fBbridge\fR .RS 4 The interface is an ethernet bridge.\& Configuration of ethernet bridges requires the \fBbridge\fR package to be installed.\& .PP .RE \fBdhcp\fR .RS 4 Use a DHCP client to learn the IPv4 address of an interface.\& .PP .RE \fBforward\fR .RS 4 Configures forwarding settings on the interface.\& .PP .RE \fBloopback\fR .RS 4 Designates the interface as a loopback device.\& .PP .RE \fBppp\fR .RS 4 Designates the interface as a PPP device.\& Configuration of PPP interfaces require the \fBppp\fR and probably the \fBpppoe\fR packages to be installed.\& .PP .RE \fBtunnel\fR .RS 4 The interface is a tunnel.\& Configuration of tunnels requires the \fBtunnel\fR package to be installed on Alpine Linux.\& .PP .RE \fBvrf\fR .RS 4 The interface is a VRF.\& Configuration of VRFs requires the \fBvrf\fR package to be installed.\& .PP .RE \fBvxlan\fR .RS 4 The interface is a Virtual Extensible LAN (VXLAN) tunnel endpoint.\& .PP .RE \fBwifi\fR .RS 4 The interface is a Wi-Fi (IEEE 802.\&11) client interface.\& Configuration of the WiFi client interface requires the \fBwireless-tools\fR package to be installed.\& The \fBwpa_supplicant\fR package must also be installed to connect to hotspots using WPA-based security.\& .PP .RE \fBwireguard\fR .RS 4 The interface is a Wireguard VPN tunnel endpoint.\& .PP .RE Check \fBinterfaces-(5)\fR for further informaton about a given executor and available configuration parameters.\& .PP If the \fIauto_executor_selection\fR ifupdown-ng.\&conf option is enabled, \fBuse\fR statements will automatically be added for executors when their configuration statements are present in the interfaces file.\& .PP .SH EXAMPLES .PP Configure a bridge interface \fBbr0\fR with \fBbond0\fR attached to it, which is a failover between \fBeth0\fR and \fBeth1\fR.\& This requires the \fBbonding\fR and \fBbridge\fR packages to be installed: .PP .nf .RS 4 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 .fi .RE .PP Configure a network interface to use DHCP to learn its IPv4 address: .PP .nf .RS 4 auto eth0 iface eth0 use dhcp .fi .RE .PP .SH SEE ALSO .PP \fBifstate\fR(5) \fBifupdown-ng.\&conf\fR(5) \fBifup\fR(8) \fBifdown\fR(8) \fBifquery\fR(8) \fBifctrstat\fR(8) \fBinterfaces-batman\fR(5) \fBinterfaces-bond\fR(5) \fBinterfaces-bridge\fR(5) \fBinterfaces-forward\fR(5) \fBinterfaces-mpls\fR(5) \fBinterfaces-ppp\fR(5) \fBinterfaces-tunnel\fR(5) \fBinterfaces-vrf\fR(5) \fBinterfaces-vxlan\fR(5) \fBinterfaces-wifi\fR(5) \fBinterfaces-wireguard\fR(5) .PP .SH AUTHORS .PP Ariadne Conill .br Maximilian Wilhelm