]> git.proxmox.com Git - mirror_ifupdown2.git/blob - man.rst/ifup.8.rst
Merge pull request #80 from BarbarossaTM/tunnel-fixes-master
[mirror_ifupdown2.git] / man.rst / ifup.8.rst
1 ====
2 ifup
3 ====
4
5 -------------------------------------
6 network interface management commands
7 -------------------------------------
8
9 :Author: Roopa Prabhu <roopa@cumulusnetworks.com>
10 :Date: 2014-02-05
11 :Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
12 :Version: 0.1
13 :Manual section: 8
14
15 NAME
16 ====
17 **ifup** - bring a network interface up
18
19 **ifdown** - take a network interface down
20
21 SYNOPSIS
22 ========
23
24 ifup [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
25 **[-X EXCLUDEPATS] [-f] [-n] [-s] [--print-dependency {list,dot}]**
26 **[IFACE [IFACE ...]]**
27
28 ifdown [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
29 **[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]**
30 **[IFACE [IFACE ...]]**
31
32 DESCRIPTION
33 ===========
34 **ifup** and **ifdown** commands can be used to configure (or, respectively,
35 deconfigure) network interfaces based on interface definitions in the
36 config file ifupdown2.conf (defaults to **/etc/network/interfaces/** file).
37
38 **ifquery(8)** maybe used in conjunction with **ifup** and **ifdown**
39 commands to query and validate applied/running configuration.
40
41 **ifup** always works on the current **interfaces(5)** file defined in ifupdown2.conf
42 (default **/etc/network/interfaces**). **ifdown** works on the last applied interface
43 configuration.
44
45 **ifup** on an already ifup'ed interface will re-apply the configuration,
46 skipping already applied configuration wherever possible. In many cases
47 where config commands are idempotent, you will see that ifup/ifdown will
48 reapply the config even if the interface already has that config.
49
50 **ifup** and **ifdown** understands interface dependency order.
51
52 For logical interfaces like vlans, bridges, bonds, **ifup** creates the
53 interface and **ifdown** deletes the interface. Use **--admin-state**
54 option if you only want to administratively bring the interface up/down.
55
56 When **ifup** and **ifdown** are used with interfaces on command line,
57 they must be have a **iface** section in the **interfaces(5)** file.
58
59 OPTIONS
60 =======
61 positional arguments:
62
63 **IFACE** interface list separated by spaces. **IFACE** list and **'-a'**
64 argument are mutually exclusive.
65
66 optional arguments:
67
68 -h, --help show this help message and exit
69
70 -a, --all process all interfaces marked "auto"
71
72 -v, --verbose verbose
73
74 -d, --debug output debug info
75 --allow CLASS ignore non-"allow-CLASS" interfaces
76
77 -w, --with-depends run with all dependent interfaces. This option
78 is redundant when -a is specified. When '-a' is
79 specified, interfaces are always executed in
80 dependency order.
81
82 -X EXCLUDEPATS, --exclude EXCLUDEPATS
83 Exclude interfaces from the list of interfaces to
84 operate on. Can be specified multiple times
85 If the excluded interface has dependent interfaces,
86 (e.g. a bridge or a bond with multiple enslaved interfaces)
87 then each dependent interface must be specified in order
88 to be excluded.
89
90 -i INTERFACESFILE, --interfaces INTERFACESFILE
91 Uses interfaces file instead of default defined in
92 ifupdown2.conf (default /etc/network/interfaces).
93 Also in ifupdown2.conf, users are not allowed to specify their own
94 interfaces file unless disable_cli_interfacesfile is set to 0
95 (default is 1).
96
97 -t {native,json}, --interfaces-format {native,json}
98 interfaces file format
99
100 -f, --force force run all operations
101
102 -n, --no-act print out what would happen, but don't do it
103
104 -p, --print-dependency {list,dot}
105 print iface dependency in list or dot format
106
107 -m, --admin-state, --no-scripts
108 don't run any addon modules/scripts. Only bring
109 the interface administratively up/down
110
111 -u, --use-current-config
112 By default ifdown looks at the saved state for
113 interfaces to bring down. This option allows ifdown
114 to look at the current interfaces file. Useful when
115 your state file is corrupted or you want down to use
116 the latest from the interfaces file
117
118 -s, --syntax-check Only run the interfaces file parser
119
120 EXAMPLES
121 ========
122 # bringing up all interfaces
123
124 **ifup -a**
125
126 # bringing up interface list
127
128 **ifup swp1 swp2**
129
130 # bringing up interface with its dependents
131
132 **ifup br0 --with-depends**
133
134 # bringing down all interfaces
135
136 **ifdown -a**
137
138 # bringing down a single interface
139
140 **ifdown swp1**
141
142 # excluding interfaces using -X option
143
144 **ifdown -X eth0 -a**
145
146 **ifup -X eth0 -a**
147
148 **ifdown -X eth0 -X lo -a**
149
150 # using verbose -v option to see what is going on
151
152 **ifup -v -a**
153
154 # using debug -d option to see more of what is going on
155
156 **ifup -d -a**
157
158 # ignore errors
159
160 **ifup -a -f**
161
162 **ifdown -a -f**
163
164 # run ifdown and ifup on all interfaces using service command/init script
165
166 **service networking restart**
167
168 # run ifup on all interfaces using service command/init script
169
170 **service networking start**
171
172 # ifdown on all interfaces using service command/init script
173
174 **service networking stop**
175
176 # To run ifup/ifdown on only interfaces that changed see **ifreload(8)**
177
178 SEE ALSO
179 ========
180 ifquery(8),
181 ifreload(8),
182 interfaces(5),
183 ifupdown-addons-interfaces(5)