Results 1 to 10 of 10

Thread: dhcp3-server configuration problems

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    Kalamazoo, MI, USA
    Beans
    71
    Distro
    Ubuntu 11.04 Natty Narwhal

    dhcp3-server configuration problems

    Hello, I'm attempting to run a DHCP server on my home network to enable PXE booting for ethernet clients, but I'm having quite a few issues getting it all up and running. I'm not entirely sure what is wrong, but I keep encountering errors in syslog as follows:

    Code:
    Feb 27 02:26:46 servnerr-1 dhcpd: Wrote 0 leases to leases file.
    Feb 27 02:26:46 servnerr-1 dhcpd:
    Feb 27 02:26:46 servnerr-1 dhcpd: No subnet declaration for eth0 (192.168.1.3).
    Feb 27 02:26:46 servnerr-1 dhcpd: ** Ignoring requests on eth0.  If this is not what
    Feb 27 02:26:46 servnerr-1 dhcpd:    you want, please write a subnet declaration
    Feb 27 02:26:46 servnerr-1 dhcpd:    in your dhcpd.conf file for the network segment
    Feb 27 02:26:46 servnerr-1 dhcpd:    to which interface eth0 is attached. **
    Feb 27 02:26:46 servnerr-1 dhcpd:
    Feb 27 02:26:46 servnerr-1 dhcpd:
    Feb 27 02:26:46 servnerr-1 dhcpd: Not configured to listen on any interfaces!
    I am attempting to set this server up on a box with one ethernet interface (eth0), and a static IP address of 192.168.1.3. I have set INTERFACES="eth0" in /etc/default/dhcp3-server. Here is all the information I can provide:

    dhcpd.conf:
    Code:
    authoritative;
    
    default-lease-time 3600;
    max-lease-time 7200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.3;
    option domain-name-servers 192.168.1.1;
    
    option time-offset -18000;
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.100 192.168.1.150;
    range 192.168.1.200 192.168.1.254;
    }
    option netbios-name-servers 192.168.1.3;
    ifconfig information for eth0:
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0a:e4:8b:e1:a2
              inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.254.0
              inet6 addr: fe80::20a:e4ff:fe8b:e1a2/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:30004274 errors:0 dropped:0 overruns:0 frame:0
              TX packets:23587990 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:875400748 (875.4 MB)  TX bytes:4128397250 (4.1 GB)
              Interrupt:16
    /etc/network/interfaces:
    Code:
    auto eth0
    iface eth0 inet static
            address 192.168.1.3
            netmask 255.255.254.0
            network 192.168.1.0
            broadcast 192.168.1.255
            gateway 192.168.1.1
    Networking is not exactly my strong suit, but I would like to get this up and running if at all possible. I will continue to research myself, but any information that could be helpful would be very much appreciated. Thank you!

  2. #2
    Join Date
    Jan 2010
    Location
    behind the server
    Beans
    116
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: dhcp3-server configuration problems

    I would expect that the declaration of you dhcp-server's subnet (255.255.255.0) is not the same subnet of your nic-configuration (255.255.254.0).
    To my mind this should be the solution.
    And be sure to change both values of subnet-masks in your dhcpd.conf
    Best Regards

  3. #3
    Join Date
    Jul 2009
    Location
    Kalamazoo, MI, USA
    Beans
    71
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: dhcp3-server configuration problems

    No such luck, the same error occurs unfortunately. Thank you for your time though.

  4. #4
    Join Date
    Jan 2010
    Location
    behind the server
    Beans
    116
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: dhcp3-server configuration problems

    Can you tell me what you have changed? Because on your Interface (eth0) you say netmask 255.255.254.0 that means:

    Address: 192.168.1.0 11000000.10101000.0000000 1.00000000
    Netmask: 255.255.254.0 = 23 11111111.11111111.1111111 0.00000000
    Wildcard: 0.0.1.255 00000000.00000000.0000000 1.11111111
    =>
    Network: 192.168.0.0/23 11000000.10101000.0000000 0.00000000 (Class C)
    Broadcast: 192.168.1.255 11000000.10101000.0000000 1.11111111
    HostMin: 192.168.0.1 11000000.10101000.0000000 0.00000001
    HostMax: 192.168.1.254 11000000.10101000.0000000 1.11111110
    Hosts/Net: 510
    And you define: network 192.168.1.0 isn't it 192.168.0.0 ?
    Same thing on DHCP. So the Information have to be the same, that dhcp-server can identify your eth0 with the subnetdeclaration.

    Another thing which caught my eye was:
    option routers 192.168.1.3;
    in your dhcpd.conf.
    Option routers defined as far as i know the gateway for the dhcp-clients. So i don't think your dhcp-server is your gateway. 192.168.1.1 could possibly your gateway.

  5. #5
    Join Date
    Jul 2009
    Location
    Kalamazoo, MI, USA
    Beans
    71
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: dhcp3-server configuration problems

    I now realize that I may have made a mistake when setting up the static IP on eth0, and have now modified its subnet mask to 255.255.255.0. I also modified the network declaration in /etc/network/interfaces to 192.168.0.0 and the subnet declaration in dhcpd.conf to 192.168.0.0. Here's the current state of dhcpd.conf and /etc/network/interfaces:

    dhcpd.conf
    Code:
    authoritative;
    ddns-update-style none;
    
    default-lease-time 3600;
    max-lease-time 7200;
    option domain-name "nerr.ath.cx";
    #option subnet-mask 255.255.255.0;
    #option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
    option domain-name-servers 192.168.1.1;
    
    option time-offset -18000;
    
    subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.1.100 192.168.1.150;
    }
    option netbios-name-servers 192.168.1.3;
    /etc/network/interfaces
    Code:
    auto eth0
    iface eth0 inet static
            address 192.168.1.3
            netmask 255.255.255.0
            network 192.168.0.0
            broadcast 192.168.1.255
            gateway 192.168.1.1
            pre-up iptables-restore < /etc/iptables.rules
            post-down iptables-save > /etc/iptables.rules

  6. #6
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: dhcp3-server configuration problems

    Any change after restarting?
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

Bookmarks

Posting Permissions

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