Re: [Dnsmasq-discuss] Determine wireless SSID

2019-02-01 Thread john doe
On 2/1/2019 5:34 PM, Donald Muller wrote:
> Router is Netgear R7800 running the Netgear firmware.
>
> Yeah I was thinking of maybe putting in an AP or another wireless router in 
> bridge mode as I can set a VLAN by port on the R7800.
>

If you're willing to flash the FW to OpenWrt (1), there's no need to buy
an extra access point.
All could be done with in OpenWrt.

If for any reasons you can't change the OEM FW buying an extra AP sounds
reasonable, being a router in bridge mode or a an AP.

If you go the router in bridge mode way, I would strongly consider the
ability to change the stock FW to something else (OpenWrt, DD-WRT ...).

1)  https://openwrt.org/toh/netgear/r7800

--
John Doe

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


Re: [Dnsmasq-discuss] Determine wireless SSID

2019-01-31 Thread john doe
On 1/31/2019 9:52 PM, Donald Muller wrote:
> Petr, Daniel
>
> Thanks for the suggestions. I checked on my router and I can set a VLAN for 
> 2.4Ghz and 5Ghz networks but not for guest vs non guest.
>

Can you afford an other wireless device on your network?
Do you mind sharing the model of your Netgear router?

--
John Doe

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


Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-11 Thread john doe
On 1/11/2019 8:48 PM, Michael Schleicher wrote:
> Hi Geert,
> 
> thanks for you mail.
> 
> On 1/11/19 6:50 PM, Geert Stappers wrote:
>> On Fri, Jan 11, 2019 at 11:29:13AM +0100, MIchael Schleicher (smicha) wrote:
>>> On 11.01.19 10:53, john doe wrote:
>>>> On 1/11/2019 9:49 AM, MIchael Schleicher (smicha) wrote:
>>>>>
>>>>> I have just checked on my environment what's in the dnsmasq.leases file:
>>>>>
>>>>> 1547246444 00:50:56:85:23:ea 10.198.10.223 win-vm 01:00:50:56:85:23:ea
>>>>> 1547276503 00:50:56:85:f1:86 10.198.10.37 linux-vm 01:00:50:56:85:f1:86
>>>>>
>>>>> As you see the Client-ID (5th field) is the MAC + "01:" as prefix.
>>>>>
>>>>
>>>> You previously said that the hostname is always the same, as ilustrated
>>>> by the above they are not (win-vm vs linux-vm)?
>>>>
>>>
>>> That are 2 different systems. (1 Windows and 1 Linux VM). It's just a
>>> example
>>>
>>
>> Thing I would like to known is the name of the virtualisation platform.
>> Mostly because all those I seen did allow me to define MAC address.
>>
> 
> The virtual landscapes (VM's) are running on VMware ESX Cluster.
> The ESX Hosts are "controlled" by a software which called
> "eCloud-Manager". That are deploying the different clones of landscapes.
> 
> We have a bunch of master VM's and the software deploy that VM's in
> different isolated landscapes. (each landscape is isolated with vlans
> and includes a copy of the Masters (but with different MAC as the Master
> VM's have!).
> 
> So, when a cloned VM in one of the virtual landscapes are crash or have
> some other problems, the software destorys the VM and deploy a copy of
> the Master-VM, with a different MAC to that landscapes.
> 
> And that is exactly the problem, during the deployment of that cloned VM
> from the Master, the MAC will changed from the eCloud-Manager during the
> VMWare deployment.
> 
> I hope I gave you a understandable description.
> 

If the maintaner of dnsmasq has not chimed in that leav us with to options:
- To much on his plate, something could be done to answer this question.
- The issue lies elsewhere (predicting way for MAC addressing).

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-11 Thread john doe
On 1/11/2019 9:49 AM, MIchael Schleicher (smicha) wrote:
> Hi,
> 
> thanks for your reply.
> 
> On 10.01.19 22:25, wkitt...@gmail.com wrote:
>> On 1/10/19 3:26 PM, Michael Schleicher wrote:
>>> As I said, for Linux VM's, I can set a uniq Client-ID that helps, but on
>>> Windows you can not set define a Client-ID (as far as I know).
>>
>> isn't this the machine name? when i was supporting winwhatever, the
>> install generated a machine name... that is the name i saw used in
>> DHCP requests... it is the name that was added to the DNS so queries
>> on it would return its current IP...
>>
>>
> 
> I have just checked on my environment what's in the dnsmasq.leases file:
> 
> 1547246444 00:50:56:85:23:ea 10.198.10.223 win-vm 01:00:50:56:85:23:ea
> 1547276503 00:50:56:85:f1:86 10.198.10.37 linux-vm 01:00:50:56:85:f1:86
> 
> As you see the Client-ID (5th field) is the MAC + "01:" as prefix.
> 

You previously said that the hostname is always the same, as ilustrated
by the above they are not (win-vm vs linux-vm)?

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-10 Thread john doe
On 1/9/2019 11:38 AM, MIchael Schleicher wrote:
> 
> On 09.01.19 08:14, john doe wrote:
>> On 1/8/2019 11:31 AM, smicha wrote:
>>> Hi John,
>>>
>>> thanks for your reply.
>>>
>>> I did some tests with your hints.
>>>
>>> On 7.1.2019 17:41, john doe wrote:
>>>>
>>>> Some hints from dnsmasq.conf:
>>>>
>>>> # Give the machine which says its name is "bert" IP address
>>>> # 192.168.0.70 and an infinite lease
>>>> #dhcp-host=bert,192.168.0.70,infinite
>>>
>>> Do not work with my setup, because when we re-deploy a VM, the MAC
>>> address will be autom. changed.
>>> The re-delpoyed VM will than get a different IP as the old vm had
>>> before.
>>>
>>
>> I just tested this option  and the behavior described is correct with
>> dnsmasq 2.76, from the man page:
> 
> I have running the version 2.78.
> 
>> "--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the
>> machine lap the IP address 192.168.0.199.
>> Addresses allocated like this are not constrained to be in the range
>> given by the --dhcp-range option, but they must be in the same subnet as
>> some valid dhcp-range. For subnets which don't need"
> 
> Yes, the config "--dhcp-host=lap,192.168.0.199" is working. The VM with
> the hostname "lap" will get the IP 192.168.0.199.
> 
> But, I have the problem, when I have a new VM, a new version of the VM
> "lap" which have a different MAC address.
> Than, that new version of VM "lap" get not the 192.168.0.199. They get
> an other IP from the pool.
> 
>> As long as a client use the hostname ("lap") the same IP will always be
>> given to that client, the MAC address is not used.
>>
> 
> As far as I see, for the "first" IP provisioning that is true -> the
> Hostname is enough.
> But, than the "dnsmasq.leases" file have also the MAC address and
> Client-ID values stored, which will be compared an the next DHCP Requests.
> If than one of the values are different (MAC, CLIENT-ID) the DHCP-Client
> will get an other IP.
> 
> Please see below, a example...
> 
> 
>>>>
>>>> See also (1) for more info on 'dhcp-host'.
>>>>
>>>>
>>>> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
>>>
>>>
>>> Maybe is it possible to "patch" the code of dnsmasq, where dnsmasq can
>>> ignore the MAC address in the DHCP task?
>>>
>>
>> Possibly, more nolageable dnsmasqer would need to chime in to do that
>> though! :)
>> If '--dhcp-host=hostname,IP' is not working for you more info would need
>> to be provided.
>>
> 
> 
> BTW: the VM "lap" does not have set a special "DHCP-Client-Identifier",
> so it use for DHCP-Client-ID the MAC address.
> 
> 
> Here some outputs of the dnsmasq.leases file:
> 
> # inital DHCP-Request:
> 
> 1547107342 00:50:56:85:02:fa 192.168.0.199 lap 01:00:50:56:85:02:fa
> 
> As you can see, the VM "lap" (MAC 00:50:56:85:02:fa) get the expected IP
> -> so far so good.
> 
> 
> Next, I power off the VM "lap" without a DHCP-Release and deploy a copy
> of the VM "lap" which have than an other MAC (00:50:56:85:02:ff) ! ->
> the MAC will always set by the deployment of a new VM version.
> 
> 
> Now, I start the new version of the VM "lap" (the old version of the VM
> "lap" is no longer available.
> 
> The dnsmasq.leases looks now, like this:
> 1547116110 00:50:56:85:02:ff 192.168.0.200 lap 01:00:50:56:85:02:ff
> 1547107342 00:50:56:85:02:fa 192.168.0.199 * 01:00:50:56:85:02:fa
> 
> 
> As you see, the VM "lap" have now the IP "192.168.0.200" and not the
> expected IP "192.168.0.199.
> 
> Do you have an idea how I can fix that?
> I tested different options with "--dhcp-host", but with no luck.
> 
> I hope you can help my.
> 

Beside looking at the VM software to always assign the same MAC address
to the same guest and the fact that I'm able to reproduce what you are
seeing, that is all I can offer.

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-08 Thread john doe
On 1/8/2019 11:31 AM, smicha wrote:
> Hi John,
> 
> thanks for your reply.
> 
> I did some tests with your hints.
> 
> On 7.1.2019 17:41, john doe wrote:
>>
>> Some hints from dnsmasq.conf:
>>
>> # Give the machine which says its name is "bert" IP address
>> # 192.168.0.70 and an infinite lease
>> #dhcp-host=bert,192.168.0.70,infinite
> 
> Do not work with my setup, because when we re-deploy a VM, the MAC
> address will be autom. changed.
> The re-delpoyed VM will than get a different IP as the old vm had before.
> 

I just tested this option  and the behavior described is correct with
dnsmasq 2.76, from the man page:

"--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the
machine lap the IP address 192.168.0.199.
Addresses allocated like this are not constrained to be in the range
given by the --dhcp-range option, but they must be in the same subnet as
some valid dhcp-range. For subnets which don't need"

As long as a client use the hostname ("lap") the same IP will always be
given to that client, the MAC address is not used.

>>
>> See also (1) for more info on 'dhcp-host'.
>>
>>
>> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
> 
> 
> Maybe is it possible to "patch" the code of dnsmasq, where dnsmasq can
> ignore the MAC address in the DHCP task?
> 

Possibly, more nolageable dnsmasqer would need to chime in to do that
though! :)
If '--dhcp-host=hostname,IP' is not working for you more info would need
to be provided.

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-07 Thread john doe
On 1/7/2019 4:23 PM, smicha wrote:
> Hi all,
> 
> first of all, thank you for the grade software !!!
> But I have a small questions regarding "dnsmasq" and DHCP requests.
> 
> Background:
> We have running different, isolated test-landscapes. In each network a
> VM is running with dnsmasq, which do the DHCP/DNS task.
> Some of the VM's in the landscape needs to have a "static" DHCP-IP,
> because a Firewall in front of the landscape routes traffic to the VM's
> (Rules are IP based)
> 
> So far so good.
> 
> Sometimes, when VM's (with the static DHCP-IP) has some problems and
> crash's and can not "release" there DHCP-IP, we need to re-deploy the
> same VM from our pool.
> But, when the re-deployement process is starting, that new VM will have
> a different MAC Address per default. The Hostname is the same as before
> the old one had.
> 
> Now, the problem is begin, because dnsmasq have already a valid DHCP
> lease for the old (destroyed) VM and the new, re-deployed VM will get a
> different IP as expect.
> 
> I see in the dnsmasq logfile the following message:
> 
>   not using configured address 10.117.247.79 because it is leased to
> 00:50:56:85:02:ff
> 
> The traffic from the firewall in front of, can reach the new VM (because
> the new VM does not have the correct expected IP).
> 
> In the past I use the tool "dhcp_release" to fix the issue, but now I
> ask is there an other way to fix this problem.
> 
> 
> Question:
> I there an option, that dnsmasq ignore the Client MAC address for
> "static" DHCP leases?
> 
> 
> As far as I see, dnsmasq use a combination of "Hostname" and "MAC" for
> the DHCP leases.
> 
> 
> I hope I could describe my problem understandable ;-)
> 

Some hints from dnsmasq.conf:

# Give the machine which says its name is "bert" IP address
# 192.168.0.70 and an infinite lease
#dhcp-host=bert,192.168.0.70,infinite

# Always give the host with client identifier 01:02:02:04
# the IP address 192.168.0.60
#dhcp-host=id:01:02:02:04,192.168.0.60

# Always give the host with client identifier "marjorie"
# the IP address 192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60

# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge


See also (1) for more info on 'dhcp-host'.


1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

-- 
John Doe

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


Re: [Dnsmasq-discuss] what do the contents of /var/lib/misc/dnsmasq.leases mean?

2019-01-02 Thread john doe
On 1/2/2019 5:01 AM, Sean Kelly wrote:
> when I cat the file I see mutiple entries for the same MAC address, what
> does this mean?
> 
> 0 98:de:d0:bb:11:0c 192.168.0.10 * 01:98:de:d0:bb:11:0c
> 0 98:de:d0:bb:11:0c 192.168.0.10 * 01:98:de:d0:bb:11:0c
> 0 98:de:d0:2c:0e:4c 192.168.0.20 * 01:98:de:d0:2c:0e:4c
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 44:80:eb:95:2a:b4 192.168.0.66 * 01:44:80:eb:95:2a:b4
> 0 44:80:eb:95:2a:b4 192.168.0.66 miri-phone 01:44:80:eb:95:2a:b4
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:90:a9:6a:0b:92 192.168.0.40 * 01:00:90:a9:6a:0b:92
> 0 00:1a:62:01:17:cf 192.168.0.252 * 01:00:1a:62:01:17:cf
>  Can I trim multiple entriesor is it safe to ignore them? I just recently
> got the dnsmasq NO LEASES LEFT error and was concerned that these duplicate
> entries contributed to the dhcp-max-leases count. Can I delete them safely?
> 

I'm assuming that the parssing of the lease file is somewhat similar to
dhcpd.leases.
Based on that assumption, only the first match is used.
New entries are added at the top of the file, I guess that the file is
read from top to bottom (oposit behavior for dhcpd.leases).
Note that the daemon needs to be stopped to modify the lease file.

The lease file is a database of known client(s) to the server, that way,
the same IP is given to the same client.

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP problem when moving from one WiFi SSID to another

2018-12-26 Thread john doe
On 12/26/2018 6:58 PM, Chris Green wrote:
> I have a large[ish[ house and to provide good WiFi throughout I run
> two Draytek routers.  The 'main' one is a Vigor 2860n which connects
> to the internet by FTTC, the second one is an old Vigor 2820n which
> has its WAN disabled and the LAN hardwired to the 2860n LAN.
> 
> Currently I'm using the same SSID on both routers, I've read quite a
> lot around this and the weight of opinion seems to be that using the
> same SSID should work OK and is more transparent to the user than
> using different ones.  However I have also tried different SSIDs for
> the two routers requiring user intervention to move from one to the
> other, this shows the same symptoms (described below) as using the
> same SSID.
> 
> What happens is that when I move around such that the WiFi connection
> should move from the 2820n to the 2860n my laptop loses its IP
> address.
> 
> DHCP and DNS is provided by dnsmasq running on a RaspberryPi, the
> basic IPV4 setup is as follows:-
> 
> Vigor 2860n - 192.168.1.1
> Raspberry Pi - 192.168.1.2 (runs dnsmasq)
> Desktop 192.168.1.3
> Vigor 2820n - 192.168.1.20
> 
> The Pi assigns IP addresses from 192.168.80 to 192.168.1.127 and the
> conf file is:-
> 
> domain-needed
> bogus-priv
> expand-hosts
> domain=zbmc.eu
> dhcp-range=192.168.1.80,192.168.1.127,12h
> dhcp-option=3,192.168.1.1
> local=/zbmc.eu/
> cname=bbb,beaglebone
> cname=mx201,maxine-X201
> cname=ben,DESKTOP-978VD5M
> cname=oki,MC342-AE529C
> dhcp-host=00:BB:3A:E9:A3:15,maxineKindle
> dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616
> dhcp-host=28:EF:01:2D:EB:07,chrisKindle
> dhcp-host=08:EB:74:9D:47:53,humaxFreeview
> dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview
> dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy
> dhcp-host=00:25:36:AE:52:9C,192.168.1.50
> 
> 
> My laptop seems to lose its IP address whenever I move from one
> Draytek's WiFi to the other but only when the IP is assigned by
> dnsmasq.  If I connect to my guest network (192.168.6.x) then I get a
> IP address assigned by the 2860n and a good connection to the outside
> world.  If I then reconnect to the 'local' WiFi the laptop loses its
> IP address.  It's as if dnsmasq doesn't see the disconnection and
> doesn't answer the new DHCP broadcast from my laptop.  If I leave it
> disconnected for a minute or two and then re-connect to the WiFi it
> *does* get an IP.
> 
> 
> Can anyone explain what might be wrong and/or a fix or workaround?
> 
> 

How is this issue different from the one you posted a fiew mounths back (1)?

Did you try what Simon Kellie suggested then?

1)
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q2/012225.html

-- 
John Doe

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


Re: [Dnsmasq-discuss] Documentation error (minor)

2018-12-26 Thread john doe
On 12/26/2018 7:40 PM, Chris Green wrote:
> While looking through the example dnsmasq.conf file comments with a
> view to seeing if there was anything relevant to my recent question
> about losing DHCP configuration when re-connecting I found:-
> 
> # Set the DHCP server to authoritative mode. In this mode it will barge in
> # and take over the lease for any client which broadcasts on the network,
> # whether it has a record of the lease or not. This avoids long timeouts
> # when a machine wakes up on a new network. DO NOT enable this if there's
> # the slightest chance that you might end up accidentally configuring a 
> DHCP
> # server for your campus/company accidentally. The ISC server uses
> # the same option, and this URL provides more information:
> # http://www.isc.org/files/auth.html
> #dhcp-authoritative
> 
> The link http://www.isc.org/files/auth.html is broken and, although I
> searched around a bit in isc.org I couldn't find anything relevant.
> 

Simply look for 'authoritative DHCP server' on the internet machine.

> By the way, while I'm about it would this possibly be the answer to my
> DHCP re-connect problem?  "This avoids long timeouts when a machine
> wakes up on a new network." does sound a bit hopeful.  However I'm not
> really clear what the sentence after means so I'm not sure if I can
> try this safely or not.
> 

If you have only one DHCP server on your network, you should be fine
trying '--dhcp-authoritative'.

-- 
John Doe

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


Re: [Dnsmasq-discuss] Patch to cache SRV records - version (#4)

2018-12-21 Thread john doe
On 12/21/2018 9:37 PM, Jeremy Allison wrote:
> Last version before Christmas, I promise :-).
> 
> Changes from version #3.
> 
> 1). Use memset(, '\0', sizeof(srv) to fully clean out SRV records
> instead of setting 'src' and 'target' to NULL.
> 
> 2). As requested by Donald Muller, add an option (I called it --srv-cache
> but feel free to change if you want !) that turns on SRV record caching.
> Note this is off by default.
> 
> Hope this works for everyone ! I've been testing this for
> a while locally under valgrind and it seems robust.
> 

Git 'send-email' ([ '--compose ]) to send signed commits is very useful,
especially when you do a 'reroll'! :)

-- 
John Doe

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


Re: [Dnsmasq-discuss] DNS entry without DHCP

2018-12-09 Thread john doe
On 12/9/2018 2:50 PM, dnsmasqyq@neverbox.com wrote:
> On Sun, Dec 9, 2018 at 1:47 AM john doe wrote:
>>
>> On 12/9/2018 4:26 AM, Michael wrote:
>>>>
>>>> Hi,
>>>>
>>>> If I'm using dnsmasq just as a DNS caching server, not a DHCP one,
>>>> would it be possible to config some fixed IP addresses as DNS entries
>>>> for my LAN?
>>>>
>>>> I.e., instead of changing the hosts file on every machine on my LAN
>>>> with the same entries, is it possible to do such configuration
>>>> centralized at dnsmasq DNS server alone?
>>>>
>>>
>>> Yes, just add them to the /etc/hosts file on the machine running dnsmasq
>>> or use the addn-hosts directive to point it to another file.
>>>
>>
>> If the option '--hostsdir' (1) is used, there is no need to restart
>> dnsmasq for changes to take effect:
>>
>> "--hostsdir=
>> Read all the hosts files contained in the directory. New or changed
>> files are read automatically. See --dhcp-hostsdir for details."
>>
>> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
> 
> Brilliant! I'll go with the '--hostsdir' (1) solution. So,
> 
> What's the usual/suggested convention to put that directory?
> 
> I first thought of creating one under /etc/dnsmasq.d, then dismissed
> it right away.
> 
> Any usual practices? Thx
> 

Here's what I'm currently using:

$ ls -d /etc/dnsmasq-*
/etc/dnsmasq-dhcp-hosts.d  /etc/dnsmasq-dhcp-options.d  /etc/dnsmasq-hosts.d

Note that this e-mail is folded by my mailer.

-- 
John Doe

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


Re: [Dnsmasq-discuss] DNS entry without DHCP

2018-12-08 Thread john doe
On 12/9/2018 4:26 AM, Michael wrote:
> On 12/8/18 7:55 PM, dnsmasqyq@neverbox.com wrote:
>>
>> Hi,
>>
>> If I'm using dnsmasq just as a DNS caching server, not a DHCP one,
>> would it be possible to config some fixed IP addresses as DNS entries
>> for my LAN?
>>
>> I.e., instead of changing the hosts file on every machine on my LAN
>> with the same entries, is it possible to do such configuration
>> centralized at dnsmasq DNS server alone?
>>
> 
> Yes, just add them to the /etc/hosts file on the machine running dnsmasq
> or use the addn-hosts directive to point it to another file.
> 

If the option '--hostsdir' (1) is used, there is no need to restart
dnsmasq for changes to take effect:

"--hostsdir=
Read all the hosts files contained in the directory. New or changed
files are read automatically. See --dhcp-hostsdir for details."

1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

-- 
John Doe

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


Re: [Dnsmasq-discuss] Help with dnsmasq and vlans tags

2018-12-06 Thread john doe
On 12/6/2018 3:50 PM, jmperrote wrote:
> El 2018-12-05 12:59, john doe escribió:
>> On 12/5/2018 1:58 PM, Geert Stappers wrote:
>>> On Wed, Dec 05, 2018 at 09:09:25AM -0300, jmperrote wrote:
>>>> El 2018-12-04 12:26, john doe escribió:
>>>>> On 12/4/2018 12:02 PM, jmperrote wrote:
>>>>>>
>>>>>>  John Doe, sorry for my mistake, my actual configuration of dnsmasq
>>>>>> are:
>>>>>>
>>>>>> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>>>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth0,option:router,10.11.37.1 # gateway
>>>>>>
>>>>>> dhcp-range=interface:eth1,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>>>>>
>>>>>> dhcp-option=eth1,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth1,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth1,option:router,10.11.137.1 # gateway
>>>>>>
>>>>>> dhcp-range=interface:eth2,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>>>>
>>>>>> dhcp-option=eth2,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth2,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth2,option:router,10.11.237.1 # gateway
>>>>>>
>>>>>> We have 3 nics on the system eth0/eth1/eth2, one for each VLAN, and
>>>>>> try to replace for one nic with VLANs tagged.
>>>>>>
>>>>>> We try the tag option and the dhcp assign ip on correct range for
>>>>>> each
>>>>>> PC on each vlan, but dnsmasq allways assign to the PC the same
>>>>>> gateway, that is the las vlan configured.
>>>>>>
>>>>>> For example on this configuraton assign the correct range to the PC,
>>>>>> but the gateway always assign 10.11.237.1 gateway, to all PC
>>>>>>
>>>>>> dhcp-range=interface:eth0.37,set:VLAN_37,10.11.37.90,10.11.37.98,6h
>>>>>> dhcp-option=eth0.37,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth0.37,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth0.37,option:router,10.11.37.1 # gateway
>>>>>>
>>>>>> dhcp-range=interface:eth0.137,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>>>>>
>>>>>> dhcp-option=eth0.137,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth0.137,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth0.137,option:router,10.11.137.1 # gateway
>>>>>>
>>>>>> dhcp-range=interface:eth0.237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>>>>
>>>>>> dhcp-option=eth0.237,6,10.11.37.15 #dns primario
>>>>>> dhcp-option=eth0.237,1,255.255.255.0 # mascara de red
>>>>>> dhcp-option=eth0.237,option:router,10.11.237.1 # gateway
>>>>>>
>>>>>>
>>>>>> It is necessary to use "vconfig" to configure virtual vlan interface
>>>>>> on the operating system, or can use tagged vlans from the router ?
>>>>>>
>>>>>
>>>>> To be able to answer your question I need to know the following:
>>>>>
>>>>>  - What hardware is the router (netgear, cisco ...)?
>>>>>  - What type of distribution (name and version) are you using
>>>>> 'vconfig'
>>>>> on (Linux, Oracle)?
>>>>>
>>>>> I can't answer your question without knowing your network topology,
>>>>> but
>>>>> if the router is VLAN tagging capable I would use it and also use the
>>>>> DHCP capability from that router.
>>>>>
>>>>> Also, to isolate whether it is a vlan configuration or a dnsmasq issue
>>>>> simply try the line I have provided, obviously you can change the Ip
>>>>> ranges to your liking.
>>>>
>>>>
>>>> Hello john doe,
>>>
>>> Hello Mailinglist,
>>>
>>>>
>>>> Send the data:
>>>>  -- Router mikrotik RB1100 AH
>>>>  -- Ubuntu 16.04
>>>>  -- Using vconfig with 3 VLANs
>>>>
>>>> Yes, the router have capabilitie to dhcp,
>>>> you recommend to use that instead of 

Re: [Dnsmasq-discuss] Help with dnsmasq and vlans tags

2018-12-05 Thread john doe
On 12/5/2018 1:58 PM, Geert Stappers wrote:
> On Wed, Dec 05, 2018 at 09:09:25AM -0300, jmperrote wrote:
>> El 2018-12-04 12:26, john doe escribió:
>>> On 12/4/2018 12:02 PM, jmperrote wrote:
>>>>
>>>>  John Doe, sorry for my mistake, my actual configuration of dnsmasq
>>>> are:
>>>>
>>>> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth0,option:router,10.11.37.1 # gateway
>>>>
>>>> dhcp-range=interface:eth1,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>>> dhcp-option=eth1,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth1,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth1,option:router,10.11.137.1 # gateway
>>>>
>>>> dhcp-range=interface:eth2,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>> dhcp-option=eth2,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth2,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth2,option:router,10.11.237.1 # gateway
>>>>
>>>> We have 3 nics on the system eth0/eth1/eth2, one for each VLAN, and
>>>> try to replace for one nic with VLANs tagged.
>>>>
>>>> We try the tag option and the dhcp assign ip on correct range for each
>>>> PC on each vlan, but dnsmasq allways assign to the PC the same
>>>> gateway, that is the las vlan configured.
>>>>
>>>> For example on this configuraton assign the correct range to the PC,
>>>> but the gateway always assign 10.11.237.1 gateway, to all PC
>>>>
>>>> dhcp-range=interface:eth0.37,set:VLAN_37,10.11.37.90,10.11.37.98,6h
>>>> dhcp-option=eth0.37,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth0.37,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth0.37,option:router,10.11.37.1 # gateway
>>>>
>>>> dhcp-range=interface:eth0.137,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>>> dhcp-option=eth0.137,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth0.137,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth0.137,option:router,10.11.137.1 # gateway
>>>>
>>>> dhcp-range=interface:eth0.237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>> dhcp-option=eth0.237,6,10.11.37.15 #dns primario
>>>> dhcp-option=eth0.237,1,255.255.255.0 # mascara de red
>>>> dhcp-option=eth0.237,option:router,10.11.237.1 # gateway
>>>>
>>>>
>>>> It is necessary to use "vconfig" to configure virtual vlan interface
>>>> on the operating system, or can use tagged vlans from the router ?
>>>>
>>>
>>> To be able to answer your question I need to know the following:
>>>
>>>  - What hardware is the router (netgear, cisco ...)?
>>>  - What type of distribution (name and version) are you using 'vconfig'
>>> on (Linux, Oracle)?
>>>
>>> I can't answer your question without knowing your network topology, but
>>> if the router is VLAN tagging capable I would use it and also use the
>>> DHCP capability from that router.
>>>
>>> Also, to isolate whether it is a vlan configuration or a dnsmasq issue
>>> simply try the line I have provided, obviously you can change the Ip
>>> ranges to your liking.
>>
>>
>> Hello john doe,
> 
> Hello Mailinglist,
> 
>>
>> Send the data:
>>  -- Router mikrotik RB1100 AH
>>  -- Ubuntu 16.04
>>  -- Using vconfig with 3 VLANs
>>
>> Yes, the router have capabilitie to dhcp,
>> you recommend to use that instead of dnsmasq for dhcp ?.
> 
> What I did read in the reply from john doe:
> 
>   Other options might resolve the original problem.
> 
> 
> But, yes, it is possible to replace
> three NICs with single NIC plus three VLANs.  Surely for DHCP stuff.
> If three NICs were choose due high bandwidth usage,
> that can't be solved by "VLAN".
> 

I guess nick bonding could be used with VLAN.

-- 
John Doe

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


Re: [Dnsmasq-discuss] Help with dnsmasq and vlans tags

2018-12-05 Thread john doe
On 12/5/2018 1:09 PM, jmperrote wrote:
> El 2018-12-04 12:26, john doe escribió:
>> On 12/4/2018 12:02 PM, jmperrote wrote:
>>> El 2018-12-03 13:30, john doe escribió:
>>>> On 12/3/2018 4:27 PM, jmperrote wrote:
>>>>> We need help to configure dnsmasq with vlans tagged on router.
>>>>>
>>>>> We actually have a dnsmasq server serving dns and dhcp, and 3 nics,
>>>>> one
>>>>> for each vlans:
>>>>>
>>>>> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>>>> dhcp-option=eth0,option:router,10.11.37.1 # gateway
>>>>>
>>>>> dhcp-range=interface:eth0,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>>>> dhcp-option=eth0,option:router,10.11.137.1 # gateway
>>>>>
>>>>> dhcp-range=interface:eth0,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>>>> dhcp-option=eth0,option:router,10.11.237.1 # gateway
>>>>>
>>>>>
>>>>> Know we are migratting to a dnsmasq solution with one nic a tagged
>>>>> vlans: But the result is not that we want:
>>>>>
>>>>> We configure this:
>>>>>
>>>>> dhcp-range=tag:vlan37,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>>>> dhcp-range=tag:vlan137,set:VLAN_137,10.11.137.50,10.11.137.200,6h
>>>>> dhcp-range=tag:vlan237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>>>> dhcp-option=tag:vlan37,option:dns-server,10.11.37.15
>>>>> dhcp-option=tag:vlan137,option:dns-server,10.11.37.15
>>>>> dhcp-option=tag:vlan237,option:dns-server,10.11.37.15
>>>>> dhcp-option=tag:vlan137,option:router,10.11.137.1
>>>>> dhcp-option=tag:vlan37,option:router,10.11.37.1
>>>>> dhcp-option=tag:vlan237,option:router,10.11.237.1
>>>>>
>>>>> But all clients recive allways the same gateway, 10.11.237.1
>>>>>
>>>>
>>>> I'm not sure to fully understand the issue(s) you are facing.
>>>> As far as dnsmasq is concerned, there is no differences between 3
>>>> physical "nicks" and 3 VLAN tagged interfaces  (802.1Q).
>>>> So for a start you could simply try:
>>>>
>>>> # Specify DHCP range with a tag
>>>> dhcp-range=set:vlan99,172.23.100.200,172.23.100.230,12h
>>>> dhcp-range=set:vlan100,172.23.101.200,172.23.101.230,12h
>>>> dhcp-range=set:vlan100,172.23.102.200,172.23.102.230,12h
>>>
>>>
>>>  John Doe, sorry for my mistake, my actual configuration of dnsmasq are:
>>>
>>> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth0,option:router,10.11.37.1 # gateway
>>>
>>> dhcp-range=interface:eth1,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>> dhcp-option=eth1,6,10.11.37.15 #dns primario
>>> dhcp-option=eth1,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth1,option:router,10.11.137.1 # gateway
>>>
>>> dhcp-range=interface:eth2,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>> dhcp-option=eth2,6,10.11.37.15 #dns primario
>>> dhcp-option=eth2,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth2,option:router,10.11.237.1 # gateway
>>>
>>> We have 3 nics on the system eth0/eth1/eth2, one for each VLAN, and try
>>> to replace for one nic with VLANs tagged.
>>>
>>> We try the tag option and the dhcp assign ip on correct range for each
>>> PC on each vlan, but dnsmasq allways assign to the PC the same gateway,
>>> that is the las vlan configured.
>>>
>>> For example on this configuraton assign the correct range to the PC, but
>>> the gateway always assign 10.11.237.1 gateway, to all PC
>>>
>>> dhcp-range=interface:eth0.37,set:VLAN_37,10.11.37.90,10.11.37.98,6h
>>> dhcp-option=eth0.37,6,10.11.37.15 #dns primario
>>> dhcp-option=eth0.37,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth0.37,option:router,10.11.37.1 # g

Re: [Dnsmasq-discuss] Help with dnsmasq and vlans tags

2018-12-04 Thread john doe
On 12/4/2018 12:02 PM, jmperrote wrote:
> El 2018-12-03 13:30, john doe escribió:
>> On 12/3/2018 4:27 PM, jmperrote wrote:
>>> We need help to configure dnsmasq with vlans tagged on router.
>>>
>>> We actually have a dnsmasq server serving dns and dhcp, and 3 nics, one
>>> for each vlans:
>>>
>>> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth0,option:router,10.11.37.1 # gateway
>>>
>>> dhcp-range=interface:eth0,set:VLAN_137,10.11.137.90,10.11.137.98,6h
>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth0,option:router,10.11.137.1 # gateway
>>>
>>> dhcp-range=interface:eth0,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>> dhcp-option=eth0,6,10.11.37.15 #dns primario
>>> dhcp-option=eth0,1,255.255.255.0 # mascara de red
>>> dhcp-option=eth0,option:router,10.11.237.1 # gateway
>>>
>>>
>>> Know we are migratting to a dnsmasq solution with one nic a tagged
>>> vlans: But the result is not that we want:
>>>
>>> We configure this:
>>>
>>> dhcp-range=tag:vlan37,set:VLAN_37,10.11.37.50,10.11.37.200,6h
>>> dhcp-range=tag:vlan137,set:VLAN_137,10.11.137.50,10.11.137.200,6h
>>> dhcp-range=tag:vlan237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
>>> dhcp-option=tag:vlan37,option:dns-server,10.11.37.15
>>> dhcp-option=tag:vlan137,option:dns-server,10.11.37.15
>>> dhcp-option=tag:vlan237,option:dns-server,10.11.37.15
>>> dhcp-option=tag:vlan137,option:router,10.11.137.1
>>> dhcp-option=tag:vlan37,option:router,10.11.37.1
>>> dhcp-option=tag:vlan237,option:router,10.11.237.1
>>>
>>> But all clients recive allways the same gateway, 10.11.237.1
>>>
>>
>> I'm not sure to fully understand the issue(s) you are facing.
>> As far as dnsmasq is concerned, there is no differences between 3
>> physical "nicks" and 3 VLAN tagged interfaces  (802.1Q).
>> So for a start you could simply try:
>>
>> # Specify DHCP range with a tag
>> dhcp-range=set:vlan99,172.23.100.200,172.23.100.230,12h
>> dhcp-range=set:vlan100,172.23.101.200,172.23.101.230,12h
>> dhcp-range=set:vlan100,172.23.102.200,172.23.102.230,12h
> 
> 
>  John Doe, sorry for my mistake, my actual configuration of dnsmasq are:
> 
> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
> dhcp-option=eth0,6,10.11.37.15 #dns primario
> dhcp-option=eth0,1,255.255.255.0 # mascara de red
> dhcp-option=eth0,option:router,10.11.37.1 # gateway
> 
> dhcp-range=interface:eth1,set:VLAN_137,10.11.137.90,10.11.137.98,6h
> dhcp-option=eth1,6,10.11.37.15 #dns primario
> dhcp-option=eth1,1,255.255.255.0 # mascara de red
> dhcp-option=eth1,option:router,10.11.137.1 # gateway
> 
> dhcp-range=interface:eth2,set:VLAN_237,10.11.237.50,10.11.237.200,6h
> dhcp-option=eth2,6,10.11.37.15 #dns primario
> dhcp-option=eth2,1,255.255.255.0 # mascara de red
> dhcp-option=eth2,option:router,10.11.237.1 # gateway
> 
> We have 3 nics on the system eth0/eth1/eth2, one for each VLAN, and try
> to replace for one nic with VLANs tagged.
> 
> We try the tag option and the dhcp assign ip on correct range for each
> PC on each vlan, but dnsmasq allways assign to the PC the same gateway,
> that is the las vlan configured.
> 
> For example on this configuraton assign the correct range to the PC, but
> the gateway always assign 10.11.237.1 gateway, to all PC
> 
> dhcp-range=interface:eth0.37,set:VLAN_37,10.11.37.90,10.11.37.98,6h
> dhcp-option=eth0.37,6,10.11.37.15 #dns primario
> dhcp-option=eth0.37,1,255.255.255.0 # mascara de red
> dhcp-option=eth0.37,option:router,10.11.37.1 # gateway
> 
> dhcp-range=interface:eth0.137,set:VLAN_137,10.11.137.90,10.11.137.98,6h
> dhcp-option=eth0.137,6,10.11.37.15 #dns primario
> dhcp-option=eth0.137,1,255.255.255.0 # mascara de red
> dhcp-option=eth0.137,option:router,10.11.137.1 # gateway
> 
> dhcp-range=interface:eth0.237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
> dhcp-option=eth0.237,6,10.11.37.15 #dns primario
> dhcp-option=eth0.237,1,255.255.255.0 # mascara de red
> dhcp-option=eth0.237,option:router,10.11.237.1 # gateway
> 
> 
> It is necessary to use "vconfig" to configure virtual vlan interface on
> the operating system, or can use tagged vlans from the router ?
> 

To be able to answer your question I need to know the following:

 - What ha

Re: [Dnsmasq-discuss] Help with dnsmasq and vlans tags

2018-12-03 Thread john doe
On 12/3/2018 4:27 PM, jmperrote wrote:
> We need help to configure dnsmasq with vlans tagged on router.
> 
> We actually have a dnsmasq server serving dns and dhcp, and 3 nics, one
> for each vlans:
> 
> dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
> dhcp-option=eth0,6,10.11.37.15 #dns primario
> dhcp-option=eth0,1,255.255.255.0 # mascara de red
> dhcp-option=eth0,option:router,10.11.37.1 # gateway
> 
> dhcp-range=interface:eth0,set:VLAN_137,10.11.137.90,10.11.137.98,6h
> dhcp-option=eth0,6,10.11.37.15 #dns primario
> dhcp-option=eth0,1,255.255.255.0 # mascara de red
> dhcp-option=eth0,option:router,10.11.137.1 # gateway
> 
> dhcp-range=interface:eth0,set:VLAN_237,10.11.237.50,10.11.237.200,6h
> dhcp-option=eth0,6,10.11.37.15 #dns primario
> dhcp-option=eth0,1,255.255.255.0 # mascara de red
> dhcp-option=eth0,option:router,10.11.237.1 # gateway
> 
> 
> Know we are migratting to a dnsmasq solution with one nic a tagged
> vlans: But the result is not that we want:
> 
> We configure this:
> 
> dhcp-range=tag:vlan37,set:VLAN_37,10.11.37.50,10.11.37.200,6h
> dhcp-range=tag:vlan137,set:VLAN_137,10.11.137.50,10.11.137.200,6h
> dhcp-range=tag:vlan237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
> dhcp-option=tag:vlan37,option:dns-server,10.11.37.15
> dhcp-option=tag:vlan137,option:dns-server,10.11.37.15
> dhcp-option=tag:vlan237,option:dns-server,10.11.37.15
> dhcp-option=tag:vlan137,option:router,10.11.137.1
> dhcp-option=tag:vlan37,option:router,10.11.37.1
> dhcp-option=tag:vlan237,option:router,10.11.237.1
> 
> But all clients recive allways the same gateway, 10.11.237.1
> 

I'm not sure to fully understand the issue(s) you are facing.
As far as dnsmasq is concerned, there is no differences between 3
physical "nicks" and 3 VLAN tagged interfaces  (802.1Q).
So for a start you could simply try:

# Specify DHCP range with a tag
dhcp-range=set:vlan99,172.23.100.200,172.23.100.230,12h
dhcp-range=set:vlan100,172.23.101.200,172.23.101.230,12h
dhcp-range=set:vlan100,172.23.102.200,172.23.102.230,12h

-- 
John Doe

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


Re: [Dnsmasq-discuss] DHCP Clients not being registered in DNS

2018-11-16 Thread john doe
On 11/16/2018 4:50 PM, Andrew Miskell wrote:
> Hi,
> 
> I’m trying to setup a dnsmasq server (version 2.79 on Ubuntu 18.10) for DNS 
> and DHCP to replace the horrible DNS/DHCP service built into the AT Fiber 
> gateways. I've gotten everything configured and I have a client pulling a 
> DHCP address but I’m not able to resolve it’s name in DNS using dnsmasq as 
> the name server. I can resolve entries in the /etc/hosts file without any 
> issues.
> 
> From what I can tell, the DHCP client name is being passed successfully from 
> the client to the server (as it’s visible in the dnsmasq.leases file).
> 
> I’ve included my current configuration below, am I missing some configuration 
> option that enables DHCP clients to register themselves into dnsmasq ’s DNS?
> 
> root@ubuntu:/etc/dnsmasq.d# grep -v '#' amiskell.net | sed '/^\s*$/d'
> domain-needed
> bogus-priv
> strict-order
> server=1.1.1.1
> expand-hosts
> domain=amiskell.net
> dhcp-range=192.168.1.50,192.168.1.60,12h
> dhcp-option=option:router,192.168.1.254
> dhcp-option=option:dns-server,192.168.1.1
> dhcp-option=option:netmask,255.255.255.0
> dhcp-lease-max=150
> dhcp-leasefile=/var/lib/misc/dnsmasq.leases

Any reasons why you're specifying the 'dhcp-option's (dnsmasq should
determine those values automatically)
The same goes for the dhcp-lease, there is no reason to set an option
when you use the default value.

> root@ubuntu:/etc/dnsmasq.d# cat /var/lib/misc/dnsmasq.leases 
> 1542425553 70:88:6b:83:XX:XX 192.168.1.57 A17062407 01:70:88:6b:83:XX:XX
> 

What do you get if you do:

$ host A17062407


P.S. I'm assuming that you're the owner of 'amiskell.net'.

-- 
John Doe

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


Re: [Dnsmasq-discuss] duplicate dhcp-host IP address

2018-11-12 Thread john doe
On 11/12/2018 4:12 PM, Roy Marples wrote:
> 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

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


Re: [Dnsmasq-discuss] Chainloading a more featureful iPXE from a limited iPXE

2018-11-05 Thread john doe
On 11/5/2018 9:33 PM, Mark Gardner wrote:
> (I hope this isn't in a FAQ somewhere that I was unable to find...)
> 
> VirtualBox uses iPXE for it's boot BIOS but the feature set is quite
> limited (due to lack of space apparently). I would like to boot URIs such
> as HTTPS and use commands such as sanboot which requires a newer, more
> featureful iPXE.
> 
> https://gist.github.com/robinsmidsrod/4008017 shows how to chainboot a
> different iPXE using DHCPD. I would like to do something similar only using
> dnsmasq. Has anyone been successful in doing this and have a config they
> can share?
> 
> Work around: a newer iPXE can be obtained by booting ipxe.iso instead of
> using the built-in iPXE. (But I would like to figure out how to do it
> strictly over the network.)
> 

Not strictly an answer; have you considered qemu?:

https://github.com/qemu/ipxe

-- 
John Doe

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


Re: [Dnsmasq-discuss] NM - dnsmasq, shared conn. no IP to client

2018-11-05 Thread john doe
On 11/5/2018 7:25 PM, Kemal Kilic wrote:
> Hello Folks,
> 
> I have 64 bit openSUSE Tumbleweed.
> Just a week ago my shared wifi and ethernet connections were working with
> NetworkManager
> 
> I do not know what happened but now I got such messages and the client can
> not get IP address
> Why dnsmasq can not create that lease file in /var/lib/NetworkManager?
> How can I get over this problem?
> 
> Thanks for your time.
> Here is the NetworkManager log:
> 
> systemctl status NetworkManager
> ● NetworkManager.service - Network Manager
>   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled;
> vendor preset: disabled)
>  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
>   └─NetworkManager-ovs.conf
>   Active: active (running)
> Docs: man:NetworkManager(8)
> Main PID: 1319 (NetworkManager)
>Tasks: 4 (limit: 4915)
>   CGroup: /system.slice/NetworkManager.service
>   ├─1319 /usr/sbin/NetworkManager --no-daemon
>   └─1704 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf
> /var/run/dhclient-enp5s0.pid -lf
> /var/lib/NetworkManager/dhclient-5aa08187-8d97-4502-836f-6f26683d034e-enp5s0.lease
> -cf /var/lib/N>
> 
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6756]
> Executing: /usr/sbin/iptables --table nat --insert POSTROUTING --source
> 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255>
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6767]
> dnsmasq-manager: starting dnsmasq...
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6778]
> device (wlp2s0f0u10): state change: ip-config -> ip-check (reason 'none',
> sys-iface-state: 'managed')
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6788]
> device (wlp2s0f0u10): state change: ip-check -> secondaries (reason 'none',
> sys-iface-state: 'managed')
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6790]
> device (wlp2s0f0u10): state change: secondaries -> activated (reason
> 'none', sys-iface-state: 'managed')
> Nov 05 20:13:51 michael NetworkManager[1319]: dnsmasq: cannot open or
> create lease file /var/lib/NetworkManager/dnsmasq-wlp2s0f0u10.leases:
> Permission denied
> Nov 05 20:13:51 michael dnsmasq[692]: cannot open or create lease file
> /var/lib/NetworkManager/dnsmasq-wlp2s0f0u10.leases: Permission denied
> Nov 05 20:13:51 michael dnsmasq[692]: FAILED to start up
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6902]
> device (wlp2s0f0u10): Activation: successful, device activated.
> Nov 05 20:13:51 michael NetworkManager[1319]:   [1541441631.6907]
> dnsmasq-manager: dnsmasq exited with error: Filesystem problem (missing
> file/directory, permissions) (3)
> 

