To work on ifupdown2 i'm using Pycharm on macOS. ifupdown2 runs in a
debian VM. To use Pycharm remote execution capabilities, we need several
symlinks (one per command). Git needs to ignore those symlinks :)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Now we support the following config:
auto swp1
iface swp1
vrrp 3 50.0.1.1/24
vrrp 3 2001:50:0:1::1/64
vrrp 3 2001:50:0:42::1/64
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
For each VRRP configuration we create 2 macvlans (ip4 and ip6), if the ip4
is removed from the config we need to remove the associated macvlan (same
for ip6).
Testing Done: remove all ip4 (or ip6) from vrr attribute line
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
if igmp snooping is enabled on a vxlan bridge and if the
vxlan_bridge_igmp_snooping_enable_port_mcrouter is turned on, ifupdown2
will automatically enable multicast router on the vxlan brport unless
this attribute was provided by the user. The policy is enabled by default.
The policy can be disabled as follow:
{
"bridge": {
"module_globals": {
"vxlan_bridge_igmp_snooping_enable_port_mcrouter": "no"
}
}
}
auto br0
iface br0
bridge-ports vx42
bridge-mcsnoop yes
auto vx42
iface vx42
vxlan-id 42
$ ifreload -ad
will show that the config is applied
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Add a vrrp config under swp intf - ifup, then remove the vrrp config - ifreload
the macvlans are not removed without this patch
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
New vxlan-ttl attribute: specifies the TTL value to use in outgoing
packets. Valid values: range 1..255 or auto (0)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2 behaviour significantly diverges from ifupdown on debian stretch.
Original ifupdown uses run-parts which supposedly doesn't run non-executable
files in the directory. However, ifupdown2 doesn't seem to make this
distinction.
This patch will log warning EACCES exceptions (instead of log error) and exit 0
Reported-by: George Diamantopoulos <gedia>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2 used /var/tmp/network/ to store its state file
upstream users reported that when /var/tmp is not mounted
before network configuration ifupdown2 fails. We now let
user define which location they want to use for the state
file.
closes: #918832
Reported-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
some of those release were available but under a different name so
technically those version numbers were never released.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
The new code base supports installation via pypi so we need to update the
imports statement.
It's also good practice to use the existing IO apis to read/write and execute
sub-commands, those API will do error handling and logging.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
batman wasn't in master-next so it got removed during the last merge
this commit adds it back to master.
See PR #12
From Maximilian Wilhelm:
This commit adds support for configuring B.A.T.M.A.N. advanced interfaces
with ifupdown2. B.A.T.M.A.N. advanced is a protocol to build Layer2 based
mesh networks with. It's supported in the Linux kernel and thus available
in many Linux environments.
A configuration could look like this
auto bat0
iface bat0
batman-ifaces eth1 eth2.23
batman-ifaces-ignore-regex .*_nodes
batman-hop-penalty 23
#
address 192.0.2.42/24
where »bat0« would be the local connection to the mesh network.
The interfaces »eth1« and »eth2.23« would be used by the B.A.T.M.A.N. adv.
protocol to communicate to other member of the mesh network.
Any interfaces matching the »ifaces-ignore-regex« will be gently ignored
by ifquery and ifreload as there might be some tunnels or interfaces
added to the mesh network by other means which should not be removed by
any subsequent ifreload run.
The »hop-penalty» parameter set the penalty of this node within the mesh
network.
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Author: Maximilian Wilhelm <max@rfc2324.org>
During the recent merge between master and master-next the changes introduced
by PR #80 were lost. This commit adds them back with some refactoring to use
the new netlink cache.
Co-authored-by: Maximilian Wilhelm <max@sdn.clinic>
Co-authored-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2 (1.2.2) unstable; urgency=medium
* Support for new iproute2 format (bridge vlan show)
* Pypi install: local addons modules should be loaded first
* Fix: link-down yes on vrf slaves
* Fix: nlmanager: use strerror to format kernel error
* Add: new checks for existing device with vxlan attributes
* Ethtool: FEC: translate None and NotSupported values to link-fec off
-- Julien Fortin <julien@cumulusnetworks.com> Thu, 13 Dec 2018 23:42:42 -0800
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2 can be installed via apt/dpkg or via pypi (pip), those two installation methods have
two different installation directory. Our main installation dir is /usr/share/ifupdown2. This is
also were other scripts might add their own addon.
If ifupdown2 is installed via pypi we need to make sure we are loading the script-added addon modules
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
because of a typo (use of wrong object) we weren't looking at the correct
ifaceobj for LINK_DOWN lookup. In some cases we didn't honor link-down yes
on VRF slaves
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
A newer iproute2 version changed the bridge vlan show output, ifupdown2 relies
on the previous format, we have the convert data into old format:
{
"vx-1002": [{
"vlan": 1002,
"flags": ["PVID", "Egress Untagged"]
}],
"vx-1004": [{
"vlan": 1004,
"flags": ["PVID", "Egress Untagged"]
}]
}
auto bridge
iface bridge
bridge-vlan-aware yes
bridge-ports vx-1000 vx-1001 vx-1002 vx-1003 vx-1004 hostbond3 hostbond4
bridge-stp on
bridge-vids 1000-1004
bridge-pvid 1
auto vx-1002
iface vx-1002
vxlan-id 1002
bridge-access 1002
vxlan-local-tunnelip 27.0.0.15
bridge-learning off
bridge-arp-nd-suppress on
mstpctl-portbpdufilter yes
mstpctl-bpduguard yes
mtu 9152
auto hostbond4
iface hostbond4
bond-slaves swp2 swp3
bond-mode 802.3ad
bond-min-links 1
bond-lacp-rate 1
mtu 9152
alias Local Node/s TORS1 and Ports swp32s2 swp32s3 <==> Remote Node/s HOSTS12 and Ports swp1 swp2
bridge-pvid 1001
auto swp3
iface swp3
link-speed 10000
link-duplex full
link-autoneg off
auto swp2
iface swp2
link-speed 10000
link-duplex full
link-autoneg off
auto vx-1004
iface vx-1004
vxlan-id 1004
bridge-access 1004
vxlan-local-tunnelip 27.0.0.15
bridge-learning off
bridge-arp-nd-suppress on
mstpctl-portbpdufilter yes
mstpctl-bpduguard yes
mtu 9152
auto vx-1003
iface vx-1003
vxlan-id 1003
bridge-access 1003
vxlan-local-tunnelip 27.0.0.15
bridge-learning off
bridge-arp-nd-suppress on
mstpctl-portbpdufilter yes
mstpctl-bpduguard yes
mtu 9152
auto hostbond3
iface hostbond3
bond-slaves swp5 swp6
bond-mode 802.3ad
bond-min-links 1
bond-lacp-rate 1
mtu 9152
alias Local Node/s TORS1 and Ports swp32s0 swp32s1 <==> Remote Node/s HOSTS11 and Ports swp1 swp2
bridge-pvid 1000
auto swp6
iface swp6
link-speed 10000
link-duplex full
link-autoneg off
auto swp5
iface swp5
link-speed 10000
link-duplex full
link-autoneg off
auto vx-1001
iface vx-1001
vxlan-id 1001
bridge-access 1001
vxlan-local-tunnelip 27.0.0.15
bridge-learning off
bridge-arp-nd-suppress on
mstpctl-portbpdufilter yes
mstpctl-bpduguard yes
mtu 9152
auto vx-1000
iface vx-1000
vxlan-id 1000
bridge-access 1000
vxlan-local-tunnelip 27.0.0.15
bridge-learning off
bridge-arp-nd-suppress on
mstpctl-portbpdufilter yes
mstpctl-bpduguard yes
mtu 9152
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
On some kind-of-minimalistic Ubuntu 18.04.1 extra python package `python-setuptools` was needed in order to compile from source the final DEB.
```
dpkg-buildpackage: info: source version 1.2.1
dpkg-buildpackage: info: source changed by Julien Fortin <julien@cumulusnetworks.com>
dpkg-source --before-build ifupdown2
dpkg-buildpackage: info: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: python-setuptools
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
```