1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

459 Commits

Author SHA1 Message Date
dcc62f895d addons: tunnel: Fix (re)creation of tunnelsof any kind.
Create all tunnels - except gretap - with 'ip tunnel', as this supports
  most tunnel modes; create gretap tunnels with 'ip link'.

  Rework the whole concept of tunnel updates and make sure a tunnel only is
  changed - recreated - IFF the configuration has changed. In previos code
  'tunnel change' was called on every _up() call. The 'tunnel change' part
  was removed completely as it doesn't work on many occations. So IFF the
  tunnel related interface configuration has changed, the tunnel is removed
  and recreated.

  fixes #78

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2018-10-29 20:31:17 +01:00
b9ab286e3f Fix indentation error in ethtool.py 2018-09-09 19:28:31 +02:00
6cba66af57 dependent device fix 2018-04-13 19:32:04 +02:00
6cb7753857 ppp load 2018-04-07 19:22:33 +02:00
f101cb2ba5 do not load ppp if not installed 2018-04-07 19:21:04 +02:00
9b60795aa1 exclude ppp like dhcp 2018-04-07 18:07:30 +02:00
b2650e4a37 typo 2018-04-07 17:35:04 +02:00
c9b6e2f883 ppp support 2018-04-07 17:29:51 +02:00
e452c2cf53 fix tunnel v4 to v6 change 2018-04-04 20:53:32 +02:00
12425dc496 tunnel changes 2018-04-04 19:49:34 +02:00
8a0aa008bb addon/batctl: lookup batctl dynamically from PATH
Currently it is called from /usr/sbin/batctl what makes it impossible to use in case one runs a self compiled version for example
2018-03-13 14:57:27 +11:00
5b563460f8 addons: vrf: fix vrf slave link kind (fixes #39)
$ cat /etc/network/interfaces
auto v0
iface v0
      link-type veth
      vrf blue

auto blue
iface blue
      vrf-table auto

$ ifreload -a
$ echo $?
0
$ ifquery -a -c
auto v0
iface v0                         [pass]
      link-type veth             [pass]
      vrf blue                   [pass]

auto blue
iface blue                       [pass]
      vrf-table 1001             [pass]
$ echo $?
0

Reported-by: Maximilian Wilhelm <max@rfc2324.org>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2018-03-13 14:57:19 +11:00
00ff264407 addons: bridge: allow "bridge-ports: none" for bridges without initial ports. (#33)
This simple patch allows the creation of bridges which should be set up
  without any ports, like a bridge for virtual machines on a hosting box.

  With this patch ifupdown2 get's a step closer to feature parity and
  compatiblity with ifupdown1.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2018-03-13 14:54:36 +11:00
7d5877831d addons: tunnel: Add support for GRETAP tunnels. (#34)
This commit adds support to configure and check gretap tunnels. An example
  configuration could look like this:

    iface tap0 inet tunnel
        mode gretap
        local 10.132.255.3
        endpoint 10.132.255.1
        ttl 64
        mtu 1400
        tunnel-physdev eth0
        #
        address 10.10.0.1/2

  ifup will happily configure the interface (which it does even without this
  patch) and ifquery now can successfully validate the configure interface:

    cr03.in.ffho.net:~# ifquery -c tap0
    iface tap0 inet tunnel                   [[ OK ]]
        tunnel-physdev eth0                  [[ OK ]]
        endpoint 10.132.255.1                [[ OK ]]
        local 10.132.255.3                   [[ OK ]]
        mode gretap                          [[ OK ]]
        ttl 64                               [[ OK ]]
        mtu 1400                             [[ OK ]]
        address 10.10.0.1/24                 [[ OK ]]

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2018-03-13 14:54:31 +11:00
008f587603 addons: batman_adv: Add support for more B.A.T.M.A.N. adv. attributes. (#35)
* addons: batman_adv: Rework B.A.T.M.A.N. adv. attribute handling.

  This commit reworks the internal handling of B.A.T.M.A.N. adv. attributes
  within the plugin. The new approach on setting and checking attributes is
  more generic and allows adding more B.A.T.M.A.N. adv. which should be set
  as attributes of an B.A.T.M.A.N. adv. interface in a simple way.

  This commit does not introduce any changes visibile to the user.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>

* addons: batman_adv: Add support for more B.A.T.M.A.N. adv. attributes.

  This commit adds supports for setting the following optional attributes:
   * gw-mode (one of { off, client, server })
   * multicast-mode (can be 'enabled' or 'disabled')
   * distributed-arp-table (cat be 'enabled' or 'disabled')

  Example config:

  pandora:~# ifquery -c bat-foo
  iface bat-foo                                         [pass]
      batman-ifaces dummy-bat                           [pass]
      batman-ifaces-ignore-regex                        [pass]
      batman-hop-penalty 7                              [pass]
      batman-multicast-mode enabled                     [pass]
      batman-distributed-arp-table enabled              [pass]
      batman-gw-mode client                             [pass]

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2018-03-13 14:54:25 +11:00
fa83ce4e36 Addons/tunnel: fix typo in validvals (#31) 2018-03-13 14:54:19 +11:00
8de397effa addons: address: Fix handling of 'pointopoint' attr. (#23)
Due to a simple logic bug the 'pointopoint' attribute was ignored when
  specifying and address as <ip/mask> and only considered when IP and mask
  where given seperately. This commit fixes this behaviour.

  When configured in ptp mode »ip addr« will show the IP address without a
  netmask which will make »ifquery -c« mark the IP as failed. The check has
  been fixed, too.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:54:05 +11:00
2e2adb0e84 Add support GRE/SIT tunnels. (#20)
This commit adds support for configuring GRE/IPIP/SIT tunnel interfaces as know
from previous versions of ifupdown. Currently only configuration checks for GRE
and SIT tunnels are implemented.

A tunnel interface configuration could look like this:

auto gre42
iface gre42 inet tunnel
        mode     gre
        local    198.51.100.1
        endpoint 203.0.113.2
	#
	# optional tunnel attributes
        ttl      64
        mtu      1400
	tunnel-physdev eth0
        #
        address  192.0.2.42/31
        address  2001:db8:d0c:23::42/64

auto he-ipv6
iface he-ipv6 inet tunnel
	mode sit
	endpoint 203.0.113.6
	local    198.51.100.66
	#
	# optional tunnel attributes
	ttl 255
	mtu 1466
	tunnel-physdev vrf_external
	#
	address 2001:db8:666::2/64

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:50:31 +11:00
6bfea931ff batman_adv: Ignore non-existing batman interface when setting up batman iface.
Previously a single non existing batman member interface could prevent the
  configuration of the batman interface. This patch makes sure only existing
  member interfaces will be considered when setting up the interface.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:47:54 +11:00
a8c175f91f batman_adv: Rename _sysfs_mgmt_member_if() to _batctl_if() and use absolute path to batctl.
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:47:45 +11:00
f08f4d8a8a batman-adv: Show function where error occured in message.
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:47:37 +11:00
53f3470485 Add support for setting phys-dev for VXLAN interfaces.
Add interface configuration option »vxlan-physdev« to set »dev« attribute
  of VXLAN interfaces and a check for the running configuration.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:45:25 +11:00
97e09957b4 Add addon module for B.A.T.M.A.N. advanced interface configuration. (#12)
* Add addon module for B.A.T.M.A.N. advanced interface configuration.

  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: Maximilian Wilhelm <max@rfc2324.org>

* addons: batman_adv: replacing rtnetlink by netlink api call and iproute2 instantiation fix

These changes are due to modifications we introduced in debian-prep2.
We no longer use the rtnetlink_api but a new one "netlink" build on top of python-nlmanager.

* Reflect upstream change where flags are stored.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2018-03-13 14:41:46 +11:00
9a5c706f45 Merge remote-tracking branch 'cumulus/dev'
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-02-23 17:17:26 +07:00
a981087c9e ifupdown2: bond-downdelay and bond-updelay need validrange
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   julien@cumulusnetworks.com

Ticket: CM-15012
2017-02-23 03:13:40 +12:00
932bfff598 ifupdown2: restrict mstpctl-treeprio validvals
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   julien@cumulusnetworks.com

Ticket: CM-15011
2017-02-23 03:12:16 +12:00
8a5626d4f4 Merge remote-tracking branch 'origin/dev-next' into dev 2017-02-18 01:46:15 +07:00
f03e7a2f28 addons: bridge: support for bridge-learning attribute
Ticket: CM-14683
Reviewed By: julien, mallik, anita, vivek, balki, wkok
Testing Done: tested with bridge-learning on off

- support for bridge-learning attribute on bridge ports.
  (currently uses sysfs, must move to netlink soon)
- Additional feature for vxlan bridge ports: sync learning
flag to vxlan bridge ports. No ifquery check for this auto
sync feature.

example config for vxlan ports:
auto vxlan1000
iface vxlan1000
        vxlan-id 1000
        bridge-learning off
        bridge-access 100

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-02-06 10:32:25 -08:00
c3fc3b8f00 addons: bond: adding attribute bond-(up|down)delay
Ticket: CM-8424
Reviewed By: Roopa, Julien
Testing Done: using the config mentioned in bug

updelay

    Specifies the time, in milliseconds, to wait before enabling a
    slave after a link recovery has been detected.  This option is
    only valid for the miimon link monitor.

downdelay

    Specifies the time, in milliseconds, to wait before disabling
    a slave after a link failure has been detected.  This option
    is only valid for the miimon link monitor.

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>

Conflicts:
	ifupdownaddons/bondutil.py
2017-02-01 10:45:56 -08:00
c09025b2b0 Merge branch 'dev' into dev-next 2017-01-27 23:40:07 +03:00
b258e406af addons: vxlan: ifquery: fix remote-ip handling
Ticket: CM-14628
Reviewed By: julien, nikhil, vivek, mallik
Testing Done: Tested with vxlan config and remote ips added externally

Recent handling of vxlan-purge-routes as part of CM-13815 did not fix
handling of remote ips during ifquery --check and ifquery --running.
This patch fixes ifquery -c and ifquery running for external
vxlan controller cases.

Without this, ifquery --check always returns exit code of 1 for
external vxlan controller configs

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-26 14:57:33 -08:00
c529c18583 Merge branch 'dev' into dev-next 2017-01-24 02:53:53 +03:00
c426b8dcc7 Revert "addons: mstpctl: reset (default) bridge mstpctl options when users remove settings"
This reverts commit a3d36dd86d6888a0b61b506a534c24ea4867a18f.
Ticket CM-14516 has been filed to track this

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2017-01-20 13:39:45 -08:00
d03b0695e0 addons: mstpctl: ifquery -c --with-default, ignore mstpctl default attributes when stp is off
Ticket: CM-13779
Reviewed By: roopa, satish, julien
Testing Done: testing the config given in the CM

mstpctl showportdetail <bridge> command won't output anything when
bridge-stp is off, therefore ignore mstpctl default attributes during
ifquery -c --with-defaults

This patch also consistently updates bridge and bridge port cache
at the same time.
Earlier bridge and bridge port cache were not consistent
because of the early return condition
    attrs = MSTPAttrsCache.get(bridgename)
        if attrs:
            return attrs
If either of bridge port cache and bridge cache is updated, function used to
return inconsistent cache values

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
2017-01-20 10:42:05 -08:00
4b875c17c6 addons: address: replay all gateway commands at every ifreload
Ticket: CM-14472
Reviewed By: Roopa, Julien
Testing Done: used the config mentioned in CM

Fix introduced by "addons: address: add both v4 and v6 gateways
instead of just one" changed the way gateway commands were configured.
ifupdown2 does not replay default gateway commands on ifreload

This patch ensures all the gateway commands at every ifreload are replayed

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
2017-01-17 17:55:35 -08:00
a3d36dd86d addons: mstpctl: reset (default) bridge mstpctl options when users remove settings
Ticket: CM-8401
Reviewed By: Roopa, Julien
Testing Done: tested on all bridge mstpctl attributes.

This patch resets th following bridge attributes to defauls when
users remove settings from interface config file.

mstpctl-treeprio
mstpctl-ageing
mstpctl-fdelay
mstpctl-maxhops
mstpctl-maxage
mstpctl-txholdcount
mstpctl-forcevers
mstpctl-hello

Added an api in policy manager to get policy default value of any
module attribute.

Added a cache for bridge attributes to save some runtime

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
2017-01-17 17:19:54 -08:00
f66fd6f12e 'link-down' needs 'default' entry in dictionary
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   roopa@cumulusnetworks.com

Ticket: CM-14330
2017-01-13 18:18:39 +00:00
5b66674938 addons: address: log error when ip route gateway command fails
Ticket: CM-14386
Reviewed By: Roopa, Purna, NIkhil G
Testing Done:

We have incorrect Address Range and Default g/w configuration. Kernel will give
error in such condition and ignore the route. but ifupdown2 is masking this
error and making user in blind spot.

$ ifdown -a -X eth0
$ ifreload -a
error: h2t_c-1: cmd 'ip route add table DataVrf1080 default via 3.0.0.1 dev h2t_c-1' failed: returned 2 (RTNETLINK answers: Network is unreachable
)
$ echo $?
1
$ ifquery -a
auto h2t_c-1
iface h2t_c-1
      address 6.0.0.1/26
      address 2001:fee1::1/64
      bond-slaves swp1 swp2
      bond-mode 802.3ad
      bond-miimon 100
      bond-min-links 1
      bond-xmit-hash-policy layer3+4
      bond-lacp-rate 1
      mtu 9152
      alias Local Node/s hostd-1-1 and Ports swp1 swp2 <==> Remote  Node/s torc-1-1 torc-1-2 and Ports swp7 swp7
      gateway 3.0.0.1
      gateway 2001:fee1::1
      vrf DataVrf1080

auto DataVrf1080
iface DataVrf1080
      vrf-table 1080

$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-13 06:51:28 +03:00
23d70d0414 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-14209
Reviewed By: Julien
Testing Done:

vids was a list and pvid is not a list, hence the check was failing

$ cat /etc/network/interfaces
auto vxlan1000
iface vxlan1000
      vxlan-id 1000
      vxlan-local-tunnelip 172.16.20.103
      vxlan-remoteip 172.16.20.106

auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp1 vxlan1000
      bridge-vids 100 200

$
$ ifdown -a -X eth0
$ ifreload -a -s
warning: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
$ ifreload -a
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$ ifreload -a
error: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-12 23:08:57 +03:00
cc90a0c8ec Revert "addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port"
This reverts commit 4e2db079564a5055a03d2e7e97807b7956c6e110.

reverting because of some reported false errors.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-11 19:58:02 -08:00
4e2db07956 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-14209
Reviewed By: Roopa
Testing Done:

$ cat /etc/network/interfaces
auto vxlan1000
iface vxlan1000
       vxlan-id 1000
       vxlan-local-tunnelip 172.16.20.103
       vxlan-remoteip 172.16.20.106

auto bridge
iface bridge
       bridge-vlan-aware yes
       bridge-ports swp1 vxlan1000
       bridge-vids 100 200

$
$ ifdown -a -X eth0
$ ifreload -a -s
warning: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
$ ifreload -a
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$ ifreload -a
error: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-12 03:19:19 +03:00
aec6cd82f6 addons: bridge: fix syntax check failing on bridge without port
Ticket: CM-13653
Reviewed By: Roopa, Daniel W
Testing Done:

$ cat /etc/network/interfaces
auto bridge
iface bridge
    bridge-vids 10-15
    bridge-vlan-aware yes

$ ifup --syntax-check --verbose --all --interfaces /etc/network/interfaces
info: loading builtin modules from /usr/share/ifupdown2/addons
info: executing /var/lib/ifupdown2/hooks/get_reserved_vlan_range.sh
info: executing /bin/pidof -x clagd
info: executing /var/lib/ifupdown2/hooks/get_reserved_vlan_range.sh
info: executing /bin/pidof mstpd
info: executing /sbin/ip rule show
info: executing /sbin/ip -6 rule show
info: address: using default mtu 1500
info: 'link_master_slave' is set. slave admin state changes will be delayed till the masters admin state change.
info: processing interfaces file /etc/network/interfaces
$ echo $?
0
$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-11 23:01:11 +03:00
b207b83d8c vxlan: add new attribute vxlan-purge-remotes to make purging remotes explicit
Ticket: CM-13815
Reviewed By:
Testing Done: Tested remote purging

vxlan purging remotes is a feature where we clean up
existing fdb remote entries in favor of the ones specified in the
interfaces file. Obviously in precense of an external controller
like bgp or vxrd this is not a good thing because these remotes
maybe installed by these external controller  daemons.
This patch makes the purgining behaviour explicit by a new attribute.
We will ship with a default policy file which sets vxlan-purge-remotes to no.

This also cleans up a bug introduced by fix to CM-13767 where we were
trying to delete default remote entry pointing to the local ip.

more details below.

problem:
for static configuration, ifupdown2 has some code to "purge" existing
default remote fdb entries and install
new ones corresponding to the ones specified in the interfaces file
(with vxlan-remoteip).
For non-static configuration (ie in presence of an external controller),
it skips this "purge"...because these entries
maybe added by an external controller. To detect that there is no
external controller running..., today it
checks if the vxrd process is running or not. We need to extend this
check to now include bgp (for evpn)...and it gets trickier with bgp
since just checking the quagga pid is not good.

Solution:
I would like to make this purging explicit with an attribute. This patch
adds a 'vxlan-purge-remotes yes|no' attribute. vxlan remote address purging
will take into affect when:
        vxlan-remoteip attribute is present in the interfaces file
        or
        vxlan-purge-remotes is set to 'yes'

We will ship a ifupdown2 default policy file to disable purging by
default (vxlan-purge-remotes no).
For existing customer deployed static configs, since the interfaces file
will already have remote entries, this change
will behave as existing code (ie purge = yes).

For existing vxrd deployments, as long as already deployed interfaces
files have no vxlan-remoteip entries,
this patch does not change any behavior (can people confirm that
existing vxrd deployments have no vxlan-remoteip entries in their
interfaces ?)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-10 17:52:41 -08:00
b8b579f36d Merge branch 'dev' into dev-next 2017-01-08 16:32:35 +03:00
7bdf7072bd addons: bridge: add support for bridge-vids alias: bridge-trunk
Daniel: Having both bridge-vids and bridge-trunk at the
net add interface NAME <TAB>
level creates confusion… need to remove bridge-vids

This commit adds bridge-trunk as an alias for bridge-vids

Ticket: CM-14041
Reviewed By: Roopa, Nikhil G
Testing Done:

$ ifquery -a
auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp1 swp9
      bridge-trunk 2-100
      bridge-pvid 101
      bridge-stp on

$ ifrelaod -a
$ ifquery -a -c
auto bridge
iface bridge                                                        [pass]
      bridge-vlan-aware yes                                       [pass]
      bridge-ports swp1 swp9                                      [pass]
      bridge-stp yes                                              [pass]
      bridge-pvid 101
      bridge-trunk 2-100                                              []

$ ifquery -a -r
auto bridge
iface bridge
      bridge-vlan-aware yes
      bridge-ports swp9 swp1
      bridge-stp yes
      bridge-pvid 101
      bridge-vids 2-101

$ net show bridge vlan
port       vlan ids
swp1        2-100
             101 PVID Egress Untagged

swp9          2-100
               101 PVID Egress Untagged

bridge         None

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-08 07:38:35 +03:00
984146fb34 Merge branch 'dev' into dev-next 2017-01-08 05:40:26 +03:00
a9633d0591 addons: bond: add support for attribute aliases (bond-ports)
This features will allow attributes to have aliases. Our use case today is
between bond-slaves and bridge-ports, which be a little confusing.
It follows the kernel api and existing linux tools. Bonding driver calls them
slaves and to the bridge driver they are ports.

With NCLU we we would like to be more consistent. We will now also support
"bond-ports"a

Ticket: CM-12763
Reviewed By: Roopa
Testing Done:

$ ifquery -a -c
auto bond0
iface bond0                                                         [pass]
      bond-slaves swp1                                            [pass]

auto bond1
iface bond1                                                         [pass]
      bond-ports swp2                                             [pass]

root@cel-redxp-06:~# ifquery -a -r
auto bond0
iface bond0
      bond-lacp-bypass-allow 0
      bond-slaves swp1
      bond-mode 802.3ad
      bond-use-carrier 1
      bond-lacp-rate 1
      bond-min-links 1
      bond-miimon 100
      bond-xmit-hash-policy layer3+4

auto bond1
iface bond1
      bond-lacp-bypass-allow 0
      bond-slaves swp2
      bond-mode 802.3ad
      bond-use-carrier 1
      bond-lacp-rate 1
      bond-min-links 1
      bond-miimon 100
      bond-xmit-hash-policy layer3+4

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-06 17:58:49 +03:00
ac49bf0ec5 addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-12235
Reviewed By: Roopa, Nikhil G
Testing Done:

$ ifquery vx br0
auto vx
iface vx
      vxlan-id 14567100
      vxlan-local-tunnelip 27.0.0.11
      mstpctl-portbpdufilter yes
      mstpctl-bpduguard yes
      mtu 1500

auto br0
iface br0
      bridge-stp off
      bridge-ports vx
      bridge-vlan-aware yes

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2017-01-06 05:20:10 +03:00
9858b0a680 ifupdown: add missing supporting code for 'link-down [yes|no]'
Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'link-down [yes|no]' will not work in all cases when 'inet manual'
is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'link-down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 11:28:16 -08:00
417e5675c4 addons: link: add new 'link-down [yes|no]' link attribute to keep link down
Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is
pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'link-down [yes|no]' will not work in all cases when 'inet
manual' is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'link-down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2017-01-05 11:07:41 -08:00