I have a question about the dhcp server on linux
Basically my server has 2 interface cards
- eth0 : 192.168.2.201/255.255.255.0
- eth1 : 192.168.4.1/255.255.255.0
- eth1:0 : 10.1.1.0/24
On this server i am running the dhcpd daemon to hand out leases in the 192.168.4.0/24 subnet.
- eth0 : connected to my home router to access internet
- eth1 : connected to a cisco switch (with only default vlan) on port 1 with ip address 10.1.1.10 - this interface is used for communication with the switch for management through telnet
Now when i plug in another computer on any port on the switch i see the following
- the computer gets 169.254 self assigned ip
- i see the DHCP server did hand out a lease (/var/lib/dhcpd/dhcpd.leases file)
- under ethernet status on the client computer i see bytes sent but 0 received
Now my question is
To which interface on the linux server does the dhcpd daemon bound to ? Since i see the lease being assigned it is obviously getting the dhcp request yet the lease it sends out is not reaching the client.
Any help would be much appreciated !
thank you, ankit
You can't use 10.1.1.0 as the IP of the NIC, that's a network ID. DHCPd should bind to all interfaces that it has subnet definitions for. So if it has only definitions for the 192.168.4/24 subnet, then it should only bind to eth1. What's the output from DHCPd when it starts? It should mention what interfaces it's listening on.
There is not stated which DHCP server is used. In the case of
isc-dhcp-server
, the interface association is done automatically based in the address range configuration in itsdhcpd.conf
file, i.e., if the interface IP address pertains to some configured DHCP range giving addresses, then the server will bound to it. If the range where the interface IP is contained is mentioned, but not have any address available to give, or is not contained in the address ranges configuration, then the server won't bound to it.