Koozali.org: home of the SME Server

DHCP does not start up after interface change

Offline waldviertler

  • ***
  • 107
  • +0/-0
DHCP does not start up after interface change
« on: September 17, 2022, 05:43:02 PM »
Hello

My LAN interface card died so I put another one in - gone  through the server config - defined the new LAN interface card, but now the DCHPd does not start. I am able to connect via a fixed ip, but not with dhcp (so the new interface card works).

Output from
journalctl -xe
Code: [Select]
journalctl -xe
-- Unit dhcpd.service has begun starting up.
Sep 17 17:31:15 servername dhcpd[22630]: Internet Systems Consortium DHCP Server 4.2.5
Sep 17 17:31:15 servername dhcpd[22630]: Copyright 2004-2013 Internet Systems Consortium.
Sep 17 17:31:15 servername systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Sep 17 17:31:15 servername dhcpd[22630]: All rights reserved.
Sep 17 17:31:15 servername systemd[1]: Failed to start DHCPv4 Server Daemon.
-- Subject: Unit dhcpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dhcpd.service has failed.
--
-- The result is failed.
Sep 17 17:31:15 servername dhcpd[22630]: For info, please visit https://www.isc.org/software/dhcp/
Sep 17 17:31:15 servername systemd[1]: Unit dhcpd.service entered failed state.
Sep 17 17:31:15 servername dhcpd[22630]: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Sep 17 17:31:15 servername systemd[1]: dhcpd.service failed.
Sep 17 17:31:15 servername dhcpd[22630]: Wrote 0 deleted host decls to leases file.
Sep 17 17:31:15 servername dhcpd[22630]: Wrote 0 new dynamic host decls to leases file.
Sep 17 17:31:15 servername dhcpd[22630]: Wrote 0 leases to leases file.
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]: No subnet declaration for dummy0 (no IPv4 addresses).
Sep 17 17:31:15 servername dhcpd[22630]: ** Ignoring requests on dummy0.  If this is not what
Sep 17 17:31:15 servername dhcpd[22630]:    you want, please write a subnet declaration
Sep 17 17:31:15 servername dhcpd[22630]:    in your dhcpd.conf file for the network segment
Sep 17 17:31:15 servername dhcpd[22630]:    to which interface dummy0 is attached. **
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]: Not configured to listen on any interfaces!
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]: This version of ISC DHCP is based on the release available
Sep 17 17:31:15 servername dhcpd[22630]: on ftp.isc.org.  Features have been added and other changes
Sep 17 17:31:15 servername dhcpd[22630]: have been made to the base software release in order to make
Sep 17 17:31:15 servername dhcpd[22630]: it work better with this distribution.
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]: Please report for this software via the CentOS Bugs Database:
Sep 17 17:31:15 servername dhcpd[22630]:     http://bugs.centos.org/
Sep 17 17:31:15 servername dhcpd[22630]:
Sep 17 17:31:15 servername dhcpd[22630]: exiting.
Sep 17 17:31:30 servername systemd[1]: Reloaded masq, the Koozali SME Server firewall script.
-- Subject: Unit masq.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit masq.service has finished reloading its configuration
--
-- The result is done.

And output from
 systemctl status dhcpd.service
Code: [Select]
systemctl status dhcpd.service
● dhcpd.service - DHCPv4 Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/dhcpd.service.d
           └─50koozali.conf
   Active: failed (Result: exit-code) since Sam 2022-09-17 17:31:15 CEST; 18s ago
     Docs: man:dhcpd(8)
           man:dhcpd.conf(5)
  Process: 22630 ExecStart=/usr/bin/sh -c exec /usr/sbin/dhcpd -f -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases -user dhcpd -group dhcpd --no-pid dummy0 >>/var/log/dhcpd/current 2>>/var/log/dhcpd/current (code=exited, status=1/FAILURE)
  Process: 22625 ExecStartPre=/bin/touch /var/lib/dhcpd/dhcpd.leases (code=exited, status=0/SUCCESS)
  Process: 22602 ExecStartPre=/sbin/e-smith/expand-template /etc/dhcpd.conf (code=exited, status=0/SUCCESS)
  Process: 22590 ExecStartPre=/sbin/e-smith/service-status dhcpd (code=exited, status=0/SUCCESS)
 Main PID: 22630 (code=exited, status=1/FAILURE)

Sep 17 17:31:14 www.pdorf.at systemd[1]: Starting DHCPv4 Server Daemon...
Sep 17 17:31:15 www.pdorf.at dhcpd[22630]: Internet Systems Consortium DHCP Server 4.2.5
Sep 17 17:31:15 www.pdorf.at systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Sep 17 17:31:15 www.pdorf.at systemd[1]: Failed to start DHCPv4 Server Daemon.
Sep 17 17:31:15 www.pdorf.at systemd[1]: Unit dhcpd.service entered failed state.
Sep 17 17:31:15 www.pdorf.at systemd[1]: dhcpd.service failed.

