LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-19-2021, 08:40 AM   #1
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623
Blog Entries: 40

Rep: Reputation: Disabled
Cannot relate warnings upon running dhclient


Good afternoon.

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”.
 
Old 06-19-2021, 02:54 PM   #2
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
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:

request request1, request2.....
<tab>request4, ...
<tab>request10, request11,,, requestlast;

I'd certainly break the line up to see if that is the problem.
 
1 members found this post helpful.
Old 06-20-2021, 06:26 AM   #3
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by elgrandeperro View Post
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:

request request1, request2.....
<tab>request4, ...
<tab>request10, request11,,, requestlast;

I'd certainly break the line up to see if that is the problem.

Such a beautiful idea... I tried that immediately. The one line “request ...” has become
Code:
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;
I have also tried:

Code:
request subnet-mask, broadcast-address, time-offset, routers; 
request domain-name, domain-name-servers, domain-search; 
request host-name, dhcp6.name-servers, dhcp6.domain-search; 
request dhcp6.fqdn, dhcp6.sntp-servers, netbios-name-servers; 
request netbios-scope, interface-mtu, rfc3442-classless-static-routes; 
request ntp-servers;
But not much has changed
Code:
/etc/dhcp/dhclient.conf line 21: expecting a statement.

^
/etc/dhcp/dhclient.conf line 40: semicolon expected.

^
 
Old 06-21-2021, 11:11 PM   #4
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
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".
 
2 members found this post helpful.
Old 06-22-2021, 12:10 AM   #5
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by elgrandeperro View Post
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.
 
Old 07-01-2021, 11:55 PM   #6
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
You could also try breaking up the line into multiple lines:

Code:
request subnet-mask;
also request broadcast-address;
also request [...];
That way each line has fewer possible typos or what-have-you. Should be easier to track down the problem.
 
Old 07-02-2021, 07:01 AM   #7
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
The new version of the configuration file results in the same errors.

File: https://www.linuxquestions.org/quest...1&d=1625226871
Errors:
Code:
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.
Attached Files
File Type: txt dhclient.conf.txt (2.0 KB, 12 views)
 
Old 07-02-2021, 10:52 PM   #8
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
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.
 
Old 07-03-2021, 12:17 AM   #9
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by MikeDeltaBrown View Post
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.
 
Old 01-03-2023, 04:50 AM   #10
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,623

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
One and a half year later:
The phenomenon is no longer observed with isc-dhclient-4.4.3-P1.ΩΩ
 
  


Reply

Tags
dhclient, dhclient.conf, syntax, warnings



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhclient: execve (/sbin/dhclient-script, ...): Exec format error RandomTroll Linux - Networking 2 10-11-2015 09:01 PM
reason for multiple dhclient leases in /var/lib/dhclient/dhclient.leases psycroptic Linux - Networking 1 04-23-2014 09:24 AM
pclinuxos reporting threats when running clamtk and they relate to snort Fred Caro Linux - Newbie 4 08-09-2012 10:10 AM
How does GPG relate to PGP? davee Linux - Security 1 02-20-2004 07:52 AM
how does a "makefile" relate to the make command? mjewell Linux - Newbie 3 01-17-2004 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration