[Solved]Hostnames Issue

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2
Author Message
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Sun Apr 21, 2019 12:05    Post subject: Reply with quote
ok. must still being something wrong. my internet went down twice. Last time to get internet back I had to reload my backup file to fix it. I'll do more digging.
Thanks
Mike
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Apr 21, 2019 12:16    Post subject: Reply with quote
The original file is in /tmp/dnsmasq.leases
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Sun Apr 21, 2019 12:22    Post subject: Reply with quote
the path I used was dhcp-leasefile=/tmp/mnt/sda1/dnsmasq.leases

Got that from here
[img][/img]
This is the share I setup
[img][/img]



share.png
 Description:
 Filesize:  29.91 KB
 Viewed:  1437 Time(s)

share.png



test.png
 Description:
 Filesize:  29.56 KB
 Viewed:  1437 Time(s)

test.png


Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Apr 21, 2019 12:34    Post subject: Reply with quote
The drive is formatted for Windows.

Format it to Linux EXT2 and name the drive jffs.

https://www.easeus.com/partition-master/how-to-create-ext2-ext3-based-linux-partition-from-windows.html
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Sun Apr 21, 2019 13:43    Post subject: Reply with quote
Ok I have done that and I still have internet. How do I know if its working? I entered this in the router under dhcp-leasefile=/jffs/dnsmasq.leases in Additional Dchpd options.
UPDATE:
My internet went down as soon as I entered a static ip for a device.
[img][/img]



second.png
 Description:
 Filesize:  14.87 KB
 Viewed:  1424 Time(s)

second.png


Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Apr 21, 2019 14:24    Post subject: Reply with quote
You have mis-spelled the volume name. It must be "jffs". No I
Dr_K
DD-WRT User


Joined: 23 Mar 2018
Posts: 445

PostPosted: Sun Apr 21, 2019 15:50    Post subject: Reply with quote
It looks to me that the two of you may be talking about "slightly" different things?

@machineman5107 To add static leases, you have three options...
1: Add them in the webif on the Services/Services tab..
2:Add them to the nvram from a command prompt..
3:Add them in the Additional Dnsmasq Options box, or in a conf-file labeled dnsmasq.custom..

Recherche the three, as they have there own format of entering the data...

If you choose the third & use Local DNS...
Also add the option "expand-hosts", so you don't have to also maintain a separate hosts file...where this are automatically populated when using the first & second options...

_________________
Location 1
R7800- DD-WRT v3.0-r53562 (10/03/23) Gateway
WNDR3400v1 DD-WRT v3.0-r35531_mega-nv64k (03/26/18 ) Access Point
WRT160Nv3 DD-WRT ?v3?.0-r35531 mini (03/26/18 ) Access Point
WRT54GSv5 DD-WRT v24-r33555_micro_generic (10/20/17) Repeater
Location 2
R7800- DD-WRT v3.0-r51855 (02/25/23) Gateway
R6300v2- DD-WRT v3.0-r50671 (10-26-22) Access Point
WNDR3700v2 DD-WRT v3.0-r35531 std (03/26/18 ) Access Point
E1200 v2 DD-WRT v3.0-r35531 mega-nv64k (03/26/18 ) Gateway(for trivial reasons)
RBWAPG-5HACT2HND-BE RouterOS-v6.46.4 (2/21/20) Outdoor Access Point
2x RBSXTG-5HPACD RouterOS-v6.46.4 (2/21/20) PTP Bridge 866.6Mbps-1GbpsLAN
Location 3
2x R7000- DD-WRT v3.0-r50671 (10/26/22) Access Points
2x RBWAPG-60AD RouterOS-v6.45.9 (04/30/20) PTP Bridge 2.3Gbps-1GbpsLAN
2x RBSXTsqG-5acD RouterOS-v6.49.7 (10/14/22) PTP Bridge 866.6Mbps-1GbpsLAN

Thank You BrainSlayer for ALL that you do & have done, also to "most" everyone here that shares their knowledge
Dr_K
DD-WRT User


Joined: 23 Mar 2018
Posts: 445

PostPosted: Sun Apr 21, 2019 16:09    Post subject: Reply with quote
@Per Yngve Berg Thank you for this. I am intrigued to look further into this..
Per Yngve Berg wrote:
It does not happen with me.

I have the dhcp leases on a volume on a USB stick.

In DHCPd Additional Options: dhcp-leasefile=/jffs/dnsmasq.leases

It will make the leases survive a router reboot.

I find it interesting that you use a DNSMasq option in the "DHCPd Additional Options" box.

For the last several years, on & off I have searched for this solution.. I've seen it asked a few times with no real answer ever given.
In the past, I've tried that option in the "Additional Dnsmasq Options" box. It would result in breaking DNSMasq with an error saying illegal repetitive option on line XX.. As certain options can only be specified once.

My final "solution" was a "hack"... Making a simple startup script deleting "dnsmasq.leases" in /tmp, creating a symlink to my own in /jffs, then restarting DNSMasq... Which does work.

