Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Simple DHCP question

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2005, 10:53 AM
Default Simple DHCP question



Hi folks,

I imagine this is a common problem but I couldn't find any hint as to solving
it.

I have a tiny network of 2-3 linux boxes connected to a DSL modem that also
serves as a DHCP server. This is a small office, and the machines are only
switched on when they get used. I don't know how the DHCP server decides which
machine gets which address when booting, all I know is that the addresses get
shuffled around. Of course I want each machine to keep its address, so I'm
looking for a way for each host to suggest to the DHCP server which address it'd
like to have. From reading, but not really understanding, the DHCP docs I've
pieced together this /etc/dhclient.conf file:

------------
alias {
interface"eth0";
fixed-address 192.168.100.100;
}

interface "eth0" {
send host-name "nizo.foo.bar";
supersede domain-name "foo.bar";
}
------------

....which accomplishes exactly nothing.

Thanks for any suggestions,

robert




Robert Latest
Reply With Quote
  #2  
Old 07-15-2005, 04:12 PM
Douglas Mayne
Guest
 
Posts: n/a
Default Re: Simple DHCP question

On Fri, 15 Jul 2005 09:53:35 +0000, Robert Latest wrote:

> Hi folks,
>
> I imagine this is a common problem but I couldn't find any hint as to solving
> it.
>
> I have a tiny network of 2-3 linux boxes connected to a DSL modem that also
> serves as a DHCP server. This is a small office, and the machines are only
> switched on when they get used. I don't know how the DHCP server decides which
> machine gets which address when booting, all I know is that the addresses get
> shuffled around. Of course I want each machine to keep its address, so I'm
> looking for a way for each host to suggest to the DHCP server which address it'd
> like to have. From reading, but not really understanding, the DHCP docs I've
> pieced together this /etc/dhclient.conf file:
>
> ------------
> alias {
> interface"eth0";
> fixed-address 192.168.100.100;
> }
>
> interface "eth0" {
> send host-name "nizo.foo.bar";
> supersede domain-name "foo.bar";
> }
> ------------
>
> ...which accomplishes exactly nothing.
>
> Thanks for any suggestions,
>
> robert
>

Assuming your DSL modem will not assign IP addresses to specific MAC
addresses, then you will have to do a couple of things.

1. Disable dhcp server on DSL modem.
2. Setup dhcp on another device that will be on all the time.
a. Possibly, this small router:
http://www.dlink.com/products/?model=DI-604

This device is a low power device which may be an adequate firewall/router
for your small office.

b. On one of your linux workstations using this howto:
http://www.tldp.org/HOWTO/DHCP/index.html

The key to setting the MAC-to-IP mapping is in the configuration file using
this syntax:

host haagen {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.222;
}

Reply With Quote
  #3  
Old 07-15-2005, 05:42 PM
Dave {Reply Address in.sig}
Guest
 
Posts: n/a
Default Re: Simple DHCP question

In message <(E-Mail Removed)>, Robert Latest wrote:

> Hi folks,
>
> I imagine this is a common problem but I couldn't find any hint as to
> solving it.
>
> I have a tiny network of 2-3 linux boxes connected to a DSL modem that
> also serves as a DHCP server. This is a small office, and the machines are
> only switched on when they get used. I don't know how the DHCP server
> decides which machine gets which address when booting, all I know is that
> the addresses get shuffled around. Of course I want each machine to keep
> its address, so I'm looking for a way for each host to suggest to the DHCP
> server which address it'd like to have. From reading, but not really
> understanding, the DHCP docs I've pieced together this /etc/dhclient.conf
> file:
>

If it's that small then either run dhcp on one of the Linux boxes instead or
just assign them all static addresses outside the range allocated by the
router dhcp server. That lets you keep the addresses simple and still
provide for any laptops or temporary machines to receive an address if they
get plugged into the network.
--
Dave
mail da (E-Mail Removed) (without the space)
http://www.llondel.org/
So many gadgets, so little time...
Reply With Quote
  #4  
Old 07-15-2005, 10:04 PM
Tauno Voipio
Guest
 
Posts: n/a
Default Re: Simple DHCP question

