1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00
Julien Fortin 1db0cb7acc addons: address: remove stale fdb entry for svi (when hwaddress is used)
As seen in the example below we are seeing a corner case, first the user
/e/n/i is configured without 'hwaddress', then it is used to fix the svi
mac address. The current code only checks for the statemanager for old
'hwaddress' attribute but couldn't find any. Now we save the mac addr
before updating it, so we can later clear it from the fdb.

$ cat a
auto eth0
iface eth0 inet dhcp

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports vx-1000
        bridge-stp on
        bridge-vids 1000 1002 1004 1006 1008
        bridge-pvid 1

auto vx-1000
iface vx-1000
        vxlan-id 1000
        bridge-access 1000
        vxlan-local-tunnelip 27.0.0.11
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto vlan1000
iface vlan1000
        address 45.0.0.2/24
        vlan-id 1000
        vlan-raw-device bridge
        address-virtual 00:00:5e:00:01:01 45.0.0.1/24
        vrf vrf1

auto vrf1
iface vrf1
        vrf-table auto

$
$
$ cat b
auto eth0
iface eth0 inet dhcp

auto bridge
iface bridge
        bridge-vlan-aware yes
        bridge-ports vx-1000
        bridge-stp on
        bridge-vids 1000 1002 1004 1006 1008
        bridge-pvid 1

auto vx-1000
iface vx-1000
        vxlan-id 1000
        bridge-access 1000
        vxlan-local-tunnelip 27.0.0.11
        bridge-learning off
        bridge-arp-nd-suppress on
        mstpctl-portbpdufilter yes
        mstpctl-bpduguard yes
        mtu 9152

auto vlan1000
iface vlan1000
        address 45.0.0.2/24
        hwaddress 00:02:00:aa:aa:aa
        vlan-id 1000
        vlan-raw-device bridge
        address-virtual 00:00:5e:00:01:01 45.0.0.1/24
        vrf vrf1

auto vrf1
iface vrf1
        vrf-table auto

$
$
$ rm /etc/network/interfaces ; ln -s `pwd`/a /etc/network/interfaces ; ifreload -a ; rm /etc/network/interfaces ; ln -s `pwd`/b /etc/network/interfaces ; (ifreload -av |& grep vlan | grep 1000)
info: bridge: netlink: bridge vlan add vid 1000 dev bridge
info: vlan1000: netlink: ip link set dev vlan1000 down
info: vlan1000: netlink: ip link set dev vlan1000 address 00:02:00:aa:aa:aa
info: vlan1000: netlink: ip link set dev vlan1000 up
info: writing '1' to file /proc/sys/net/ipv4/conf/vlan1000/arp_accept
info: executing /sbin/bridge fdb del 4a:b3:1e:45:bf:bf dev bridge vlan 1000  self
info: executing /sbin/bridge fdb replace 00:02:00:aa:aa:aa dev bridge vlan 1000  self
info: executing /sbin/bridge fdb replace 00:00:5e:00:01:01 dev bridge vlan 1000  self
$

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
2021-06-30 16:13:49 +02:00
2019-12-17 13:46:18 +01:00

=========
ifupdown2
=========

Linux Interface Network Manager

* Free software: GNU General Public License v2

============
Installation
============

As of today (early june 2018), the preferred method to install ifupdown2, is by
building the source code (as it will always install the most recent stable
release). See `Installing latest stable release from sources`_ chapter.

Installing latest stable release 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://github.com/CumulusNetworks/ifupdown2

Or download the `tarball`_:

.. code-block:: console

    $ curl  -OL https://github.com/CumulusNetworks/ifupdown2/tarball/master

Once you have a copy of the source, you should build a deb-package and install it

.. code-block:: console

    $ cd ifupdown2 && git checkout master && make deb

The generated deb should be in the root directory (``../ifupdown2_1.2.1_all.deb``)

.. code-block:: console

    $ dpkg -i ../ifupdown2_1.2.1_all.deb

We don't recommend using ``setup.py install`` directly, as it's still missing systemd/init.d scripts.
This capability should be added in the near future.

You might need to manually download dependencies. Mandatory dependencies:

.. code-block:: console

    $ apt-get install build-essential devscripts dh-systemd fakeroot python-all python-docutils iproute2 python-ipaddr python-setuptools

To build the deb file successfully, the following additional packages are required:

.. code-block:: console

    $ apt-get install dh-python python3-all python3-setuptools python3-docutils

Suggested dependencies:

.. code-block:: console

    $ apt-get install ethtool bridge-utils python-gvgen python-mako

.. _Github repo: https://github.com/CumulusNetworks/ifupdown2
.. _tarball: https://github.com/CumulusNetworks/ifupdown2/tarball/master


============
Contributing
============

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 https://github.com/CumulusNetworks/ifupdown2/issues.

If you are reporting a bug, please include:

* Your operating system name and version (``uname -a``).
* Any details about your setup that might be helpful in troubleshooting.
* Content of configuration files such as ``/etc/network/interfaces``
* Detailed steps to reproduce the bug.
* Debug output of the ifupdown2 command (see ``--debug`` option)

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 https://github.com/CumulusNetworks/ifupdown2/issues.

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.

=======
Credits
=======

Development Lead
----------------

* Roopa Prabhu <roopa@cumulusnetworks.com>
* Julien Fortin <julien@cumulusnetworks.com>

Contributors
------------

* Nikhil Gajendrakumar <nikhil.gajendrakumar@gmail.com>
* Maximilian Wilhelm <max@sdn.clinic>
* Sven Auhagen <sven.auhagen@voleatech.de>
* skorpy <magnus@skorpy.space>
* Alexandre Derumier <aderumier@odiso.com>
* Sam Tannous <stannous@cumulusnetworks.com>
* Wilson Kok <wkok@cumulusnetworks.com>
* John Berezovik <berezovik@gmail.com>
* Daniel Walton <dwalton76@gmail.com>
* Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* Balakrishnan Raman <balkee@yahoo.com>
* Scott Emery <scotte@cumulusnetworks.com>
* Dave Olson <olson@cumulusnetworks.com>
* David Ahern <dsa@cumulusnetworks.com>
* Jonathan Toppins <>
* Nolan Leake <nolan@cumulusnetworks.com>
* Sergey Sudakovich <sergey@cumulusnetworks.com>
* Andy Gospodarek <>
* Satish Ashok <sashok@cumulusnetworks.com>
* Scott Laffer <slaffer@cumulusnetworks.com>
* Vidya Sagar Ravipati <vidya.ravipati@gmail.com>
* Marek Grzybowski <marek.grzybowski@rtbhouse.com>
* Gaudenz Steinlin <gaudenz@users.noreply.github.com>
* Nigel Kukard <nkukard@lbsd.net>
* Jeffrey <jeffrey.bosma@gmail.com>
* kokel <kokel@users.noreply.github.com>

Why not you too? :)


=======
History
=======

See changelog here: https://github.com/CumulusNetworks/ifupdown2/blob/master/debian/changelog


Credits
-------

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

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Description
No description provided
Readme 6.2 MiB
Languages
Python 99.2%
Shell 0.6%
Makefile 0.2%