Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-23 Thread Rajshri D
The testing is on a single device, where the MAC address is the same
for both  vlan9 and vlan19. Hence, the release packet is reaching the
server.


Looking for your help to root cause the issue.
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-17 Thread shashikumar Shashi
The testing is on a single device, where MAC address is the same for
both  vlan9 and vlan19.
Hence, the release packet is reaching to server." ?

On Thu, Aug 10, 2023 at 2:05 AM  wrote:

> On 8/9/23 10:58 AM, shashikumar Shashi wrote:
> > 2) Put the client on vlan9. Client gets IP from vlan9 pool (e.g.
> 192.168.9.10)
> > by executing “dhclient -4 eth1”.
> >
> > 3) Put the same client on vlan19. Client releases previously acquired IP
> (e.g.
> > 192.168.9.10) by executing “dhclient -4 eth1 -r”.
> >
> > 4) The same client tries to get the IP by executing “dhclient -4 eth1”.
>
>
> my question is if step 3's release is done before the client is actually
> moved
> to the new network...
>
> if no, does the client actually transmit the release to the server? if it
> does,
> how does that release packet get to the original server if the client is
> now on
> a different network?
>
> admittedly, these questions may not matter due to the apparent nature of
> the
> possible bug being discussed... i may also be being too simplistic and
> somewhat
> ignorant of how a DHCP address release really works...
>
> --
>   NOTE: No off-list assistance is given without prior approval.
> *Please keep mailing list traffic on the list unless*
> *a signed and pre-paid contract is in effect with us.*
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-09 Thread wkitty42

On 8/9/23 10:58 AM, shashikumar Shashi wrote:
2) Put the client on vlan9. Client gets IP from vlan9 pool (e.g. 192.168.9.10) 
by executing “dhclient -4 eth1”.


3) Put the same client on vlan19. Client releases previously acquired IP (e.g. 
192.168.9.10) by executing “dhclient -4 eth1 -r”.


4) The same client tries to get the IP by executing “dhclient -4 eth1”.



my question is if step 3's release is done before the client is actually moved 
to the new network...


if no, does the client actually transmit the release to the server? if it does, 
how does that release packet get to the original server if the client is now on 
a different network?


admittedly, these questions may not matter due to the apparent nature of the 
possible bug being discussed... i may also be being too simplistic and somewhat 
ignorant of how a DHCP address release really works...


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list unless*
   *a signed and pre-paid contract is in effect with us.*

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


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-09 Thread shashikumar Shashi
Hi,

“

*Acknowledge on "Client moves".*  *The 'releases IP' is probably*

*something like "I'm unaware that IP stands for Internet Protocol*

*and want to try how far I can get by being vague how the release*

*of the DHCP lease was done"*

—>

Client is executing “dhclient -4 eth1 -r” to release the IP address.





*The issue of moving clients,*

*the issue of interfaces go down and come up,*

*the issue of moving clients AND flipping interfaces?*

—>

There is no flapping of the interfaces, interfaces are not going down and
comping up. Need to have at least one interface in DOWN state with dhcpv4
pool address range defined for it, to reproduce the issue.



The steps to reproduce the issue are as follows:

1) Have one client, 3 dhcp pools for 3 vlans or interfaces as shown below.
Out of these 3 interfaces, need to keep one interface in DOWN state, and
move the client across the other two UP interfaces, to reproduce the issue.

vlan9 (State UP) : Range: 192.168.9.10-192.168.9.254

vlan19 (State UP): Range: 192.168.19.10-192.168.19.254

vlan99 (State DOWN): Range: 192.168.99.10-192.168.99.254



2) Put the client on vlan9. Client gets IP from vlan9 pool (e.g.
192.168.9.10) by executing “dhclient -4 eth1”.



3) Put the same client on vlan19. Client releases previously acquired IP
(e.g. 192.168.9.10) by executing “dhclient -4 eth1 -r”.



4) The same client tries to get the IP by executing “dhclient -4 eth1”.

Here client should get IP address from 192.168.19.xx pool, but it gets from
192.168.99.xx pool.



5) In case if the issue is not seen at step 4, then need to move the client
across vlan9 and vlan19 couple of times, where client will release the
previously acquired IP address on the current vlan and then try to acquire
the IP address on the current vlan.



Looking for your help to root cause the issue.

”





Thanks and Regards,

Shashi

On Sun, Aug 6, 2023 at 2:01 PM Nym  wrote:

