SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
and this in /etc/dhcpd.conf (I am using the ISC dhcp server, not dnsmasq):
Code:
# Log to local3.debug so that we can redirect logging to a separate file.
log-facility local3;
This is the kind of stuff that gets logged then:
Code:
Jun 7 20:30:20 door dhcpd: DHCPREQUEST for 192.168.0.99 from 00:11:XX:XX:XX:XX (icculus-wireless) via eth0
Jun 7 20:30:20 door dhcpd: DHCPACK on 192.168.0.99 to 00:11:XX:XX:XX:XX (icculus-wireless) via eth0
Jun 8 04:51:50 door dhcpd: DHCPINFORM from 192.168.0.5 via eth0
Jun 8 04:51:50 door dhcpd: DHCPACK to 192.168.0.5
Jun 8 04:51:53 door dhcpd: DHCPINFORM from 192.168.0.5 via eth0
Jun 8 04:51:53 door dhcpd: DHCPACK to 192.168.0.5
Jun 8 10:10:40 door dhcpd: DHCPINFORM from 192.168.0.5 via eth0
Jun 8 10:10:40 door dhcpd: DHCPACK to 192.168.0.5
Jun 8 10:10:43 door dhcpd: DHCPINFORM from 192.168.0.5 via eth0
Jun 8 10:10:43 door dhcpd: DHCPACK to 192.168.0.5
Jun 8 14:16:18 door dhcpd: Added new forward map from room.dyn.my.lan to 192.168.0.5
Jun 8 14:16:18 door dhcpd: added reverse map from 5.0.168.192.in-addr.arpa. to room.dyn.my.lan
Jun 8 14:16:18 door dhcpd: DHCPREQUEST for 192.168.0.5 from 00:02:XX:XX:XX:XX via eth0
Jun 8 14:16:18 door dhcpd: DHCPACK on 192.168.0.5 to 00:02:XX:XX:XX:XX via eth0
Jun 8 14:17:20 door dhcpd: DHCPINFORM from 192.168.0.5 via eth0
Jun 8 14:17:20 door dhcpd: DHCPACK to 192.168.0.5
You won't get much more than that in a simple setup.
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.
$ grep dhcpcd /var/log/debug
Jun 7 20:30:36 icculus dhcpcd[2358]: broadcasting DHCP_REQUEST for 192.168.0.8
Jun 7 20:30:36 icculus dhcpcd[2358]: dhcpIPaddrLeaseTime=1209600 in DHCP server response.
Jun 7 20:30:36 icculus dhcpcd[2358]: dhcpT1value is missing in DHCP server response. Assuming 604800 sec
Jun 7 20:30:36 icculus dhcpcd[2358]: dhcpT2value is missing in DHCP server response. Assuming 1058400 sec
Jun 7 20:30:36 icculus dhcpcd[2358]: DHCP_ACK received from (192.168.0.11)
Jun 7 20:30:36 icculus dhcpcd[2406]: broadcasting DHCP_REQUEST for 192.168.0.99
Jun 7 20:30:40 icculus dhcpcd[2406]: dhcpIPaddrLeaseTime=1209600 in DHCP server response.
Jun 7 20:30:40 icculus dhcpcd[2406]: dhcpT1value is missing in DHCP server response. Assuming 604800 sec
Jun 7 20:30:40 icculus dhcpcd[2406]: dhcpT2value is missing in DHCP server response. Assuming 1058400 sec
Jun 7 20:30:40 icculus dhcpcd[2406]: DHCP_ACK received from (192.168.0.11)
Jun 7 20:30:41 icculus dhcpcd[2614]: broadcasting DHCP_REQUEST for 192.168.0.8
Jun 7 20:31:11 icculus dhcpcd[2614]: timed out waiting for DHCP_ACK response
Jun 7 20:31:11 icculus dhcpcd[2614]: broadcasting DHCP_DISCOVER
To get this, you must run the dhcpcd with the "-d" flag. This is default in Slackware.
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.
Euw. Please don't confuse dhcpcd with dhclient. Dhclient is a much more useful tool than that.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.