Re: Error in DHCPd in 2 networks sharing the same phisical network
Hi,
On Sun, Jan 30, 2005 at 06:59:55PM +0100, Jordi Ferrando wrote:
> I have found an error when configuring DHCPd in a 2-ethernet PC sharing
> the same phisical network. Both eth0 and eth1 became active, when only
> eth1 sould be. It lead to errors: see /var/log/
> I have solved it modifying the file /etc/init.d/dhcp:
> # Defaults
> #INTERFACES="eth0"
> #Changing the interface to eth1 does not work
> INTERFACES=eth1
>
> # Reads config file (will override defaults above)
> [ -r /etc/default/dhcp ] && . /etc/default/dhcp
without looking at the package, I assume, you should modify
/etc/default/dhcp to only handle eth1. INTERFACES will be overridden there
(maybe with something like all or so). The "Defaults" above is only set in
case /etc/default/dhcp is deleted for some reason or can't be read.
> start-stop-daemon --start --quiet --pidfile $DHCPDPID \
> --exec /usr/sbin/dhcpd eth1
> # This does not work, listens for eth0 and eth1
> # --exec /usr/sbin/dhcpd -- -q $INTERFACES
> sleep 2
You should revert that ugly hack. ;)
Greetings,
Mike
Reply to: