CentOS 7 DHCP.CONF

Issues related to configuring your network
OTz3N
Posts: 5
Joined: 2017/06/15 13:07:47

CentOS 7 DHCP.CONF

Postby OTz3N » 2017/06/15 13:28:37

Hi @all,

at this time i'll change all systems to CentOS 7, as well as the DHCP server.
The old CentOS server is CentOS 5 with DHCP 3.0.5 the new server is CentOS 7 with DHCP 4.2.5.

The problem is, that i don't know what i musst change in the classes for the new version.

This are the lines in Verion 3.0.5:

Code: Select all

###################
## config of classes ##      
###################

# Siemens IP Telefone - DLS Server
   class "VoIPTel" {
        # Filter nach Hersteller-String
        match if ( substring (option vendor-class-identifier, 0, 11) = "OptiIpPhone" ) or
                 ( substring (option vendor-class-identifier, 0, 9) = "OptiPoint") ;
        vendor-option-space        OptiIpPhone;
        option OptiIpPhone.magic   53:69:65:6D:65:6E:73:00:00:00;  # "SIEMENS\0\0\0"
        option OptiIpPhone.dls     "sdlp://000.00.00.000:18443";
        }


# IGEL Thinclients
        class "IGELThinClients" {
             match if (substring (hardware,1,3) = 00:E0:C5) or
                    (substring (hardware,1,3) = 00:e0:c5) or
                    (substring (hardware,1,3) = 00:0B:CA) or
                    (substring (hardware,1,3) = 00:0b:ca);
                }

###################
## config of subnet ##         
###################   
# ens32
subnet 000.00.00.0 netmask 255.255.255.0
        {
        option domain-name "xxxxxxxx";
        option domain-name-servers 000.00.00.000,000.00.00.000;
        option netbios-name-servers 000.00.00.000,000.00.00.000;

        option subnet-mask 255.255.255.0;
        option routers 000.00.00.0;

        option time-servers ip-address 000.00.00.0;
        option time-offset 3600;
        option igelrmserver code 224 = text;

        default-lease-time 604800;
        max-lease-time 1209600;
        next-server 000.00.00.000;
        filename "pxelinux.0";

        ##### vendor specific options for Siemens OpenStage
        option space OptiIpPhone;
        option OptiIpPhone.magic   code 1 = string;
        option OptiIpPhone.vlanid  code 2 = unsigned integer 32;
        option OptiIpPhone.dls     code 3 = string;

   pool    {
      #failover peer "xxxxxx";
      deny dynamic bootp clients;
      allow members of "VoIPTel";
      range 000.00.00.0 000.00.00.000;
      include "/opt/clientlists/voip_client.list";
      } 

   pool   {
      #failover peer "xxxxxx";
      deny dynamic bootp clients;
      range 000.00.00.0 000.00.00.000;
           option igelrmserver "000.00.00.000";
      allow members of "IGELThinClients";
      include "/opt/clientlists/igel_client.list";
      }

   pool   {
      #failover peer "xxxxxxx";
      deny dynamic bootp clients;
      range 000.00.00.0 000.00.00.000;
      deny members of "IGELThinClients";
      deny members of "VoIPTel";
      allow unknown-clients;
 
      group   {
         include "/opt/clientlists/misc_client.list";
         include "/opt/clientlists/switch_client.list";
         include "/opt/clientlists/normal_client.list";
         include "/opt/clientlists/printer_client.list";
         }
      }
   }


Problems:

Code: Select all

option OptiIpPhone.magic   53:69:65:6D:65:6E:73:00:00:00;  # "SIEMENS\0\0\0"
option OptiIpPhone.dls     "sdlp://000.00.00.000:18443";


Code: Select all

option space OptiIpPhone;
option OptiIpPhone.magic   code 1 = string;
option OptiIpPhone.vlanid  code 2 = unsigned integer 32;
option OptiIpPhone.dls     code 3 = string;


Code: Select all

option igelrmserver "000.00.00.000";


I've searched for a solution on the Internet, but could not find any.

Can you help me?

Thank you.

CU Benni

User avatar
avij
Forum Moderator
Posts: 2006
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: CentOS 7 DHCP.CONF

