Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-19 Thread Geert Stappers
On Fri, Oct 18, 2019 at 03:25:36PM -0500, Carl Karsten wrote:
> On Mon, Oct 14, 2019 at 2:13 AM Geert Stappers wrote:
> > On Fri, Oct 04, 2019 at 08:37:03AM +0200, john doe wrote:
> > > On 10/4/2019 1:25 AM, Geert Stappers wrote:
> > > > On Thu, Oct 03, 2019 at 06:01:17PM -0500, Carl Karsten wrote:
> > > 
> > >  For any dhcp client request, server gives the same IP.
> > > 
> > > >>>
> > > >>> Please let us, the mailinglist archive, know if
> > > >>>
> > > >>> dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
> > > >>>
> > > >>> serves the request.
> > > >>
> > > >> What I don't know is how the lease comes into play
> > > >> when the 2nd machine comes on line.
> > > >
> > >
> > > To always get the same Ip address regardless of the device you connect
> > > to the server you could try the following (untested):
> > >
> > > dhcp-range=192.168.1.4,192.168.1.4,1m
> >
> > It would be nice to share the test results.
> >
> > Elaborating on how the "original problem" evoled would also be nice.
> >
> it's basically low budget HA.
> "how can we swap out this server and not have it's IP hard coded into it's
> config?"
> (server = box hosing mmqt server)
> Where its config is its local drive and conf files.
> It lets the dhcp server control all the IPs.  which may change over time,
> and the server and replacement server image don't care because they and
> everything else on the LAN will do dhcp.
> 
> The problem got kicked down the road.   current solution: "if we are
> swapping out server hardware, someone can poke the dhcp server and make it
> release the lease."
> 
> I'm pretty sure this is the answer:
>  /etc/dhcp/dhclient.conf
> #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
> 
> I think I can set
> send dhcp-client-identifier foo;
> on both servers, and both will be seen as "the same" to the dhcp server, as
> if the first box had been power cycled.

Feel free to share the test results of that thought.


Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-18 Thread Carl Karsten
it's basically low budget HA.
"how can we swap out this server and not have it's IP hard coded into it's
config?"
(server = box hosing mmqt server)
Where its config is its local drive and conf files.
It lets the dhcp server control all the IPs.  which may change over time,
and the server and replacement server image don't care because they and
everything else on the LAN will do dhcp.

The problem got kicked down the road.   current solution: "if we are
swapping out server hardware, someone can poke the dhcp server and make it
release the lease."

I'm pretty sure this is the answer:
 /etc/dhcp/dhclient.conf
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;

I think I can set
send dhcp-client-identifier foo;
on both servers, and both will be seen as "the same" to the dhcp server, as
if the first box had been power cycled.



On Mon, Oct 14, 2019 at 2:13 AM Geert Stappers  wrote:

> On Fri, Oct 04, 2019 at 08:37:03AM +0200, john doe wrote:
> > On 10/4/2019 1:25 AM, Geert Stappers wrote:
> > > On Thu, Oct 03, 2019 at 06:01:17PM -0500, Carl Karsten wrote:
> > >> On Thu, Oct 3, 2019 at 4:54 PM Geert Stappers wrote:
> > >>> On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
> >  I want to know if this is in spec, or needs out of spec hacks:
> > 
> >  For any dhcp client request, server gives the same IP.
> > 
> >  The use case: dnsmasq is serving on 1 interface, and a client will
> be
> >  directly connected to that interface - no hub/switch/vlan etc. So
> there can
> >  only be 1 device ever connected, and I want that device to have
> 10.1.2.3
> >  - even if I yank  it and plug in a 2nd device with a different mac
> etc.
> >  The device should get 10.1.2.3.
> > 
> >  Even if the previous lease has not expired.which is where I
> suspect
> >  this gets sketchy.   But maybe the spec has a prevision for this.
> > 
> > >>>
> > >>> Quoting manual page of dnsmasq
> > >>>
> > >>>
> > >>>
> --dhcp-range=[tag:[,tag:],][set:,][,|][,[,]][, time>]
> > >>>
> > >>>
> >  I want to know if this is in spec, or needs out of spec hacks:
> > >>>
> > >>> Please let us, the mailinglist archive, know if
> > >>>
> > >>> dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
> > >>>
> > >>> serves the request.
> > >>
> > >> What I don't know is how the lease comes into play
> > >> when the 2nd machine comes on line.
> > >
> >
> > To always get the same Ip address regardless of the device you connect
> > to the server you could try the following (untested):
> >
> > dhcp-range=192.168.1.4,192.168.1.4,1m
>
> It would be nice to share the test results.
>
> Elaborating on how the "original problem" evoled would also be nice.
>
>
> Groeten
> Geert Stappers
> --
> Leven en laten leven
>


