]>
Commit | Line | Data |
---|---|---|
e37ad4a6 | 1 | ==== |
2 | ifup | |
3 | ==== | |
4 | ||
5 | ------------------------------------- | |
6 | network interface management commands | |
7 | ------------------------------------- | |
8 | ||
898c8214 | 9 | :Author: Roopa Prabhu <roopa@cumulusnetworks.com> |
e37ad4a6 | 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 | ==== | |
bbc7c379 | 17 | **ifup** - bring a network interface up |
e37ad4a6 | 18 | |
bbc7c379 | 19 | **ifdown** - take a network interface down |
e37ad4a6 | 20 | |
21 | SYNOPSIS | |
22 | ======== | |
bbc7c379 | 23 | |
e37ad4a6 | 24 | ifup [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends] |
bbc7c379 | 25 | **[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]** |
26 | **[IFACE [IFACE ...]]** | |
e37ad4a6 | 27 | |
28 | ifdown [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends] | |
bbc7c379 | 29 | **[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]** |
30 | **[IFACE [IFACE ...]]** | |
e37ad4a6 | 31 | |
32 | DESCRIPTION | |
33 | =========== | |
bbc7c379 | 34 | **ifup** and **ifdown** commands can be used to configure (or, respectively, |
e37ad4a6 | 35 | deconfigure) network interfaces based on interface definitions in the |
bbc7c379 | 36 | file **/etc/network/interfaces/** file. |
e37ad4a6 | 37 | |
bbc7c379 | 38 | **ifquery(8)** maybe used in conjunction with **ifup** and **ifdown** |
39 | commands to query and validate applied/running configuration. | |
e37ad4a6 | 40 | |
bbc7c379 | 41 | **ifup** always works on the current **interfaces(5)** file under |
42 | **/etc/network/interfaces**. **ifdown** works on the last applied interface | |
e37ad4a6 | 43 | configuration. |
44 | ||
bbc7c379 | 45 | **ifup** on an already ifup'ed interface will re-apply the configuration, |
e37ad4a6 | 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 | ||
bbc7c379 | 50 | **ifup** and **ifdown** understands interface dependency order. |
e37ad4a6 | 51 | |
c5a54d73 RP |
52 | For logical interfaces like vlans, bridges, bonds, **ifup** creates the |
53 | interface and **ifdown** deletes the interface. Use **--admin-state** | |
bbc7c379 | 54 | option if you only want to administratively bring the interface up/down. |
e37ad4a6 | 55 | |
c5a54d73 RP |
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 | ||
e37ad4a6 | 59 | OPTIONS |
60 | ======= | |
61 | positional arguments: | |
bbc7c379 | 62 | |
63 | **IFACE** interface list separated by spaces. **IFACE** list and **'-a'** | |
64 | argument are mutually exclusive. | |
e37ad4a6 | 65 | |
66 | optional arguments: | |
bbc7c379 | 67 | |
e37ad4a6 | 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 | ||
bbc7c379 | 76 | -l, --allow CLASS ignore non-"allow-CLASS" interfaces |
e37ad4a6 | 77 | |
bbc7c379 | 78 | -w, --with-depends run with all dependent interfaces. This option |
e37ad4a6 | 79 | is redundant when -a is specified. When '-a' is |
80 | specified, interfaces are always executed in | |
81 | dependency order. | |
82 | ||
e37ad4a6 | 83 | -X EXCLUDEPATS, --exclude EXCLUDEPATS |
84 | Exclude interfaces from the list of interfaces to | |
85 | operate on. Can be specified multiple times | |
86 | ||
87 | -f, --force force run all operations | |
88 | ||
c5a54d73 | 89 | -n, --no-act print out what would happen, but don't do it |
e37ad4a6 | 90 | |
898c8214 RP |
91 | -p, --print-dependency {list,dot} |
92 | print iface dependency in list or dot format | |
bbc7c379 | 93 | |
898c8214 RP |
94 | -m, --admin-state, --no-scripts |
95 | dont run any addon modules/scripts. Only bring | |
96 | the interface administratively up/down | |
97 | ||
98 | -u, --use-current-config | |
99 | By default ifdown looks at the saved state for | |
100 | interfaces to bring down. This option allows ifdown | |
101 | to look at the current interfaces file. Useful when | |
102 | your state file is corrupted or you want down to use | |
103 | the latest from the interfaces file | |
e37ad4a6 | 104 | |
bbc7c379 | 105 | EXAMPLES |
106 | ======== | |
e37ad4a6 | 107 | # bringing up all interfaces |
bbc7c379 | 108 | |
109 | **ifup -a** | |
e37ad4a6 | 110 | |
111 | # bringing up interface list | |
e37ad4a6 | 112 | |
bbc7c379 | 113 | **ifup swp1 swp2** |
114 | ||
115 | # bringing up interface with its dependents | |
116 | ||
117 | **ifup br0 --with-depends** | |
e37ad4a6 | 118 | |
119 | # bringing down all interfaces | |
bbc7c379 | 120 | |
121 | **ifdown -a** | |
e37ad4a6 | 122 | |
123 | # bringing down a single interface | |
bbc7c379 | 124 | |
125 | **ifdown swp1** | |
e37ad4a6 | 126 | |
127 | # excluding interfaces using -X option | |
bbc7c379 | 128 | |
129 | **ifdown -X eth0 -a** | |
130 | ||
131 | **ifup -X eth0 -a** | |
132 | ||
133 | **ifdown -X eth0 -X lo -a** | |
e37ad4a6 | 134 | |
135 | # using verbose -v option to see what is going on | |
bbc7c379 | 136 | |
137 | **ifup -v -a** | |
e37ad4a6 | 138 | |
139 | # using debug -d option to see more of what is going on | |
bbc7c379 | 140 | |
141 | **ifup -d -a** | |
e37ad4a6 | 142 | |
143 | # ignore errors | |
bbc7c379 | 144 | |
145 | **ifup -a -f** | |
146 | ||
147 | **ifdown -a -f** | |
e37ad4a6 | 148 | |
c5a54d73 | 149 | # run ifdown and ifup on all interfaces using service command/init script |
bbc7c379 | 150 | |
151 | **service networking restart** | |
e37ad4a6 | 152 | |
c5a54d73 | 153 | # run ifup on all interfaces using service command/init script |
bbc7c379 | 154 | |
155 | **service networking start** | |
e37ad4a6 | 156 | |
157 | # ifdown on all interfaces using service command/init script | |
e37ad4a6 | 158 | |
bbc7c379 | 159 | **service networking stop** |
160 | ||
c5a54d73 | 161 | # To run ifup/ifdown on only interfaces that changed see **ifreload(8)** |
e37ad4a6 | 162 | |
163 | SEE ALSO | |
164 | ======== | |
bbc7c379 | 165 | ifquery(8), |
166 | ifreload(8), | |
167 | interfaces(5), | |
35c868a0 | 168 | ifupdown-addons-interfaces(5) |