Is it working if you start dnsmasq directly?:

$ systemctl restart dnsmasq

Did you change the permissions of one or more directories in the path?:

/var/lib/NetworkManager/

-- 
John Doe

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


Re: [Dnsmasq-discuss] uefi booting with different MAC

2018-09-11 Thread john doe

On 9/10/2018 10:22 PM, Louis Garcia II wrote:

Currently I have uefi pxe boot setup and working fine.  grub.cfg has different menu options 
pointing to different kickstart files for different systems. They are all x86_64 uefi. Is there a 
way to have dnsmasq serve different grub.cfg to different systems according to its MAC?  Would 
dhcp-mac=set:, and renaming grub.cfg to -grub.cfg help?



Maybe the option '--tftp-unique-root' could do what you want:

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

"--tftp-unique-root[=ip|mac]
Add the IP or hardware address of the TFTP client as a path component on 
the end of the TFTP-root. Only valid if a tftp-root is set and the 
directory exists. Defaults to adding IP address (in standard dotted-quad 
format). For instance, if tftp-root is "/tftp" and client 1.2.3.4 
requests file "myfile" then the effective path will be 
"/tftp/1.2.3.4/myfile" if /tftp/1.2.3.4 exists or /tftp/myfile 
otherwise. When "=mac" is specified it will append the MAC address 
instead, using lowercase zero padded digits separated by dashes, e.g.: 
01-02-03-04-aa-bb Note that resolving MAC addresses is only possible if 
the client is in the local network or obtained a DHCP lease from us. "


