[SOLVED] Cannot relate warnings upon running dhclient
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
For a long time already, dhclient gives me two warnings upon running
Code:
rosalind@dna:~$ sudo dhclient -d
Every run succeeds, though; therefore I have ignored the situation until now.
Here is the beginning of the output:
Code:
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhclient.conf line 16: expecting a statement.
^
/etc/dhcp/dhclient.conf line 35: semicolon expected.
^
(...)
And here is the *complete* configuration-file “/etc/dhcp/dhclient.conf”. Most of the content are the original commented sections. I highlight the two lines 16 and 35 (1 curly bracket, only) from the console-output:
Code:
# Configuration file for /sbin/dhclient.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers, netbios-name-servers, netbios-scope, interface-mtu, rfc3442-classless-static-routes, ntp-servers;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/sbin/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
host kurti.uplawski.eu {
hardware ethernet 54:83:3A:C4:F9:84;
fixed-address 192.168.1.10;
}
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
Needless to say, I do not see what's wrong. Do you?
Last edited by Michael Uplawski; 06-19-2021 at 08:55 AM.
Reason: Forgot the question. Corrected the word “Forgot”.
Often writers of code are using canned libraries to read conf files. My guess it is some line buffer limit, which is creating a non-semicolon entry on line 16. The one on my machine is like:
Often writers of code are using canned libraries to read conf files. My guess it is some line buffer limit, which is creating a non-semicolon entry on line 16. The one on my machine is like:
I did some testing on my system, all options parsed correctly. I'd start looking for special characters in your file. I use the ":set list" option in vi, or "cat -v FILE".
I did some testing on my system, all options parsed correctly. I'd start looking for special characters in your file. I use the ":set list" option in vi, or "cat -v FILE".
Thank you for the feedback.
I have done both, “:set list” shows only the start of each line, its end and the tabulator which precedes indented option values. I have also scrutinized the output of “cat -v”, line by line and cannot see anything odd.
The same test with a new file, containing the same option-values and no comments results in the same warnings.
At this point, I tend to let the issue rest. My network works.
@elgrandeperro, you helped me a lot just by confirming that there are no obvious syntactical errors in the configuration-file.
rna@retikulum:~$ dhclient -d
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhclient.conf line 32: expecting a statement.
^
/etc/dhcp/dhclient.conf line 51: semicolon expected.
^
Listening on LPF/wlp2s0/e2:ae:6f:c4:2a:b5
Sending on LPF/wlp2s0/e2:ae:6f:c4:2a:b5
Listening on LPF/enp1s0/54:e1:ad:8b:a7:99
Sending on LPF/enp1s0/54:e1:ad:8b:a7:99
Sending on Socket/fallback
DHCPREQUEST for 192.168.1.88 on wlp2s0 to 255.255.255.255 port 67
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 7
DHCPACK of 192.168.1.88 from 192.168.1.5
RTNETLINK answers: File exists
bound to 192.168.1.88 -- renewal in 40654 seconds.
I was wondering if an option might be missing and an incoherence exists betweeen the requests and options, but all I tried resulted in clearly expressed errors, which were directly related to my manipulations.
Btw. the two man-pages on dhclient.conf and on the dhclient-options are quite obviously not redacted with people in mind. I did, but I shall not consult them again.
I'd continue the trouble shooting by commenting out the lower half of the requests, see if that makes the first error go away. If so, then uncomment the 3rd quarter and try again. Eventually you'll find the line that is throwing the error.
I'd continue the trouble shooting by commenting out the lower half of the requests, see if that makes the first error go away. If so, then uncomment the 3rd quarter and try again. Eventually you'll find the line that is throwing the error.
TY for the idea.
I have subsequently commented out everything, starting from the bottom. The first error is then detected one line above the previous until it reports a missing statement in line 0. That is about the only time, when I understand the message.
For some time I believe that there is something else to take into consideration, which is probably not even found in the configuration file, meaning: Something else is dysfunctional or I am missing an option or request. Maybe there are other structures to use, in addition to what is already in the configuration.
I am not the original author of the file and I even think that I have personally never touched its content until my OP, above. But for the same reason, my memory may fail me, as this system is running for so long now.
If dhclient is a mystery to me, now, it may just stay that way, as long as it “works for me”. I become immune against this kind of challenge. Anyway, I have to perpare for an annoying voyage to an uncomfortable place and a rotten week-end... Hope to be back monday to see the neighbour's cows peacfully graze on my meadow, as I see them right now behind my back door... That is important, nothing else is! Ω
Thank you all. Enjoy whatever it is you get today and tomorrow.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.