5 -------------------------------------
6 network interface management commands
7 -------------------------------------
9 :Author: Roopa Prabhu <roopa@cumulusnetworks.com>
11 :Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
17 **ifup** - bring a network interface up
19 **ifdown** - take a network interface down
24 ifup [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
25 **[-X EXCLUDEPATS] [-f] [-n] [-s] [--print-dependency {list,dot}]**
26 **[IFACE [IFACE ...]]**
28 ifdown [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
29 **[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]**
30 **[IFACE [IFACE ...]]**
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).
38 **ifquery(8)** maybe used in conjunction with **ifup** and **ifdown**
39 commands to query and validate applied/running configuration.
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
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.
50 **ifup** and **ifdown** understands interface dependency order.
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.
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.
63 **IFACE** interface list separated by spaces. **IFACE** list and **'-a'**
64 argument are mutually exclusive.
68 -h, --help show this help message and exit
70 -a, --all process all interfaces marked "auto"
74 -d, --debug output debug info
75 --allow CLASS ignore non-"allow-CLASS" interfaces
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
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
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
97 -t {native,json}, --interfaces-format {native,json}
98 interfaces file format
100 -f, --force force run all operations
102 -n, --no-act print out what would happen, but don't do it
104 -p, --print-dependency {list,dot}
105 print iface dependency in list or dot format
107 -m, --admin-state, --no-scripts
108 don't run any addon modules/scripts. Only bring
109 the interface administratively up/down
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
118 -s, --syntax-check Only run the interfaces file parser
122 # bringing up all interfaces
126 # bringing up interface list
130 # bringing up interface with its dependents
132 **ifup br0 --with-depends**
134 # bringing down all interfaces
138 # bringing down a single interface
142 # excluding interfaces using -X option
144 **ifdown -X eth0 -a**
148 **ifdown -X eth0 -X lo -a**
150 # using verbose -v option to see what is going on
154 # using debug -d option to see more of what is going on
164 # run ifdown and ifup on all interfaces using service command/init script
166 **service networking restart**
168 # run ifup on all interfaces using service command/init script
170 **service networking start**
172 # ifdown on all interfaces using service command/init script
174 **service networking stop**
176 # To run ifup/ifdown on only interfaces that changed see **ifreload(8)**
183 ifupdown-addons-interfaces(5)