I'm sure your method is better. Assuming it works when using DNSMasq for DHCP

Your post is the first I've seen that ever suggested using any options in that box....& I've looked... Only to find, in the webif help/more... "There are some extra options you can set by entering them in Additional DHCPD Options." or a web reference stating "you can use this box to do some really neat things"... Never finding any reference to any that could be used?..

Do you know of a link to anywhere with more useable options that can be used there? Or do you know of any others?

Thang you again.

_________________
Location 1
R7800- DD-WRT v3.0-r53562 (10/03/23) Gateway
WNDR3400v1 DD-WRT v3.0-r35531_mega-nv64k (03/26/18 ) Access Point
WRT160Nv3 DD-WRT ?v3?.0-r35531 mini (03/26/18 ) Access Point
WRT54GSv5 DD-WRT v24-r33555_micro_generic (10/20/17) Repeater
Location 2
R7800- DD-WRT v3.0-r51855 (02/25/23) Gateway
R6300v2- DD-WRT v3.0-r50671 (10-26-22) Access Point
WNDR3700v2 DD-WRT v3.0-r35531 std (03/26/18 ) Access Point
E1200 v2 DD-WRT v3.0-r35531 mega-nv64k (03/26/18 ) Gateway(for trivial reasons)
RBWAPG-5HACT2HND-BE RouterOS-v6.46.4 (2/21/20) Outdoor Access Point
2x RBSXTG-5HPACD RouterOS-v6.46.4 (2/21/20) PTP Bridge 866.6Mbps-1GbpsLAN
Location 3
2x R7000- DD-WRT v3.0-r50671 (10/26/22) Access Points
2x RBWAPG-60AD RouterOS-v6.45.9 (04/30/20) PTP Bridge 2.3Gbps-1GbpsLAN
2x RBSXTsqG-5acD RouterOS-v6.49.7 (10/14/22) PTP Bridge 866.6Mbps-1GbpsLAN

Thank You BrainSlayer for ALL that you do & have done, also to "most" everyone here that shares their knowledge
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Sun Apr 21, 2019 16:34    Post subject: Reply with quote
Hi
All I am trying to do is get the router to remember the device names once found. This seems to be hit and miss. As soon as I make a change in the router whatever it is, and the router refreshes or whatever it does, it looses all of the names it has found.
To set static for 75 plus devices is getting old.
In the Dnsmasq box if you make a mistake you loose internet. This has happened a few time already.
All I am trying to do is get it to remember the names once found.
Is there no easy way to do this?
I am new at this but shouldn't be easier?
Thanks
Mike
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Mon Apr 22, 2019 0:21    Post subject: Reply with quote
Hi
Thanks everyone for the help. Very Happy
I think I have the lease file working now. I have rebooted the router a couple of times and my clients came back up.
Is there a way to view the file to be 100% its writing the info?
Thanks
Mike
Dr_K
DD-WRT User


Joined: 23 Mar 2018
Posts: 445

PostPosted: Mon Apr 22, 2019 2:29    Post subject: Reply with quote
If it survives a reboot.....It is working...Normally it needs to repopulate as devices connect after a reboot...

So turn off a device....reboot router...& see if it is still in the list..

Look at the dnsmasq.leases file in /jffs & see if anything is in there...

_________________
Location 1
R7800- DD-WRT v3.0-r53562 (10/03/23) Gateway
WNDR3400v1 DD-WRT v3.0-r35531_mega-nv64k (03/26/18 ) Access Point
WRT160Nv3 DD-WRT ?v3?.0-r35531 mini (03/26/18 ) Access Point
WRT54GSv5 DD-WRT v24-r33555_micro_generic (10/20/17) Repeater
Location 2
R7800- DD-WRT v3.0-r51855 (02/25/23) Gateway
R6300v2- DD-WRT v3.0-r50671 (10-26-22) Access Point
WNDR3700v2 DD-WRT v3.0-r35531 std (03/26/18 ) Access Point
E1200 v2 DD-WRT v3.0-r35531 mega-nv64k (03/26/18 ) Gateway(for trivial reasons)
RBWAPG-5HACT2HND-BE RouterOS-v6.46.4 (2/21/20) Outdoor Access Point
2x RBSXTG-5HPACD RouterOS-v6.46.4 (2/21/20) PTP Bridge 866.6Mbps-1GbpsLAN
Location 3
2x R7000- DD-WRT v3.0-r50671 (10/26/22) Access Points
2x RBWAPG-60AD RouterOS-v6.45.9 (04/30/20) PTP Bridge 2.3Gbps-1GbpsLAN
2x RBSXTsqG-5acD RouterOS-v6.49.7 (10/14/22) PTP Bridge 866.6Mbps-1GbpsLAN

Thank You BrainSlayer for ALL that you do & have done, also to "most" everyone here that shares their knowledge
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Mon Apr 22, 2019 7:53    Post subject: Reply with quote
The command in Linux is (type in Windows)

