1 .\" Man page generated from reStructeredText.
3 .TH INTERFACES 5 "2014-02-05" "0.1" ""
5 interfaces \- network interface configuration for ifupdown
7 .nr rst2man-indent-level 0
11 level \\n[rst2man-indent-level]
12 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
19 .\" .rstReportMargin pre:
21 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22 . nr rst2man-indent-level +1
23 .\" .rstReportMargin post:
27 .\" indent \\n[an-margin]
28 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .nr rst2man-indent-level -1
30 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
36 \fB/etc/network/interfaces\fP contains network interface configuration
37 information for the \fBifup(8)\fP, \fBifdown(8)\fP and \fBifquery(8)\fP commands.
39 This is where you configure how your system is connected to the network.
41 Lines starting with # are ignored. Note that end\-of\-line comments are
42 NOT supported, comments must be on a line of their own.
44 A line may be extended across multiple lines by making the last character
47 The file consists of zero or more "iface", "auto", "allow\-"
48 and "source" stanzas. Here is an example:
55 iface lo inet loopback
57 source /etc/network/interfaces.d/bridges
59 iface eth0 inet static
60 address 192.168.1.1/24
67 Lines beginning with the word "auto" are used to identify the physical
68 interfaces to be brought up when ifup is run with the \-a option.
69 (This option is used by the system boot scripts.) Physical interface names
70 should follow the word "auto" on the same line. There can be multiple
73 Lines beginning with "allow\-" are used to identify interfaces that
74 should be brought up automatically by various subsytems. This may be
75 done using a command such as "ifup \-\-allow=hotplug eth0 eth1", which
76 will only bring up eth0 or eth1 if it is listed in an "allow\-hotplug"
77 line. Note that "allow\-auto" and "auto" are synonyms.
79 Lines beginning with "source" are used to include stanzas from other
80 files, so configuration can be split into many files. The word "source"
81 is followed by the path of file to be sourced. Shell wildcards can be
82 used. Currently only supports absolute
85 iface is normally given a interface name as its first non\-option
88 The interface name is followed by the name of the address family that the
89 interface uses. This will be "inet" for TCP/IP networking and inet6 for
90 ipv6. Following that is the name of the method used to configure the
93 ifupdown supports iface stanzas without a family or a method. This enables
94 using the same stanza for inet and inet6 family addresses. And the method
97 Additional interface options/attributes can be given on subsequent lines
98 in the iface stanza. These options come from addon modules. see
99 \fBifupdown\-addons\-interfaces(5)\fP for these options.
101 example bridge interface with additional attributes listed in the
102 \fBifupdown\-addons\-interfaces(5)\fP man page:
109 address 2000:1000:1000:1000:3::5/128
110 bridge\-ports swp1 swp2 swp3
115 ifupdown supports python\-mako style templates in the interfaces file.
116 See examples section for details.
118 See \fB/usr/share/doc/python\-ifupdown2/examples/\fP for \fBinterfaces(5)\fP
119 file examples and interfaces file generation scripts.
125 Both \fBinet\fP and \fBinet6\fP address family interfaces can use the following
126 methods (However they are not required):
129 .B The loopback Method
130 This method may be used to define the loopback interface.
133 This method may be used to define ethernet interfaces with
134 statically allocated addresses.
137 This method may be used to obtain an address via DHCP.
141 .SH BUILTIN INTERFACES
144 \fBiface\fP sections for some interfaces like physical interfaces or vlan
145 interfaces in dot notation (like eth1.100) are understood by ifupdown.
146 These interfaces do not need an entry in the interfaces file if
147 they are dependents of other interfaces and dont need any specific
148 configurations like addresses etc.
154 Sample /etc/network/interfaces file:
160 address 192.168.2.0/24
161 address 2001:dee:eeee:1::4/128
167 iface eth1 inet manual
168 address 192.168.2.0/24
169 address 2001:dee:eeee:1::4/128
171 # source files from a directory /etc/network/interfaces.d
172 source /etc/network/interfaces.d/*
174 # Using mako style templates
177 iface vlan${v} inet static
178 address 10.20.${v}.3/24
183 For additional syntax and examples see \fBifupdown\-addons\-interfaces(5)\fP
189 /etc/network/interfaces
195 ifupdown\-addons\-interfaces(5),
202 Roopa Prabhu <roopa@cumulusnetworks.com>
204 Copyright 2014 Cumulus Networks, Inc. All rights reserved.
205 .\" Generated by docutils manpage writer.