-- 
Carl K
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-14 Thread Geert Stappers
On Fri, Oct 04, 2019 at 08:37:03AM +0200, john doe wrote:
> On 10/4/2019 1:25 AM, Geert Stappers wrote:
> > On Thu, Oct 03, 2019 at 06:01:17PM -0500, Carl Karsten wrote:
> >> On Thu, Oct 3, 2019 at 4:54 PM Geert Stappers wrote:
> >>> On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
>  I want to know if this is in spec, or needs out of spec hacks:
> 
>  For any dhcp client request, server gives the same IP.
> 
>  The use case: dnsmasq is serving on 1 interface, and a client will be
>  directly connected to that interface - no hub/switch/vlan etc. So there 
>  can
>  only be 1 device ever connected, and I want that device to have 10.1.2.3
>  - even if I yank  it and plug in a 2nd device with a different mac etc.
>  The device should get 10.1.2.3.
> 
>  Even if the previous lease has not expired.which is where I suspect
>  this gets sketchy.   But maybe the spec has a prevision for this.
> 
> >>>
> >>> Quoting manual page of dnsmasq
> >>>
> >>>
> >>> --dhcp-range=[tag:[,tag:],][set:,][,|][,[,]][, >>>  time>]
> >>>
> >>>
>  I want to know if this is in spec, or needs out of spec hacks:
> >>>
> >>> Please let us, the mailinglist archive, know if
> >>>
> >>> dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
> >>>
> >>> serves the request.
> >>
> >> What I don't know is how the lease comes into play
> >> when the 2nd machine comes on line.
> >
> 
> To always get the same Ip address regardless of the device you connect
> to the server you could try the following (untested):
> 
> dhcp-range=192.168.1.4,192.168.1.4,1m
 
It would be nice to share the test results.

Elaborating on how the "original problem" evoled would also be nice.


Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-04 Thread john doe
On 10/4/2019 1:25 AM, Geert Stappers wrote:
> On Thu, Oct 03, 2019 at 06:01:17PM -0500, Carl Karsten wrote:
>> On Thu, Oct 3, 2019 at 4:54 PM Geert Stappers wrote:
>>> On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
 I want to know if this is in spec, or needs out of spec hacks:

 For any dhcp client request, server gives the same IP.

 The use case: dnsmasq is serving on 1 interface, and a client will be
 directly connected to that interface - no hub/switch/vlan etc. So there can
 only be 1 device ever connected, and I want that device to have 10.1.2.3
 - even if I yank  it and plug in a 2nd device with a different mac etc.
 The device should get 10.1.2.3.

 Even if the previous lease has not expired.which is where I suspect
 this gets sketchy.   But maybe the spec has a prevision for this.

>>>
>>> Quoting manual page of dnsmasq
>>>
>>>
>>> --dhcp-range=[tag:[,tag:],][set:,][,|][,[,]][,>>  time>]
>>>
>>>
 I want to know if this is in spec, or needs out of spec hacks:
>>>
>>> Please let us, the mailinglist archive, know if
>>>
>>> dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
>>>
>>> serves the request.
>>
>> What I don't know is how the lease comes into play
>> when the 2nd machine comes on line.
>

To always get the same Ip address regardless of the device you connect
to the server you could try the following (untested):

dhcp-range=192.168.1.4,192.168.1.4,1m

