]>
Commit | Line | Data |
---|---|---|
f82758bf RP |
1 | .\" Man page generated from reStructeredText. |
2 | . | |
3 | .TH INTERFACES 5 "2014-02-05" "0.1" "" | |
4 | .SH NAME | |
5 | interfaces \- network interface configuration for ifupdown | |
6 | . | |
7 | .nr rst2man-indent-level 0 | |
8 | . | |
9 | .de1 rstReportMargin | |
10 | \\$1 \\n[an-margin] | |
11 | level \\n[rst2man-indent-level] | |
12 | level 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 | |
37 | information for the \fBifup(8)\fP, \fBifdown(8)\fP and \fBifquery(8)\fP commands. | |
38 | .sp | |
39 | This is where you configure how your system is connected to the network. | |
40 | .sp | |
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. | |
43 | .sp | |
44 | A line may be extended across multiple lines by making the last character | |
45 | a backslash. | |
46 | .sp | |
47 | The file consists of zero or more "iface", "auto", "allow\-" | |
48 | and "source" stanzas. Here is an example: | |
49 | .sp | |
50 | .nf | |
51 | .ft C | |
52 | auto lo eth0 | |
53 | allow\-hotplug eth1 | |
54 | ||
55 | iface lo inet loopback | |
56 | ||
57 | source /etc/network/interfaces.d/bridges | |
58 | ||
59 | iface eth0 inet static | |
60 | address 192.168.1.1/24 | |
61 | up flush\-mail | |
62 | ||
63 | iface eth1 inet dhcp | |
64 | .ft P | |
65 | .fi | |
66 | .sp | |
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 | |
71 | "auto" stanzas. | |
72 | .sp | |
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. | |
78 | .sp | |
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 | |
83 | path names. | |
84 | .sp | |
85 | iface is normally given a interface name as its first non\-option | |
86 | argument. | |
87 | .sp | |
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 | |
91 | interface. | |
92 | .sp | |
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 | |
95 | defaults to "static" | |
96 | .sp | |
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. | |
100 | .sp | |
101 | example bridge interface with additional attributes listed in the | |
102 | \fBifupdown\-addons\-interfaces(5)\fP man page: | |
103 | .sp | |
104 | .nf | |
105 | .ft C | |
106 | auto br0 | |
107 | iface 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 | |
115 | ifupdown supports python\-mako style templates in the interfaces file. | |
116 | See examples section for details. | |
117 | .sp | |
118 | See \fB/usr/share/doc/python\-ifupdown2/examples/\fP for \fBinterfaces(5)\fP | |
119 | file examples and interfaces file generation scripts. | |
120 | .UNINDENT | |
121 | .UNINDENT | |
122 | .SH METHODS | |
123 | .INDENT 0.0 | |
124 | .INDENT 3.5 | |
125 | Both \fBinet\fP and \fBinet6\fP address family interfaces can use the following | |
126 | methods (However they are not required): | |
127 | .INDENT 0.0 | |
128 | .TP | |
129 | .B The loopback Method | |
130 | This method may be used to define the loopback interface. | |
131 | .TP | |
132 | .B The static Method | |
133 | This method may be used to define ethernet interfaces with | |
134 | statically allocated addresses. | |
135 | .TP | |
136 | .B The dhcp Method | |
137 | This 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 | |
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. | |
149 | .UNINDENT | |
150 | .UNINDENT | |
151 | .SH EXAMPLES | |
152 | .INDENT 0.0 | |
153 | .INDENT 3.5 | |
154 | Sample /etc/network/interfaces file: | |
155 | .sp | |
156 | .nf | |
157 | .ft C | |
158 | auto lo | |
159 | iface lo | |
160 | address 192.168.2.0/24 | |
161 | address 2001:dee:eeee:1::4/128 | |
162 | ||
163 | auto eth0 | |
164 | iface eth0 inet dhcp | |
165 | ||
166 | auto eth1 | |
167 | iface 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 | |
172 | source /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 | |
183 | For 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 | |
195 | ifupdown\-addons\-interfaces(5), | |
196 | ifup(8), | |
197 | ifquery(8), | |
198 | ifreload(8) | |
199 | .UNINDENT | |
200 | .UNINDENT | |
201 | .SH AUTHOR | |
202 | Roopa Prabhu <roopa@cumulusnetworks.com> | |
203 | .SH COPYRIGHT | |
204 | Copyright 2014 Cumulus Networks, Inc. All rights reserved. | |
205 | .\" Generated by docutils manpage writer. | |
206 | .\" | |
207 | . |