Re: [Dnsmasq-discuss] DHCP tag being ignored?

2019-04-07 Thread Dave Thompson
Thank you for your response! Got me thinking about releasing the IP address 
from the Windows machine; in the end, I found instructions here: 
https://superuser.com/questions/470585/how-to-force-windows-7-to-ask-for-a-fresh-ip-address-from-dhcp-server
 on how to force Windows not to request an IP address from the DHCP server 
(Dnsmasq honours that).

In particular:


ipconfig /release
net stop dhcp
net start dhcp
ipconfig /renew

This worked!

Thank you all,

Dave

From: Dnsmasq-discuss  on 
behalf of wkitt...@gmail.com 
Sent: 06 April 2019 14:36
To: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] DHCP tag being ignored?

On 4/6/19 1:41 PM, Dave Thompson wrote:
> I can see that the Windows 7 VM is requesting 104. Perhaps Dnsmasq is
> honouring that and ignoring the config file?

i think you have to release the address, first... something so that the VM won't
try to request the last address it had... if it requests a valid address that is
not in current use, it will be allowed and accepted IIUC...

in the past we've renumbered the network addresses so the old numbers were not
valid which forced the assignment of a new address which was the desired
effect... when we renumbered the addresses, we basically just changed the 3rd
octet...

eg: 192.168.0.*/24 -> 192.168.100.*/24

maybe you can do something similar to reach your desired objective?

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.thekelleys.org.uk%2Fmailman%2Flistinfo%2Fdnsmasq-discuss&data=02%7C01%7C%7C7584564b6c644062dbac08d6bac03dc9%7C84df9e7fe9f640afb435%7C1%7C0%7C636901732160434173&sdata=YuHMXubZ6%2FLTXunkJLIZi%2FV1BbSvcminpUX5f9AAL28%3D&reserved=0
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCP tag being ignored?

2019-04-06 Thread wkitty42

On 4/6/19 1:41 PM, Dave Thompson wrote:

I can see that the Windows 7 VM is requesting 104. Perhaps Dnsmasq is
honouring that and ignoring the config file?


i think you have to release the address, first... something so that the VM won't 
try to request the last address it had... if it requests a valid address that is 
not in current use, it will be allowed and accepted IIUC...


in the past we've renumbered the network addresses so the old numbers were not 
valid which forced the assignment of a new address which was the desired 
effect... when we renumbered the addresses, we basically just changed the 3rd 
octet...


eg: 192.168.0.*/24 -> 192.168.100.*/24

maybe you can do something similar to reach your desired objective?

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


Re: [Dnsmasq-discuss] DHCP tag being ignored?

2019-04-06 Thread Dave Thompson
Thank you for your help, but no luck I'm afraid. The Windows 7 VM is still 
being provided with a 192.168.0.104 IP address even though the MAC address is 
08:00:27:ab:8b:7e.

I can see that the Windows 7 VM is requesting 104. Perhaps Dnsmasq is honouring 
that and ignoring the config file?

I will take a look at the code tomorrow; my C isn't great but I think perhaps 
the answer is in the way the tags are applied. Annoyingly, the log clearly 
shows that the tag 'vms' is being set by the 'dhcp-mac' config variable, so 
it's obviously being picked up!

Any more thoughts!?

Many thanks in advance,

Dave

From: Dnsmasq-discuss  on 
behalf of Geert Stappers 
Sent: 06 April 2019 02:28
To: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] DHCP tag being ignored?

On Fri, Apr 05, 2019 at 09:43:12PM +, Dave Thompson wrote:
> Hi there,
>
> I am trying to configure Dnsmasq to provide a custom range of IP
> addresses for my VMs which will then map to a certain subdomain. The
> trouble is, the tag is being found (I can see in the log file) but
> the correct IP range is never provided.
>
> Here's my config file:
>
> domain=int.[redacted]
> domain=vm.int.[redacted],192.168.1.50,192.168.1.150
>
> dhcp-range=192.168.0.50,192.168.0.150,12h
> dhcp-range=tag:vms,192.168.1.50,192.168.1.150,12h

So
ccc.ddd.0.nnn and
ccc.ddd.1.nnn

> dhcp-mac=set:vms,08:00:27:*:*:*
>
> dhcp-host=98:E7:F4:BA:3D:AA,192.168.0.80
> dhcp-leasefile=/var/lib/misc/dnsmasq.leases
> dhcp-authoritative
>
> log-dhcp
>
> >From the log:
>
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 available DHCP range: 
> 192.168.0.50 -- 192.168.0.150
missing the   192.168.1.50   --   192.168.1.150  range
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 vendor class: MSFT 5.0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 client provides name: 
> DWT-VPC-W7-0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPINFORM(eth0) 
> 192.168.0.104 08:00:27:ab:8b:7e
eth0   ccc.ddd.0.nnn   08:00:27:*:*:*
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 tags: vms, eth0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPACK(eth0) 
> 192.168.0.104 08:00:27:ab:8b:7e DWT-VPC-W7-0
>
> Can any of you point out what I am missing, please?

Start with changing your
} domain=int.[redacted]
} domain=vm.int.[redacted],192.168.1.50,192.168.1.150
}
} dhcp-range=192.168.0.50,192.168.0.150,12h
} dhcp-range=tag:vms,192.168.1.50,192.168.1.150,12h

