Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Trivial DHCP problem; but can't figure it out....
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
arrummzen
n00b
n00b


Joined: 18 Apr 2006
Posts: 52

PostPosted: Wed Jan 20, 2016 11:05 pm    Post subject: [solved] Trivial DHCP problem; but can't figure it out.... Reply with quote

Hi everyone,

This is a bit embarrassing. I want to setup a trivial network. I have a few hosts connected to an unmanaged switch. I want to configure one host to act as a simple DHCP server to hand out IP address to the others. I don't need DNS or even routing! Sounds simple right? But after several hours I have nothing to show...

Here's what I tried: on the server, I put "config_eth0="192.168.0.1 netmask 255.255.255.0 brd 192.168.0.255"" in /etc/conf.d/net to statically assign IP address 192.168.0.1. That worked!

But, I then tried (1) dnsmasq. For dnsmasq I created the configuration file:
Code:

dhcp-range=192.168.0.100,192.168.0.250,72h
interface="eth0"

in /etc/dnsmasq.conf
I then started the service. No errors are reported, however the other hosts are not able to obtain IP addresses!

Second, I tried the ISC DHCPD.
/etc/conf.d/dhcpd:
Code:

DHCPD_IFACE="eth0"
IFACE="192.168.0.1"
INTERFACES="eth0"

/etc/dhcp/dhcpd.conf
Code:

subnet 192.168.1.0 netmask 255.255.255.0 {
#       option routers                  192.168.1.254;                                                                                                     
       option subnet-mask              255.255.255.0;
#       option domain-search              "example.com";                                                                                                   
#       option domain-name-servers       192.168.1.1;                                                                                                     
#       option time-offset              -18000;     # Eastern Standard Time                                                                               
       range 192.168.1.10 192.168.1.200;
}

I started the services and then tried to request an IP address on a second host. But they weren't able to get one.

Any suggestions would be appreciated! My desired configuration is so trival. It should take like three lines. But I can't figure it out. No errors, but no success :-(

Best,
James

EDIT: actually, I used this for ISC DHCPD
Code:

subnet 192.168.0.0 netmask 255.255.255.0 {
#       option routers                  192.168.1.254;                                                                                                     
       option subnet-mask              255.255.255.0;
#       option domain-search              "example.com";                                                                                                   
#       option domain-name-servers       192.168.1.1;                                                                                                     
#       option time-offset              -18000;     # Eastern Standard Time                                                                               
       range 192.168.0.10 192.168.0.200;
}


EDIT: Ok, figured it out. The host wasn't plugged into the switch. Please forget my shame :-/
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Jan 21, 2016 12:36 pm    Post subject: Re: [solved] Trivial DHCP problem; but can't figure it out.. Reply with quote

arrummzen wrote:
Ok, figured it out. The host wasn't plugged into the switch. Please forget my shame :-/

Lul; we already have, but I doubt you will any time soon ;-)

The old networking goody: "Have you plugged it in?" hehe

Don't feel bad: I knew some network engineers in the mid-90s, who got paid hundreds of pounds to drive out to places, and nine times out of ten when they got there, a cable was unplugged; all they had to do was plug it in, and go home, again charging for the time.

It's more embarrassing when it's the power-cable.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum