my wan interface uses DHCP client to get IP address, I see udhcpc running in ps but there isn't any udhcpc related events in syslog unlike what I have seen in other posts. Where is the setting to enable udhcpc logs? Thanks
Perhaps not what you asked for but:
ifstatus wan
shows information of the WAN interface
Edit:
I do have some things in the log:
root@DL-WRX36:~# logread -e wan
Fri Aug 11 14:41:31 2023 kern.info kernel: [ 4.672017] nss-dp 3a007000.dp6-syn wan: Registered netdev wan(qcom-id:6)
Fri Aug 11 14:41:34 2023 daemon.notice netifd: Interface 'wan' is enabled
Fri Aug 11 14:41:34 2023 daemon.notice netifd: Interface 'wan6' is enabled
Fri Aug 11 14:41:37 2023 daemon.notice netifd: Network device 'wan' link is up
Fri Aug 11 14:41:37 2023 daemon.notice netifd: Interface 'wan' has link connectivity
Fri Aug 11 14:41:37 2023 daemon.notice netifd: Interface 'wan' is setting up now
Fri Aug 11 14:41:37 2023 daemon.notice netifd: Interface 'wan6' has link connectivity
Fri Aug 11 14:41:37 2023 daemon.notice netifd: Interface 'wan6' is setting up now
Fri Aug 11 14:41:37 2023 kern.info kernel: [ 20.568951] nss-dp 3a007000.dp6-syn wan: PHY Link up speed: 1000
Fri Aug 11 14:41:37 2023 kern.info kernel: [ 20.569030] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
Fri Aug 11 14:41:37 2023 daemon.notice netifd: wan (6018): udhcpc: started, v1.36.1
Fri Aug 11 14:41:37 2023 daemon.notice netifd: wan (6018): udhcpc: broadcasting discover
Fri Aug 11 14:41:40 2023 daemon.notice netifd: wan (6018): udhcpc: broadcasting discover
Fri Aug 11 14:41:40 2023 daemon.notice netifd: wan (6018): udhcpc: broadcasting select for 192.168.0.9, server 192.168.0.1
Fri Aug 11 14:41:41 2023 daemon.notice netifd: wan (6018): udhcpc: lease of 192.168.0.9 obtained from 192.168.0.1, lease time 4294967295
Fri Aug 11 14:41:41 2023 daemon.notice netifd: Interface 'wan' is now up
Fri Aug 11 14:41:43 2023 daemon.notice netifd: Interface 'wan6' is now up
It is enabled. udhcpc is part of busybox.
Normal "logread" shows the items
OpenWrt SNAPSHOT, r23699-9feed15a0f
-----------------------------------------------------
root@router5:~# logread | grep udhcpc | head -n 10
Thu Aug 10 18:15:34 2023 daemon.notice netifd: wan (3052): udhcpc: started, v1.36.1
Thu Aug 10 18:15:34 2023 daemon.notice netifd: wan (3052): udhcpc: broadcasting discover
Thu Aug 10 18:15:34 2023 daemon.notice netifd: wan (3052): udhcpc: broadcasting select for 87.92.120.83, server 62.241.198.74
Thu Aug 10 18:15:35 2023 daemon.notice netifd: wan (3052): udhcpc: lease of 87.92.120.83 obtained from 62.241.198.74, lease time 3600
Thu Aug 10 18:46:48 2023 daemon.notice netifd: wan (3052): udhcpc: sending renew to server 62.241.198.74
Thu Aug 10 18:46:48 2023 daemon.notice netifd: wan (3052): udhcpc: lease of 87.92.120.83 obtained from 62.241.198.74, lease time 3600
Thu Aug 10 19:16:48 2023 daemon.notice netifd: wan (3052): udhcpc: sending renew to server 62.241.198.74
Thu Aug 10 19:16:49 2023 daemon.notice netifd: wan (3052): udhcpc: lease of 87.92.120.83 obtained from 62.241.198.74, lease time 3600
Thu Aug 10 19:46:49 2023 daemon.notice netifd: wan (3052): udhcpc: sending renew to server 62.241.198.74
Thu Aug 10 19:46:49 2023 daemon.notice netifd: wan (3052): udhcpc: lease of 87.92.120.83 obtained from 62.241.198.74, lease time 3600
somehow I don't have it, and logread returns segfault
root@GL-X3000:~# logread
Segmentation fault
Are you using the GL-inet stock firmware?
What is the output of
ubus call system board
Meanwhile, in standard OpenWrt, the udhcpc events will be in the log unless:
- you have one or more processes with a lot of log events such that the udhcpd related entires are flushed out (the log file is stored in RAM and is intentionally constrained in size as to not allow it to consume all the memory; when it reaches the max size, the oldest entries roll off the edge as new entries come in).
- your dhcp lease is sufficiently long such that the last renewal event was long enough ago that the above happened, even if you don't have any log-heavy processes running.
or....
if you're not running DHCP client on any of the interfaces (although actualy, if you have a DHCP server for your lan running on the device, it will do a request before starting the server to avoid becoming a rogue DHCP server on a network that already has one).
yeah I am running gl-inet's firmware for GL-X3000. The log had not rolled yet and there was no udhcpc logs even from booting or manually triggered dhcp renewal.
after logd restart from changing logging settings (increasing buffer), I no longer see segfault and now udhcpc logs do show up in syslog. weird. The issue might be related to whatever causing logread to segfault.
Odd set of issues. But at this point, since you're using the vendor firmware, you should direct your questions to the Gl-inet support channels, or install official OpenWrt (and then we can help you here).