What's new

two laptop interfaces, one ip address

  • 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!

bananabrain

New Around Here
Good morning,

(RT-AC86U/384.13)


I've been trying to get a laptop to take the same ip address for both wireless and ethernet interfaces from the dhcp server. There's no possiblility of these interfaces being up simultaneously.

I've enabled custom scripts in the webui and put the following in /jffs/scripts/dnsmasq.postconf, according to the dnsmasq manpage and the asuswrt-merlin wiki...

Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_replace "dhcp-host=x:x:x:x:x:EE,192.168.1.102" "dhcp-host=x:x:x:x:x:EE,x:x:x:x:x:06,192.168.1.102" $CONFIG

EE is wireless, 06 is ethernet. It works beautifully and modifies /etc/dnsmasq.conf as expected.

My problem is that I can't find a way to translate that to something useful in the router's webui.

Under LAN/DHCP Server I have:
Code:
MAC Address        IP Address          Hostname
x:x:x:x:x:EE       192.168.1.102       gallipants
I would now expect to be able to add another entry from the offline hosts in the drop-down mac address list:
Code:
x:x:x:x:x:06       192.168.1.102       gallipants

...but it throws an error "This entry has been in list", and will only allow a different ip address.


Hopefully I've doing something dumb or have missed something obvious.
Ill be very grateful if anyone can point out what it is.

Phil
 
I would now expect to be able to add another entry from the offline hosts in the drop-down mac address list:
Code:
x:x:x:x:x:06       192.168.1.102       gallipants

...but it throws an error "This entry has been in list", and will only allow a different ip address.
This is working as expected. The GUI will not let you reserve the same IP address for more than one MAC address.
 

I was a bit slow to realise your solution only works by first removing all references from the dhcp server config page - but it does work!

Initially I had a merry dance trying to get my ethernet interface to let go of address .251, and ended up having to "service restart_dnsmasq", then uninstall the dhcpcd package on the laptop, delete all remnant files under /var and reinstall again (dhcpcd doesn't appear to provide a switch to clear its cache/leases).

I'm very grateful to you.

Phil
 
This is working as expected. The GUI will not let you reserve the same IP address for more than one MAC address.

Yes Colin, that's self evident and I fully accept it. It does though rather smack of the latterday "no need to go trying to think things through for yourself, we know what's best for you". It's a pity the webui won't allow provision for a perfectly reasonable scenario that probably doesn't affect too many people.
It's also a pity that the above solution results in the webui incorrectly advising of a "dhcp" connection rather than a forced "manual" one, which it effectively is.

Don't misread me.
No complaints here.
This merlin firmware is a thing of beauty.

Phil
 
Yes Colin, that's self evident and I fully accept it. It does though rather smack of the latterday "no need to go trying to think things through for yourself, we know what's best for you". It's a pity the webui won't allow provision for a perfectly reasonable scenario that probably doesn't affect too many people.
The webui is designed for "the average home user". For such users accidentally entering the same IP address for two different devices would be an error.

As it stands the current interface is pretty simple to code, each line equates to a line in dnsmasq.conf. If you were to simply allow the user to enter duplicate IP addresses that wouldn't work because it would create two entries in dnsmasq.conf one of which would be ignored which prevents dnsmasq from starting up. So instead you would need more complicated code that scans the reservation list for duplicates and constructs lines like you have in your script. All in all this is just not worth the effort IMHO for an edge case like yours. Pro users can always use the script method.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

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