Project

General

Profile

Actions

Support #16963

closed

can not allocate ip from dhcp

Added by vanlos wang about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

I setup a foreman server and use it to discovery host, But host cannot allocate ip address from the dhcp on foreman server.
The smart proxy sctive features are TFTP, DHCP, Puppet, Puppet CA, Discovery, Dynflow, and SSH. And the Discovery service show me as following:

*Discovery

Version1.0.4
Data not available for Discovery*

The dhcp configurations is as following:
  1. dhcpd.conf
    omapi-port 7911;

default-lease-time 43200;
max-lease-time 86400;

ddns-update-style none;

option domain-name "tower.com";
option domain-name-servers 192.172.30.1;
option ntp-servers none;

allow booting;
allow bootp;

option fqdn.no-client-update on; # set the "O" and "S" flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text ;

  1. PXE Handoff.
    next-server 192.172.30.1;
    filename "pxelinux.0";

log-facility local7;

include "/etc/dhcp/dhcpd.hosts";

#################################
  1. tower.com #################################
    subnet 192.172.30.0 netmask 255.255.255.0 {

    option subnet-mask 255.255.255.0;
    option routers 192.172.30.1;
    }


Files

subnet_proxy.PNG View subnet_proxy.PNG 28.7 KB vanlos wang, 10/17/2016 02:41 AM
Actions #1

Updated by vanlos wang about 8 years ago

The dhcp config in foreman-installer is as following:
68. Set dhcp, current value: true
69. Set dhcp_listen_on, current value: https
70. Set dhcp_managed, current value: true
71. Set dhcp_provider, current value: isc
72. Set dhcp_subnets, current value: []
73. Set dhcp_option_domain, current value: ["tower.com"]
74. Set dhcp_search_domains, current value:
75. Set dhcp_interface, current value: eth1
76. Set dhcp_gateway, current value: 192.172.30.1
77. Set dhcp_range, current value: false
78. Set dhcp_nameservers, current value: default
79. Set dhcp_server, current value: 127.0.0.1
80. Set dhcp_config, current value: /etc/dhcp/dhcpd.conf
81. Set dhcp_leases, current value: /var/lib/dhcpd/dhcpd.leases
82. Set dhcp_key_name, current value:
83. Set dhcp_key_secret, current value:
84. Set dhcp_omapi_port, current value: 7911

The discovery config in foreman-installer is as following:
1. Enable/disable foreman_plugin_discovery module, current value: true
2. Set install_images, current value: true
3. Set tftp_root, current value: /var/lib/tftpboot
4. Set source_url, current value:
http://192.172.30.252/discovery/releases/latest/
5. Set image_name, current value: fdi-image-latest.tar

Actions #2

Updated by vanlos wang about 8 years ago

The subnet proxy is set as the picture.

Actions #3

Updated by vanlos wang about 8 years ago

There are two interface for me, eth0 and eth1. eth0 is outer network, and eth1 is for dhcp for inner network.
  1. service dhcpd status
    Redirecting to /bin/systemctl status dhcpd.service
    ● dhcpd.service - DHCPv4 Server Daemon
    Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled; vendor preset: disabled)
    Active: active (running) since Mon 2016-10-17 11:05:58 EDT; 1min 18s ago
    Docs: man:dhcpd(8)
    man:dhcpd.conf(5)
    Main PID: 1147 (dhcpd)
    Status: "Dispatching packets..."
    CGroup: /system.slice/dhcpd.service
    └─1147 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid

Oct 17 11:05:58 foreman.tower.com dhcpd1147: Sending on LPF/eth1/00:1a:4a:65:26:99/192.172.30.0/24
Oct 17 11:05:58 foreman.tower.com dhcpd1147:
Oct 17 11:05:58 foreman.tower.com dhcpd1147: No subnet declaration for eth0 (192.172.29.18).
Oct 17 11:05:58 foreman.tower.com dhcpd1147: * Ignoring requests on eth0. If this is not what
Oct 17 11:05:58 foreman.tower.com dhcpd1147: you want, please write a subnet declaration
Oct 17 11:05:58 foreman.tower.com dhcpd1147: in your dhcpd.conf file for the network segment
Oct 17 11:05:58 foreman.tower.com dhcpd1147: to which interface eth0 is attached. *

Oct 17 11:05:58 foreman.tower.com dhcpd1147:
Oct 17 11:05:58 foreman.tower.com dhcpd1147: Sending on Socket/fallback/fallback-net
Oct 17 11:05:58 foreman.tower.com systemd1: Started DHCPv4 Server Daemon.

I guess this is not the matter.

Actions #4

Updated by Dominic Cleal about 8 years ago

  • Translation missing: en.field_release deleted (194)
Actions #5

Updated by Dominic Cleal about 8 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Feedback

You need to configure a range on your DHCP server if you want it to allocate IP addresses for unknown hosts. Using the installer, set the dhcp_range parameter to something like "192.172.30.10 192.172.30.50" to have it configure it, or do it yourself.

This doesn't appear to be a bug in Foreman, please prefer the mailing list etc for support queries: https://theforeman.org/support.html

Actions #6

Updated by vanlos wang about 8 years ago

Thanks, it works. The guide https://theforeman.org/plugins/foreman_discovery/6.0/index.html does not contain this issue. Maybe we need to add it.

Actions #7

Updated by Lukas Zapletal about 8 years ago

  • Status changed from Feedback to Resolved

Glad it worked.

Actions

Also available in: Atom PDF