--
John Doe

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


Re: [Dnsmasq-discuss] Ignore DHCP request based on "client name"?

2018-08-04 Thread john doe

On 8/4/2018 5:32 PM, Hugo Segovia wrote:

Hello!

First, for "client name" I mean the fourth field in an typical
dnsmasq.lease line:
* this one! *
1532225279 aa:bb:cc:00:11:22 192.168.3.191 android-abcdexyx123456 *

Now, to my issue: I've been asked to setup a little WLAN for free
"Computers 101" courses, and the WLAN does not have any kind of
security (not my choice, BTW...). As you can imagine,
an open WLAN is VERY attractive for freeloaders.

I've been adding "dhcp-host=mac-address,ignore" entries for a while, but
I've been wondering if I could, for example, ignore all DHCP requests
from hosts with a client name like
"android-" (because we're not teaching "how to use
your Android smartphone", hence it must come from freeloaders)



You could maybe look at '-6 --dhcp-script=':

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

--
John Doe

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


Re: [Dnsmasq-discuss] local dns broke

2018-07-24 Thread john doe

On 7/24/2018 7:47 AM, Carl Karsten wrote:

On Tue, Jul 24, 2018 at 12:32 AM, Geert Stappers  wrote:

On Mon, Jul 23, 2018 at 06:02:02PM -0500, Carl Karsten wrote:

On Mon, Jul 23, 2018 at 4:16 PM, Geert Stappers  wrote:


What do the other client fine that the netplan client doesn't do?



resolve local names.

xenial box:
carl@twist:~$ host pc8
pc8 has address 192.168.1.8

carl@twist:~$ host trist
trist has address 192.168.1.156

bionic netplan:
juser@dc10b:~$ host pc8
Host pc8 not found: 2(SERVFAIL)
juser@dc10b:~$ host trist
Host trist not found: 2(SERVFAIL)

juser@dc10b:~$ host pc8 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Aliases:
pc8 has address 192.168.1.8

juser@dc10b:~$ host trist 192.168.1.8
Using domain server:
Name: 192.168.1.8
Address: 192.168.1.8#53
Aliases:
trist has address 192.168.1.156


juser@dc10b:~$ cat /run/systemd/resolve/resolv.conf
# [comments removed]
nameserver 192.168.1.8

juser@dc10b:~$ cat /etc/resolv.conf
nameserver 127.0.0.53



My guess is that a domain name is missing, dc10b correct and twist wrong.


ah right, I don't have
domain=something.com

I'm not sure I have gotten a straight answer about if/what domain name
I should plug in.
I have no interest of these names resolving outside of my lan, so what
name should I use?



One of those TLDS (.home' seems reasonable)'
  home
  internal
  intranet
  lan
  local
  private
  test

Also have a look online for private TLDS, there is more to this.

--
John Doe

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


Re: [Dnsmasq-discuss] local dns broke

2018-07-23 Thread john doe

On 7/23/2018 1:23 AM, Carl Karsten wrote:

I am not sure if this is a dnsmasq problem, but hopefully someone can
help me track down who's problem it is.

My dhcp server has:
host-record=pc8,192.168.1.8



From the man page:

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

host-record:
...
"in hosts-file also. Unlike hosts-files, names are not expanded, even 
when expand-hosts is in effect. Short and long names may appear in the 
same host-record, eg. 
--host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100
If the time-to-live is given, it overrides the default, which is zero or 
the value of --local-ttl."


HTH

--
John Doe

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


Re: [Dnsmasq-discuss] Just listen on one interface

2018-07-10 Thread john doe

On 7/10/2018 7:46 PM, Mauricio Tavares wrote:

How much do I need in dnsmasq.conf to tell it to

1. Only do your thing on eth2. Leave other interfaces alone.
1.1. Listen only on eth2 only. I take this is done with

bind-interfaces
interface=eth2



Should be enough; do you have multiple IPs on the same interface?


1.2. Do not try to edit the /etc/resolv.conf file. I do want to keep
the DNS on that port completely separate from the one used on the rest
of the interfaces. Right now it is taking over:

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search domain.com



Dnsmasq has nothing to do with resolvconf(8).
You will need to disable resolvconf(8) in order to avoid resolv.conf(5) 
to be overwritten.



1.3. Listen to dhcp queries. I have

# DHCP IP range
dhcp-range=192.168.0.150,192.168.0.250,12h

And it is not answering any request.



This option will enable dhcp server for that range, thus clients should 
get a dhcp lease if they are on the subnet given by eth2.


http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

--
John Doe

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


Re: [Dnsmasq-discuss] [PATCH 1/3] Fix some mistakes in french translation of the manual

2018-07-07 Thread john doe

On 7/7/2018 3:08 PM, Nicolas Cavallari wrote:

On 07/07/2018 13:15, Olivier Gayot wrote:

Various typos were present along with spelling mistakes and grammar
errors. Some sentences were missing a few words to be easily
understandable.

Many of them probably remain though.




+.B --hostsdir=
+Lire tous les fichiers d'hôtes contenus dans le répertoire spécifié. Les
+fichiers ajoutés ou modifiés sont lus automatiquement.
+.TP


Unrelated and probably incomplete change.



Can you elaborate?


Once fixed, you can add my Reviewed-By for the whole series.



Assuming that a reroll is needed, your reviewed is here on the list and 
the OP will simply need to resend a 'reroll' of the set of patches.:


git send-email --reroll-count n

--
John Doe

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


Re: [Dnsmasq-discuss] cannot start dnsmasq

2018-06-29 Thread john doe

On 6/29/2018 3:39 PM, Christophe Massez wrote:

Hi all,

I've updated my linux machine (debian jessie) yesterday and dnsmasq cannot
start - no change made in config file, here the log :

Jun 29 15:29:00 vterminal systemd[1]: Starting dnsmasq - A lightweight DHCP
and caching DNS server...
Jun 29 15:29:00 vterminal dnsmasq[29555]: dnsmasq: vérification de syntaxe
OK.
Jun 29 15:29:00 vterminal dnsmasq[29557]: la ligne de commande contient des
éléments indésirables ou incompréhensibles
Jun 29 15:29:00 vterminal dnsmasq[29557]: IMPOSSIBLE de démarrer
Jun 29 15:29:00 vterminal systemd[1]: dnsmasq.service: control process
exited, code=exited status=1
Jun 29 15:29:00 vterminal systemd[1]: Failed to start dnsmasq - A
lightweight DHCP and caching DNS server.
Jun 29 15:29:00 vterminal systemd[1]: Dependency failed for Host and
Network Name Lookups.
Jun 29 15:29:00 vterminal systemd[1]: Unit dnsmasq.service entered failed
state.
Jun 29 15:29:00 vterminal dnsmasq[29557]: dnsmasq: la ligne de commande
contient des éléments indésirables ou incompréhensibles

I also try on a fresh install (still debian jessie), and I've the same
problem.

In both cases :
root@vterminal:~# dnsmasq --test
dnsmasq: vérification de syntaxe OK.


Any clue about this error ?  Any help will be very welcome.



The configuration of Dnsmasq is sane as shown by the '--test' option.

Do you have non-ascii characters in '/etc/default/dnsmasq' or did you 
modify in any way '/etc/init.d/dnsmasq'?
Can you change the language of your system to English and see if the 
error is fixed?:


$ dpkg-reconfigure locales

--
John Doe

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


Re: [Dnsmasq-discuss] Regex patch

2018-06-17 Thread john doe

On 6/17/2018 5:46 PM, Thiago Alves wrote:

Sorry for being insistent here

I just need to confirm that:

1) The regex feature is not available in the official releases, so the only
way to enable it is by applying the patch mentioned in my previous message
2) It is safe to apply the patch on version 2.62 and use it in production
envs



