Find the answer to your Linux question:
Results 1 to 4 of 4
Hi there, I have few machines at home. One has two ethernet card. One of the ethernet is connected to the Internet and works fine. I want to create a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! fatra2's Avatar
    Join Date
    Mar 2005
    Location
    Switzerland
    Posts
    33

    DHCP server


    Hi there,

    I have few machines at home. One has two ethernet card. One of the ethernet is connected to the Internet and works fine.

    I want to create a little home network with the other machines. The first step is to have the other machines recongized by the server. Therefore, I have been trying to setup a DHCP server, with the /etc/dhcpd.conf file, which looks like this
    Code:
    subnet 192.168.2.0 netmask 255.255.255.0 {
    	range 192.168.2.2 192.168.2.60;
    	default-lease-time 86400;
    	max-lease-time 86400;
    	option broadcast-address 192.168.2.255;
    	option subnet-mask 255.255.255.0;
    	option routers 192.168.2.1;
    	option domain-name-servers 192.168.2.1;
    }
    From my point of view, this should allow the client machines to receive an IP address. The problem starts here. Once this is setup, and dhcpd restarted, the client machines are not able to determine an IP address.

    Could anyone fill me in with some tips. I am clueless.

    Cheers

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Never configured a DHCP router on my system at home, and while everything looks good here, I think you should try to take the subnet, range and option-router lines out of that particular setup and append them to the end of the entry. Also, make sure you did *not* include the IP address used by the DHCP server in the range. Good luck. Post some progress for us.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    Just Joined! fatra2's Avatar
    Join Date
    Mar 2005
    Location
    Switzerland
    Posts
    33
    Hi there and thank you for the answer.

    I guess I should have mentionned that I did setup my DHCP server with the dhcp.conf file. I should have given a sample of the file I use. Sorry for that lazyness. Here is a sample of my dhcp.conf file.
    Code:
    ddns-updates off;
    ddns-update-style none;
    ddns-ttl 30;
    # home network
    subnet 192.168.2.0 netmask 255.255.255.0 {
    	authoritative;
    	allow client-updates;
    	allow unknown-clients;
    	range 192.168.2.2 192.168.2.60;
    	}
    When I start my dhcp server, I use the command
    Code:
    /usr/sbin/dhcpd eth0
    because my LAN is on eth0. Everything seems to work fine from the server's point of view. When I connect a client to the network, it can't determine IP address.

    I guess I should also mention that I am using a switch, therefore no need for crossover cable.

    At this point, any comments or suggestions are welcome. I have been looking at it for the past two days, and I am ready to crack my head on the wall.

    Cheers

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! fatra2's Avatar
    Join Date
    Mar 2005
    Location
    Switzerland
    Posts
    33
    Hi there,

    Here is an update of my situation, which seems to get more and more weird. I tried many different options to have my DHCP server working. Everything seemed fine from the server's point of view, but I could not obtain IP information for a client machine.

    Then in a desperate attempt, I decided to plug a third machine (second client) to my server. Everything worked fine in this new situation. I don't need to activate the ethernet card, just to have it plugged in to my switch.

    It seems terribly peculiar that my DHCP server wants to see two NIC before handing out some IP information. Can someone explain the reasons for this strange behaviour.

    Anyways, everything seems to be working fine.

    Cheers

Posting Permissions

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