But I also think we should be able to edit the routers in WEBGUI, so I also created the bug report for “Add option to edit “option routers” in WEBGUI” https://bugzilla.ipfire.org/show_bug.cgi?id=12930
Revive this topic?
The last reply to this topic was about 1 year ago. Your reply will bump the topic to the top of its list and notify anyone previously involved in the conversation.
Are you sure you want to continue this old conversation?
yes it has to be resurrected
@raffe
nice find! so i do not have to bother anymore
reading:
Michael Tremer 2022-09-19 07:22:52 UTC
If you have any syntax errors in your custom configuration file, you will find any messages about that in /var/log/messages.
furthermore helps to summarize ipfire is not intended to realize this.
with:
And then in dhcpd.conf.local have something like
subnet 192.168.222.0 netmask 255.255.255.0 #GREEN
{
option routers 192.168.222.254;
} #GREEN
still looking for dhcpd.conf.local syntax docs
the wiki:
To add specific options (e.g. change router ip, create dhcp entry) edit the file /var/ipfire/dhcp/dhcpd.conf.local.
https://wiki.ipfire.org/configuration/network/dhcp
is a dead end
so it is not possible to alter option routers on ipfire to me also like: https://community.ipfire.org/t/how-can-i-point-dhcp-clients-to-other-gateway/5738
another dead end
The bug It is not open anymore, they closed it as they think I did a syntax error (I do not believe I did). (EDIT: THis is not true, see below:) So you have to create a new one if you want change. I still do it manually.
EDIT: The bug is closed as it works now, I just have not tested it. Bud Adolf did
I just added your exact block of statements from that bug into my dhcp.conf.local and pressed save on the dhcp page and dhcp restarted followed by unbound dhcp leases bridge and everything was running fine.
I also tried /etc/rc.d/init.d/dhcp restart and that also ended with dhcp running with no error messages in the logs.
I then just put option routers 192.168.222.254
but without the ; at the end and then dhcp failsed to start and there were error messages in the log telling me that there was a missing semicolon somewhere.
Put the semicolon back and restarted dhcp and again it started with no problems.
I would suggest trying again with your block and running
tail -f /var/log/messages
in another terminal window so you can see what messages occur when you restart dhcp because for me it worked with no problem, even with a subnet definition totally different from the subnets I am running on my system.
There must have been some syntax issue somehow or other because the dhcp code for dealing with dhcp.conf.local hasn’t been touched since I joined the community 5 years ago.
Give it a try and let us know that dhcp continues working for you as well.
You are probably right, the option routers 192.168.222.254; is quite straight forward and easy, but maybe I did something else wrong or messed it up somehow. Wouldn’t be the first time
then if the lines in dhcp.conf.local are syntactically correct then you will get the following lines
Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit ISC DHCP - ISC
Config file: /var/ipfire/dhcp/dhcpd.conf
Database file: /var/state/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
This was with your statement block in dhcp.conf.local
I then removed the ; just as a test and reran the dhcp -t test command from above and got the following response.
/usr/sbin/dhcpd -t -cf /var/ipfire/dhcp/dhcpd.conf
Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit ISC DHCP - ISC
/var/ipfire/dhcp/dhcpd.conf.local line 4: semicolon expected.
}
^
/var/ipfire/dhcp/dhcpd.conf.local line 4: unexpected end of file
} #GREEN
^
/var/ipfire/dhcp/dhcpd.conf line 90: /var/ipfire/dhcp/dhcpd.conf.local: bad parse.
include “/var/ipfire/dhcp/dhcpd.conf.local”
^
Configuration file errors encountered – exiting
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.
exiting.
So that test command is worth running after doing any changes in dhcp.conf.local to make sure no syntax errors have occurred.
I will add that info into the wiki.
The dhcp -t ... command can be run while dhcp is running and before restarting it to take the changed dhcp.conf.local statements.
That commit was the adding of an extra column in the fixed leases table. Nothing to do with dhcp.conf or dhcp.conf.local.
It was also reverted before getting into a release anyway.
You can track that easier in the ipfire git repo rather than github.
I didn’t say there were no commits on dhcp, i did several myself over the last few years, just none changing the way dhcp.conf.local is used in dhcp.conf
Then i got confused. I clicked on the link at the top and i ended up seeing a reverted commit at the top of the list. and i thought that was what you were showing.