How to delete static address on the SERVICES tab? [SOLVED]

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


Joined: 25 Oct 2019
Posts: 144

PostPosted: Thu Apr 08, 2021 15:03    Post subject: How to delete static address on the SERVICES tab? [SOLVED] Reply with quote
Is it me or is there not a way to delete a static address entered on the SERVICES tab? When I clear the MAC Address and the Hostname and the IP Address for a device and click SAVE everything re-populates. If I click REMOVE the entry that gets removed is the very last entry.

How do I delete the entries for a specific line and not just the last line?

_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura


Last edited by emanon on Sun Apr 11, 2021 22:31; edited 1 time in total
Sponsor
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Thu Apr 08, 2021 16:05    Post subject: Reply with quote
I think code needs to be rewritten to change this behavior, or manually remove each entry then add again.

There are old threads for how to make changes from command line, but fair warning things can get messy.

https://wiki.dd-wrt.com/wiki/index.php/Static_DHCP

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=48246

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=308065
emanon
DD-WRT User


Joined: 25 Oct 2019
Posts: 144

PostPosted: Thu Apr 08, 2021 16:15    Post subject: Reply with quote
blkt wrote:
I think code needs to be rewritten to change this behavior, or manually remove each entry then add again.

There are old threads for how to make changes from command line, but fair warning things can get messy.

https://wiki.dd-wrt.com/wiki/index.php/Static_DHCP

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=48246


This ain't happening cause I have 30 different devices listed!

I guess I'm stuck with figuring out the command line stuff.

_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Thu Apr 08, 2021 16:24    Post subject: Reply with quote
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1205242#1205242

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=311960

Here are a few links in addition to the three above, good luck.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6414
Location: UK, London, just across the river..

PostPosted: Thu Apr 08, 2021 18:45    Post subject: Reply with quote
yep, it always deletes, only the last one...so you have to copy paste and move them around, its not a big deal...
if so, you better use DNSmasq for adding static leases, as it does the same job...
on my home router, i personally like the GUI option, but on those i manage i can't bother to add so many addresses, so DNSmasq advanced config box does the quick job...
use this format
dhcp-host=xx:xx:xx:xx:xx:xx,my-phone,192.168.1.116,infinite
dhcp-host=xx:xx:44:xx:xx:xx,tv,192.168.1.106,infinite

replace xx with mac address..

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
emanon
DD-WRT User


Joined: 25 Oct 2019
Posts: 144

PostPosted: Fri Apr 09, 2021 4:36    Post subject: Reply with quote
Alozaros wrote:
yep, it always deletes, only the last one...so you have to copy paste and move them around, its not a big deal...
if so, you better use DNSmasq for adding static leases, as it does the same job...
on my home router, i personally like the GUI option, but on those i manage i can't bother to add so many addresses, so DNSmasq advanced config box does the quick job...
use this format
dhcp-host=xx:xx:xx:xx:xx:xx,my-phone,192.168.1.116,infinite
dhcp-host=xx:xx:44:xx:xx:xx,tv,192.168.1.106,infinite

replace xx with mac address..


When adding a device using DNSmasq, does the device appear on the table in the SERVICES tab?

How do you delete a device using DNSmasq?

_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6414
Location: UK, London, just across the river..

PostPosted: Fri Apr 09, 2021 13:16    Post subject: Reply with quote
emanon wrote:

When adding a device using DNSmasq, does the device appear on the table in the SERVICES tab?

How do you delete a device using DNSmasq?


Im afraid, im not intelligent enough to answer you those questions...to help you out...i may test that instead of you or you can test it on your own, i guess it will show off some results... Rolling Eyes

p.s. if i dont come out with some results on time, please do not wait, test it on your own...as im very busy at the moment... Cool

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
emanon
DD-WRT User


Joined: 25 Oct 2019
Posts: 144

PostPosted: Fri Apr 09, 2021 14:58    Post subject: Reply with quote
Alozaros wrote:
emanon wrote:

When adding a device using DNSmasq, does the device appear on the table in the SERVICES tab?

How do you delete a device using DNSmasq?


Im afraid, im not intelligent enough to answer you those questions...to help you out...i may test that instead of you or you can test it on your own, i guess it will show off some results... Rolling Eyes

p.s. if i dont come out with some results on time, please do not wait, test it on your own...as im very busy at the moment... Cool


You are more than intelligent! There is a lot to learn and know with dd-wrt. I think there is not one person who knows all the answers.

_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura
foz111
DD-WRT Guru


Joined: 01 Oct 2017
Posts: 704
Location: Earth

PostPosted: Fri Apr 09, 2021 16:51    Post subject: Reply with quote
simplest solution move it to USB (jffs) where its easy to edit

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1233580&highlight=#1233580

_________________
Netgear R7800 PPPoE Main Router
Network IPV4 - Isolated Vlan's with IoT Devices. Unifi AC-Pro x 3 AP's, Router Wi-Fi Disabled. OVPN Server With Paid Commercial Wireguard Client's. Gateway Mode, DNSMasq, Static Leases & DHCP, Pi-Hole DNS & Running Unbound.

No one can build you the bridge on which you, and only you, must cross the river of life!
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14129
Location: Texas, USA

PostPosted: Fri Apr 09, 2021 17:19    Post subject: Reply with quote
blkt wrote:
I think code needs to be rewritten to change this behavior


It was initially requested to have the feature to remove individual leases from the table 14 years ago:

https://svn.dd-wrt.com/ticket/133

Yeah, that hasn't happened yet, apparently.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
plawer
DD-WRT User


Joined: 11 Aug 2019
Posts: 156

PostPosted: Sun Apr 11, 2021 10:52    Post subject: Reply with quote
I find that it is a pain to maintain in the table. If you only have a few static, go with the suggested option of adding the text to the additional config field (no, it does not populate the table - the table is added to the config file on boot). If you have a lot of static addresses then store it on a usb device, and add a pointer to that file in the additional config field.
_________________
Linksys: Several WRTxx00AC variations | Netgear: 4x WNDR4500v2, 7x WNDR4300, R6400v1 | Asus: 2x RT-AC66U | Gl.inet: 3x GL-AR150
emanon
DD-WRT User


Joined: 25 Oct 2019
Posts: 144

PostPosted: Sun Apr 11, 2021 12:55    Post subject: Reply with quote
plawer wrote:
I find that it is a pain to maintain in the table. If you only have a few static, go with the suggested option of adding the text to the additional config field (no, it does not populate the table - the table is added to the config file on boot). If you have a lot of static addresses then store it on a usb device, and add a pointer to that file in the additional config field.


I think that this might be my best option. However, I am still an amateur when comes to writing config language for various options in ddwrt. I've read the tutorials and attempted to do this but absolutely nothing changed. I’m sure it's because I didn't do it correctly. I need for someone to please point me to an example of the file that goes on the USB device and please tell me exactly where the pointer goes. I am using the latest version of ddwrt. I think all the examples I've seen on the internet are for older versions of ddwrt and the examples don't match what I see. Thanks a million!!!

_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura
plawer
DD-WRT User


Joined: 11 Aug 2019
Posts: 156

PostPosted: Sun Apr 11, 2021 13:55    Post subject: Reply with quote
Make a copy of whatever entries you need to keep in the Static Lease section so you have the addresses you need. Then remove all of them

Under Dnsmasq in the Additional Dnsmasq Options write each host in this format host MAC, hostname, IP to be assigned, for how long the lease should be applicable (I always use 1440m which is a day()
dhcp-host=BE:EF:FE:ED:BE:EF,hostname1,192.168.1.2,1440m
dhcp-host=BE:EF:FE:ED:BA:DD,hostname2,192.168.1.3,1440m

and save and reboot.

After the reboot, go to Administration / Commands and type
cat /tmp/dnsmasq.conf

When the window refreshes, you should see your entries towards the bottom of the file it shows.

_________________
Linksys: Several WRTxx00AC variations | Netgear: 4x WNDR4500v2, 7x WNDR4300, R6400v1 | Asus: 2x RT-AC66U | Gl.inet: 3x GL-AR150
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2030

PostPosted: Sun Apr 11, 2021 14:14    Post subject: Reply with quote
If you already have leases defined in the GUI, SSH/Telnet to your router, Do:
Code:
grep dhcp-host /tmp/dnsmasq.conf


Copy them and paste into Additional Dnsmasq Options
and delete them from the GUI.

Add or delete entries as desired. Also copy them to a text file saved on your computer for easy review.

eibgrad describes other options and enhancements.
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1233516#1233516
emanon
DD-WRT User


Joined: 25 Oct 2019
Posts: 144

PostPosted: Sun Apr 11, 2021 15:34    Post subject: Reply with quote
Thank you all for replying. I am at church and will give this a try when I get home. Yes I am on the Internet on my phone while church is happening!
_________________
Linksys WRT32X | DD-WRT v3.0-r51937 std (03/05/23) | macOS Ventura
Goto page 1, 2  Next Display posts from previous:    Page 1 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