Page MenuHomeVyOS Platform

Primary interface for bond not getting configured on VyOS 1.2.0 / 1.2.1
Closed, ResolvedPublic


getting error when trying to set primary interface for existing bond :-
vyos@vyos:~$ show configuration commands | grep bond
set interfaces bonding bond2 hash-policy 'layer2'
set interfaces bonding bond2 mode '802.3ad'
set interfaces bonding bond3 hash-policy 'layer2+3'
set interfaces bonding bond3 mode '802.3ad'
set interfaces ethernet eth1 bond-group 'bond2'
set interfaces ethernet eth2 bond-group 'bond2'
set interfaces ethernet eth3 bond-group 'bond3'

vyos@vyos# set interfaces bonding bond2 primary 'eth1'
[ interfaces bonding bond2 primary eth1 ]
eth1 eth2

[ interfaces bonding bond2 primary eth1 ]
sh: line 0: echo: write error: Permission denied

interfaces bonding bond2 primary failed
Commit failed

vyos@vyos:~$ show version
Version: VyOS 1.2.0-rolling+201905140337
Built by:
Built on: Tue 14 May 2019 03:37 UTC
Build ID:

Architecture: x86_64


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close

Revisions and Commits

Event Timeline

rohitthakur2590 created this task.
rohitthakur2590 created this object in space S1 VyOS Public.

mode 802.3ad doesn't support setting a primary interface.

root@vyos:~# cat /sys/class/net/bond0/bonding/mode 
802.3ad 4
root@vyos:~# cat /sys/class/net/bond0/bonding/slaves 
eth3 eth4 eth2 eth1
root@vyos:~# echo "eth1"> /sys/class/net/bond0/bonding/primary
-bash: echo: write error: Permission denied

The failing line is in


	A string (eth0, eth2, etc) specifying which slave is the
	primary device.  The specified device will always be the
	active slave while it is available.  Only when the primary is
	off-line will alternate devices be used.  This is useful when
	one slave is preferred over another, e.g., when one slave has
	higher throughput than another.

	The primary option is only valid for active-backup(1),
	balance-tlb (5) and balance-alb (6) mode.

A check should be added to only allow setting primary on active-backup, balance-tlb and balance-alb but I'm not sure how.

GitHub <> closed this task as Resolved by committing Restricted Diffusion Commit.Jul 18 2019, 11:08 PM
GitHub <> added a commit: Restricted Diffusion Commit.
GitHub <> added a commit: Restricted Diffusion Commit.