Feature #3036

Custom DHCP options

Added by Filippo Carletti over 6 years ago. Updated almost 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-dnsmasq
Target version:v6.6
Resolution: NEEDINFO:Yes

Description

Sometimes, users need to pass custom options to client via dhcp.
A common option is a custom DNS server, but we might include every possible option. Maybe DNS could go to the panel (different DNS for every zone/interface) and other options to the db with a setprop.


Related issues

Related to NethServer 6 - Enhancement #3238: Configure DHCP on VLANs CLOSED

Associated revisions

Revision d4e735bd
Added by Giacomo Sanchietti about 6 years ago

dnsmasq.conf: add new DHCP options. Refs #3036

New available options:
  • DhcpDNS
  • DhcpNTP
  • DhcpWINS
  • DhcpTFTP
  • DhcpDomain

Revision 309b1f1b
Added by Giacomo Sanchietti about 6 years ago

dnsmasq.conf: expand dhcp-lease-max to include static leases. Refs #3036

Revision e145e773
Added by Giacomo Sanchietti about 6 years ago

Web UI: add new advanced options. Refs #3036

Revision 055e8e50
Added by Giacomo Sanchietti about 6 years ago

Validator: allow reservation on blue interfaces. Refs #3036

Revision 36aac63f
Added by Giacomo Sanchietti about 6 years ago

Inline help: add new options. Refs #3036

Revision 59f394d5
Added by Giacomo Sanchietti about 6 years ago

Italian: update DHCP inline help. Refs #3036

History

#1 Updated by Giacomo Sanchietti over 6 years ago

Can we enumerate a set of options to add as prop and inside the web UI?

#2 Updated by Giacomo Sanchietti over 6 years ago

  • NEEDINFO changed from No to Yes

#3 Updated by Giacomo Sanchietti over 6 years ago

  • Category set to nethserver-dnsmasq

#4 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20
New options available from the web interface:
  • default gateway
  • lease time
  • max lease time
  • domain suffix
  • dns servers
  • wins servers
  • tftp server
Also includes these improvments:
  • remove global option DhcpLeaseTime
  • allow reservations on blue interfaces
  • avoid configuration problems with many reservations by settings dhcp-lease-max=range*(end-start)+count(static leases)

#5 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#6 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#7 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-dnsmasq-1.4.7-1.6.g36aac63.ns6.noarch.rpm
Test case 1
  • Install the old package
  • Configure at least one DHCP range
  • Update the package, check the DHCP works correctly
Test case 2
  • From test case 1
  • Try to create a reservation on a green interface
Test case 3
  • From test case 1
  • Try to create a reservation on a blue interface
Test case 4
  • Try to set the new options on a DHCP range
  • Check the options are passed to clients (maybe you need a real environment to test this)

Command example for new options:

db dhcp setprop eth2 DhcpDNS 1.1.1.1,2.2.2.2 DhcpNTP 3.3.3.3,4.4.4.4 DhcpWINS 5.5.5.5,6.6.6.6 DhcpTFTP 7.7.7.7,8.8.8.8 DhcpDomain mydomain.com DhcpLeaseTime 4455 DhcpGatewayIP 11.22.33.44

#8 Updated by Filippo Carletti about 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

I lost the formal verification output of all test cases, but everything was correct.
I have installed the update on a production system, changed some values and obtained a new lease.
In particular, I changed lease time from 1 to 2 days and here are the logs:
Lease time 1 day:
Aug 5 15:21:21 ns65 dhclient1156: bound to 192.168.5.55 -- renewal in 33860 seconds.
Lease time 2 days:
Aug 6 00:36:09 ns65 dhclient29753: bound to 192.168.5.55 -- renewal in 68992 seconds.

#9 Updated by Davide Principi almost 6 years ago

#10 Updated by Davide Principi almost 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates/6.6
nethserver-dnsmasq-1.5.0-1.ns6.noarch.rpm

Also available in: Atom PDF