--
John Doe

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-03 Thread Geert Stappers
On Thu, Oct 03, 2019 at 06:01:17PM -0500, Carl Karsten wrote:
> On Thu, Oct 3, 2019 at 4:54 PM Geert Stappers wrote:
> > On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
> > > I want to know if this is in spec, or needs out of spec hacks:
> > >
> > > For any dhcp client request, server gives the same IP.
> > >
> > > The use case: dnsmasq is serving on 1 interface, and a client will be
> > > directly connected to that interface - no hub/switch/vlan etc. So there 
> > > can
> > > only be 1 device ever connected, and I want that device to have 10.1.2.3
> > > - even if I yank  it and plug in a 2nd device with a different mac etc.
> > > The device should get 10.1.2.3.
> > >
> > > Even if the previous lease has not expired.which is where I suspect
> > > this gets sketchy.   But maybe the spec has a prevision for this.
> > >
> >
> > Quoting manual page of dnsmasq
> >
> >
> > --dhcp-range=[tag:[,tag:],][set:,][,|][,[,]][, >  time>]
> >
> >
> > > I want to know if this is in spec, or needs out of spec hacks:
> >
> > Please let us, the mailinglist archive, know if
> >
> > dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
> >
> > serves the request.
>
> What I don't know is how the lease comes into play
> when the 2nd machine comes on line.

Become main stakeholder of the request.



Regards
Geert Stappers
Still learning how to ignore  semi good questions

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-03 Thread Carl Karsten
On Thu, Oct 3, 2019 at 4:54 PM Geert Stappers  wrote:

> On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
> > I want to know if this is in spec, or needs out of spec hacks:
> >
> > For any dhcp client request, server gives the same IP.
> >
> > The use case: dnsmasq is serving on 1 interface, and a client will be
> > directly connected to that interface - no hub/switch/vlan etc. So there
> can
> > only be 1 device ever connected, and I want that device to have 10.1.2.3
> -
> > even if I yank  it and plug in a 2nd device with a different mac etc.
> > The device should get 10.1.2.3.
> >
> > Even if the previous lease has not expired.which is where I suspect
> > this gets sketchy.   But maybe the spec has a prevision for this.
> >
>
> Quoting manual page of dnsmasq
>
>
> --dhcp-range=[tag:[,tag:],][set:,][,|][,[,cast>]][,]
>
>
> > I want to know if this is in spec, or needs out of spec hacks:
>
> Please let us, the mailinglist archive, know if
>
> dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248
>
> serves the request.
>
>
>
That is half of this.  What I don't know is how the lease comes into play
when the 2nd machine comes on line.
to be clear, the first machine will have its network cable unplugged, so no
chance of it telling the server releasing the lease:

   DHCPRELEASE  -  Client to server relinquishing network address and
   cancelling remaining lease.

(really it is not the rj45 but the power cord being pulled.  yes, this is a
hostel environment and who knows what will really happen.)

I suspect if i want this I need to have both clients use the same client
ID.  But I am hoping there is a server side option to achieve the same
thing.
(the goal is for all the networking config to be done server side, no
tweaking client config.)



>
> Groeten
> Geert Stappers
> --
> Leven en laten leven
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>


-- 
Carl K
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] 1 IP for all requests

2019-10-03 Thread Geert Stappers
On Thu, Oct 03, 2019 at 03:52:35PM -0500, Carl Karsten wrote:
> I want to know if this is in spec, or needs out of spec hacks:
> 
> For any dhcp client request, server gives the same IP.
> 
> The use case: dnsmasq is serving on 1 interface, and a client will be
> directly connected to that interface - no hub/switch/vlan etc. So there can
> only be 1 device ever connected, and I want that device to have 10.1.2.3 -
> even if I yank  it and plug in a 2nd device with a different mac etc.
> The device should get 10.1.2.3.
> 
> Even if the previous lease has not expired.which is where I suspect
> this gets sketchy.   But maybe the spec has a prevision for this.
> 

Quoting manual page of dnsmasq

--dhcp-range=[tag:[,tag:],][set:,][,|][,[,]][,]


> I want to know if this is in spec, or needs out of spec hacks:

Please let us, the mailinglist archive, know if

dhcp-range=10.1.2.3,10.1.2.3,255.255.255.248

serves the request.
  
 

Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss