]> git.proxmox.com Git - mirror_ifupdown2.git/blob - ifupdown2/man.rst/ifup.8.rst
Merge 'vlan filtering bridge + vxlan + mlag + vrr' support from internal
[mirror_ifupdown2.git] / ifupdown2 / 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] [--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 file **/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 under
42 **/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 whereever 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
86 -i INTERFACESFILE, --interfaces INTERFACESFILE
87 Use interfaces file instead of default
88 /etc/network/interfaces
89
90 -t {native,json}, --interfaces-format {native,json}
91 interfaces file format
92
93 -f, --force force run all operations
94
95 -n, --no-act print out what would happen, but don't do it
96
97 -p, --print-dependency {list,dot}
98 print iface dependency in list or dot format
99
100 -m, --admin-state, --no-scripts
101 dont run any addon modules/scripts. Only bring
102 the interface administratively up/down
103
104 -u, --use-current-config
105 By default ifdown looks at the saved state for
106 interfaces to bring down. This option allows ifdown
107 to look at the current interfaces file. Useful when
108 your state file is corrupted or you want down to use
109 the latest from the interfaces file
110
111 EXAMPLES
112 ========
113 # bringing up all interfaces
114
115 **ifup -a**
116
117 # bringing up interface list
118
119 **ifup swp1 swp2**
120
121 # bringing up interface with its dependents
122
123 **ifup br0 --with-depends**
124
125 # bringing down all interfaces
126
127 **ifdown -a**
128
129 # bringing down a single interface
130
131 **ifdown swp1**
132
133 # excluding interfaces using -X option
134
135 **ifdown -X eth0 -a**
136
137 **ifup -X eth0 -a**
138
139 **ifdown -X eth0 -X lo -a**
140
141 # using verbose -v option to see what is going on
142
143 **ifup -v -a**
144
145 # using debug -d option to see more of what is going on
146
147 **ifup -d -a**
148
149 # ignore errors
150
151 **ifup -a -f**
152
153 **ifdown -a -f**
154
155 # run ifdown and ifup on all interfaces using service command/init script
156
157 **service networking restart**
158
159 # run ifup on all interfaces using service command/init script
160
161 **service networking start**
162
163 # ifdown on all interfaces using service command/init script
164
165 **service networking stop**
166
167 # To run ifup/ifdown on only interfaces that changed see **ifreload(8)**
168
169 SEE ALSO
170 ========
171 ifquery(8),
172 ifreload(8),
173 interfaces(5),
174 ifupdown-addons-interfaces(5)