Postby avij » 2017/06/15 13:54:24

You could start with the config you had in CentOS 5. If it does not work as expected in CentOS 7, or if it shows errors/warnings when restarting dhcpd, details about those would be informative.

OTz3N
Posts: 5
Joined: 2017/06/15 13:07:47

Re: CentOS 7 DHCP.CONF

Postby OTz3N » 2017/06/16 14:28:35

This lines in the log "/var/log/messages":

Code: Select all

Jun 16 16:17:52 XXXXXXXX systemd: Starting DHCPv4 Server Daemon...
Jun 16 16:17:52 XXXXXXXX dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Jun 16 16:17:52 XXXXXXXX dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Jun 16 16:17:52 XXXXXXXX dhcpd: All rights reserved.
Jun 16 16:17:52 XXXXXXXX dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 24: no option space named OptiIpPhone.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option OptiIpPhone.magic
Jun 16 16:17:52 XXXXXXXX dhcpd:                           ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 25: no option space named OptiIpPhone.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option OptiIpPhone.dls
Jun 16 16:17:52 XXXXXXXX dhcpd:                           ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 51: semicolon expected.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option time-servers ip-address XXX.
Jun 16 16:17:52 XXXXXXXX dhcpd:                                        ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 53: option definitions may not be scoped.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option igelrmserver code
Jun 16 16:17:52 XXXXXXXX dhcpd:                ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 61: option space definitions may not be scoped.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option space
Jun 16 16:17:52 XXXXXXXX dhcpd:         ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 62: no option space named OptiIpPhone.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option OptiIpPhone.magic
Jun 16 16:17:52 XXXXXXXX dhcpd:                           ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 63: no option space named OptiIpPhone.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option OptiIpPhone.vlanid
Jun 16 16:17:52 XXXXXXXX dhcpd:                           ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 64: no option space named OptiIpPhone.
Jun 16 16:17:52 XXXXXXXX dhcpd:        option OptiIpPhone.dls
Jun 16 16:17:52 XXXXXXXX dhcpd:                           ^
Jun 16 16:17:52 XXXXXXXX dhcpd: /etc/dhcp/dhcpd.conf line 78: unknown option dhcp.igelrmserver
Jun 16 16:17:52 XXXXXXXX dhcpd:        #011option igelrmserver "XXX.XXX.XXX.XX"
Jun 16 16:17:52 XXXXXXXX dhcpd:                        ^
Jun 16 16:17:52 XXXXXXXX dhcpd: Configuration file errors encountered -- exiting
Jun 16 16:17:52 XXXXXXXX dhcpd:
Jun 16 16:17:52 XXXXXXXX dhcpd: This version of ISC DHCP is based on the release available
Jun 16 16:17:52 XXXXXXXX dhcpd: on ftp.isc.org.  Features have been added and other changes
Jun 16 16:17:52 XXXXXXXX dhcpd: have been made to the base software release in order to make
Jun 16 16:17:52 XXXXXXXX dhcpd: it work better with this distribution.
Jun 16 16:17:52 XXXXXXXX dhcpd:
Jun 16 16:17:52 XXXXXXXX dhcpd: Please report for this software via the CentOS Bugs Database:
Jun 16 16:17:52 XXXXXXXX dhcpd:    http://bugs.centos.org/
Jun 16 16:17:52 XXXXXXXX dhcpd:
Jun 16 16:17:52 XXXXXXXX dhcpd: exiting.


So you see, there is no reason in the log.

And this are the lines in "systemctl status dhcpd.service":

Code: Select all

Jun 16 16:22:12 XXXXXXXX[1]: Starting DHCPv4 Server Daemon...
Jun 16 16:22:12 XXXXXXXX dhcpd[4764]: Internet Systems Consortium DHCP Server 4.2.5
Jun 16 16:22:12 XXXXXXXX dhcpd[4764]: Copyright 2004-2013 Internet Systems Consortium.
Jun 16 16:22:12 XXXXXXXX dhcpd[4764]: All rights reserved.
Jun 16 16:22:12 XXXXXXXX dhcpd[4764]: For info, please visit https://www.isc.org/software/dhcp/
Jun 16 16:22:12 XXXXXXXX systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Jun 16 16:22:12 XXXXXXXX systemd[1]: Failed to start DHCPv4 Server Daemon.
Jun 16 16:22:12 XXXXXXXX systemd[1]: Unit dhcpd.service entered failed state.
Jun 16 16:22:12 XXXXXXXX systemd[1]: dhcpd.service failed.


