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] [--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 file **/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 under
42 **/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 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.
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
86 -i INTERFACESFILE, --interfaces INTERFACESFILE
87 Use interfaces file instead of default
88 /etc/network/interfaces
90 -t {native,json}, --interfaces-format {native,json}
91 interfaces file format
93 -f, --force force run all operations
95 -n, --no-act print out what would happen, but don't do it
97 -p, --print-dependency {list,dot}
98 print iface dependency in list or dot format
100 -m, --admin-state, --no-scripts
101 dont run any addon modules/scripts. Only bring
102 the interface administratively up/down
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
113 # bringing up all interfaces
117 # bringing up interface list
121 # bringing up interface with its dependents
123 **ifup br0 --with-depends**
125 # bringing down all interfaces
129 # bringing down a single interface
133 # excluding interfaces using -X option
135 **ifdown -X eth0 -a**
139 **ifdown -X eth0 -X lo -a**
141 # using verbose -v option to see what is going on
145 # using debug -d option to see more of what is going on
155 # run ifdown and ifup on all interfaces using service command/init script
157 **service networking restart**
159 # run ifup on all interfaces using service command/init script
161 **service networking start**
163 # ifdown on all interfaces using service command/init script
165 **service networking stop**
167 # To run ifup/ifdown on only interfaces that changed see **ifreload(8)**
174 ifupdown-addons-interfaces(5)