> On Sun, Aug 06, 2023 at 01:24:02AM +0300, 0zl wrote:
> > On 8/4/23 09:24, shashikumar Shashi wrote:
> > > Hi,
> > >
> > > Observing that dnsmasq is offering DHCP IP to the client
> } } Observing that dnsmasq is offering DHCP IP-address to the client
> > > from a vlan pool which is in DOWN state.
> > >
> > > E.g. If there are 3 dhcp pools
> > >
> > > vlan9 (State UP) : Range: 192.168.9.1-192.168.9.254
> > > vlan19 (State UP): Range: 192.168.19.1-192.168.19.254
> > > vlan99 (State DOWN): Range: 192.168.99.1-192.168.99.254
> > >
> > > 1) Client on vlan9 gets IP from vlan9 pool
> > > 2) Client moves to vlan19, releases IP
>
> Acknowledge on "Client moves".  The 'releases IP' is probably
> something like "I'm unaware that IP stands for Internet Protocol
> and want to try how far I can get by being vague how the release
> of the DHCP lease was done"
>
>
> > > 3) Client on vlan19 requests IP --> dnsmasq offers IP 192.168.99.xx
> from
> > >vlan99 pool (incorrect pool), instead of vlan19 pool.
> > >
> > > If the vlan99 is in UP state, then dnsmasq offers the IP from the
> vlan19
> > > pool (the correct pool).
> > >
> > > Has anyone come across such an issue?
> > >
> > I've encountered this issue as well,
>
> The issue of moving clients,
> the issue of interfaces go down and come up,
> the issue of moving clients AND flipping interfaces?
>
>
> > I ended up working around it by creating bridges that have those vlans
> > as their bridge port. This way the bridge stays up to dnsmasq even
> > when I take one of these vlans down.
>
> That deals only with keeping interfaces present to dnsmasq.
> Nothing about a moving client.
>
>
> Thing is that poor problem descriptions do not contribute
> to improvement.
>
>
> Not your mom
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-06 Thread Nym
On Sun, Aug 06, 2023 at 01:24:02AM +0300, 0zl wrote:
> On 8/4/23 09:24, shashikumar Shashi wrote:
> > Hi,
> > 
> > Observing that dnsmasq is offering DHCP IP to the client
} } Observing that dnsmasq is offering DHCP IP-address to the client
> > from a vlan pool which is in DOWN state.
> > 
> > E.g. If there are 3 dhcp pools
> > 
> > vlan9 (State UP) : Range: 192.168.9.1-192.168.9.254
> > vlan19 (State UP): Range: 192.168.19.1-192.168.19.254
> > vlan99 (State DOWN): Range: 192.168.99.1-192.168.99.254
> > 
> > 1) Client on vlan9 gets IP from vlan9 pool
> > 2) Client moves to vlan19, releases IP

Acknowledge on "Client moves".  The 'releases IP' is probably
something like "I'm unaware that IP stands for Internet Protocol
and want to try how far I can get by being vague how the release
of the DHCP lease was done"


> > 3) Client on vlan19 requests IP --> dnsmasq offers IP 192.168.99.xx from
> >vlan99 pool (incorrect pool), instead of vlan19 pool.
> > 
> > If the vlan99 is in UP state, then dnsmasq offers the IP from the vlan19
> > pool (the correct pool).
> > 
> > Has anyone come across such an issue?
> > 
> I've encountered this issue as well,

The issue of moving clients,
the issue of interfaces go down and come up,
the issue of moving clients AND flipping interfaces?


> I ended up working around it by creating bridges that have those vlans
> as their bridge port. This way the bridge stays up to dnsmasq even
> when I take one of these vlans down.

That deals only with keeping interfaces present to dnsmasq.
Nothing about a moving client.


Thing is that poor problem descriptions do not contribute
to improvement.


Not your mom

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


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-05 Thread 0zl
I've encountered this issue as well, I ended up working around it by 
creating bridges that have those vlans as their bridge port. This way 
the bridge stays up to dnsmasq even when I take one of these vlans down.


On 8/4/23 09:24, shashikumar Shashi wrote:

Hi,

Observing that dnsmasq (version 2.80) is offering DHCP IP to the 
client from a vlan pool which is in DOWN state.


E.g. If there are 3 dhcp pools

vlan9 (State UP) : Range: 192.168.9.1-192.168.9.254

vlan19 (State UP): Range: 192.168.19.1-192.168.19.254

vlan99 (State DOWN): Range: 192.168.99.1-192.168.99.254

1) Client on vlan9 gets IP from vlan9 pool

2) Client moves to vlan19, releases IP

3) Client on vlan19 requests IP --> dnsmasq offers IP 192.168.99.xx 
from vlan99 pool (incorrect pool), instead of vlan19 pool.


If the vlan99 is in UP state, then dnsmasq offers the IP from the 
vlan19 pool (the correct pool).


If dnsmasq is rebuilt by commenting out the following code block from 
dhcp_reply function, then in the above case, dnsmasq offers IP from 
the vlan19 pool (the correct pool) even if vlan99 is DOWN.


code block -->

/* guess the netmask for relayed networks */

          if (!(context_tmp->flags & CONTEXT_NETMASK) && 
context_tmp->netmask.s_addr == 0)


            {

              if (IN_CLASSA(ntohl(context_tmp->start.s_addr)) && 
IN_CLASSA(ntohl(context_tmp->end.s_addr)))


                netmask.s_addr = htonl(0xff00);

              else if (IN_CLASSB(ntohl(context_tmp->start.s_addr)) && 
IN_CLASSB(ntohl(context_tmp->end.s_addr)))


                netmask.s_addr = htonl(0x);

              else if (IN_CLASSC(ntohl(context_tmp->start.s_addr)) && 
IN_CLASSC(ntohl(context_tmp->end.s_addr)))


                netmask.s_addr = htonl(0xff00);

            }

Has anyone come across such an issue?



Thanks,

Shashi


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-04 Thread Florent Fourcot

Hello,

I can confirm that we suffered something maybe related on all recent 
dnsmasq versions (I never tried with something older), since several 
years (first seen in 2021, with a v2.86).


In our scenario, we had a lot of new/removed interfaces, and removing an 
interface (and associated subnet) triggered randomly the same behavior 
than yours.


However, I was never able to create a stable reproducer. At some point, 
dnsmasq started to send bad IP addresses, but I never found something to 
trigger it. It looks random.


Our current workaround : always update dnsmasq.conf to not include 
removed (or down) interfaces, and restart dnsmasq.


Best regards

--
*Ce message et toutes les pièces jointes (ci-après le "message") sont 
établis à l’intention exclusive des destinataires désignés. Il contient des 
informations confidentielles et pouvant être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de détruire le message. Toute utilisation de 
ce message non conforme à sa destination, toute diffusion ou toute 
publication, totale ou partielle, est interdite, sauf autorisation expresse 
de l'émetteur*


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


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-04 Thread Geert Stappers
On Fri, Aug 04, 2023 at 02:20:05PM +0530, shashikumar Shashi wrote:
> On Fri, Aug 4, 2023 at 1:20 PM Geert Stappers wrote:
> > On Fri, Aug 04, 2023 at 11:54:15AM +0530, shashikumar Shashi wrote:
> > > Hi,
> > >
> > > Observing that dnsmasq (version 2.80) is offering DHCP IP to the client
> > 
> > > Has anyone come across such an issue?
> >
> > Could be.
> > Most likely they tried a more recent version.
> >
> The issue is seen even after porting the latest Dnsmasq version 2.89 also.
> 

Acknowledge.

Challenge:
Convince us, this mailinglist, that it is not an user problem
but something were it would be good if Dnsmasq did better.


Regards
Geert Stappers


P.S.

* Welcome
* Make reading in the discussion order possible
-- 
Silence is hard to parse

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


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-04 Thread shashikumar Shashi
The issue is seen even after porting the latest Dnsmasq version 2.89 also.


Thanks,

Shashi

On Fri, Aug 4, 2023 at 1:20 PM Geert Stappers  wrote:

> On Fri, Aug 04, 2023 at 11:54:15AM +0530, shashikumar Shashi wrote:
> > Hi,
> >
> > Observing that dnsmasq (version 2.80) is offering DHCP IP to the client
> 
> > If dnsmasq is rebuilt by commenting out the following code block from
> > dhcp_reply function, then in the above case, dnsmasq offers IP from the
> > vlan19 pool (the correct pool) even if vlan99 is DOWN.
> 
> > Has anyone come across such an issue?
>
> Could be.
> Most likely they tried a more recent version.
>
>
>
> Groeten
> Geert Stappers
> --
> Silence is hard to parse
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq is offering ip from different pool

2023-08-04 Thread Geert Stappers
On Fri, Aug 04, 2023 at 11:54:15AM +0530, shashikumar Shashi wrote:
> Hi,
> 
> Observing that dnsmasq (version 2.80) is offering DHCP IP to the client
 
> If dnsmasq is rebuilt by commenting out the following code block from
> dhcp_reply function, then in the above case, dnsmasq offers IP from the
> vlan19 pool (the correct pool) even if vlan99 is DOWN.
 
> Has anyone come across such an issue?

Could be.
Most likely they tried a more recent version.



Groeten
Geert Stappers
-- 
Silence is hard to parse

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