The dhcp check:

Code: Select all

Internet Systems Consortium DHCP Server 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 24: no option space named OptiIpPhone.
        option OptiIpPhone.magic
                           ^
/etc/dhcp/dhcpd.conf line 25: no option space named OptiIpPhone.
        option OptiIpPhone.dls
                           ^
/etc/dhcp/dhcpd.conf line 51: semicolon expected.
        option time-servers ip-address XXX.
                                        ^
/etc/dhcp/dhcpd.conf line 53: option definitions may not be scoped.
        option igelrmserver code
                ^
/etc/dhcp/dhcpd.conf line 61: option space definitions may not be scoped.
        option space
         ^
/etc/dhcp/dhcpd.conf line 62: no option space named OptiIpPhone.
        option OptiIpPhone.magic
                           ^
/etc/dhcp/dhcpd.conf line 63: no option space named OptiIpPhone.
        option OptiIpPhone.vlanid
                           ^
/etc/dhcp/dhcpd.conf line 64: no option space named OptiIpPhone.
        option OptiIpPhone.dls
                           ^
/etc/dhcp/dhcpd.conf line 78: unknown option dhcp.igelrmserver
                option igelrmserver "XXX.XXX.XXX.XX"
                        ^
Configuration file errors encountered -- exiting

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the CentOS Bugs Database:
    http://bugs.centos.org/

exiting.


Do you need more informations?

I need to know what's the code for the wrong lines?.

OTz3N
Posts: 5
Joined: 2017/06/15 13:07:47

Re: CentOS 7 DHCP.CONF

Postby OTz3N » 2017/06/21 06:14:52

Hello,

is there no one hwo can help me?

CU Benni

aks
Posts: 2489
Joined: 2014/09/20 11:22:14

Re: CentOS 7 DHCP.CONF

Postby aks » 2017/06/21 16:23:40

At a guess you need to define the option namespace. See https://docstore.mik.ua/orelly/networki ... ppd_03.htm

OTz3N
Posts: 5
Joined: 2017/06/15 13:07:47

Re: CentOS 7 DHCP.CONF

Postby OTz3N » 2017/07/04 13:29:05

I'll see and test it... thx

OTz3N
Posts: 5
Joined: 2017/06/15 13:07:47

Re: CentOS 7 DHCP.CONF

Postby OTz3N » 2017/09/06 15:39:27

You can close the topic. I have solved the problem with the appropriate manufacturers.

Thx for help.

Here ist the right config:

Code: Select all

# Siemens IP Telefone - DLS Server
   ## vendor options for Siemens OpenStage ##
   option space OpenStage;
   option OpenStage.vendor code 1 = string;
   option OpenStage.vlanid code 2 = unsigned integer 32;
   option OpenStage.dls code 3 = string;

   # Each vendor-class-identifier will constitute a class
   class "vendor-classes" {
      match option vendor-class-identifier;
      }
      subclass "vendor-classes" "OptiIpPhone" {
         vendor-option-space OpenStage;
         option OpenStage.vendor "Siemens";
         #option OpenStage.vlanid 4;
         option OpenStage.dls "sdlp://XXX.XXX.XXX.XXX:18443";
      }

# IGEL Thinclients
   ## options for IGEL Client ##
   option igelumsserver code 224 = text;
   option igelumsserver "XXX.XXX.XXX.XXX";
   
   class "IGELThinClients" {
        match if (substring (hardware,1,3) = 00:E0:C5) or
             (substring (hardware,1,3) = 00:e0:c5) or
             (substring (hardware,1,3) = 00:0B:CA) or
             (substring (hardware,1,3) = 00:0b:ca);
    }
   


Return to “CentOS 7 - Networking Support”

Who is online

Users browsing this forum: No registered users and 1 guest