5 --------------------------------------------
6 network interface configuration for ifupdown
7 --------------------------------------------
9 :Author: Roopa Prabhu <roopa@cumulusnetworks.com>
11 :Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
17 **/etc/network/interfaces** contains network interface configuration
18 information for the **ifup(8)**, **ifdown(8)** and **ifquery(8)** commands.
20 This is where you configure how your system is connected to the network.
22 Lines starting with # are ignored. Note that end-of-line comments are
23 NOT supported, comments must be on a line of their own.
25 A line may be extended across multiple lines by making the last character
28 The file consists of zero or more "iface", "auto", "allow-"
29 and "source" stanzas. Here is an example::
34 iface lo inet loopback
36 source /etc/network/interfaces.d/bridges
38 iface eth0 inet static
39 address 192.168.1.1/24
44 Lines beginning with the word "auto" are used to identify the physical
45 interfaces to be brought up when ifup is run with the -a option.
46 (This option is used by the system boot scripts.) Physical interface names
47 should follow the word "auto" on the same line. There can be multiple
50 Lines beginning with "allow-" are used to identify interfaces that
51 should be brought up automatically by various subsytems. This may be
52 done using a command such as "ifup --allow=hotplug eth0 eth1", which
53 will only bring up eth0 or eth1 if it is listed in an "allow-hotplug"
54 line. Note that "allow-auto" and "auto" are synonyms.
56 Lines beginning with "source" are used to include stanzas from other
57 files, so configuration can be split into many files. The word "source"
58 is followed by the path of file to be sourced. Shell wildcards can be
59 used. Currently only supports absolute
62 iface is normally given a interface name as its first non-option
65 The interface name is followed by the name of the address family that the
66 interface uses. This will be "inet" for TCP/IP networking and inet6 for
67 ipv6. Following that is the name of the method used to configure the
70 ifupdown supports iface stanzas without a family or a method. This enables
71 using the same stanza for inet and inet6 family addresses. And the method
74 Additional interface options/attributes can be given on subsequent lines
75 in the iface stanza. These options come from addon modules. see
76 **ifupdown-addons-interfaces(5)** for these options.
78 example bridge interface with additional attributes listed in the
79 **ifupdown-addons-interfaces(5)** man page::
84 address 2000:1000:1000:1000:3::5/128
85 bridge-ports swp1 swp2 swp3
88 ifupdown supports python-mako style templates in the interfaces file.
89 See examples section for details.
91 See **/usr/share/doc/python-ifupdown2/examples/** for **interfaces(5)**
92 file examples and interfaces file generation scripts.
96 Both **inet** and **inet6** address family interfaces can use the following
97 methods (However they are not required):
100 This method may be used to define the loopback interface.
103 This method may be used to define ethernet interfaces with
104 statically allocated addresses.
107 This method may be used to obtain an address via DHCP.
111 **iface** sections for some interfaces like physical interfaces or vlan
112 interfaces in dot notation (like eth1.100) are understood by ifupdown.
113 These interfaces do not need an entry in the interfaces file if
114 they are dependents of other interfaces and dont need any specific
115 configurations like addresses etc.
119 Sample /etc/network/interfaces file::
123 address 192.168.2.0/24
124 address 2001:dee:eeee:1::4/128
130 iface eth1 inet manual
131 address 192.168.2.0/24
132 address 2001:dee:eeee:1::4/128
134 # source files from a directory /etc/network/interfaces.d
135 source /etc/network/interfaces.d/*
137 # Using mako style templates
140 iface vlan${v} inet static
141 address 10.20.${v}.3/24
144 For additional syntax and examples see **ifupdown-addons-interfaces(5)**
148 /etc/network/interfaces
152 ifupdown-addons-interfaces(5),