into

 domain=int.[redacted]
 domain=vm.int.[redacted],192.168.0.151,192.168.0.200

 dhcp-range=192.168.0.50,192.168.0.150,12h
 dhcp-range=tag:vms,192.168.0.151,192.168.0.200,12h

to get
} Dnsmasq to provide a custom range of IP addresses
} for VMs which will then map to a certain subdomain.

So all in  ccc.ddd.X.nnn


Extending it to   ccc.ddd.A.nnn and  ccc.ddd.B.nnn will
take extra effort.


> Thank you very much,
>
> Dave


Looking forward to the report of the success story.
Yes, even little success stories are welcome.


Groeten
Geert Stappers
--
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.thekelleys.org.uk%2Fmailman%2Flistinfo%2Fdnsmasq-discuss&data=02%7C01%7C%7Cdbd7864c35cf4644b59308d6ba5b486c%7C84df9e7fe9f640afb435%7C1%7C0%7C636901298550046672&sdata=crJBCTi1xx%2BMOsOUAgsG%2B5Wt%2BRlA9uoqElFxUHWhsYA%3D&reserved=0
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCP tag being ignored?

2019-04-05 Thread Geert Stappers
On Fri, Apr 05, 2019 at 09:43:12PM +, Dave Thompson wrote:
> Hi there,
> 
> I am trying to configure Dnsmasq to provide a custom range of IP
> addresses for my VMs which will then map to a certain subdomain. The
> trouble is, the tag is being found (I can see in the log file) but
> the correct IP range is never provided.
> 
> Here's my config file:
> 
> domain=int.[redacted]
> domain=vm.int.[redacted],192.168.1.50,192.168.1.150
> 
> dhcp-range=192.168.0.50,192.168.0.150,12h
> dhcp-range=tag:vms,192.168.1.50,192.168.1.150,12h

So
ccc.ddd.0.nnn and
ccc.ddd.1.nnn
 
> dhcp-mac=set:vms,08:00:27:*:*:*
> 
> dhcp-host=98:E7:F4:BA:3D:AA,192.168.0.80
> dhcp-leasefile=/var/lib/misc/dnsmasq.leases
> dhcp-authoritative
> 
> log-dhcp
> 
> >From the log:
> 
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 available DHCP range: 
> 192.168.0.50 -- 192.168.0.150
missing the   192.168.1.50   --   192.168.1.150  range
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 vendor class: MSFT 5.0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 client provides name: 
> DWT-VPC-W7-0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPINFORM(eth0) 
> 192.168.0.104 08:00:27:ab:8b:7e
eth0   ccc.ddd.0.nnn   08:00:27:*:*:*
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 tags: vms, eth0
> Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPACK(eth0) 
> 192.168.0.104 08:00:27:ab:8b:7e DWT-VPC-W7-0
> 
> Can any of you point out what I am missing, please?

Start with changing your
} domain=int.[redacted]
} domain=vm.int.[redacted],192.168.1.50,192.168.1.150
} 
} dhcp-range=192.168.0.50,192.168.0.150,12h
} dhcp-range=tag:vms,192.168.1.50,192.168.1.150,12h

into

 domain=int.[redacted]
 domain=vm.int.[redacted],192.168.0.151,192.168.0.200
 
 dhcp-range=192.168.0.50,192.168.0.150,12h
 dhcp-range=tag:vms,192.168.0.151,192.168.0.200,12h

to get
} Dnsmasq to provide a custom range of IP addresses
} for VMs which will then map to a certain subdomain.
 
So all in  ccc.ddd.X.nnn


Extending it to   ccc.ddd.A.nnn and  ccc.ddd.B.nnn will
take extra effort.


> Thank you very much,
> 
> Dave


Looking forward to the report of the success story.
Yes, even little success stories are welcome.


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


[Dnsmasq-discuss] DHCP tag being ignored?

2019-04-05 Thread Dave Thompson
Hi there,

I am trying to configure Dnsmasq to provide a custom range of IP addresses for 
my VMs which will then map to a certain subdomain. The trouble is, the tag is 
being found (I can see in the log file) but the correct IP range is never 
provided.

Here's my config file:

domain=int.[redacted]
domain=vm.int.[redacted],192.168.1.50,192.168.1.150

dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-range=tag:vms,192.168.1.50,192.168.1.150,12h

dhcp-mac=set:vms,08:00:27:*:*:*

dhcp-host=98:E7:F4:BA:3D:AA,192.168.0.80
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
dhcp-authoritative

log-dhcp

>From the log:

Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 available DHCP range: 
192.168.0.50 -- 192.168.0.150
Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 vendor class: MSFT 5.0
Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 client provides name: 
DWT-VPC-W7-0
Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPINFORM(eth0) 
192.168.0.104 08:00:27:ab:8b:7e
Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 tags: vms, eth0
Apr  5 17:37:39 pi dnsmasq-dhcp[21541]: 3063663390 DHCPACK(eth0) 192.168.0.104 
08:00:27:ab:8b:7e DWT-VPC-W7-0

Can any of you point out what I am missing, please?

Thank you very much,

Dave

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