Project

General

Profile

Actions

Feature #14396

open

Support for subnet options inside "pool" blocks

Added by Greg Sutcliffe about 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Behaviour: In the UI, clicking Import Subnets goes to a page with the Gateway and Netmask correctly detected/filled in, but not the Start/End IPs according to my pool. If I hit the API, I see:

root@test1:/var/log/foreman-proxy# wget -q -O - http://localhost:8000/dhcp
[{"network":"10.10.0.0","netmask":"255.255.255.0","options":{"routers":["10.10.0.1"]}}]

Setup: Debian Wheezy with backports, packaged 1.11 RC3 proxy.
Configs:

dhcp.yml 
---
:enabled: true
:use_provider: dhcp_isc
dhcp_isc.yml 
---
:config: /etc/dhcp/dhcpd.conf
:leases: /var/lib/dhcp/dhcpd.leases
:omapi_port: 7911
/etc/dhcp/dhcpd.conf 
omapi-port 7911;
default-lease-time 43200;
max-lease-time 86400;
ddns-update-style none;
option domain-name "local.example.net";
option domain-name-servers 10.10.0.1;
option ntp-servers none;
allow booting;
allow bootp;
option fqdn.no-client-update    on;
option fqdn.rcode2            255;
option pxegrub code 150 = text ;
next-server 10.10.0.1;
filename "pxelinux.0";
log-facility local7;
include "/etc/dhcp/dhcpd.hosts";
subnet 10.10.0.0 netmask 255.255.255.0 {
  pool
  {
    range 10.10.0.100 10.10.0.200;
  }
  option subnet-mask 255.255.255.0;
  option routers 10.10.0.1;
}

Logs:

proxy.log
D, [2016-03-30T11:44:10.018564 #22508] DEBUG -- : accept: 127.0.0.1:55114
D, [2016-03-30T11:44:10.020127 #22508] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-03-30T11:44:10.020808 #22508] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
D, [2016-03-30T11:44:10.020945 #22508] DEBUG -- : Loading subnets for 127.0.0.1
D, [2016-03-30T11:44:10.020998 #22508] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2016-03-30T11:44:10.021093 #22508] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2016-03-30T11:44:10.021233 #22508] DEBUG -- : Added a subnet: 10.10.0.0
I, [2016-03-30T11:44:10.021554 #22508] INFO -- : 127.0.0.1 - - [30/Mar/2016 11:44:10] "GET /dhcp HTTP/1.1" 200 87 0.0010
D, [2016-03-30T11:44:10.022427 #22508] DEBUG -- : close: 127.0.0.1:55114

Related issues 3 (1 open2 closed)

Related to Smart Proxy - Feature #12211: Improve DHCP subnets parsing to get more informations from DHCP serverClosedBaptiste Agasse10/19/2015Actions
Related to Smart Proxy - Refactor #19441: Rewrite isc dhcpd config parser to support various nested blocks Closed05/03/2017Actions
Related to Foreman - Feature #19650: Issue warning when overlapping IP range with lease pool detectedNew05/24/2017Actions
Actions

Also available in: Atom PDF