.\" Generated by scdoc 1.11.2 .\" 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" "2022-10-15" .P .SH NAME .P \fB/etc/network/interfaces\fR - interface configuration database .P .SH DESCRIPTION .P 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.\& .P In most cases, syntax from legacy implementations is supported as well, but that syntax is not discussed in detail here.\& .P .SH FILE SYNTAX .P The interface configuration database is composed of a series of stanzas.\& Hash symbols designate comments, which are ignored by the system.\& .P 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.\& .P All keywords are case-sensitive and are expected to be lower-case.\& .P The following is a simple example of a stanza: .P .nf .RS 4 auto eth0 iface eth0 address 203\&.0\&.113\&.2/24 gateway 203\&.0\&.113\&.1 .fi .RE .P 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.\& .P .SH SUPPORTED KEYWORDS FOR UNASSOCIATED TRIPLES .P \fBauto\fR \fIobject\fR .RS 4 Designates that \fIobject\fR should be automatically configured by the system when appropriate.\& .P .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.\& .P .RE \fBsource\fR \fIfilename\fR .RS 4 Includes the file \fIfilename\fR as configuration data.\& .P .RE \fBsource-directory\fR \fIdirectory\fR .RS 4 Includes the files in \fIdirectory\fR as configuration data.\& .P .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.\& .P .RE .SH SUPPORTED KEYWORDS FOR OBJECT TRIPLES .P Any keyword may be used inside an interface declaration block, but the system will only respond to certain keywords by default: .P \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.\& .P .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.\& .P .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.\& .P .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).\& .P .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).\& .P .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.\& .P .RE \fBalias\fR \fIalias\fR .RS 4 Sets the given alias on the interface.\& .P .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.\& .P .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.\& .P .RE \fBuse\fR \fIexecutor\fR .RS 4 Designates that an executor should be used.\& See \fIEXECUTORS\fR section for more information on executors.\& .P .RE \fBpre-down\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR before taking the interface down.\& .P .RE \fBdown\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR when the interface is taken down.\& .P .RE \fBpost-down\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR after taking the interface down.\& .P .RE \fBpre-up\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR before bringing the interface up.\& .P .RE \fBup\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR when the interface is brought up.\& .P .RE \fBpost-up\fR \fIcommand\fR .RS 4 Runs \fIcommand\fR after bringing the interface up.\& .P .RE Additional packages such as \fBbonding\fR, \fBbridge\fR, \fBtunnel\fR, \fBvrf\fR and \fBvxlan\fR add additional keywords to this vocabulary.\& .P .SH EXECUTORS .P 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: .P \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.\& .P .RE \fBbond\fR .RS 4 The interface is a bonded interface.\& Configuration of bonded interfaces requires the \fBbonding\fR package to be installed.\& .P .RE \fBbridge\fR .RS 4 The interface is an ethernet bridge.\& Configuration of ethernet bridges requires the \fBbridge\fR package to be installed.\& .P .RE \fBdhcp\fR .RS 4 Use a DHCP client to learn the IPv4 address of an interface.\& .P .RE \fBforward\fR .RS 4 Configures forwarding settings on the interface.\& .P .RE \fBloopback\fR .RS 4 Designates the interface as a loopback device.\& .P .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.\& .P .RE \fBtunnel\fR .RS 4 The interface is a tunnel.\& Configuration of tunnels requires the \fBtunnel\fR package to be installed on Alpine Linux.\& .P .RE \fBvrf\fR .RS 4 The interface is a VRF.\& Configuration of VRFs requires the \fBvrf\fR package to be installed.\& .P .RE \fBvxlan\fR .RS 4 The interface is a Virtual Extensible LAN (VXLAN) tunnel endpoint.\& .P .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.\& .P .RE \fBwireguard\fR .RS 4 The interface is a Wireguard VPN tunnel endpoint.\& .P .RE Check \fBinterfaces-(5)\fR for further informaton about a given executor and available configuration parameters.\& .P 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.\& .P .SH EXAMPLES .P 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: .P .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 .P Configure a network interface to use DHCP to learn its IPv4 address: .P .nf .RS 4 auto eth0 iface eth0 use dhcp .fi .RE .P .SH SEE ALSO .P \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) .P .SH AUTHORS .P Ariadne Conill .br Maximilian Wilhelm