Discussion:
[Dnsmasq-discuss] duplicate dhcp-host IP address
Roy Marples
2018-11-12 15:12:58 UTC
Permalink
Hi List

dnsmasq has this lovely piece of code
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/option.c;h=462796996ef208bd013eece70fce51e7dc1a45ad;hb=HEAD#l3240

This effectively stops me using dnsmasq to give the same IP address to
wired and wireless interfaces (which are on the same network) of my laptop.
The laptop in question runs NetBSD + dhcpcd can is more than capable of
having the same address UP on >1 interface.

Can this be removed, or an option added to disable the check please?
I want to enjoy a persitent ssh shell from/to it while swapping between
wired/wireless without it droping due to changing the IP address.

Thanks

Roy
M. Buecher
2018-11-12 15:46:49 UTC
Permalink
Hi Simon,

sorry for this "Me too" mail, but +1.
Never got to request that feature myself.

Regards
Maddes
Post by Roy Marples
Hi List
dnsmasq has this lovely piece of code
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/option.c;h=462796996ef208bd013eece70fce51e7dc1a45ad;hb=HEAD#l3240
This effectively stops me using dnsmasq to give the same IP address to
wired and wireless interfaces (which are on the same network) of my laptop.
The laptop in question runs NetBSD + dhcpcd can is more than capable
of having the same address UP on >1 interface.
Can this be removed, or an option added to disable the check please?
I want to enjoy a persitent ssh shell from/to it while swapping
between wired/wireless without it droping due to changing the IP
address.
Thanks
Roy
Donald Muller
2018-11-12 16:11:36 UTC
Permalink
You could put a reservation in dnsmasq for the wired and wireless MAC addresses and give them the same IP address.
-----Original Message-----
On Behalf Of Roy Marples
Sent: Monday, November 12, 2018 10:13 AM
Subject: [Dnsmasq-discuss] duplicate dhcp-host IP address
Hi List
dnsmasq has this lovely piece of code
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fthek
elleys.org.uk%2Fgitweb%2F%3Fp%3Ddnsmasq.git%3Ba%3Dblob%3Bf%3Dsrc
%2Foption.c%3Bh%3D462796996ef208bd013eece70fce51e7dc1a45ad%3Bhb
%3DHEAD%23l3240&data=02%7C01%7C%7Ca7cf1826fc2c4b02726f08d64
8b73f13%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636776349219
249498&sdata=PO0Ufdzr9NyR7dJYUXRhc5My94kEt7CzHWA4De1taHc%3
D&reserved=0
This effectively stops me using dnsmasq to give the same IP address to
wired and wireless interfaces (which are on the same network) of my laptop.
The laptop in question runs NetBSD + dhcpcd can is more than capable of
having the same address UP on >1 interface.
Can this be removed, or an option added to disable the check please?
I want to enjoy a persitent ssh shell from/to it while swapping between
wired/wireless without it droping due to changing the IP address.
Thanks
Roy
_______________________________________________
Dnsmasq-discuss mailing list
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.t
hekelleys.org.uk%2Fmailman%2Flistinfo%2Fdnsmasq-
discuss&data=02%7C01%7C%7Ca7cf1826fc2c4b02726f08d648b73f13%7C
84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636776349219249498&am
p;sdata=ennca%2B7by%2BpuDTYxG8YkbIC2N6Exi3xeMqF2RNaFHMs%3D&a
mp;reserved=0
Roy Marples
2018-11-12 17:56:50 UTC
Permalink
Post by Donald Muller
You could put a reservation in dnsmasq for the wired and wireless MAC addresses and give them the same IP address.
How?
Donald Muller
2018-11-12 19:19:08 UTC
Permalink
See john doe's response.
-----Original Message-----
On Behalf Of Roy Marples
Sent: Monday, November 12, 2018 12:57 PM
Subject: Re: [Dnsmasq-discuss] duplicate dhcp-host IP address
Post by Donald Muller
You could put a reservation in dnsmasq for the wired and wireless MAC
addresses and give them the same IP address.
How?
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Jan Psota
2018-11-12 19:09:17 UTC
Permalink
Post by Donald Muller
You could put a reservation in dnsmasq for the wired and wireless
MAC addresses and give them the same IP address.
How?
In /etc/dnsmask.hosts I have:
ee:33:99:99:cc:dd,88:33:99:88:ee:00,192.168.1.10,hostname
^^^^ ethernet ^^^,^^^^ wifi ^^^^^^^

but it _does not work for some laptops_! I don't understand, how, but
it does not. And for some it works like expected. Both on Windows 7!
Roy Marples
2018-11-12 20:09:20 UTC
Permalink
Post by Jan Psota
Post by Donald Muller
You could put a reservation in dnsmasq for the wired and wireless
MAC addresses and give them the same IP address.
How?
ee:33:99:99:cc:dd,88:33:99:88:ee:00,192.168.1.10,hostname
^^^^ ethernet ^^^,^^^^ wifi ^^^^^^^
but it _does not work for some laptops_! I don't understand, how, but
it does not. And for some it works like expected. Both on Windows 7!
Wow, that works and proves I missed that part of the man page!

It also shows there is a bug with dhcpcd (maybe on NetBSD) where it's
not changing the subnet route to the correct interface, but I'll get
that fixed.

Maybe the warning could be improved slightly though.

Roy

john doe
2018-11-12 17:37:39 UTC
Permalink
Post by Roy Marples
Hi List
dnsmasq has this lovely piece of code
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/option.c;h=462796996ef208bd013eece70fce51e7dc1a45ad;hb=HEAD#l3240
This effectively stops me using dnsmasq to give the same IP address to
wired and wireless interfaces (which are on the same network) of my laptop.
The laptop in question runs NetBSD + dhcpcd can is more than capable of
having the same address UP on >1 interface.
Can this be removed, or an option added to disable the check please?
I want to enjoy a persitent ssh shell from/to it while swapping between
wired/wireless without it droping due to changing the IP address.
# Give a host with Ethernet address 11:22:33:44:55:66 or
# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume
# that these two Ethernet interfaces will never be in use at the same
# time, and give the IP address to the second, even if it is already
# in use by the first. Useful for laptops with wired and wireless
# addresses.
#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60

Isn't the above what you want?
--
John Doe
Loading...