if disconnect the cable, then Linux believes that the cable is still there, because of this does not work keepalived (vrrp)
# for i in $( ls /sys/class/net ); do echo -n $i; ethtool $i | grep Link\ d; done
bond0 Link detected: no
bonding_mastersCannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
eth0 Link detected: yes (cable disconnect)
eth1 Link detected: yes
lo Link detected: yes
It is right because eth0 and 1 is connected to mt7530, eth0 and eth1 just represents the CPU ports on switch and they are always kept as 1g link. The result you expect should depend on ports in the front of board, but those port can’t be model as netdev in kernel .
It is just a notification from hardware but is not reported into netdevice (how do you have multiple ports fitting into single netdev?) as you query got from ethtool. You can use latest kernel to reach what you want, the switch uses dsa to represent each port as independent netdevie.
Hi.
We updated kernel to latest version (4.4.70 from GitHub). ifconfig show us two eth, that always up(problem still here). Must we use some special commands, when compiling the kernel? May be we must install some packages ?
The reason that two ethx interfaces are always up on Ubuntu is that both GMAC-s of MT7623n are connected to MT7530, so the link status doesn’t depend on the status of wan and lan-s port.
If you want to use bonding driver, please use arp method ranther than mii link status. Also the DSA driver is available on Openwrt(lede), you can have a try.