2014-02-14 09:55:19 -08:00
|
|
|
====
|
|
|
|
ifup
|
|
|
|
====
|
|
|
|
|
|
|
|
-------------------------------------
|
|
|
|
network interface management commands
|
|
|
|
-------------------------------------
|
|
|
|
|
2014-06-06 23:00:24 -07:00
|
|
|
:Author: Roopa Prabhu <roopa@cumulusnetworks.com>
|
2014-02-14 09:55:19 -08:00
|
|
|
:Date: 2014-02-05
|
|
|
|
:Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
|
|
|
|
:Version: 0.1
|
|
|
|
:Manual section: 8
|
|
|
|
|
|
|
|
NAME
|
|
|
|
====
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifup** - bring a network interface up
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifdown** - take a network interface down
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
========
|
2014-04-11 12:29:31 -07:00
|
|
|
|
2014-02-14 09:55:19 -08:00
|
|
|
ifup [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
|
2015-11-22 16:26:14 -08:00
|
|
|
**[-X EXCLUDEPATS] [-f] [-n] [-s] [--print-dependency {list,dot}]**
|
2014-04-11 12:29:31 -07:00
|
|
|
**[IFACE [IFACE ...]]**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
ifdown [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
|
2014-04-11 12:29:31 -07:00
|
|
|
**[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]**
|
|
|
|
**[IFACE [IFACE ...]]**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
===========
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifup** and **ifdown** commands can be used to configure (or, respectively,
|
2014-02-14 09:55:19 -08:00
|
|
|
deconfigure) network interfaces based on interface definitions in the
|
2015-08-20 22:59:44 -04:00
|
|
|
config file ifupdown2.conf (defaults to **/etc/network/interfaces/** file).
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifquery(8)** maybe used in conjunction with **ifup** and **ifdown**
|
|
|
|
commands to query and validate applied/running configuration.
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2015-08-20 22:59:44 -04:00
|
|
|
**ifup** always works on the current **interfaces(5)** file defined in ifupdown2.conf
|
|
|
|
(default **/etc/network/interfaces**). **ifdown** works on the last applied interface
|
2014-02-14 09:55:19 -08:00
|
|
|
configuration.
|
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifup** on an already ifup'ed interface will re-apply the configuration,
|
2014-02-14 09:55:19 -08:00
|
|
|
skipping already applied configuration whereever possible. In many cases
|
|
|
|
where config commands are idempotent, you will see that ifup/ifdown will
|
|
|
|
reapply the config even if the interface already has that config.
|
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifup** and **ifdown** understands interface dependency order.
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
For logical interfaces like vlans, bridges, bonds, **ifup** creates the
|
|
|
|
interface and **ifdown** deletes the interface. Use **--admin-state**
|
2014-04-11 12:29:31 -07:00
|
|
|
option if you only want to administratively bring the interface up/down.
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
When **ifup** and **ifdown** are used with interfaces on command line,
|
|
|
|
they must be have a **iface** section in the **interfaces(5)** file.
|
|
|
|
|
2014-02-14 09:55:19 -08:00
|
|
|
OPTIONS
|
|
|
|
=======
|
|
|
|
positional arguments:
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**IFACE** interface list separated by spaces. **IFACE** list and **'-a'**
|
|
|
|
argument are mutually exclusive.
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
optional arguments:
|
2014-04-11 12:29:31 -07:00
|
|
|
|
2014-02-14 09:55:19 -08:00
|
|
|
-h, --help show this help message and exit
|
|
|
|
|
|
|
|
-a, --all process all interfaces marked "auto"
|
|
|
|
|
|
|
|
-v, --verbose verbose
|
|
|
|
|
|
|
|
-d, --debug output debug info
|
2014-08-26 14:19:13 -07:00
|
|
|
--allow CLASS ignore non-"allow-CLASS" interfaces
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
-w, --with-depends run with all dependent interfaces. This option
|
2014-02-14 09:55:19 -08:00
|
|
|
is redundant when -a is specified. When '-a' is
|
|
|
|
specified, interfaces are always executed in
|
|
|
|
dependency order.
|
|
|
|
|
|
|
|
-X EXCLUDEPATS, --exclude EXCLUDEPATS
|
|
|
|
Exclude interfaces from the list of interfaces to
|
|
|
|
operate on. Can be specified multiple times
|
2015-07-30 11:15:17 -04:00
|
|
|
If the excluded interface has dependent interfaces,
|
|
|
|
(e.g. a bridge or a bond with multiple enslaved interfaces)
|
|
|
|
then each dependent interface must be specified in order
|
|
|
|
to be excluded.
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-08-26 14:19:13 -07:00
|
|
|
-i INTERFACESFILE, --interfaces INTERFACESFILE
|
2015-08-20 22:59:44 -04:00
|
|
|
Uses interfaces file instead of default defined in
|
|
|
|
ifupdown2.conf (default /etc/network/interfaces).
|
|
|
|
Also in ifupdown2.conf, users are not allowed to specify their own
|
|
|
|
interfaces file unless disable_cli_interfacesfile is set to 0
|
|
|
|
(default is 1).
|
2014-08-26 14:19:13 -07:00
|
|
|
|
|
|
|
-t {native,json}, --interfaces-format {native,json}
|
|
|
|
interfaces file format
|
|
|
|
|
2014-02-14 09:55:19 -08:00
|
|
|
-f, --force force run all operations
|
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
-n, --no-act print out what would happen, but don't do it
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-06-06 23:00:24 -07:00
|
|
|
-p, --print-dependency {list,dot}
|
|
|
|
print iface dependency in list or dot format
|
2014-04-11 12:29:31 -07:00
|
|
|
|
2014-06-06 23:00:24 -07:00
|
|
|
-m, --admin-state, --no-scripts
|
|
|
|
dont run any addon modules/scripts. Only bring
|
|
|
|
the interface administratively up/down
|
|
|
|
|
|
|
|
-u, --use-current-config
|
|
|
|
By default ifdown looks at the saved state for
|
|
|
|
interfaces to bring down. This option allows ifdown
|
|
|
|
to look at the current interfaces file. Useful when
|
|
|
|
your state file is corrupted or you want down to use
|
|
|
|
the latest from the interfaces file
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2015-11-22 16:26:14 -08:00
|
|
|
-s, --syntax-check Only run the interfaces file parser
|
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
EXAMPLES
|
|
|
|
========
|
2014-02-14 09:55:19 -08:00
|
|
|
# bringing up all interfaces
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifup -a**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# bringing up interface list
|
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**ifup swp1 swp2**
|
|
|
|
|
|
|
|
# bringing up interface with its dependents
|
|
|
|
|
|
|
|
**ifup br0 --with-depends**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# bringing down all interfaces
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifdown -a**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# bringing down a single interface
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifdown swp1**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# excluding interfaces using -X option
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifdown -X eth0 -a**
|
|
|
|
|
|
|
|
**ifup -X eth0 -a**
|
|
|
|
|
|
|
|
**ifdown -X eth0 -X lo -a**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# using verbose -v option to see what is going on
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifup -v -a**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# using debug -d option to see more of what is going on
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifup -d -a**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# ignore errors
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**ifup -a -f**
|
|
|
|
|
|
|
|
**ifdown -a -f**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
# run ifdown and ifup on all interfaces using service command/init script
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**service networking restart**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
# run ifup on all interfaces using service command/init script
|
2014-04-11 12:29:31 -07:00
|
|
|
|
|
|
|
**service networking start**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
# ifdown on all interfaces using service command/init script
|
|
|
|
|
2014-04-11 12:29:31 -07:00
|
|
|
**service networking stop**
|
|
|
|
|
2014-06-12 06:27:29 -07:00
|
|
|
# To run ifup/ifdown on only interfaces that changed see **ifreload(8)**
|
2014-02-14 09:55:19 -08:00
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
========
|
2014-04-11 12:29:31 -07:00
|
|
|
ifquery(8),
|
|
|
|
ifreload(8),
|
|
|
|
interfaces(5),
|
2014-05-29 12:43:03 -07:00
|
|
|
ifupdown-addons-interfaces(5)
|