Re: [Dnsmasq-discuss] Use dnsmasq to assign static /32 addresses via DHCP

2019-03-14 Thread Simon Kelley
Is this a use for something like the ISC dhcpd shared-network configuration.


In the dnsmasq case, we could have something like

shared-network=,

or

shared-network=,

In the first case dnsmasq would behave _as_if_ the specified interface
carried the address and netmask specified.

In the second case, it would behave as if the interface which carries
interface-address also carried the address and netmask specified.

If I've understood correctly, you'd just need a shared-network
declaration for each of your /24s.



For the avoidance of doubt, this is NOT currently implemented on
dnsmasq, but it has been on the "desirable" list in my head for some time.


Simon.



On 12/03/2019 11:56, Peter Lieven wrote:
> Hi,
> 
> we run several thousand virtual gateways which are used to assign /32
> allocations to Virtual Servers via DHCP.
> 
> 
> This so far runs pretty well except for one hack that we had to make and
> that I would like to avoid.
> 
> We assign the /32 networks out of /24 blocks that we reserved for this
> purpose. However, dnsmasq only
> assigns IP addresses via an interface if the network is configured on
> that interface. We had to add some
> more specific routes on the gateways to make a 2 hosts that receive a
> /32 out of the same /24 see each
> other if they are on different gateways. In fact I would like to
> configure only one common virtual address
> on the vserver facing interface lets say 10.255.255.255/32.
> 
> What I would like to need is an option to either make dnsmasq assign
> addresses out of an dhcp-range even
> if the network is not configured on the dhcp interface or an option
> where dnsmasq runs in a mode where it
> 
> does not require dhcp-range options, but only works using dhcp-host
> entries and replies if gets a request
> 
> for a static mac address entry.
> 
> 
> My config looks basically like this:
> 
> [virtual gw1]
> 
> dhcp-range=set:virtualgw,10.0.0.2,10.0.0.254,infinite,static
> 
> dhcp-host=52:54:00:00:00:01,10.0.0.2,vserver1
> 
> dhcp-option=tag:virtualgw,1,255.255.255.255
> dhcp-option=tag:virtualgw,3,10.255.255.255
> dhcp-option=tag:virtualgw,28,255.255.255.255
> 
> dhcp-option=tag:virtualgw,121,10.255.255.255/32,0.0.0.0,0.0.0.0/0,10.255.255.255
> 
> 
> 
> [virtual gw2]
> 
> dhcp-range=set:virtualgw,10.0.0.2,10.0.0.254,infinite,static
> 
> dhcp-host=52:54:00:00:00:02,10.0.0.3,vserver1
> 
> dhcp-option=tag:virtualgw,1,255.255.255.255
> dhcp-option=tag:virtualgw,3,10.255.255.255
> dhcp-option=tag:virtualgw,28,255.255.255.255
> 
> dhcp-option=tag:virtualgw,121,10.255.255.255/32,0.0.0.0,0.0.0.0/0,10.255.255.255
> 
> 
> 
> To make dnsmasq deliver addresses out of 10.0.0.0/24 I have to configure
> 10.0.0.1/24
> 
> on the DHCP interface. To ensure reachability between 10.0.0.2 and
> 10.0.0.3 I have
> 
> configured static routes 10.0.0.0/25 and 10.0.0.128/25 towards the
> default gw.
> 
> The configuration of 10.0.0.1/24 on the DHCP interface and the static
> routes is what I would like to avoid.
> 
> 
> Thanks for your feedback,
> 
> Peter
> 
> 
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


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


Re: [Dnsmasq-discuss] Configuring DHCPv6 Vendor specific information using Option 17

2019-03-14 Thread Simon Kelley


On 14/03/2019 03:13, P, Sreelakshmi wrote:
> Thanks Simon, this works!
> 
> In case of DHCP v4 vendor option, it's not mandatory to provide encapsulated 
> vendor specific information. Here in DHCPv6, I see that the option 17 doesn't 
> work without giving enterprise ID for encapsulation. Why so?

I think because the only defined form of vendor-specific option defined
for DHCPv6 is the so-called vendor-identifying vendor specific option,
which includes the vendor-id as part of the option. If the option format
includes the vendor-id then the vendor-id must be provided.

> Also, is there a way to give hex as vendor option value that can include 
> enterprise ID as well?
> 
--dhcp-option=vi-encap:47196,option6:100,11:22:33:44:55:66:77

should work.


Simon.


> Regards,
> Sree
> 
> -Original Message-
> From: Dnsmasq-discuss 
> [mailto:dnsmasq-discuss-boun...@lists.thekelleys.org.uk] On Behalf Of Simon 
> Kelley
> Sent: Tuesday, March 5, 2019 4:04 AM
> To: dnsmasq-discuss@lists.thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] Configuring DHCPv6 Vendor specific information 
> using Option 17
> 
> You need something like
> 
> --dhcp-option=vi-encap:47196,option6:100,\
> "AOS-Switch:Top:Tokyo,3ffe:501::100::abcd,aruba123"
> 
> 
> Check the vendor-specific option number. I got the value of 100 from the data 
> you provided, but I may have decoded it wrong.
> 
> Cheers,
> 
> Simon.
> 
> 
> On 04/03/2019 10:01, P, Sreelakshmi wrote:
>> Hi All,
>>
>>  
>>
>> How to we configure vendor specific information in dnsmasqv6 using 
>> option 17?
>>
>>  
>>
>> Every time I tried to configure option 17 as below :
>>
>>  
>>
>> dnsmasq
>> --dhcp-option=option6:17,003db85c00640035414f532d5377697463683a546
>> f703a546f6b3
>> -test
>>
>>  
>>
>> I ended up getting the below error:
>>
>>     dnsmasq: bad command line options: bad IPv6 address
>>
>>  
>>
>>  
>>
>> What is the proper way to configure option 17 in dnsmasq? Below is my 
>> enterprise id and data:
>>
>>  
>>
>> Enterprise Id : *47196*
>>
>> Data : *¸\d5AOS-Switch:Top:Tokyo,3ffe:501::100::abcd,aruba123*
>>
>>  
>>
>> If we try to configure the same value using other DHCPv6 servers, it 
>> works fine.
>>
>> Any example? Can we configure the value as ASCII or HEX? Any help will 
>> be greatly appreciated.
>>
>>  
>>
>> Regards,
>>
>> Sree
>>
>>  
>>
>>
>> ___
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss@lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

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