need static dhcp

Please post question and issues pertaining to expansion here.

need static dhcp

Postby sbruck » Thu May 06, 2010 3:12 am

Hello,
with rnd4000..
I need a static address with udhcp, like dhcp3-server:

host MYHOST{
hardware ethernet 00:1C:3F:F9:2B:80;
fixed-address 10.38.238.125;
}

How can I do this??

It's not possible with udhcp. (I didn't find)

Then.....

I remove udhcpd, and install dhcp3-server, but dhcpd not working properly in rnd4000, and I can't compile ( I can't install build-essential)
Sometimes it work, sometimes not :(
I have only one dhcpd in my lan.
In /var/log/daemon.log I have:
Apr 26 09:09:00 MAC01-DOC dhcpd: DHCPDISCOVER from 00:16:36:12:97:10 via eth0
Apr 26 09:09:00 MAC01-DOC dhcpd: DHCPOFFER on 10.72.238.21 to 00:16:36:12:97:10 via eth0
Apr 26 09:09:14 MAC01-DOC dhcpd: DHCPDISCOVER from 00:0b:6a:82:00:fc via eth0
Apr 26 09:09:14 MAC01-DOC dhcpd: DHCPOFFER on 10.72.238.17 to 00:0b:6a:82:00:fc via eth0
Apr 26 09:09:16 MAC01-DOC dhcpd: DHCPDISCOVER from 00:16:36:12:97:10 via eth0
Apr 26 09:09:16 MAC01-DOC dhcpd: DHCPOFFER on 10.72.238.21 to 00:16:36:12:97:10 via eth0
Apr 26 09:09:18 MAC01-DOC dhcpd: DHCPDISCOVER from 00:0b:6a:82:00:fc via eth0

A loop... DISCOVER.. OFFER... DISCOVER.. OFFER... DISCOVER.. OFFER... and nothing.
And when dhcp ok. the DHCPREQUEST is send... the DHCPACK confirm it's work.. but it's not always working :(

Anyone have solution??
Tks a lot
sbruck
ReadyNAS Newbie
 
Posts: 6
Joined: Mon Apr 26, 2010 2:55 am
ReadyNAS: NV+

Re: need static dhcp

Postby dbott67 » Thu May 06, 2010 7:46 am

Are you looking to add a static lease (aka DHCP reservation)? If so, I have written a how-to for the x86-based ReadyNAS units (Pro, NVX, 2100) and it's probably quite similar for the NV+. You'll need root SSH access to the NV+:

http://home.bott.ca/webserver/?p=256

Basically, you need to add the static_lease option to the /etc/udhcp.conf file, similar to the following:

Code: Select all
# Static Lease Map
static_lease 00:60:08:xx:xx:xx 192.168.129.54
static_lease 00:60:08:xx:xx:xx 192.168.129.64


The end result should look like this:

Code: Select all
ReadyNAS-2100:~# cat /etc/udhcpd.conf
# This file is auto-generated.  Do not modify!

auto_time       60
interface       eth0
option wins     192.168.128.25
option dns      192.168.128.25
option dns      192.168.128.35
option domain   mydomain.ca
option lease    604800
option subnet   255.255.255.0
option router   192.168.129.1
start   192.168.129.50
end     192.168.129.199

# Static Lease Map
static_lease 00:60:08:xx:xx:xx 192.168.129.54
static_lease 00:60:08:xx:xx:xx 192.168.129.64


User avatar
dbott67
ReadyNAS Fanatic
 
Posts: 8528
Joined: Mon Dec 31, 2007 9:20 am
Location: District 9
ReadyNAS: Pro

Re: need static dhcp

Postby sbruck » Tue May 11, 2010 10:37 pm

Thank you, it's ok, but... :/

- how disable unknown macaddress ?
like dhcpd.conf =>
deny unknown-clients;

- And allow a group, like:
group {
host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; }
host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; }
host ncd8 { hardware ethernet 0:c0:c3:22:46:81; }
}

Tks a lot
sbruck
ReadyNAS Newbie
 
Posts: 6
Joined: Mon Apr 26, 2010 2:55 am
ReadyNAS: NV+

Re: need static dhcp

Postby dbott67 » Wed May 12, 2010 6:04 am

I don't know if udhcpd supports the options you're looking for, however, if you are familiar with linux you can install the SSH add-on for the NV+, as well as the APT add-on and then install a different dhcp package (such as dhcp3-server). Be sure to disable the existing DHCP in Frontview:

Code: Select all
apt-get install dhcp3-server


http://www.howtoforge.com/dhcp_server_l ... bian_sarge

Note: I no longer have an NV+ to test/verify/brick. Installation of other packages may hose your NAS. Be sure to back up your data and settings. A firmware re-install can fix many issues if you get stuck. Objects in the mirror are closer than they appear. Your mileage may vary.
User avatar
dbott67
ReadyNAS Fanatic
 
Posts: 8528
Joined: Mon Dec 31, 2007 9:20 am
Location: District 9
ReadyNAS: Pro

Re: need static dhcp

Postby sbruck » Wed May 12, 2010 9:37 am

Yes, I did, but it was my first problem:

I remove udhcpd, and install dhcp3-server, but dhcpd not working properly in rnd4000, and I can't compile ( I can't install build-essential)
Sometimes it work, sometimes not :(
sbruck
ReadyNAS Newbie
 
Posts: 6
Joined: Mon Apr 26, 2010 2:55 am
ReadyNAS: NV+

Re: need static dhcp

Postby dbott67 » Wed May 12, 2010 9:41 am

sbruck wrote:Yes, I did, but it was my first problem:

I remove udhcpd, and install dhcp3-server, but dhcpd not working properly in rnd4000, and I can't compile ( I can't install build-essential)
Sometimes it work, sometimes not :(


You could always make a request in the add-ons sub-forums for a more fully-featured dhcp server:

viewforum.php?f=62
User avatar
dbott67
ReadyNAS Fanatic
 
Posts: 8528
Joined: Mon Dec 31, 2007 9:20 am
Location: District 9
ReadyNAS: Pro

Re: need static dhcp

Postby sbruck » Wed May 12, 2010 11:28 am

Thank you for the advice
sbruck
ReadyNAS Newbie
 
Posts: 6
Joined: Mon Apr 26, 2010 2:55 am
ReadyNAS: NV+

Re: need static dhcp

Postby pnorris » Fri May 21, 2010 6:41 pm

Probably too late.. but someone else may read and it may help them

I was running the latest released version of the ReadyNAS software as of 22nd May 2010..

You will need ssh access to the NAS..
(vi editing knowledge will help...)

I found the version of udhcp installed (via the default install did not support static leases)

However changing my /etc/apt/sources.list so it worked... (backup this file before you start)

deb http://archive.debian.org/debian/ sarge contrib main non-free
deb-src http://archive.debian.org/debian/ sarge contrib main non-free

BACKUP your /etc/udhcpd.conf (as the upgrade removes it..)

then run
apt-get upgrade # to get a list of the latest upgrades
apt-get install udhcpd (This will perform an upgrade)

in your /etc/udhcpd.conf file place you static leases as follows

static_lease 00:21:5a:e7:xx:xx 10.10.1.254


Reboot your NAS (to ensure it still works)

Mine now hands out the static leases...

Cheers
pnorris
ReadyNAS Newbie
 
Posts: 1
Joined: Fri May 21, 2010 6:23 pm
ReadyNAS: NV+


Return to Expansion



Who is online

Users browsing this forum: No registered users and 2 guests