cat /jffs/dnsmasq.leases
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Mon Apr 22, 2019 10:08    Post subject: Reply with quote
Thank you again for the help. I appreciate it.
machineman5107
DD-WRT User


Joined: 16 Apr 2019
Posts: 63

PostPosted: Mon Apr 22, 2019 23:57    Post subject: Reply with quote
Hi
I thought I had the lease file working but its not. When I try to read the file I am told It does not exist.
Here are a couple of screen shots. I am not sure what the reason is that its not working.
Any advice would be appreciated.
[img][/img]
[img][/img]
Thank you
Mike



nas.png
 Description:
 Filesize:  24.13 KB
 Viewed:  1316 Time(s)

nas.png



usb.png
 Description:
 Filesize:  17.66 KB
 Viewed:  1316 Time(s)

usb.png



jff.png
 Description:
 Filesize:  4.28 KB
 Viewed:  1316 Time(s)

jff.png



_________________
WRT1900ACSV2-Router
Firmware: DD-WRT v3.0-r39855 std (05/25/19)
Dr_K
DD-WRT User


Joined: 23 Mar 2018
Posts: 445

PostPosted: Thu May 02, 2019 16:13    Post subject: Reply with quote
This thread being marked as "[Solved]", I think it is ok to continue this "slightly" off topic...
Dr_K wrote:
@Per Yngve Berg Thank you for this. I am intrigued to look further into this..
Per Yngve Berg wrote:
It does not happen with me.

I have the dhcp leases on a volume on a USB stick.

In DHCPd Additional Options: dhcp-leasefile=/jffs/dnsmasq.leases

It will make the leases survive a router reboot.

I find it interesting that you use a DNSMasq option in the "DHCPd Additional Options" box.

For the last several years, on & off I have searched for this solution.. I've seen it asked a few times with no real answer ever given.
In the past, I've tried that option in the "Additional Dnsmasq Options" box. It would result in breaking DNSMasq with an error saying illegal repetitive option on line XX.. As certain options can only be specified once.

My final "solution" was a "hack"... Making a simple startup script deleting "dnsmasq.leases" in /tmp, creating a symlink to my own in /jffs, then restarting DNSMasq... Which does work.

I'm sure your method is better. Assuming it works when using DNSMasq for DHCP

Your post is the first I've seen that ever suggested using any options in that box....& I've looked... Only to find, in the webif help/more... "There are some extra options you can set by entering them in Additional DHCPD Options." or a web reference stating "you can use this box to do some really neat things"... Never finding any reference to any that could be used?..

Do you know of a link to anywhere with more useable options that can be used there? Or do you know of any others?

Thang you again.

Well... I tried your provided option...It did not work, at least not as I would have expected...
Not really sure what it did. As it did not use or update the "dnsmasq.leases" file located on /jffs. Nor did the "DHCP Clients" displayed at the bottom of the gui's /Status/LAN page survive a reboot.
Instead it appeared to create a file in /jffs named "command-leases", I say appeared because the said file is dated Feb 12th? Nor do I recall it being there before running your option.
Though it does seam to be some sort of host file by it's content.

It sure would be nice to have any reference/explination of your provided option &/or any other options useable in the "Additional DHCPd Options" box found on the gui's /Services page.

For reference the solution I used & now use again, is better explained in this post

_________________
Location 1
R7800- DD-WRT v3.0-r53562 (10/03/23) Gateway
WNDR3400v1 DD-WRT v3.0-r35531_mega-nv64k (03/26/18 ) Access Point
WRT160Nv3 DD-WRT ?v3?.0-r35531 mini (03/26/18 ) Access Point
WRT54GSv5 DD-WRT v24-r33555_micro_generic (10/20/17) Repeater
Location 2
R7800- DD-WRT v3.0-r51855 (02/25/23) Gateway
R6300v2- DD-WRT v3.0-r50671 (10-26-22) Access Point
WNDR3700v2 DD-WRT v3.0-r35531 std (03/26/18 ) Access Point
E1200 v2 DD-WRT v3.0-r35531 mega-nv64k (03/26/18 ) Gateway(for trivial reasons)
RBWAPG-5HACT2HND-BE RouterOS-v6.46.4 (2/21/20) Outdoor Access Point
2x RBSXTG-5HPACD RouterOS-v6.46.4 (2/21/20) PTP Bridge 866.6Mbps-1GbpsLAN
Location 3
2x R7000- DD-WRT v3.0-r50671 (10/26/22) Access Points
2x RBWAPG-60AD RouterOS-v6.45.9 (04/30/20) PTP Bridge 2.3Gbps-1GbpsLAN
2x RBSXTsqG-5acD RouterOS-v6.49.7 (10/14/22) PTP Bridge 866.6Mbps-1GbpsLAN

Thank You BrainSlayer for ALL that you do & have done, also to "most" everyone here that shares their knowledge
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum