I want to check a physical ethernet port status on GL-Inet AR300M flashed with 21.02.1 and all the methods I've tried report that eth0
always has carrier even when nothing is plugged in:
-
ethtool eth0
saysLink detected: yes
-
/sys/class/net/eth0/carrier
is always1
-
ip link show
never saysNO-CARRIER
foreth0
-
ubus call network.device status '{ "name": "eth0" }'
always reports"carrier": true,
-
swconfig dev switch0 port 0 get link
always reportsport:0 link:up
Full disclosure I've merged both ports into LAN and deleted WAN:
# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.226.1'
option ipv6 '0'
@alzhao @jow any ideas on how I can get an actual status of eth0
on this router on 21.02?