What's new

Any possibility to remove Option28(Broadcast Address) in DHCP?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

You could replace a string with spaces or make it a comment. i.e.

Code:
pc_replace "dhcp-lease-max=253" "# option removed" $CONFIG
 
You could replace a string with spaces or make it a comment. i.e.

Code:
pc_replace "dhcp-lease-max=253" "# option removed" $CONFIG
I want to comment it out with below command. But it has no effect.

pc_replace "dhcp-option=28" "#dhcp-option=28" $CONFIG
 
show your config file.
 
And your script (/jffs/scripts/dnsmasq.postconf). What are you using to create the script, vi?

You have rebooted the router?

/jffs/scripts/dnsmasq.postconf

#!/bin/sh
#sed -i "s/cache-size=1500/cache-size=15000/" /tmp/etc/dnsmasq.conf

CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "cache-size=1500" "cache-size=9999" $CONFIG

pc_append "dhcp-option-force=125,00:00:00:00:14:02:06:48:47:57:2d:43:54:0a:02:00:00:0b:02:00:55:0d:02:00:2e" $CONFIG
#pc_append "dhcp-option=28,192.168.2.10" $CONFIG
#pc_replace "dhcp-option=28,192.168.2.255" " " $CONFIG
pc_replace "dhcp-option=28" "" $CONFIG
 
Try to modify dnsmasq-postconf with no comment out string. Do you have dhcp-option=28 in your dnsmasq config file ?

#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

pc_append "dhcp-option-force=125,00:00:00:00:14:02:06:48:47:57:2d:43:54:0a:02:00:00:0b:02:00:55:0d:02:00:2e" $CONFIG
pc_replace "cache-size=1500" "cache-size=9999" $CONFIG
pc_replace "dhcp-option=28" "" $CONFIG
 
Try to modify dnsmasq-postconf with no comment out string. Do you have dhcp-option=28 in your dnsmasq config file ?
I think there is no option28 in my config file. It's not my custom option. Seems it's dnsmasq default option. When enable dnsmasq, option28 will be added.
 
I think there is no option28 in my config file. It's not my custom option. Seems it's dnsmasq default option. When enable dnsmasq, option28 will be added.
You can't edit a string that doesn't exist!

What broadcast address are you trying to set? and why?
 
So we can't remove this broadcast address option?
No.
One of my device will use this broadcast address and it will cause device no internet access. I don't know whether it's device fireware bug.
It sounds like a bug because dnsmasq is giving out the correct address, unless you have a non-standard network.
 
So we can't remove this broadcast address option?
Actually, it looks like I was wrong! The dnsmasq CHANGELOG for release 2.6 says this:
Changed the semantics of argument-less dhcp-options for the default-setting ones, ie 1, 3, 6 and 28. Now, doing eg, dhcp-option=3 stops dnsmasq from sending a default router option at all. Thanks to Scott Emmons for pointing out that this is useful.
So it looks like all you need is
Code:
dhcp-option=28
 
Similar threads
Thread starter Title Forum Replies Date
C Does updating merlin remove installed packages? Asuswrt-Merlin 1

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top