Advertisement

DHCP in RedHat9

Started by March 10, 2004 08:07 AM
6 comments, last by Crispy 20 years, 6 months ago
I can''t get it to give out addresses. Here''s what I have set up: NIC1 (eth2) on an external IP, working as expected NIC2 (eth0) on 192.168.20.0, netmask 255.255.255.0, no default gateway specified /etc/dhcpd.conf looks like this:

default-lease-time 600;
max-lease-time 7200;
option domain-name-servers AN_IP, ANOTHER_IP, YET_ANOTHER_IP;
option domain-name "myvendor.whatever";

ddns-update-style ad-hoc;


subnet 192.168.40.32 netmask 255.255.255.224 {
    range 192.168.40.50 192.168.40.62;
    option routers 192.168.40.33;
    option subnet-mask 255.255.255.0;

    host 192.168.40.60 { hardware ethernet 00:10:5A:40:C9:EA; fixed-address 192.168.40.60; }
}

shared-network network_name {
        subnet 192.168.20.0 netmask 255.255.255.0 {
                range 192.168.20.10 192.168.20.199;
                option routers 192.168.20.1;
                option subnet-mask 255.255.255.0;
        }

        subnet 192.168.22.0 netmask 255.255.255.0 {
                range 192.168.22.2 192.168.22.10;
                option routers 192.168.22.1;
                option subnet-mask 255.255.255.0;
        }

        host 192.168.22.2 { hardware ethernet 00:50:BF:5E:81:F5; fixed-address 192.168.41.2; }
        host 192.168.22.3 { hardware ethernet 52:54:05:C4:99:EA; fixed-address 192.168.41.3; }
}
The DHCP server is connected to a test computer over a hub/switch, which otherwise successfully obtains an IP address from an alternate network (therefore I''m rather confident that it''s my configuration that is not right here). The above configuration file wasn''t written by me, but I know it works. Basically, the computer trying to obtain the IP address (seemingly) can''t see the DHCP server and times out (and yes - it is set to automatically obtain an IP address). eth0 has been added to modules.conf as DHCPARGS and DHCP seems to start just fine with:
service dhcpd start eth0
Anybody got any hints as to what might be wrong?

"Finishing in second place, simply means you are the first loser." - PouyaCat
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Is dhcpd running on your DHCP server?
Advertisement
Yes. That''s what:

service dhcpd start eth0

does.


"Finishing in second place, simply means you are the first loser." - PouyaCat

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
do a
service dhcpd status 
and check your logs
humanity will always be slaved by its ignorance
Status returns a running PID and the weird thing is that the leases file actually contains a few entries (although none of the entries contain the MAC address of the NIC to which the IP was assigned so I can''t really check where it went).


"Finishing in second place, simply means you are the first loser." - PouyaCat

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Okay - I finally got it up and running - had to uninstall and reinstall all NIC''s in order to get it working properly... Sniff... RedHat''s networking hardware support sucks in a way - I have 4 NIC''s installed and, while Kudzu identified and configured all four of them, the network management utility only identified two - eth''s 0 and 3.

Anyway - I have set up rudimentary masquerading and IP-based connections seem to be working almost fine (weirdly, there are a few excpetions). However - either the DHCP server doesn''t give the nodes the DNS IP (as can be seen from the script in my original post, three are defined) or there''s some other problem. I''m not sure - maybe I need to do something else as well... Any suggestions?


"Finishing in second place, simply means you are the first loser." - PouyaCat

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
Do you see anything in the logs (/var/log/messages)? You should see something when a request is made and when the server send an ACK.
An excerpt from /var/log/messages relating to a DHCP update from a node:

Mar 12 18:15:27 router dhcpd: DHCPREQUEST for 192.168.40.60 from 00:10:5a:40:c9:ea via eth1Mar 12 18:15:27 router dhcpd: DHCPACK on 192.168.40.60 to 00:10:5a:40:c9:ea via eth1Mar 12 18:20:25 router dhcpd: Dynamic and static leases present for 192.168.40.60.Mar 12 18:20:25 router dhcpd: Remove host declaration 192.168.40.60 or remove 192.168.40.60Mar 12 18:20:25 router dhcpd: from the dynamic address pool for 192.168.40.32/27


No indication of failure, no indication of DNS status...

Weirdly, a lease from /var/lib/dhcp/dhclient.leases:

lease {  interface "eth1";  fixed-address 192.168.20.198;  option subnet-mask 255.255.255.0;  option routers 192.168.20.1;  option dhcp-lease-time 600;  option dhcp-message-type 5;  option domain-name-servers DNSIP1,DNSIP2,DNSIP3;  option dhcp-server-identifier 192.168.20.1;  option domain-name "DOMAIN_NAME_REMOVED";  renew 4 2004/2/12 13:23:44;  rebind 4 2004/2/12 13:28:32;  expire 4 2004/2/12 13:29:47;}


DNSIPx are valid IP''s to DNS servers...


"Finishing in second place, simply means you are the first loser." - PouyaCat

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

This topic is closed to new replies.

Advertisement