Skip to main content

interface network manager

Project description


.. image::

.. image::

.. image::
:alt: Documentation Status

.. image::
:alt: Updates

interface network manager

* Free software: GNU General Public License v2
* Documentation:



.. highlight:: shell


Stable release

To install ifupdown2, run this command in your terminal:

.. code-block:: console

$ pip install ifupdown2

This is the preferred method to install ifupdown2, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pip:
.. _Python installation guide:

From sources

The sources for ifupdown2 can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console

$ git clone git://

Or download the `tarball`_:

.. code-block:: console

$ curl -OL

Once you have a copy of the source, you can install it with:

.. code-block:: console

$ python install

.. _Github repo:
.. _tarball:


To use ifupdown2 in a project::

import ifupdown2

.. highlight:: shell


Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.

Write Documentation

ifupdown2 could always use more documentation, whether as part of the
official ifupdown2 docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Get Started!

Ready to contribute? Here's how to set up `ifupdown2` for local development.

1. Fork the `ifupdown2` repo on GitHub.
2. Clone your fork locally::

$ git clone

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv ifupdown2
$ cd ifupdown2/
$ python develop

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::

$ flake8 ifupdown2 tests
$ python test or py.test
$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
and make sure that the tests pass for all supported Python versions.


To run a subset of tests::

$ py.test tests.test_ifupdown2


A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run::

$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.

Known issues

This known issues list is not really up-to-date and will soon be verified and updated!

- There is a state issue if multiple configuration blocks are present for the same interface in the interfaces file
- `ifquery -r` can give wrong result if dhclient is running + static addresses are configured
- `ifquery -r` status is success for success case and also for cases where there is no support for query yet
- has ifupdown listed in data section instead of scripts: This is because default location for scripts is /usr/bin/. And ifupdown default location is /sbin. With newer versions we can specify --install-scripts directory. This needs to be fixed then.
- and more :)

- support old ifupdown state file /run/network/ifstate. Because some app's seem to use it
- support for debian ifupdown methods: tunnel, v4tunnel, 6to4, ppp, wvdial, ipv4ll
- support for debian ifupdown ipv6 auto method
- support for debian ifupdown CAN address family
- Compat : support for LOGICAL interfaces
- dry-run improvement: It skips the cache completely. Which means It tells you the commands it would execute if the system is clean. Its not smart enought to say what it will really execute given the state of the system
- Ifquery does not report link status, mainly because it reports only in terms of /etc/network/interfaces attributes. Plan to fix that
- more Documentation
- Priorities for addon modules
- have ability to also run uninstall on interfaces that dont have any config
- ifup hotplug support (basically needs some testing and fixing broken things)
- -q quiet option
- support for /etc/networking.defaults
- implement legacy ifupdown mapping feature
- support for the following ifupdown options:

-o OPTION=VALUE set OPTION to VALUE as though it were in /etc/network/interfaces

--no-mappings don't run any mappings

--no-scripts don't run any hook scripts

- parallel implementation
- Test all original ifupdown options for compatibility
- Test with ifupdown-extra, ifmetric, ifupdown-scripts-zg2
- export other environment variables to bash scripts (for backward compatibility):
IFACE physical name of the interface being processed
LOGICAL logical name of the interface being processed
ADDRFAM address family of the interface
METHOD method of the interface (e.g., static)
MODE start if run from ifup, stop if run from ifdown
PHASE as per MODE, but with finer granularity, distinguishing the pre-up, post-up, pre-down and post-down phases.
VERBOSITY indicates whether --verbose was used; set to 1 if so, 0 if not.
PATH the command search path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

- run python code guideline checker
- more code documentation
- move all cache handling to decorators in ifupdownaddons package
- input validation (present in some cases not all)
- support the vlan0004 style vlans
- ifquery coverage. currently it is at 80%.
- vxlan module
- fix and release ifaddon utility to manage module priorities
- Deep compare in query for address module (does not compare address attributes like scope)
- Maybe a pure netlink backend
- improve caching


Development Lead

* Roopa Prabhu <>
* Julien Fortin <>


* Nikhil Gajendrakumar <>
* Maximilian Wilhelm <>
* Sven Auhagen <>
* skorpy <>
* Sam Tannous <>
* Wilson Kok <>
* John Berezovik <>
* Daniel Walton <>
* Anuradha Karuppiah <>
* Balakrishnan Raman <>
* Scott Emery <>
* Dave Olson <>
* David Ahern <>
* Jonathan Toppins <>
* Nolan Leake <>
* Sergey Sudakovich <>
* Andy Gospodarek <>
* Satish Ashok <>
* Scott Laffer <>
* Vidya Sagar Ravipati <>
* Marek Grzybowski <>
* Gaudenz Steinlin <>
* Nigel Kukard <>
* Jeffrey <>
* kokel <>

Why not you too? :)


1.2.0 (2018-05-02)

* First release on PyPI.


This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter:
.. _`audreyr/cookiecutter-pypackage`:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ifupdown2-1.2.0.tar.gz (223.6 kB view hashes)

Uploaded source

Built Distribution

ifupdown2-1.2.0-py2.py3-none-any.whl (241.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page