Link Aggregation on WRT1900ACS and R7800

Hi,

I am trying to aggegrate two lan ports using 802.3ad static lacp (with Cisco SG300-28P managed switch) or software lb (balance-rr).

I am having trouble to bring down vlan interfaces using ifconfig or ip link commands.
Using Wrt1900acs and R7800 devices with follwing builds:

Wrt1900acs Firmware Version: OpenWrt SNAPSHOT r13342-e35e40ad82 / LuCI Master git-20.144.63033-62ed4e6
Wrt1900acs Kernel Version: 5.4.42
Wrt1900acs firmware Source: Davidc502

R7800: using official build - 19.07.5

All the below findings and commands are from wrt1900acs. Same issue also exists for r7800.
The only difference is that eth1 is lan switch pon R7800 whereas eth0 is lan switch on wrt1900acs.

I am trying to use Physical switch port 3 and 4 for link aggregation. On software switch, they are presented as port 0 and 1.
In order to classify these two switch ports as distinct ports, I have created two vlans - 3 and 4, one for each port (CPU tagged and Port Untagged).

I am currenly having issuing while try to add/enslave eth0.3 and eth0.4 to bond0 master.
In order to enslave to bond master interface, slave interface must be down. However, I cannot bring eth0.3 or eth0.4 down using ifconfig and ip link command. When I execute commands, interface is brought up instantly, not sure what is triggering this.

eth0.1 (the default lan interface vlan1) and eth1.2 (the default wan interface vlan2) is not affected. I am able to bring eth0.1 and eth1.2 down using ifconfig or ip link command. So just the custom/manually added vlan interfaces are affected by this issue.
Once eth0.1 and eth1.2 are down, I can enslave them to bond0. Verified.

System Log:

Sun Jan  3 14:50:37 2021 daemon.notice netifd: VLAN 'eth0.3' link is down
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' has link connectivity loss
Sun Jan  3 14:50:37 2021 daemon.notice netifd: eth3 (11272): udhcpc: read error: Network is down, reopening socket
Sun Jan  3 14:50:37 2021 daemon.info avahi-daemon[3476]: Interface eth0.3.IPv6 no longer relevant for mDNS.
Sun Jan  3 14:50:37 2021 daemon.info avahi-daemon[3476]: Leaving mDNS multicast group on interface eth0.3.IPv6 with address fe80::1691:82ff:fec2:72a6.
Sun Jan  3 14:50:37 2021 daemon.info avahi-daemon[3476]: Withdrawing address record for fe80::1691:82ff:fec2:72a6 on eth0.3.
Sun Jan  3 14:50:37 2021 daemon.notice netifd: eth3 (11272): udhcpc: received SIGTERM
Sun Jan  3 14:50:37 2021 daemon.notice netifd: eth3 (11272): udhcpc: entering released state
Sun Jan  3 14:50:37 2021 daemon.notice netifd: eth3 (11272): Command failed: Permission denied
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' is now down
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' is disabled
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' is enabled
Sun Jan  3 14:50:37 2021 daemon.notice netifd: VLAN 'eth0.3' link is up
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' has link connectivity
Sun Jan  3 14:50:37 2021 daemon.notice netifd: Interface 'eth3' is setting up now

Sun Jan  3 14:50:59 2021 daemon.notice netifd: eth4 (9970): udhcpc: received SIGTERM
Sun Jan  3 14:50:59 2021 daemon.notice netifd: eth4 (9970): udhcpc: entering released state
Sun Jan  3 14:50:59 2021 daemon.notice netifd: eth4 (9970): Command failed: Permission denied
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is now down
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is disabled
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is enabled
Sun Jan  3 14:50:59 2021 daemon.notice netifd: VLAN 'eth0.4' link is up
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' has link connectivity
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is setting up now
Sun Jan  3 14:50:59 2021 daemon.notice netifd: eth4 (11943): udhcpc: started, v1.31.1
Sun Jan  3 14:50:59 2021 daemon.notice netifd: eth4 (11943): udhcpc: sending discover
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is now down
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is disabled
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is enabled
Sun Jan  3 14:50:59 2021 daemon.notice netifd: VLAN 'eth0.4' link is up
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' has link connectivity
Sun Jan  3 14:50:59 2021 daemon.notice netifd: Interface 'eth4' is setting up now

I have also tried to bring all eth0 vlan interfaces down but that doesn't help either. eth0.3/4 are brought up instantly.

brctl delif br-lan eth0.1
ifconfig eth0.1 down
ifconfig eth0.3 down
ifconfig eth0.4 down

eth0.3/4 ports are connected to Cisco SG300-28P switch with Auto Negotiation enabled.

Can any one please guide me how can I bring eth0.3 and eth0.4 down for enslaving them to bond interface.

Regards
Harmandeep

if you are setting up interfaces manually you should not enable / manage / have the set to auto, in /etc/config/network

search the forum/wiki for 'bond0' for references

Thank you. Silly me. I ignored my instincts :crazy_face:

When I create and initialize vlan interfaces manually, without using LUCI, I am able to bring up and down vlan interfaces. So hoefully, I will be able to enslav vlan interfaces in bonding master.

this article helped with commands