Enable LAN port link status in system log when down

Because the WAN isn't down.

Only your LAN connection...when you pull the ethernet cable from your computer.

It should display WAN is down right if there's no cable plug in the WAN port? My other openwrt router which is NEWIFI would always display a log that WAN is down whenever cable is unplug then display a log is now UP when it's plug again.

Sorry for the confusion, I meant for the cable connected in the WAN port, I tried to unplug it then plug again but it's just doesn't display a log whenever I do that.

Thread title -

Enable LAN port link status in system log when down

This was your original question.

Yeah, I followed up in my second comment about the WAN also, sorry for that but it's the same issue in LAN also. I tried to unplug the cable connected from my PC to LAN port of the router but there's no log also.

What device, and what version of OpenWrt?

Could be your log level.

It's TPlink archer c5 v2 using Openwrt version 19.07.10

I just unplugged my WAN cable (on Port 1), and then plugged it back in -

logread -

Thu May 12 00:03:09 2022 kern.info kernel: [168369.008273] Atheros AR8216/AR8236/AR8316 mdio.0:00: Port 1 is down
Thu May 12 00:03:17 2022 kern.info kernel: [168377.199989] Atheros AR8216/AR8236/AR8316 mdio.0:00: Port 1 is up

dmesg -

[168369.008273] Atheros AR8216/AR8236/AR8316 mdio.0:00: Port 1 is down
[168377.199989] Atheros AR8216/AR8236/AR8316 mdio.0:00: Port 1 is up

This worked when I'm using my other Openwrt Newifi, it's just weird that in my TPLink ARcher C5 v2 this doesn't shows up.

Might need to change something here?

root@OpenWrt:~# cat /etc/config/system

config system
        option hostname 'OpenWrt'
        option ttylogin '0'
        option log_size '64'
        option urandom_seed '0'
        option zonename 'Asia/Manila'
        option cronloglevel '5'
        option log_proto 'udp'
        option conloglevel '8'
        option timezone 'PST-8'

Mine is currently set to '6'.

Compare the C5 configs to your other OpenWrt device.

Okay I tried all the numbers from 1-8 but sadly logs about "interface down" doesn't appear. I guess this is an issue for this version of this router? Downgrading might really solve the issue but I'm hoping there's still a possible way to fix this with this latest supported version of this device.

Or maybe this version just doesn't really support the "interface down" logging because if it did, it should be working at the first install and without any tweak.

you can probably work around it, for instance running a ping script, that will alert you (I assume that's the use case here) about any WAN down time.

As suggested above, did you compare the C5 configs with your other OpenWrt device that logs it correctly?

Owh, might be helpful, running a loop ping for the wan and just log when there's a downtime, could you guide me for this if it's possible?

Sorry, I can't compare right now since the other openwrt device is in my province, so what I have right now is the archer c5 v2.

I think it's your device...

The C5 v2 uses the Broadcom chipset, which has very limited support on OpenWrt.

@frollic has the best solution for you.

Yep it's a broadcom so this likely also the reason why it cannot satisfy all the feature of the openwrt and I'm aware that WIFI wont work too. I used the openwrt for this device because of the SQM and dns-over-https.