]> git.proxmox.com Git - mirror_ifupdown2.git/blame - man/interfaces.5
Merge pull request #80 from BarbarossaTM/tunnel-fixes-master
[mirror_ifupdown2.git] / man / interfaces.5
CommitLineData
f82758bf
RP
1.\" Man page generated from reStructeredText.
2.
3.TH INTERFACES 5 "2014-02-05" "0.1" ""
4.SH NAME
5interfaces \- network interface configuration for ifupdown
6.
7.nr rst2man-indent-level 0
8.
9.de1 rstReportMargin
10\\$1 \\n[an-margin]
11level \\n[rst2man-indent-level]
12level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
13-
14\\n[rst2man-indent0]
15\\n[rst2man-indent1]
16\\n[rst2man-indent2]
17..
18.de1 INDENT
19.\" .rstReportMargin pre:
20. RS \\$1
21. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22. nr rst2man-indent-level +1
23.\" .rstReportMargin post:
24..
25.de UNINDENT
26. RE
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
32..
33.SH DESCRIPTION
34.INDENT 0.0
35.INDENT 3.5
36\fB/etc/network/interfaces\fP contains network interface configuration
37information for the \fBifup(8)\fP, \fBifdown(8)\fP and \fBifquery(8)\fP commands.
38.sp
39This is where you configure how your system is connected to the network.
40.sp
41Lines starting with # are ignored. Note that end\-of\-line comments are
42NOT supported, comments must be on a line of their own.
43.sp
44A line may be extended across multiple lines by making the last character
45a backslash.
46.sp
47The file consists of zero or more "iface", "auto", "allow\-"
48and "source" stanzas. Here is an example:
49.sp
50.nf
51.ft C
52auto lo eth0
53allow\-hotplug eth1
54
55iface lo inet loopback
56
57source /etc/network/interfaces.d/bridges
58
59iface eth0 inet static
60 address 192.168.1.1/24
61 up flush\-mail
62
63iface eth1 inet dhcp
64.ft P
65.fi
66.sp
67Lines beginning with the word "auto" are used to identify the physical
68interfaces 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
70should follow the word "auto" on the same line. There can be multiple
71"auto" stanzas.
72.sp
73Lines beginning with "allow\-" are used to identify interfaces that
4b061e44 74should be brought up automatically by various subsystems. This may be
f82758bf
RP
75done using a command such as "ifup \-\-allow=hotplug eth0 eth1", which
76will only bring up eth0 or eth1 if it is listed in an "allow\-hotplug"
77line. Note that "allow\-auto" and "auto" are synonyms.
78.sp
79Lines beginning with "source" are used to include stanzas from other
80files, so configuration can be split into many files. The word "source"
81is followed by the path of file to be sourced. Shell wildcards can be
82used. Currently only supports absolute
83path names.
84.sp
85iface is normally given a interface name as its first non\-option
86argument.
87.sp
88The interface name is followed by the name of the address family that the
89interface uses. This will be "inet" for TCP/IP networking and inet6 for
90ipv6. Following that is the name of the method used to configure the
91interface.
92.sp
93ifupdown supports iface stanzas without a family or a method. This enables
94using the same stanza for inet and inet6 family addresses. And the method
95defaults to "static"
96.sp
97Additional interface options/attributes can be given on subsequent lines
98in the iface stanza. These options come from addon modules. see
99\fBifupdown\-addons\-interfaces(5)\fP for these options.
100.sp
101example bridge interface with additional attributes listed in the
102\fBifupdown\-addons\-interfaces(5)\fP man page:
103.sp
104.nf
105.ft C
106auto br0
107iface br0
108 address 12.0.0.4/24
109 address 2000:1000:1000:1000:3::5/128
110 bridge\-ports swp1 swp2 swp3
111 bridge\-stp on
112.ft P
113.fi
114.sp
115ifupdown supports python\-mako style templates in the interfaces file.
116See examples section for details.
117.sp
118See \fB/usr/share/doc/python\-ifupdown2/examples/\fP for \fBinterfaces(5)\fP
119file examples and interfaces file generation scripts.
120.UNINDENT
121.UNINDENT
122.SH METHODS
123.INDENT 0.0
124.INDENT 3.5
125Both \fBinet\fP and \fBinet6\fP address family interfaces can use the following
126methods (However they are not required):
127.INDENT 0.0
128.TP
129.B The loopback Method
130This method may be used to define the loopback interface.
131.TP
132.B The static Method
133This method may be used to define ethernet interfaces with
134statically allocated addresses.
135.TP
136.B The dhcp Method
137This method may be used to obtain an address via DHCP.
138.UNINDENT
139.UNINDENT
140.UNINDENT
141.SH BUILTIN INTERFACES
142.INDENT 0.0
143.INDENT 3.5
144\fBiface\fP sections for some interfaces like physical interfaces or vlan
145interfaces in dot notation (like eth1.100) are understood by ifupdown.
146These interfaces do not need an entry in the interfaces file if
147they are dependents of other interfaces and dont need any specific
148configurations like addresses etc.
149.UNINDENT
150.UNINDENT
151.SH EXAMPLES
152.INDENT 0.0
153.INDENT 3.5
154Sample /etc/network/interfaces file:
155.sp
156.nf
157.ft C
158auto lo
159iface lo
160 address 192.168.2.0/24
161 address 2001:dee:eeee:1::4/128
162
163auto eth0
164iface eth0 inet dhcp
165
166auto eth1
167iface eth1 inet manual
168 address 192.168.2.0/24
169 address 2001:dee:eeee:1::4/128
170
171# source files from a directory /etc/network/interfaces.d
172source /etc/network/interfaces.d/*
173
174# Using mako style templates
175% for v in [11,12]:
176 auto vlan${v}
177 iface vlan${v} inet static
178 address 10.20.${v}.3/24
179% endfor
180.ft P
181.fi
182.sp
183For additional syntax and examples see \fBifupdown\-addons\-interfaces(5)\fP
184.UNINDENT
185.UNINDENT
186.SH FILES
187.INDENT 0.0
188.INDENT 3.5
189/etc/network/interfaces
190.UNINDENT
191.UNINDENT
192.SH SEE ALSO
193.INDENT 0.0
194.INDENT 3.5
195ifupdown\-addons\-interfaces(5),
196ifup(8),
197ifquery(8),
198ifreload(8)
199.UNINDENT
200.UNINDENT
201.SH AUTHOR
202Roopa Prabhu <roopa@cumulusnetworks.com>
203.SH COPYRIGHT
204Copyright 2014 Cumulus Networks, Inc. All rights reserved.
205.\" Generated by docutils manpage writer.
206.\"
207.