Network, routers, DHCP and PXE

Manolis Kiagias sonic2000gr at gmail.com
Mon Jul 28 09:42:59 UTC 2008


Svein Halvor Halvorsen wrote:
> Manolis Kiagias wrote:
>   
>>> Now, on this network, most of the computers get their IP by means of
>>> DHCP. Except our home audio server, which have a hard coded ip
>>> address in rc.conf, set to something within the range of the dhcp
>>> server (10.0.0.2-10.0.0.253). The server seems to pick this up, and
>>> don't give that address away to someone else.
>>>       
>> You may also want to ensure that the router will never allocate your 
>> static IP address to someone else.
>> Look at the DHCP router settings either for DHCP scope (set it to 
>> narrower values, and use a static IP outside the range) or for something 
>> like exceptions / exclusion where you can mark a specific IP that DHCP 
>> will never assign.
>>     
>
> Yeah, but even though the router has customizable values for this
> range, and issues a warning when i try to change them, it still
> doesn't change them when I click "yes" on the warning. It is
> pre-configured to 10.0.0.2-10.0.0.253
>
> I could of course use 10.0.0.254 for my static ip, but my room mate
> also wants a static address.
>
>   

What are you trying to set it at? I would just lower the 253 value, so I 
could use the upper end for my static addresses. If you try to set it to 
a subnet outside it's own address, it will definitely not accept it.
 I would also try a factory reset or firmware upgrade of the router. I 
have been using a Speedtouch 500 series for years, and never had any 
problems with settings not getting registered.  AFAIR the 585 has one of 
the new web interfaces and it is kind of confusing. I found the 500 
easier to use.

>>> I've tried using other addresses outside this range, like 10.0.1.1,
>>> but that doesn't work. All network access is lost when I do that.
>>>       
>>  10.0.1.1 is a different network (I assume your netmask is 
>> 255.255.255.0, but check your router or your clients)
>>     
>
> You're right! But how do I make the entire 10/24 adress space
> available? It would be "clean" (I guess) to have a different adresse
> scheme for the static adresses.
>   

Well problem is, a netmask of 255.255.255.0 means only the last octet 
can be used for hosts. Your DHCP server is already assigning addresses 
from this space.

> Anyway, it this point this isn't really critical, as the router
> figures out that the addresses I use, are in fact in use, and keeps
> them out of its dhcp address pool.
>
>
>   
>> You will have to shutdown the router's DHCP. Probably disable it 
>> permanently and assign this function to a machine.
>> The DHCP of the router also sends you the following information (besides 
>> IP address):
>>
>> - DNS Server(s): Either the ones used by your ISP (consult its website) 
>> or its own address (i.e. 10.0.0.1). Most routers send their own address 
>> as a DNS server and perform the resolution by sending your request to 
>> ISP servers.
>> - Gateway address: This is always the router's local IP address (i.e. 
>> 10.0.0.1)
>>
>> If you setup your own DHCP server, make sure it is set to send this info 
>> as well. (These are commonly known as DHCP options)
>>     
>
> So as long as I make my own DHCP server act the same way as the
> router one, I should be fine? NAT and all will work?
>   

Yes. As long as the clients have a valid DNS to ask, and a valid gateway 
to send their packets, everything will work properly. If you come to 
think about it, you are already doing this on the system with the static 
configuration.

> Is there a way to debug the DHCP response from the current router
> dhcp server? So I can see what options it actually sends? dhclient
> doesn't seem to have a "more verbose" option, only less.
>
>
> 	sv.
>   


Not sure about this, sorry. However, don't expect much more than 
IP/Netmask, DNS Server, Gateway from a simple router. These should not 
be difficult to configure in isc-dhcp3 (net/isc-dhcp3-server).

Have a look at this article:

http://www.howtoforge.com/dhcp_server_linux_debian_sarge

It is linux oriented, but very easy to adjust for FreeBSD.
You will also need to add:

option domain-name-servers 10.0.0.1;

to set the DNS server address to your clients.


More information about the freebsd-questions mailing list