Portál AbcLinuxu, 15. července 2025 10:20
INTERFACES="eth1"v /etc/dhcp3/dhcpd.conf
authoritative; deny unknown-clients; default-lease-time 86400; max-lease-time 86400; option domain-name-servers 192.168.10.2; subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.2 192.168.10.254; option routers 192.168.10.1; option broadcast-address 192.168.10.1; host TEST {hardware ethernet 00:E0:4C:BD:97:C9; fixed-address 192.168.10.2;} }sit 192.168.10.0/24 je routovana na stroj 192.168.1.2, kde potrebuji rozchodit dhcrelay. DHCRELAY
INTERFACES="eth1" DHCP_SERVERS="192.168.1.1" OPTIONS=""Problem nastava uz pri spusteni dhcpserveru
Starting DHCP server: dhcpd3 failed to start - check syslog for diagnostics.V logu je hlaska
No subnet declaration for eth1 (192.168.1.1).Da se spustit DHCP server, aby nekontroloval to co ma na sitovkach ??
start-stop-daemon --start --quiet --pidfile $DHCPDPID \ --exec /usr/sbin/dhcpd3 -- -q $INTERFACES
start-stop-daemon --start --quiet --pidfile $DHCPDPID \ --exec /usr/sbin/dhcpd3 -- -q eth1
#!/bin/sh # # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ # test -f /usr/sbin/dhcpd3 || exit 0 # It is not safe to start if we don't have a default configuration... if [ ! -f /etc/default/dhcp3-server ]; then echo "/etc/default/dhcp3-server does not exist! - Aborting..." echo "Run 'dpkg-reconfigure dhcp3-server' to fix the problem." exit 0 fi # Read init script configuration (so far only interfaces the daemon # should listen on.) . /etc/default/dhcp3-server DHCPDPID=/var/run/dhcpd.pid case "$1" in start) echo -n "Starting DHCP server: " start-stop-daemon --start --quiet --pidfile $DHCPDPID \ --exec /usr/sbin/dhcpd3 -- -q $INTERFACES sleep 2 if [ -f "$DHCPDPID" ] && ps h `cat "$DHCPDPID"` >/dev/null; then echo "dhcpd3." else echo "dhcpd3 failed to start - check syslog for diagnostics." exit 1 fi ;; stop) echo -n "Stopping DHCP server: dhcpd3" start-stop-daemon --stop --quiet --pidfile $DHCPDPID echo "." ;; restart | force-reload) $0 stop sleep 2 $0 start if [ "$?" != "0" ]; then exit 1 fi ;; *) echo "Usage: /etc/init.d/dhcp3-server {start|stop|restart|force-reload}" exit 1 esac exit 0
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.