[Dnsmasq-discuss] dnsmasq
Hi, I have the /etc/config/dhcp as follows: Code: config 'dnsmasq' option 'domainneeded' '1' option 'boguspriv' '1' option 'filterwin2k' '0' option 'localise_queries' '1' option 'local' '/lan/' option 'domain' 'lan' option 'expandhosts' '1' option 'nonegcache' '0' option 'authoritative' '1' option 'readethers' '1' option 'leasefile' '/tmp/dhcp.leases' option 'resolvfile' '/tmp/resolv.conf.auto' config 'dhcp' 'lan' option 'interface' 'lan' option 'start' '100' option 'limit' '150' option 'leasetime' '12h' # list 'dhcp_option' 'vendor:MSFT,2,1i' #I've set that because of http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example (Vista clients) config 'vendorclass' option classifier MSFT option name lan list 'dhcp_option' 'vendor:MSFT,2,li' config 'dhcp' 'wan' option 'interface' 'wan' option 'ignore' '1' option 'dynamicdhcp' '0' I wanted to add some settings using /etc/dnsmasq.conf , so I my /etc/dnsmasq.conf is as follows: Code: #The following if because of violation of dhcp standard of Windows Vista... dhcp-vendorclass=set:red,Linux dhcp-vendorclass=set:yellow,Mac dhcp-vendorclass=set:gray,MSFT dhcp-broadcast=tag:gray But when I look into /proc/$(pgrep dnsmasq)/cmdline I see: Code: /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -l /tmp/dhcp.leases -r /tmp/resolv.conf.auto --dhcp-range=lan,192.168.89.100,192.168.89.250,255.255.255.0,12h -2 'eth0.2' It say nothing about config 'vendorclass' option classifier MSFT option name lan list 'dhcp_option' 'vendor:MSFT,2,li' or about: dhcp-vendorclass=set:red,Linux dhcp-vendorclass=set:yellow,Mac dhcp-vendorclass=set:gray,MSFT dhcp-broadcast=tag:gray Is that right ? Hardware is: TL-WR1043ND Software is: Code: DISTRIB_ID=OpenWrt DISTRIB_RELEASE=10.03 DISTRIB_CODENAME=backfire DISTRIB_DESCRIPTION=OpenWrt Backfire 10.03 Thanks in advance! -- -- Sergio Belkin http://www.sergiobelkin.com Watch More TV http://sebelk.blogspot.com Sergio Belkin -
Re: [Dnsmasq-discuss] dnsmasq
Sergio Belkin wrote: Hi, I have the /etc/config/dhcp as follows: Code: config 'dnsmasq' option 'domainneeded' '1' option 'boguspriv' '1' option 'filterwin2k' '0' option 'localise_queries' '1' option 'local' '/lan/' option 'domain' 'lan' option 'expandhosts' '1' option 'nonegcache' '0' option 'authoritative' '1' option 'readethers' '1' option 'leasefile' '/tmp/dhcp.leases' option 'resolvfile' '/tmp/resolv.conf.auto' config 'dhcp' 'lan' option 'interface' 'lan' option 'start' '100' option 'limit' '150' option 'leasetime' '12h' # list 'dhcp_option' 'vendor:MSFT,2,1i' #I've set that because of http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example (Vista clients) config 'vendorclass' option classifier MSFT option name lan list 'dhcp_option' 'vendor:MSFT,2,li' config 'dhcp' 'wan' option 'interface' 'wan' option 'ignore' '1' option 'dynamicdhcp' '0' I wanted to add some settings using /etc/dnsmasq.conf , so I my /etc/dnsmasq.conf is as follows: Code: #The following if because of violation of dhcp standard of Windows Vista... dhcp-vendorclass=set:red,Linux dhcp-vendorclass=set:yellow,Mac dhcp-vendorclass=set:gray,MSFT dhcp-broadcast=tag:gray But when I look into /proc/$(pgrep dnsmasq)/cmdline I see: Code: /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -l /tmp/dhcp.leases -r /tmp/resolv.conf.auto --dhcp-range=lan,192.168.89.100,192.168.89.250,255.255.255.0,12h -2 'eth0.2' It say nothing about config 'vendorclass' option classifier MSFT option name lan list 'dhcp_option' 'vendor:MSFT,2,li' or about: dhcp-vendorclass=set:red,Linux dhcp-vendorclass=set:yellow,Mac dhcp-vendorclass=set:gray,MSFT dhcp-broadcast=tag:gray Is that right ? Yes, I think so. The options in /etc/dnsmasq.conf certainly won't appear on the command line, but they will be used by dnsmasq. Cheers, Simon.
Re: [Dnsmasq-discuss] Random IP address in the pool with dhcp-script?
Benjamin Henrion wrote: Hi, I am trying to figure out howto give a different IP address, preferably random, in a pool, by invoking the dhcp-script. Any idea how to do that? It's not possible: information flows fomr dnsmasq to the dhcp-script, but not the other way. In fact the address is allocated long before the script is run. The addresses allocated by dnsmasq are fairly random anyway. If you can describe in more detail exactly what you are trying to achieve, we can probably make suggestions. Cheers, Simon.
Re: [Dnsmasq-discuss] Random IP address in the pool with dhcp-script?
On Thu, Aug 26, 2010 at 7:11 AM, Benjamin Henrion b...@udev.org wrote: Hi, I am trying to figure out howto give a different IP address, preferably random, in a pool, by invoking the dhcp-script. Any idea how to do that? Best, -- Benjamin Henrion bhenrion at ffii.org Maybe I'm reading this wrong, but since the original assignment from the dhcp pool is reasonably random, and after than dnsmasq works very hard to offer the same IP address to the same machine based on mac address or hostname or some other network characteristic that is configurable. I'm taking your question to mean is there a way to force dnsmasq to give out DIFFERENT IP addresses even if we've processed this machine before. If this is what you want, then you might need to explain the problem you are trying to solve, because generally this is undesired behavior, at least it is on the networks I manage. Rance