I don't know where the "dummy0" interface comes from, the actual interface name is now enp8s2

Is it possible to change the interface somewhere?

I have tried to go back to the old interface card, configure the server again - reboot, and then again the new interface card, and configured it again, reboot - no success, dhcp comes up with the dummy0 interface.

(The server is on SME 10.1)

I get rid of dummy0 with

Code: [Select]
ip link delete dummy0
but still no avail.

best regards
Martin
« Last Edit: September 17, 2022, 06:20:55 PM by waldviertler »

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: DHCP does not start up after interface change
« Reply #1 on: September 17, 2022, 08:34:28 PM »
what is your server mode ?
- gateway
- server-only
- private server

dummy0 mean you were probably with a gateway with only one ethernet interface.
This is the way to do if your server is a dedicated server at a hosting service, but could be the way to do in some other situations.



Offline bunkobugsy

  • *
  • 274
  • +4/-0
Re: DHCP does not start up after interface change
« Reply #2 on: September 17, 2022, 08:37:19 PM »
ifconfig ?

Offline waldviertler

  • ***
  • 107
  • +0/-0
Re: DHCP does not start up after interface change
« Reply #3 on: September 18, 2022, 12:27:31 AM »
Its configured as Gateway.


[root@www etc]# ifconfig
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet WAN-ip  netmask 255.255.255.0  broadcast Wan-ip.255
        ether 30:b5:c2:04:c6:3b  txqueuelen 1000  (Ethernet)
        RX packets 503757  bytes 202613351 (193.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 291593  bytes 83356437 (79.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp8s2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.254  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 00:e0:4c:69:1b:d7  txqueuelen 1000  (Ethernet)
        RX packets 343617  bytes 68660296 (65.4 MiB)
        RX errors 0  dropped 2060  overruns 0  frame 0
        TX packets 344725  bytes 192172549 (183.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 56524  bytes 4205637 (4.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 56524  bytes 4205637 (4.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: DHCP does not start up after interface change
« Reply #4 on: September 18, 2022, 06:17:51 AM »
what is the output of

Code: [Select]
config show InternalInterface

Offline waldviertler

  • ***
  • 107
  • +0/-0
Re: DHCP does not start up after interface change
« Reply #5 on: September 18, 2022, 10:18:00 AM »
I have installed a fresh version of SME 10.1.
And restored from a backup.
Thank you all.

best regards
Martin

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: DHCP does not start up after interface change
« Reply #6 on: September 18, 2022, 04:22:28 PM »
I need however to know the most exact sequence of event as I suspect a bug with dhcpd unit file not being updated when needed.

how did you proceed after seeing the card was faulty?
 removed ?
reboot without it ?
console to reconfigure?
reboot?
adding a card ?
console to configure?
any reboot?


a simple signal-even post-upgrade; signal-event reboot would have fixed that. 

the reason i ask for the sequence is to add the fix at the right place so no one experience that again. 

Offline waldviertler

  • ***
  • 107
  • +0/-0
Re: DHCP does not start up after interface change
« Reply #7 on: September 18, 2022, 11:26:16 PM »
Ok.
After replacing the bad card with a very old 100 MBit replacement, I reconfigured the server in the console.
In the console the card was not recognized, I must have chosen the suggested dummy card during configuration.
After the LAN did not work, I bought a new RTL8169 card and configured it again in the console.
But even now the LAN did not work.
I removed the new RTL8169 and installed the faulty card - again configured in the console - again no success.
Then again with the new card.
Each time after the console change the server rebooted.
LAN Dhcp was always linked to the dummy0 device. No matter what I tried.

Thank you and best regards
Martin
« Last Edit: September 18, 2022, 11:29:08 PM by waldviertler »

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: DHCP does not start up after interface change
« Reply #8 on: September 18, 2022, 11:29:47 PM »
with or without a post-upgrade  event ?

the key is here to update the content of the unit.

Offline waldviertler

  • ***
  • 107
  • +0/-0
Re: DHCP does not start up after interface change
« Reply #9 on: September 19, 2022, 10:57:52 AM »
Not a special post-upgrade event command.
I thought it post-upgrades automatically, when useing the admin console configuration utility...

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: DHCP does not start up after interface change
« Reply #10 on: September 20, 2022, 03:38:12 AM »
nop

system("/sbin/e-smith/signal-event", "console-save");

and here is the bug to fix
we need to populate accordingly this.

https://bugs.koozali.org/show_bug.cgi?id=12183