On 02/07/12 04:42, Helmut Hullen wrote:
> Hallo, Simon,
> 
> Du meintest am 01.07.12:
> 
>> A quote from the man page:
> 
>> dhcp-range may have an interface name supplied as
>> "interface:<interface-
> name>> ". The semantics if this are as follows: For  DHCP, if any other
>> dhcp-range exists _without_ an interface name, then the interface
>> name is  ignored  and  and  dnsmasq behaves  as  if  the interface
>> parts did not exist,
> 
> [...]
> 
>> This feature was added to facilitate integration with uses such as
>> libvirt, where libvirt could automatically add extra facilities to a
>> single "system" dnsmasq instance. It has never been used as such, and
>> things like libvirt and openstack and networkmanager have instead
>> gone down the route of running their own "private" dnsmasq instances.
> 
> I'd like to use this feature in many schools:
> 
> eth0 and eth1 for the school clients in the LAN, eth2 for the private  
> clients (especially in the WLAN). And eth3 for DSL/Router into the WAN.
> 
> Other services (like squid) may allow or disallow something depending on  
> the net range (and therefore on the NIC).
> 
> The major problem: sometimes a NIC dies and has to be replaced, and then  
> the NIC names may change too. Other services (especially samba and  
> squid) allow something like "interfaces=eth0 eth1 local", and that is  
> simple to change by a script which first detects which interfaces serve  
> which net. But it seems to be a bit more difficult to change  
> automatically something like
> 
>     dhcp-range=eth0,192.168.0.10,static
>     dhcp-range=eth1,192.168.1,10,static
>     dhcp-range=eth2,192.168.17.10-192.168,28.250
> 
> to
> 
>     dhcp-range=eth0,192.168.0.10,static
>     dhcp-range=eth2,192.168.1,10,static
>     dhcp-range=eth1,192.168.17.10-192.168,28.250
> 
> when the names of eth1 and eth2 have changed.

Note that you don't need to tell dnsmasq which dhcp-range goes with
which interface - it finds that automatically using the IP address and
netmask of the interfaces.

If you just supply the ranges, dnsmasq will handle the mapping even if
the name of the interface changes, you need to assign the correct IP
address to each interface, but that's not a dnsmasq problem, and the
proposed change to dnsmasq won't affect what you're doing.


Cheers,

Simon.



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

Reply via email to