AR-300M -- how to check if either LAN or WAN port have cable plugged in?

So swconfig says there’s just one switch – switch0:

# swconfig list
Found: switch0 - eth1


# swconfig dev switch0 port 0 get link
port:0 link:up speed:1000baseT full-duplex txflow rxflow

Always reports link:up, even with no ethernet cables are plugged into the router. How can I verify if LAN/WAN ports have cable plugged in with active link?

That is running the image build with the image builder on the AR-300M-NOR. Is that how it’s supposed to work @alzhao/@kyson-lok?

For lan: ethtool eth1 | grep "Link detected"
For wan: ethtool eth0 | grep "Link detected"

1 Like

port 0 is CPU so it is always up.

You may need to try swcofig dev switch0 show and use grep to filter the ports.

Using ethtool is also a good choice.