Change hostname (for DHCP)

Marvell Kirkwood based
Post Reply
Edoa
Posts: 18
Joined: Tue Jan 15, 2013 4:00 pm

Change hostname (for DHCP)

Post by Edoa » Fri Jan 18, 2013 9:06 am

Hi all, I have a personal dhcp server, and I added a reserved ip for the hostname "nas".
I changed the "server name" on my zyxel administration settings to "nas", but it continues to ask his ip to dhcp server with hostname "nsa310" ... how do I change it?

Thank you.

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Change hostname (for DHCP)

Post by barmalej2 » Fri Jan 18, 2013 10:17 am

Edoa wrote:Hi all, I have a personal dhcp server, and I added a reserved ip for the hostname "nas".
I changed the "server name" on my zyxel administration settings to "nas", but it continues to ask his ip to dhcp server with hostname "nsa310" ... how do I change it?

Thank you.
i don't really understand your problem. Set the same reserved static ip on zyxel administration page. Did you even tryied to reboot your NAS?

Edoa
Posts: 18
Joined: Tue Jan 15, 2013 4:00 pm

Re: Change hostname (for DHCP)

Post by Edoa » Fri Jan 18, 2013 1:49 pm

barmalej2 wrote:i don't really understand your problem. Set the same reserved static ip on zyxel administration page. Did you even tryied to reboot your NAS?
Of course I rebooted my nas.
My problem is that my router/dhcp server also run as dns proxy (dnsmasq), so if some device register himself to dhcp with a specific name, the dns server will resolve that name on its ip.

-- Sorry the problem was in the dhcp leases cache, now it works!

Edoa
Posts: 18
Joined: Tue Jan 15, 2013 4:00 pm

Re: Change hostname (for DHCP)

Post by Edoa » Sun Jan 20, 2013 4:44 pm

Edoa wrote:-- Sorry the problem was in the dhcp leases cache, now it works!
Sorry again.. I was not wrong, to make it working last time, I just played with zysh commands until it requested the ip with the correct hostname, but on a new reboot, it continues for asking for "nsa310" ...
If I do a ps -e ww (that shows me commandline), I found that the dhcpd command is run to do so:

Code: Select all

 /sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h nsa310 -m 50 egiga0
... How could i change that?

finnsloss
Posts: 5
Joined: Mon Feb 10, 2014 9:09 pm

Re: Change hostname (for DHCP)

Post by finnsloss » Sat Apr 05, 2014 9:50 am

I also have this problem.

Has anyone managed to get the NAS to register on DHCP with the changed name??

Thanks,
Finn
Last edited by finnsloss on Thu May 25, 2017 8:27 pm, edited 1 time in total.

pgh321
Posts: 20
Joined: Thu Feb 06, 2014 4:16 pm

Re: Change hostname (for DHCP)

Post by pgh321 » Sun Jan 11, 2015 12:06 pm

I have this unsolved problem too...
DHCP name of my 310S is detected by my router ending with an escape sequence \00 (like NSA310S\00 , with the \00 in violet inside linux terminal) , and this had given problems a the router GUI, needing telnet setup as workaround...

Anyone?

finnsloss
Posts: 5
Joined: Mon Feb 10, 2014 9:09 pm

Re: Change hostname (for DHCP)

Post by finnsloss » Mon May 15, 2017 7:41 pm

I'm still having the problem of DHCP hostname being set to "nsa310".

The strange thing appears to be that if I reboot my Plusnet router, the name shown in the connected devices is indeed the custom hostname I have set, and I can ping that name. If I reboot the NAS, when it restarts it registers with nsa310; I can no longer ping the custom name, only nsa310.
Last edited by finnsloss on Thu May 25, 2017 8:28 pm, edited 2 times in total.

finnsloss
Posts: 5
Joined: Mon Feb 10, 2014 9:09 pm

Re: Change hostname (for DHCP)

Post by finnsloss » Mon May 15, 2017 7:50 pm

The plot thickens...

If I reboot the NSA310 the command run is:

Code: Select all

/sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h nsa310 -m 50 egiga0
If I reboot the router and check the command run, it is:

Code: Select all

/sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h mynas -m 50 egiga0
How can the command change depending on whether the router is rebooted vs the NSA310 being rebooted?!?!

The plot thickens further still:
Start the router.
Start the NSA310.
Command run is:

Code: Select all

/sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h nsa310 -m 50 egiga0
Unplug the network cable, and reattach.
Command run is:

Code: Select all

/sbin/dhcpcd -N -c /usr/sbin/dhcpcd.sh -h mynas -m 50 egiga0
Can anyone work out why the hostname registered is different if the NAS has just booted, rather than registering after it has booted and the network is then attached?

Maddening!
Finn

Post Reply