( fityiszkukac | 2024. 02. 01., cs – 12:50 )

Köszi, rendben.

sudo /usr/sbin/dhcpd -d -t -cf /etc/dhcp/dhcpd.conf

Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
ldap-gssapi-principal is not set,GSSAPI Authentication for LDAP will not be used
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcpd/dhcpd.leases
PID file: /var/run/dhcpd.pid
Source compiled to use binary-leases

 

/usr/sbin/dhcpd -d -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid  enp1s0

Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
ldap-gssapi-principal is not set,GSSAPI Authentication for LDAP will not be used
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcpd/dhcpd.leases
PID file: /var/run/dhcpd.pid
Source compiled to use binary-leases
Wrote 0 leases to leases file.

No subnet declaration for enp1s0 (no IPv4 addresses).
** Ignoring requests on enp1s0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface enp1s0 is attached. **

Not configured to listen on any interfaces!

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 issues with this software via: 
https://bugzilla.redhat.com/
 

/etc/sysconfig/dhcp

 

# WARNING: This file is NOT used anymore.

# If you are here to restrict what interfaces should dhcpd listen on,
# be aware that dhcpd listens *only* on interfaces for which it finds subnet
# declaration in dhcpd.conf. It means that explicitly enumerating interfaces
# also on command line should not be required in most cases.

# If you still insist on adding some command line options,
# copy dhcpd.service from /lib/systemd/system to /etc/systemd/system and modify
# it there.
# https://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2…

# example:
# $ cp /usr/lib/systemd/system/dhcpd.service /etc/systemd/system/
# $ vi /etc/systemd/system/dhcpd.service
# $ ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid <your_interface_name(s)>
# $ systemctl --system daemon-reload
# $ systemctl restart dhcpd.service

DHCPDRAGS="enp1s0"
 

 

/etc/dhcp/dhcpd.conf

 

subnet 192.168.9.0 netmask 255.255.255.0 {
       range 192.168.9.10 192.168.9.50;
       option subnet-mask 255.255.255.0;
       option routers 192.168.9.2;
       option domain-name-servers 8.8.8.8;
    }
}
 

ifconfig 

 

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether d0:50:99:a8:9d:21  txqueuelen 1000  (Ethernet)
        RX packets 331  bytes 73370 (71.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 110  bytes 10933 (10.6 KiB)
        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
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 18  bytes 2118 (2.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18  bytes 2118 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s18f2u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.130  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::bee3:32c5:53a:57bf  prefixlen 64  scopeid 0x20<link>
        ether 00:0f:00:8d:09:f9  txqueuelen 1000  (Ethernet)
        RX packets 66582  bytes 75133597 (71.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47249  bytes 12583923 (12.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0