![]() |
Logging of dhcpcd messages
I am trying to diagnose a DHCP setup problem. I simply
need to log dhcpcd messages at a deeper log level than debug. With my current syslog setup, certain dhcpcd REQUEST and ACK messages appear in /var/log/debug; *.=debug /var/log/debug Other post on this subject indicate that to specifically log dhcpcd messages, the following entry in syslog.conf is needed: local0.* /var/log/dhcpcd I have tried this, but see no file in /var/log. I would at least expect to see the same messages that appear in debug. Am I setting this up correctly or am I missing something? |
I have this in my /etc/syslog.conf:
Code:
local3.debug -/var/log/dhcpd.logCode:
# Log to local3.debug so that we can redirect logging to a separate file.Code:
Jun 7 20:30:20 door dhcpd: DHCPREQUEST for 192.168.0.99 from 00:11:XX:XX:XX:XX (icculus-wireless) via eth0Eric |
I suppose that's alright if you're running dhcpd (a server). However
I want to simply log the activity spawned by dhclient (dhcpcd). I tried to place log-facility local3; in dhclient.conf (yes I changed syslog.conf too), but this had no effect. I must admit that I really don't understand logging very well and I have no idea how to make this work. |
Duh... I overlooked the 'c' in "dhcpcd"...
Code:
$ grep dhcpcd /var/log/debugEric |
It is being run with the "-d" flag.
/sbin/dhcpcd -d -t 60 -h 192.168.0.1 eth0 Could it be that I should specify logging-facility or something else on the command line? |
Quote:
|
Pardon me. I was confused for awhile but eventually realized that
dhcpcd and dhclient are two different clients. Oddly enough, all I had to do was change /var/log/dhcpcd to /var/log/dhcpcd.log in syslog.conf to make logging work properly. That is after resetting local3.* to local0.* in syslog. I think local3.* is for dhclient. Speaking of dhclient, if you know how to make it work in Slack I would very much like to know how. I've been testing it too and I can't get any DHCP offers. I have used the standard setup (no dhclient.conf) and can't get any response other than exiting when I run 'dhclient eth0'. Oddly enough, I can set a fixed IP address on eth0 and actually get a response however no DHCPOFFERS are received. Listening on Socket/eth0 Sending on Socket/eth0 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4 Discarding packet with bogus hlen DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 Discarding packet with bogus hlen DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 Discarding packet with bogus hlen DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21 Discarding packet with bogus hlen DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 Discarding packet with bogus hlen DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 Discarding packet with bogus hlen No DHCPOFFERS received No working leases in persistent database - sleeping. dhcpcd doesn't require any current interface to send out its DHCPDISCOVER; what's wrong with dhclient? Is it possible that dhclient only works if the DHCP server is an ISC dhcpd? |
| All times are GMT -5. The time now is 04:00 PM. |