Find the answer to your Linux question:
Results 1 to 7 of 7
Hello all, I am trying to configure a ISC DHCP server on my Fedora Core 3 machine. The DHCP version I am using is dhcp-3.0.1-44_FC3. My requirement is that all ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Posts
    19

    DHCP: Problem in assigning fixed address to clients


    Hello all,
    I am trying to configure a ISC DHCP server on my Fedora Core 3 machine. The DHCP version I am using is dhcp-3.0.1-44_FC3. My requirement is that all the machines are assigned an IP via DHCP. However the IP should be same all the time it boots. so I gave the following configuration in /etc/dhcpd.conf:
    default-lease-time 600;
    max-lease-time 7200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.202.255;
    option routers 192.168.202.1;
    option domain-name-servers 192.168.202.1;
    option domain-name "basic.net";
    ddns-update-style ad-hoc;

    subnet 192.168.202.0 netmask 255.255.255.0 {
    range 192.168.202.100 192.168.202.200;

    #host nila.basic.net {
    # hardware ethernet 00:13:20:20:19:E4;
    # fixed-address 192.168.202.101;
    #}

    host pamba.basic.net {
    hardware ethernet 00:134:A6:153;
    fixed-address 192.168.202.102;
    }
    }
    When I started the dhcp daemon, it shows the following messages in /var/log/messages:
    Nov 17 01:36:53 triveni dhcpd: DHCPREQUEST for 192.168.202.199 from 00:13:d4:a6:15:d3 via eth0: lease 192.168.202.199 unavailable.
    Nov 17 01:36:53 triveni dhcpd: DHCPNAK on 192.168.202.199 to 00:13:d4:a6:15:d3 via eth0
    Nov 17 01:36:53 triveni dhcpd: DHCPDISCOVER from 00:13:d4:a6:15:d3 via eth0
    Nov 17 01:36:53 triveni dhcpd: DHCPOFFER on 192.168.202.102 to 00:13:d4:a6:15:d3 via eth0
    Nov 17 01:36:53 triveni dhcpd: Dynamic and static leases present for 192.168.202.102. Nov 17 01:36:53 triveni dhcpd: Remove host declaration pamba.ejyothi.net or remove 192.168.202.102
    Nov 17 01:36:53 triveni dhcpd: from the dynamic address pool for 192.168.202/24
    Nov 17 01:36:53 triveni dhcpd: DHCPREQUEST for 192.168.202.102 (192.168.202.1) from 00:13:d4:a6:15:d3 via eth0
    However when using linux clients, the above configuration works, eventhough it shows the above messages. When windows is used the IP is not assigned. what may me the problem?

    I am newbie to (Linux )Networking . Can anyone suggest a suitable method so that all the clients(LInux/Windows) are assigned a fixed IP and hostname from the dhcp server. Later on I have to set up a DNS server also in this network. But it's not a priority now.
    Any help would be appreciated.
    regards
    libregeek.

  2. #2
    Just Joined!
    Join Date
    Nov 2005
    Posts
    15
    lease-file-name "/var/lib/dhcp/dhcpd.leases";
    authoritative;

    #Server config
    ddns-update-style interim;
    #none For NO DNS / interim with DNS server / ad-hoc = ?
    ddns-domainname "mydomain";
    ddns-updates on;
    ignore client-updates;
    deny bootp;

    default-lease-time 86400;
    max-lease-time 86400;

    #Client config
    option ip-forwarding off;

    subnet 192.168.1.0 netmask 255.255.255.0 {
    option time-offset -18000; #Eastern Standard Time
    option routers 192.168.1.1;
    option broadcast-address 192.168.1.255;
    option domain-name-servers 192.168.1.1;
    option netbios-dd-server 192.168.1.1;
    option netbios-node-type 8;
    option netbios-name-servers 192.168.1.1;
    range 192.168.1.15 192.168.1.25;
    }

    This is the /etc/dhcpd.conf i am using, working all good.
    Been trying to optimize it lately. many things i dont know yet, like the ad-hoc options ??
    I know interim if you have a DNS (named) server configured (which i do).

    One thing before starting the daemon, you gotta create the lease file:
    #touch /var/lib/dhcp/dhcpd.leases

    Otherwise, it seems to be a problem with Named & DHCPD combo.

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    In your config you have the MAC address incorrectly input.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    wst
    wst is offline
    Just Joined!
    Join Date
    May 2006
    Posts
    1
    I have no problem with dhcp (dynamic and fixed) assigns, no problems with dynamic dns updates, but fixed IP dns updates don't work.

    For example, in dhcpd.conf I have an fixed host defined:
    host FixHost { hardware ethernet 00:01:21:bf:53:00; fixed-address 192.168.1.2; }

    FixHost can connect and obtain the fixed IP defined, but dhcp no send the update to named. What's wrong?


    wst...

  5. #5
    Just Joined!
    Join Date
    Jun 2006
    Posts
    1
    wst-

    I am experiencing the exact same behavior, though I suspect it may not be working as intended.

    However, I'd like to get this to work if possible. I have a network where a few workstations require a static address since the firewall statically routes ports to these addresses. However, I'd noticed over time that all hosts declared with fixed-address aren't showing up in my dynamic zone. What gives!

    Anyone have any idea?

    Quote Originally Posted by wst
    I have no problem with dhcp (dynamic and fixed) assigns, no problems with dynamic dns updates, but fixed IP dns updates don't work.

    For example, in dhcpd.conf I have an fixed host defined:
    host FixHost { hardware ethernet 00:01:21:bf:53:00; fixed-address 192.168.1.2; }

    FixHost can connect and obtain the fixed IP defined, but dhcp no send the update to named. What's wrong?


    wst...

  6. #6
    Just Joined!
    Join Date
    Oct 2006
    Posts
    1
    I wonder if anyone has any idea to solve this problem yet - cos I am having this problem as well: the fixed ip address not being updated on DNS server. From the man page I can see that there is a setting of "update-static-leases" is for this purpose. However it still not working properly even I set it to "on". Anyone help ?
    Thanks.

  7. #7
    Just Joined!
    Join Date
    Jan 2014
    Posts
    4
    I am having a similar problem. Several Windows computers (XP and 8.1) don't pick up the static address assigned to their hardware MAC address. They get one of the dynamically assigned range addresses instead. I can't figure out if this is something in the Windows networking configuration on each Windows computer or in the dhcpd.conf file. The hardware addesses are spelled out correctly and even show up correctly in the /etc/dhcp/dhcpd.leases file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •