[Dnsmasq-discuss] Using Vendor Class to determine range
Michael P. McDonnell
bzaks1424 at gmail.com
Fri Mar 4 16:45:04 GMT 2011
I understand this isn't EXACTLY the scenario I need to fix for - but I kind
of want to learn what I'm doing wrong as well. (This will help me learn more
about dhcp in general)
Here's my dnsmasq.conf:
###DNSMASQ CONF
no-resolv
no-poll
dhcp-vendorclass=set:custom,"Magic Server"
dhcp-range=tag:custom,10.230.240.50,10.230.240.150,12h
dhcp-range=10.230.240.151,10.230.240.254,12h
dhcp-script=/root/bin/doit
log-queries
log-dhcp
#####END
Here's my ***current* dhclient.conf
###DHCLIENT CONF
send dhcp-lease-time 3600;
send vendor-class-identifier "sample";
#send vendor-class-identifier "Magic Server";
request subnet-mask, broadcast-address, routers,
interface-mtu, host-name, domain-name,
domain-name-servers, nis-domain, nis-servers,
nds-context, nds-servers, nds-tree-name,
netbios-name-servers, netbios-dd-server,
netbios-node-type, netbios-scope, ntp-servers;
require subnet-mask;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;
#####END
Here's what I found as the output:
Mar 4 10:33:54 pxeserv dnsmasq[18619]: Available DHCP range: 10.230.240.50
-- 10.230.240.150
Mar 4 10:33:54 pxeserv dnsmasq[18619]: Available DHCP range: 10.230.240.151
-- 10.230.240.254
Mar 4 10:33:54 pxeserv dnsmasq[18619]: Vendor class: sample
Mar 4 10:33:54 pxeserv dnsmasq[18619]: DHCPREQUEST(eth0) 10.230.240.54
00:50:56:b9:00:05
Mar 4 10:33:54 pxeserv dnsmasq[18619]: DHCPACK(eth0) 10.230.240.54
00:50:56:b9:00:05
Mar 4 10:33:54 pxeserv dnsmasq[18619]: requested options: 1:netmask,
28:broadcast, 3:router, 26:mtu,
Mar 4 10:33:54 pxeserv dnsmasq[18619]: requested options: 12:hostname,
15:domain-name, 6:dns-server,
Mar 4 10:33:54 pxeserv dnsmasq[18619]: requested options: 40:nis-domain,
41:nis-server, 87, 85, 86,
Mar 4 10:33:54 pxeserv dnsmasq[18619]: requested options: 44:netbios-ns,
45:netbios-dd, 46:netbios-nodetype,
Mar 4 10:33:54 pxeserv dnsmasq[18619]: requested options: 47:netbios-scope,
42:ntp-server
Mar 4 10:33:54 pxeserv dnsmasq[18619]: tags: tag:custom
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 1 option:
53:message-type 05
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option:
54:server-identifier 0a:e6:f0:64
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 51:lease-time
00:00:0e:10
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 58:T1
00:00:07:08
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 59:T2
00:00:0c:4e
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 1:netmask
ff:ff:ff:00
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 28:broadcast
0a:e6:f0:ff
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 3:router
0a:e6:f0:64
Mar 4 10:33:54 pxeserv dnsmasq[18619]: sent size: 4 option: 6:dns-server
0a:e6:f0:64
On Fri, Mar 4, 2011 at 10:19, richardvoigt at gmail.com <richardvoigt at gmail.com
> wrote:
> Does dnsmasq have dhcp logging enabled? Can you paste the few lines
> associated with giving the client an address from the wrong block?
>
>
> On Fri, Mar 4, 2011 at 10:15 AM, Michael P. McDonnell <bzaks1424 at gmail.com
> > wrote:
>
>> I'm was just doing a dhclient eth0 on the client. So I guess that would
>> make sense not killing the lease all together...
>>
>> so I tried doing a dhclient -r eth0, then doing a dhclient eth0. No luck
>> :-/
>>
>>
>> On Fri, Mar 4, 2011 at 10:12, richardvoigt at gmail.com <
>> richardvoigt at gmail.com> wrote:
>>
>>> Are you releasing the lease after changing the client configuration, or
>>> renewing an existing lease?
>>>
>>> On Thu, Mar 3, 2011 at 11:31 PM, Michael P. McDonnell <
>>> bzaks1424 at gmail.com> wrote:
>>>
>>>> So I'd like to use vendor class identifer to create two different ranges
>>>> in dnsmasq, and I'm not entire sure how to go about that.
>>>>
>>>> dhcp-vendorclass=set:custom,"Sample Vendor Class"
>>>> dhcp-range=tag:custom,192.168.0.50,192.168.0.150,12h
>>>> dhcp-range=192.168.0.151,192.168.0.254,12h
>>>>
>>>> However - if I take a single client and flip the vendor-class-identifier
>>>> on or off in the dhclient.conf, I don't get a different IP.
>>>> Am I doing something wrong? Should I be looking to do something
>>>> differently in my config?
>>>>
>>>> Also - would it be possible for me to exactly specify to only run
>>>> dhcp-script for a specific lease? (so only the dhcp leases tagged with
>>>> "custom" ? ) Or do I need to just put that logic in the script that the
>>>> dhcp-script is calling?
>>>>
>>>> Thanks for your help in advance!
>>>>
>>>> _______________________________________________
>>>> Dnsmasq-discuss mailing list
>>>> Dnsmasq-discuss at lists.thekelleys.org.uk
>>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20110304/2b69cd63/attachment-0001.htm
More information about the Dnsmasq-discuss
mailing list