Networking Forums

Networking Forums > Computer Networking > Linux Networking > Simple DHCP question

Reply
Thread Tools Display Modes

Simple DHCP question

 
 
Robert Latest
Guest
Posts: n/a

 
      07-15-2005, 09:53 AM
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


 
Reply With Quote
 
 
 
 
Douglas Mayne
Guest
Posts: n/a

 
      07-15-2005, 03:12 PM
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
 
Dave {Reply Address in.sig}
Guest
Posts: n/a

 
      07-15-2005, 04:42 PM
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
 
Tauno Voipio
Guest
Posts: n/a

 
      07-15-2005, 09:04 PM
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
 
Michael Surette
Guest
Posts: n/a

 
      07-19-2005, 06:20 PM
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
 
Robert Latest
Guest
Posts: n/a

 
      07-20-2005, 08:50 AM
Thanks everybody for the help. I got rid of DHCP and all is fine now.

robert

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      07-20-2005, 10:12 AM
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
 
David Schwartz
Guest
Posts: n/a

 
      07-20-2005, 10:53 AM

"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
 
James Knott
Guest
Posts: n/a

 
      07-20-2005, 04:49 PM
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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple question about lpd Ty Roberts Linux Networking 2 07-11-2008 03:00 PM
Simple Question Marco Roberto Gonçalves Junior Wireless Networks 0 07-10-2006 07:10 PM
Simple Question Rugbytrader Broadband Hardware 2 01-19-2004 02:35 PM
Simple question... MacDaddy Wireless Internet 7 12-01-2003 06:36 PM
Probably a simple question Slaphead Home Networking 1 10-13-2003 10:36 PM



1 2 3 4 5 6 7 8 9 10 11