Robert Latest wrote:
> Hi folks,
>
> I imagine this is a common problem but I couldn't find any hint as to solving
> it.
>
> I have a tiny network of 2-3 linux boxes connected to a DSL modem that also
> serves as a DHCP server. This is a small office, and the machines are only
> switched on when they get used. I don't know how the DHCP server decides which
> machine gets which address when booting, all I know is that the addresses get
> shuffled around. Of course I want each machine to keep its address, so I'm
> looking for a way for each host to suggest to the DHCP server which address it'd
> like to have. From reading, but not really understanding, the DHCP docs I've
> pieced together this /etc/dhclient.conf file:
>
> ------------
> alias {
> interface"eth0";
> fixed-address 192.168.100.100;
> }
>
> interface "eth0" {
> send host-name "nizo.foo.bar";
> supersede domain-name "foo.bar";
> }
> ------------
>
> ...which accomplishes exactly nothing.



This makes your client to request a certain address for
a host. The server may opt to not honour the request,
however, which seems to happen here.

IMHO, you have two options:

a) Get rid of DHCP and configure the clients manually
with the required fixed addresses etc,

b) Turn off the DSL modem DHCP server and make one of
your Linux boxes a DHCP server with the requred
MAC-to-IP translations hardwired.

HTH

--

Tauno Voipio
tauno voipio (at) iki fi

Reply With Quote
  #5  
Old 07-19-2005, 07:20 PM
Michael Surette
Guest
 
Posts: n/a
Default Re: Simple DHCP question

Robert Latest wrote:

> I have a tiny network of 2-3 linux boxes connected to a DSL modem that also
> serves as a DHCP server. This is a small office, and the machines are only
> switched on when they get used. I don't know how the DHCP server decides which
> machine gets which address when booting, all I know is that the addresses get
> shuffled around. Of course I want each machine to keep its address, so I'm
> looking for a way for each host to suggest to the DHCP server which address it'd
> like to have. From reading, but not really understanding, the DHCP docs I've
> pieced together this /etc/dhclient.conf file:
> ...

You don't mention if your IP addresses are routeable or not. These
addresses are non-routable...

10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

If the assigned addresses are in one of these ranges then your modem is
also a router and is assigning the ip's and you can go ahead and pick an
address in the proper range for each of your computers and assign it
manually that is without dhcp.

If the assigned addresses are not in one of these ranges then your modem
is just a modem and the dhcp server is upstream. You probably will not
be able to coax the dhcp server to assign consistent addresses and your
best solution is to get a router. I strongly reccommend Linksys because
they run dnsmasq which will allow you to address each computer by name
even if the IP changes.

HTH

Mike
Reply With Quote
  #6  
Old 07-20-2005, 09:50 AM
Robert Latest
Guest
 
Posts: n/a
Default Re: Simple DHCP question

Thanks everybody for the help. I got rid of DHCP and all is fine now.

robert

Reply With Quote
  #7  
Old 07-20-2005, 11:12 AM
James Knott
Guest
 
Posts: n/a
Default Re: Simple DHCP question

Michael Surette wrote:

> You don't mention if your IP addresses are routeable or not. These
> addresses are non-routable...
>
> 10.0.0.0 - 10.255.255.255
> 172.16.0.0 - 172.31.255.255
> 192.168.0.0 - 192.168.255.255
>


They most certainly are routable. However, they're supposed to be blocked
from reaching the internet. There is nothing special about those addresses
that keeps them from being routable and many companies use them internally,
including through routers.

Reply With Quote
  #8  
Old 07-20-2005, 11:53 AM
David Schwartz
Guest
 
Posts: n/a
Default Re: Simple DHCP question


"James Knott" <(E-Mail Removed)> wrote in message
news:3aSdnSnm497vvkPfRVn-(E-Mail Removed)...

> Michael Surette wrote:


>> You don't mention if your IP addresses are routeable or not. These
>> addresses are non-routable...
>>
>> 10.0.0.0 - 10.255.255.255
>> 172.16.0.0 - 172.31.255.255
>> 192.168.0.0 - 192.168.255.255


> They most certainly are routable. However, they're supposed to be blocked
> from reaching the internet. There is nothing special about those
> addresses
> that keeps them from being routable and many companies use them
> internally,
> including through routers.


The word "routable" is often used as shorthand for "globally routable"
or "routable over the Internet".

DS


Reply With Quote
  #9  
Old 07-20-2005, 05:49 PM
James Knott
Guest
 
Posts: n/a
Default Re: Simple DHCP question

David Schwartz wrote:

> The word "routable" is often used as shorthand for "globally routable"
> or "routable over the Internet".
>


That's often the case, but I have come across some, who belive routers can't
pass those addresses.

Reply With Quote
Reply

Tags
dhcp, question, simple

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.