If you want to use features that are not in the official version of 
dnsmasq it is your responsability to insure that they are working as you 
expect them to!


--
John Doe

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


Re: [Dnsmasq-discuss] [PATCH] Warn about the impact of cache-size on performance

2018-05-31 Thread john doe

On 5/31/2018 2:18 PM, Geert Stappers wrote:

On Sun, May 20, 2018 at 10:14:34PM +0200, Geert Stappers wrote:

On Fri, May 11, 2018 at 11:43:02PM +0100, Simon Kelley wrote:

On 09/05/18 12:13, Geert Stappers wrote:

  3 files changed, 5 insertions(+), 3 deletions(-)

Note that this patch contains non-ASCII characters,
those might be mangled during transport ...


They were, please could you resend an attachment?


# git clone git://thekelleys.org.uk/dnsmasq.git
cd dnsmasq/
git remote add stappers http://stappers.it/git/dnsmasq
git fetch stappers

} git branch --remote

git checkout -b stappers/warn_cache_size stappers/warn_cache_size
git diff master
git checkout master
git merge stappers/warn_cache_size

} git branch -d stappers/warn_cache_size
} git remote remove stappers

reminder by retransmit



$ git pull http://stappers.it/git/dnsmasq

Will fetch/pull in the current branch!

Hopefully 'git/dnsmasq' points to a bare repository (missing '.git').

--
John Doe

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


Re: [Dnsmasq-discuss] [PATCH] Warn about the impact of cache-size on performance

2018-05-21 Thread john doe

On 5/20/2018 10:14 PM, Geert Stappers wrote:

On Fri, May 11, 2018 at 11:43:02PM +0100, Simon Kelley wrote:

On 09/05/18 12:13, Geert Stappers wrote:

  3 files changed, 5 insertions(+), 3 deletions(-)

Note that this patch contains non-ASCII characters,
those might be mangled during transport ...


They were, please could you resend an attachment?


# git clone git://thekelleys.org.uk/dnsmasq.git
cd dnsmasq/
git remote add stappers http://stappers.it/git/dnsmasq
git fetch stappers
git checkout -b stappers/warn_cache_size stappers/warn_cache_size
git diff master
git checkout master
git merge stappers/warn_cache_size



Not everyone is using Git. Would have been easier to send (git 
send-email) the patch in a format that is accepted by diff(1).


So one could download the tarball from the following link and then apply 
your patch:


http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.79.tar.gz

They mabey some reason why the patch is not merged in the oficial 
repository! :)


To the maintainer of dnsmasq; could tags and commit be gpg signed and 
the '--sign-off' option be used while committing?


--
John Doe

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


Re: [Dnsmasq-discuss] [PATCH] Warn about the impact of cache-size on performance

2018-05-21 Thread john doe

On 5/21/2018 8:46 AM, john doe wrote:

On 5/20/2018 10:14 PM, Geert Stappers wrote:

On Fri, May 11, 2018 at 11:43:02PM +0100, Simon Kelley wrote:

On 09/05/18 12:13, Geert Stappers wrote:

  3 files changed, 5 insertions(+), 3 deletions(-)

Note that this patch contains non-ASCII characters,
those might be mangled during transport ...


They were, please could you resend an attachment?


# git clone git://thekelleys.org.uk/dnsmasq.git
cd dnsmasq/
git remote add stappers http://stappers.it/git/dnsmasq
git fetch stappers
git checkout -b stappers/warn_cache_size stappers/warn_cache_size
git diff master
git checkout master
git merge stappers/warn_cache_size



Not everyone is using Git. Would have been easier to send (git 
send-email) the patch in a format that is accepted by diff(1).


So one could download the tarball from the following link and then apply 
your patch:


http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.79.tar.gz

They mabey some reason why the patch is not merged in the oficial 
repository! :)


To the maintainer of dnsmasq; could tags and commit be gpg signed and 
the '--sign-off' option be used while committing?




The options I'm referring to are:

user.signingKey
commit.gpgSign
tag.forceSignAnnotated

https://git-scm.com/docs/git-config


$ git commit -s ...

--
John Doe

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


Re: [Dnsmasq-discuss] DHCP leases on multiple interfaces with different subnet mask

2018-05-01 Thread john doe

On 5/1/2018 5:44 AM, Tom Hung wrote:

Greetings,

  


I have an issue about set multiple interfaces with different subnet mask.

I set three interfaces, br-lan, br-VLAN4 and br-VLAN5. br-VLAN5 subnet mask
is 255.0.0.0, others are 255.255.255.0

When there is no DHCP leases, DHCP Client can get correct DHCP OFFER from
different interfaces.

But if client get DHCP OFFER from br-VLAN5, and then switch back to br-lan.
It will get incorrect result.

What I expect is it can be obtained in original br-lan dhcp-range. Do I miss
anything?

  


Here is my dnsmasq.conf and log, you can see last DHCP OFFER from br-lan is
incorrect.

==

localise-queries

dhcp-range=lan,192.168.10.101,192.168.10.199,255.255.255.0,12h

dhcp-range=VLAN4,192.168.4.101,192.168.4.199,255.255.255.0,12h



In most cases tags need to be set before they can be used. Are the tags 
set anywhere else in your configuration?

If no, the following example could help:

dhcp-range=set:,...

--
John Doe

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


Re: [Dnsmasq-discuss] Can tags be used with the address directive?

2018-04-21 Thread john doe

On 4/21/2018 10:02 AM, Sean Baughn wrote:

Hello. Is it possible to use tags with the address directive? Goal being to
specify a name resolution response based on a tag match. Example of my use
case:

dhcp-mac=set:kids,XX:XX:XX:XX:XX:XX #My kids computer
address=tag:kids,/youtube.com/127.0.0.1

The address line given above errors out. However I don't know if my syntax
is incorrect, or if the use of tags in the address directive is invalid.



According to:

http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

"-A, --address=/[/...]/[]"

So you can't use tags with the '--address=' option:

$ dnsmasq --test
dnsmasq: error at line 1 of /etc/dnsmasq.conf

$ awk 'NR==1' /etc/dnsmasq.conf
address=tag:kids,/youtube.com/127.0.0.1

--
John Doe

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


Re: [Dnsmasq-discuss] Error when declaring multiple cnames to a target in a single line

2018-04-17 Thread john doe

On 4/17/2018 12:16 AM, Simon Kelley wrote:

On 11/04/18 12:30, john doe wrote:

Hi,

I can no longer declare multiple cnames in a single line with the
current version of Dnsmasq on Debian 9.

The error I'm getting is:

Apr 11 13:11:07 dnsmasq[1135]: dnsmasq: syntax check OK.
Apr 11 13:11:07 dnsmasq[1138]: dnsmasq: bad TTL at line 2 of
/etc/dnsmasq.d/try.conf
Apr 11 13:11:07 dnsmasq[1138]: bad TTL at line 2 of /etc/dnsmasq.d/try.conf

Line 2 of /etc/dnsmasq.d/try.conf resemble the following:
cname=,,target

Is this syntax deprecated or is it a regression?

Note that this e-mail is folded by my mailer.



The 2.79 release includes a fix for confusion caused by leading/trailing
spaces in cname arguments. Is that what's biting you here?



Yes, the fix inpplemented in 2.79 fixes what was biting me in 2.76.

So to summarize; between Dnsmasq 2.76 and 2.79 only one CNAME can be 
used per  target (--cname=,).


Sorry for the noice.

P.S. Thanks for bringing the list processor back from holiday! :)

--
John Doe

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


[Dnsmasq-discuss] Error when declaring multiple cnames to a target in a single line

2018-04-16 Thread john doe

Hi,

I can no longer declare multiple cnames in a single line with the 
current version of Dnsmasq on Debian 9.


The error I'm getting is:

Apr 11 13:11:07 dnsmasq[1135]: dnsmasq: syntax check OK.
Apr 11 13:11:07 dnsmasq[1138]: dnsmasq: bad TTL at line 2 of 
/etc/dnsmasq.d/try.conf

Apr 11 13:11:07 dnsmasq[1138]: bad TTL at line 2 of /etc/dnsmasq.d/try.conf

Line 2 of /etc/dnsmasq.d/try.conf resemble the following:
cname=,,target

Is this syntax deprecated or is it a regression?

Note that this e-mail is folded by my mailer.

--
John Doe

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


Re: [Dnsmasq-discuss] Error when declaring multiple cnames to a target in a single line

2018-04-16 Thread john doe
Hi, I'm not sure this e-mail went through the list the first time I sent 
it, my appologies if it was the case.


On 4/11/2018 1:30 PM, john doe wrote:

Hi,

I can no longer declare multiple cnames in a single line with the 
current version of Dnsmasq on Debian 9.


The error I'm getting is:

Apr 11 13:11:07 dnsmasq[1135]: dnsmasq: syntax check OK.
Apr 11 13:11:07 dnsmasq[1138]: dnsmasq: bad TTL at line 2 of 
/etc/dnsmasq.d/try.conf

Apr 11 13:11:07 dnsmasq[1138]: bad TTL at line 2 of /etc/dnsmasq.d/try.conf

Line 2 of /etc/dnsmasq.d/try.conf resemble the following:
cname=,,target

Is this syntax deprecated or is it a regression?

Note that this e-mail is folded by my mailer.




--
John Doe

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


Re: [Dnsmasq-discuss] Dnsmasq dhcp-optsdir remove options problem

2018-03-07 Thread john doe

On 3/7/2018 8:19 AM, Lindgren Fredrik wrote:

What I did to test this was to add "option:router,10.243.0.1" to a new option 
file.

Which is re-read by dnsmasq


I start a dhclient that I'm testing with, output in console of dnsmasq indicate 
that router entry is part of response (also seen in dhcpdump of package)

I stop the dhclient and remove the config file with this option and send SIGHUP 
to pid for dnsmasq



Why stopping dhclient and not releasing the lease?:

$ dhclient -r  && dhclient 


--
John Doe

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


Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread john doe

On 2/11/2018 4:58 PM, Andy Hawkins wrote:

Hi,

In article <slrnp80btc.nkj.a...@xcp-mailnews.gently.org.uk>,
Andy Hawkins<a...@gently.org.uk> wrote:

I could have a look at submitting a patch, but my editor is showing some
very strange indentation of the source, so I suspect I have my tab settings
incorrect. What is the standard setting for tabs on the dnasmasq source
files?


Here's an attempt at a patch. If it needs to be in a different format, then
please let me know. The changes are minimal however, so applying the patch
manually should be trivial.

[andy@xcp-dev dnsmasq (hosts-dirs *)]$ git diff --ignore-space-at-eol
diff --git a/src/inotify.c b/src/inotify.c
old mode 100644
new mode 100755


Is the change of the mode intentionel (from 644 to 755)?


index eda1d56..a655fe2
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -235,8 +235,8 @@ int inotify_check(time_t now)

   /* ignore emacs backups and dotfiles */
   if (in->len == 0 ||
- in->name[in->len - 1] == '~' ||
- (in->name[0] == '#' && in->name[in->len - 1] == '#') ||
+ in->name[strlen(in->name) - 1] == '~' ||
+ (in->name[0] == '#' && in->name[strlen(in->name) - 1] == '#') ||
   in->name[0] == '.')
 continue;

Hope that helps.

Andy


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




--
John Doe

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


Re: [Dnsmasq-discuss] Max num of concurrent dns reached troubleshootting

2018-01-27 Thread john doe

Hi Simon, bottom posting

On 1/21/2018 12:55 AM, Simon Kelley wrote:

Sounds like you're just tickling the limit. Maybe just increase it with

--dns-forward-max


Cheers,

Simon.


On 19/01/18 07:30, john doe wrote:

Hi Simon, bottom posting.

On 1/18/2018 11:16 PM, Simon Kelley wrote:

Use log-queries to see what's happening. You should be looking for
outgoing queries which don't see an answer.


Cheers,

Simon.


On 16/01/18 15:34, john doe wrote:

Hi,

First of all a big thank you for dnsmasq.
It's an easy dhcp, dns, read only tftp server to configure.


On a perimeterfirewall the logs gets flutted with the following:
Jan 15 22:32:23 dnsmasq[546]: Maximum number of concurrent DNS queries
reached (max: 150)
Jan 16 00:06:34 dnsmasq[546]: Maximum number of concurrent DNS queries
reached (max: 150)

Note that only one server (gateway) is connected to the
perimeterfirewall.

How can I determine wherein lies  the problem (perimeterfirewall or
gateway)?

In other words: what should I do to understand what's triggering those
messages.

Both the gateway and the perimeterfirewall are on Debian 9 using:
dnsmasq, systemd-resolved and resolvconf(8).

-John





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



Thanks for your answer.
The issue I'm facing is not occuring all the time and I'm wandering if
'log-queries' could be only passed to dnsmasq when those messages are
logged.

In other words: How can I pass options to an already running instance of
dnsmasq.

I really appriciate any help! :)





Indeed increasing that option does the tric! :)
It's been a fiew days now that I'm not seeing those messages in the log.
I will need to understand why increasing that option works and what are 
the consequences if any.


Thanks for your time and for your help! :)

--
John Doe

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


Re: [Dnsmasq-discuss] DHCP for pairs MAC:IP only

2018-01-25 Thread john doe

On 1/25/2018 6:57 PM, v...@iptrans.net wrote:

2018-01-25 18:42, john doe написав:

On 1/25/2018 4:55 PM, v...@iptrans.net wrote:


Good day

I have a DHCP-router based on dnsmasq with interface eth2 and 
networks 192.168.100.1/24 192.168.102.1/24 10.0.0.1/27 on this 
interface. There are computers-dhcp-clients on this network which 
have to get IP based on their MAC-addresses. And if file 
/etc/dnsmasq.conf doesn't contain line with corresponding MAC (option 
dhcp-host) then this computer doesn't get an IP via my DHCP-router.


But.

In /etc/dnsmasq.conf:

# Uncomment this to enable the integrated DHCP server, you need
^
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
# dhcp-range=192.168.0.50,192.168.0.150,12h

And if I uncomment "# dhcp-range" then I'll have computer-dhcp-client 
which will get a ip address without corresponding MAC in 
/etc/dnsmasq.conf.




If I understand you correctly you want only hosts that have a matching
mac address to be given an address for a specific subnet
(192.168.100.0/24).
For that you can use the 'static' keyword:

dhcp-range=192.168.100.2,static,12h

In case it is not what you want dhcp-host should have the form:

dhcp-range=192.168.100.2,192.168.100.253,12h
dhcp-host=ab:cd:ef:gh:ij:kl,fix-ip-to-be-given-to-host


Thanks.

:) My man page for dnsmasq doesn't have a information about optional 
static mode for dhcp-range like on link 
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html:


"The optional  keyword may be static which tells dnsmasq to enable 
DHCP for the network specified, but not to dynamically allocate IP 
addresses: only hosts which have static addresses given via dhcp-host or 
from /etc/ethers will be served. A static-only subnet with address all 
zeros may be used as a "catch-all" address to enable replies to all 
Information-request packets on a subnet which is provided with stateless 
DHCPv6, ie --dhcp-range=::,static"


For example configuration:

interface=eth2
dhcp-range=192.168.100.0,static
dhcp-range=192.168.102.0,static
dhcp-range=10.0.0.0,static
dhcp-host=ab:cd:ef:gh:ij:kl,192.168.102.10

With this configuration pc with mac "ab:cd:ef:gh:ij:kl" get 
192.168.102.10 and no other ip.
Аnd any other pc with a different mac will not receive any ip from my 
dhcp-server.




If you want "fix" address and "non-fix" address on the same subnet 
(192.168.100.0/24):



dhcp-range=192.168.100.100,192.168.100.150,12h
dhcp-host=ab:cd:ef:gh:ij:kl,192.168.100.90

The above line means that the host with the mac address 
'ab:cd:ef:gh:ij:kl' will always get 192.168.100.90.
Any other hosts will get an ip addres from 192.168.100.100 to 
192.168.100.150 (50 addresses available).


Normally you would use one subnet per interface:

interface=eth2
interface=eth3
dhcp-range=192.168.100.100,192.168.100.150,12h
dhcp-range=192.168.101.100,192.168.101.150,12h

The subnet to be used is the one set on the interface.

--
John Doe

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


Re: [Dnsmasq-discuss] DHCP for pairs MAC:IP only

2018-01-25 Thread john doe

On 1/25/2018 4:55 PM, v...@iptrans.net wrote:


Good day

I have a DHCP-router based on dnsmasq with interface eth2 and networks 
192.168.100.1/24 192.168.100.2.1/24 10.0.0.1/27 on this interface. There 
are computers-dhcp-clients on this network which have to get IP based on 
their MAC-addresses. And if file /etc/dnsmasq.conf doesn't contain line 
with corresponding MAC (option dhcp-host) then this computer doesn't get 
an IP via my DHCP-router.


But.

In /etc/dnsmasq.conf:

# Uncomment this to enable the integrated DHCP server, you need
^
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
# dhcp-range=192.168.0.50,192.168.0.150,12h

And if I uncomment "# dhcp-range" then I'll have computer-dhcp-client 
which will get a ip address without corresponding MAC in /etc/dnsmasq.conf.




If I understand you correctly you want only hosts that have a matching 
mac address to be given an address for a specific subnet (192.168.100.0/24).

For that you can use the 'static' keyword:

dhcp-range=192.168.100.2,static,12h

In case it is not what you want dhcp-host should have the form:

dhcp-range=192.168.100.2,192.168.100.253,12h
dhcp-host=ab:cd:ef:gh:ij:kl,fix-ip-to-be-given-to-host

--
John Doe

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


Re: [Dnsmasq-discuss] Max num of concurrent dns reached troubleshootting

2018-01-18 Thread john doe

Hi Simon, bottom posting.

On 1/18/2018 11:16 PM, Simon Kelley wrote:

Use log-queries to see what's happening. You should be looking for
outgoing queries which don't see an answer.


Cheers,

Simon.


On 16/01/18 15:34, john doe wrote:

Hi,

First of all a big thank you for dnsmasq.
It's an easy dhcp, dns, read only tftp server to configure.


On a perimeterfirewall the logs gets flutted with the following:
Jan 15 22:32:23 dnsmasq[546]: Maximum number of concurrent DNS queries
reached (max: 150)
Jan 16 00:06:34 dnsmasq[546]: Maximum number of concurrent DNS queries
reached (max: 150)

Note that only one server (gateway) is connected to the perimeterfirewall.

How can I determine wherein lies  the problem (perimeterfirewall or
gateway)?

In other words: what should I do to understand what's triggering those
messages.

Both the gateway and the perimeterfirewall are on Debian 9 using:
dnsmasq, systemd-resolved and resolvconf(8).

-John





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



Thanks for your answer.
The issue I'm facing is not occuring all the time and I'm wandering if 
'log-queries' could be only passed to dnsmasq when those messages are 
logged.


In other words: How can I pass options to an already running instance of 
dnsmasq.


I really appriciate any help! :)

--
John Doe

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


[Dnsmasq-discuss] Max num of concurrent dns reached troubleshootting

2018-01-16 Thread john doe

Hi,

First of all a big thank you for dnsmasq.
It's an easy dhcp, dns, read only tftp server to configure.


On a perimeterfirewall the logs gets flutted with the following:
Jan 15 22:32:23 dnsmasq[546]: Maximum number of concurrent DNS queries 
reached (max: 150)
Jan 16 00:06:34 dnsmasq[546]: Maximum number of concurrent DNS queries 
reached (max: 150)


Note that only one server (gateway) is connected to the perimeterfirewall.

How can I determine wherein lies  the problem (perimeterfirewall or 
gateway)?


In other words: what should I do to understand what's triggering those 
messages.


Both the gateway and the perimeterfirewall are on Debian 9 using: 
dnsmasq, systemd-resolved and resolvconf(8).


-John
--
John Doe

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