5 --------------------------------------------
6 network interface configuration for ifupdown
7 --------------------------------------------
9 :Author: 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/machine-dependent
38 iface eth0-home inet static
39 address 192.168.1.1/24
42 iface eth0-work inet dhcp
46 Lines beginning with the word "auto" are used to identify the physical
47 interfaces to be brought up when ifup is run with the -a option.
48 (This option is used by the system boot scripts.) Physical interface names
49 should follow the word "auto" on the same line. There can be multiple
52 Lines beginning with "allow-" are used to identify interfaces that
53 should be brought up automatically by various subsytems. This may be
54 done using a command such as "ifup --allow=hotplug eth0 eth1", which
55 will only bring up eth0 or eth1 if it is listed in an "allow-hotplug"
56 line. Note that "allow-auto" and "auto" are synonyms.
58 Lines beginning with "source" are used to include stanzas from other
59 files, so configuration can be split into many files. The word "source"
60 is followed by the path of file to be sourced. Shell wildcards can be
61 used. (See wordexp(3) for details.). Currently only supports absolute
64 ifup is normally given a physical interface name as its first non-option
67 The interface name is followed by the name of the address family that the
68 interface uses. This will be "inet" for TCP/IP networking and inet6 for
69 ipv6. Following that is the name of the method used to configure the
72 ifupdown2 supports iface stanzas without a family or a method. This enables
73 using the same stanza for inet and inet6 family addresses.
75 Interface options can be given on subsequent lines in the iface stanza.
76 These options come from addon modules. see interfaces-addons(5) for
79 ifupdown2 supports python-mako style templates in the interfaces file.
80 See examples section for details.
84 Both inet and inet6 address family interfaces can use the following
85 methods (However they are not required):
88 This method may be used to define the loopback interface.
91 This method may be used to define ethernet interfaces with
92 statically allocated addresses.
95 This method may be used to obtain an address via DHCP.
99 iface sections for some interfaces like physical interfaces or vlan
100 interfaces in dot notation (like eth1.100) are understood by ifupdown2.
101 These kind of interfaces do not need an entry in the interfaces file.
102 However, if these interfaces need extra configuration like addresses, they
103 will need to be specified.
107 Sample /etc/network/interfaces file::
111 address 192.168.2.0/24
112 address 2001:dee:eeee:1::4/128
118 iface eth1 inet manual
119 address 192.168.2.0/24
120 address 2001:dee:eeee:1::4/128
122 # source files from a directory /etc/network/interfaces.d
123 source /etc/network/interfaces.d/*
125 # Using mako style templates
128 iface vlan${v} inet static
129 address 10.20.${v}.3/24
132 For additional syntax and examples see **ifupdownaddons-interfaces(5)**
136 /etc/network/interfaces
140 ifupdownaddons-interfaces(5),