Re: [Dnsmasq-discuss] "No IPv6 address available" for bulk request from IXIA DHCPv6 clients

2019-03-07 Thread Simon Kelley
What a strange configuration!

I can sort-of explain what's happening here.

DHCP is a two-phase process: The server first suggests an address, then
the client accepts it and tells the server that it will be using the
address.

In dnsmasq, the first phase does not reserve an address. It's completely
idempotent. The client is given a suggested address, but there's nothing
to stop the same address being suggested to another client until the
first one comes along and reserves it. The address suggested to a client
is determined in part by a hash of the client's MAC address or some
other unique feature, so that clashes are very rare.

However in this case, you have dhcp ranges holding only two addresses.
Whilst the first range has at least one free address, it will be used to
suggest the address to use. The hash doesn't  work: if there's only one
free address, then that will be suggested and the hash can't change it.

So when lots of clients come along at once and ask for an address, they
all get one of the two addresses from the first dhcp-range. When they
come back to comfirm the address, all but two are refused because the
address in already in use.

If the clients come along one at a time, the addresses that are already
committed to the earlier clients don't get suggested, and the clients
get an address which they can sucessfuly commit.



The fix is to use a more conventional dhcp-range configuration. Another
possible fix might be to use the  --dhcp-sequential-ip  setting. That
_might_ behave more sanely under these conditions, but I've not tested
it, so no guarantees.

Cheers,

Simon.



On 07/02/2019 10:12, P, Sreelakshmi wrote:
> Hi All,
> 
>  
> 
> I’m trying to simulate DHCPv6 clients from IXIA and observe that only 1
> or 2 clients gets honored with IPv6 address when simultaneous requests
> are sent from 64 clients, but the same thing works if the request is
> made one after the other sequentially.
> 
>  
> 
> *_Configuration below:_*
> 
>  
> 
>     log-facility=/var/log/dnsmasq_swns/dnsmasq6.log
> 
> port=0
> 
> dhcp-script=/usr/bin/dhcp_server_leases
> 
> leasefile-ro
> 
> dhcp-lease-max=64000
> 
> bind-dynamic
> 
> dhcp-range=set:default+test,2000::e:2,2000::e:3
> 
> dhcp-range=set:default+test,2000::27:1,2000::27:2
> 
> dhcp-range=set:default+test,2000::16:1,2000::16:2
> 
> dhcp-range=set:default+test,2000::7:1,2000::7:2
> 
> dhcp-range=set:default+test,2000::26:1,2000::26:2
> 
> dhcp-range=set:default+test,2000::3b:1,2000::3b:2
> 
> dhcp-range=set:default+test,2000::32:1,2000::32:2
> 
> dhcp-range=set:default+test,2000::40:1,2000::40:2
> 
> dhcp-range=set:default+test,2000::28:1,2000::28:2
> 
> dhcp-range=set:default+test,2000::1b:1,2000::1b:2
> 
> dhcp-range=set:default+test,2000::3f:1,2000::3f:2
> 
> dhcp-range=set:default+test,2000::12:1,2000::12:2
> 
> dhcp-range=set:default+test,2000::9:1,2000::9:2
> 
> dhcp-range=set:default+test,2000::d:1,2000::d:2
> 
> dhcp-range=set:default+test,2000::36:1,2000::36:2
> 
> dhcp-range=set:default+test,2000::24:1,2000::24:2
> 
> dhcp-range=set:default+test,2000::1f:1,2000::1f:2
> 
> dhcp-range=set:default+test,2000::34:1,2000::34:2
> 
> dhcp-range=set:default+test,2000::21:1,2000::21:2
> 
> dhcp-range=set:default+test,2000::3a:1,2000::3a:2
> 
> dhcp-range=set:default+test,2000::17:1,2000::17:2
> 
> dhcp-range=set:default+test,2000::3d:1,2000::3d:2
> 
> dhcp-range=set:default+test,2000::1:1,2000::1:2
> 
> dhcp-range=set:default+test,2000::f:1,2000::f:2
> 
> dhcp-range=set:default+test,2000::22:1,2000::22:2
> 
> dhcp-range=set:default+test,2000::14:1,2000::14:2
> 
> dhcp-range=set:default+test,2000::2c:1,2000::2c:2
> 
> dhcp-range=set:default+test,2000::19:1,2000::19:2
> 
> dhcp-range=set:default+test,2000::1d:1,2000::1d:2
> 
> dhcp-range=set:default+test,2000::2:1,2000::2:2
> 
> dhcp-range=set:default+test,2000::37:1,2000::37:2
> 
> dhcp-range=set:default+test,2000::a:1,2000::a:2
> 
> dhcp-range=set:default+test,2000::38:1,2000::38:2
> 
> dhcp-range=set:default+test,2000::2a:1,2000::2a:2
> 
> dhcp-range=set:default+test,2000::23:1,2000::23:2
> 
> dhcp-range=set:default+test,2000::2b:1,2000::2b:2
> 
> dhcp-range=set:default+test,2000::4:1,2000::4:2
> 
> dhcp-range=set:default+test,2000::15:1,2000::15:2
> 
> dhcp-range=set:default+test,2000::8:1,2000::8:2
> 
> dhcp-range=set:default+test,2000::35:1,2000::35:2
> 
> dhcp-range=set:default+test,2000::1e:1,2000::1e:2
> 
> dhcp-range=set:default+test,2000::b:1,2000::b:2
> 
> dhcp-range=set:default+test,2000::3c:1,2000::3c:2
> 
> dhcp-range=set:default+test,2000::25:1,2000::25:2
> 
> dhcp-range=set:default+test,2000::3:1,2000::3:2
> 
> dhcp-range=set:default+test,2000::33:1,2000::33:2
> 
> dhcp-range=set:default+test,2000::31:1,2000::31:2
> 
> dhcp-range=set:default+test,2000::6:1,2000::6:2
> 
> dhcp-range=set:default+test,2000::18:1,2000::18:2
> 
> dhcp-range=set:default+test,2000::11:1,2000::11:2
> 
> dhcp-range=set:default+test,2000::1a:1,2000::1a:2
> 
> 

[Dnsmasq-discuss] "No IPv6 address available" for bulk request from IXIA DHCPv6 clients

2019-02-07 Thread P, Sreelakshmi
Hi All,

I'm trying to simulate DHCPv6 clients from IXIA and observe that only 1 or 2 
clients gets honored with IPv6 address when simultaneous requests are sent from 
64 clients, but the same thing works if the request is made one after the other 
sequentially.

Configuration below:

log-facility=/var/log/dnsmasq_swns/dnsmasq6.log
port=0
dhcp-script=/usr/bin/dhcp_server_leases
leasefile-ro
dhcp-lease-max=64000
bind-dynamic
dhcp-range=set:default+test,2000::e:2,2000::e:3
dhcp-range=set:default+test,2000::27:1,2000::27:2
dhcp-range=set:default+test,2000::16:1,2000::16:2
dhcp-range=set:default+test,2000::7:1,2000::7:2
dhcp-range=set:default+test,2000::26:1,2000::26:2
dhcp-range=set:default+test,2000::3b:1,2000::3b:2
dhcp-range=set:default+test,2000::32:1,2000::32:2
dhcp-range=set:default+test,2000::40:1,2000::40:2
dhcp-range=set:default+test,2000::28:1,2000::28:2
dhcp-range=set:default+test,2000::1b:1,2000::1b:2
dhcp-range=set:default+test,2000::3f:1,2000::3f:2
dhcp-range=set:default+test,2000::12:1,2000::12:2
dhcp-range=set:default+test,2000::9:1,2000::9:2
dhcp-range=set:default+test,2000::d:1,2000::d:2
dhcp-range=set:default+test,2000::36:1,2000::36:2
dhcp-range=set:default+test,2000::24:1,2000::24:2
dhcp-range=set:default+test,2000::1f:1,2000::1f:2
dhcp-range=set:default+test,2000::34:1,2000::34:2
dhcp-range=set:default+test,2000::21:1,2000::21:2
dhcp-range=set:default+test,2000::3a:1,2000::3a:2
dhcp-range=set:default+test,2000::17:1,2000::17:2
dhcp-range=set:default+test,2000::3d:1,2000::3d:2
dhcp-range=set:default+test,2000::1:1,2000::1:2
dhcp-range=set:default+test,2000::f:1,2000::f:2
dhcp-range=set:default+test,2000::22:1,2000::22:2
dhcp-range=set:default+test,2000::14:1,2000::14:2
dhcp-range=set:default+test,2000::2c:1,2000::2c:2
dhcp-range=set:default+test,2000::19:1,2000::19:2
dhcp-range=set:default+test,2000::1d:1,2000::1d:2
dhcp-range=set:default+test,2000::2:1,2000::2:2
dhcp-range=set:default+test,2000::37:1,2000::37:2
dhcp-range=set:default+test,2000::a:1,2000::a:2
dhcp-range=set:default+test,2000::38:1,2000::38:2
dhcp-range=set:default+test,2000::2a:1,2000::2a:2
dhcp-range=set:default+test,2000::23:1,2000::23:2
dhcp-range=set:default+test,2000::2b:1,2000::2b:2
dhcp-range=set:default+test,2000::4:1,2000::4:2
dhcp-range=set:default+test,2000::15:1,2000::15:2
dhcp-range=set:default+test,2000::8:1,2000::8:2
dhcp-range=set:default+test,2000::35:1,2000::35:2
dhcp-range=set:default+test,2000::1e:1,2000::1e:2
dhcp-range=set:default+test,2000::b:1,2000::b:2
dhcp-range=set:default+test,2000::3c:1,2000::3c:2
dhcp-range=set:default+test,2000::25:1,2000::25:2
dhcp-range=set:default+test,2000::3:1,2000::3:2
dhcp-range=set:default+test,2000::33:1,2000::33:2
dhcp-range=set:default+test,2000::31:1,2000::31:2
dhcp-range=set:default+test,2000::6:1,2000::6:2
dhcp-range=set:default+test,2000::18:1,2000::18:2
dhcp-range=set:default+test,2000::11:1,2000::11:2
dhcp-range=set:default+test,2000::1a:1,2000::1a:2
dhcp-range=set:default+test,2000::3e:1,2000::3e:2
dhcp-range=set:default+test,2000::2d:1,2000::2d:2
dhcp-range=set:default+test,2000::2e:1,2000::2e:2
dhcp-range=set:default+test,2000::39:1,2000::39:2
dhcp-range=set:default+test,2000::30:1,2000::30:2
dhcp-range=set:default+test,2000::5:1,2000::5:2
dhcp-range=set:default+test,2000::10:1,2000::10:2
dhcp-range=set:default+test,2000::c:1,2000::c:2
dhcp-range=set:default+test,2000::2f:1,2000::2f:2
dhcp-range=set:default+test,2000::29:1,2000::29:2
dhcp-range=set:default+test,2000::20:1,2000::20:2
dhcp-range=set:default+test,2000::1c:1,2000::1c:2
dhcp-range=set:default+test,2000::13:1,2000::13:2
# ---

Interface IP:

root@8320:~# ip -6 addr
1: lo:  mtu 65536 state UNKNOWN qlen 1
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: bridge-vrf:  mtu 9198 state UP qlen 1000
inet6 fe80::1c5c:2ff:fe4f:8fb8/64 scope link
   valid_lft forever preferred_lft forever
3: tap-br0@tap0:  mtu 9198 state UP qlen 1000
inet6 fe80::e8fb:ecff:fed5:1091/64 scope link
   valid_lft forever preferred_lft forever
4: tap0@tap-br0:  mtu 9198 state UP qlen 1000
inet6 fe80::1/64 scope link
   valid_lft forever preferred_lft forever
inet6 fe80::bc2b:37ff:fe5c:be11/64 scope link
   valid_lft forever preferred_lft forever
61: vlan1@bridge_normal:  mtu 1500 state UP 
qlen 1000
inet6 2000::e:1/64 scope global
   valid_lft forever preferred_lft forever
inet6 fe80::cc37:ab80:1be:a7a/64 scope link
   valid_lft forever preferred_lft forever

Logs attached for both cases. It throws error "no address available" even 
though configured ranges can provide 64 IPs. Is there any known issues with 
Ixia DHCPv6 client ? What is the best tool to do performance testing of dnsmasq 
DHCPv6 server ?

Regards,
Sree
Feb  7 08:22:28 dnsmasq-dhcp[25973]: DHCPSOLICIT(m1s1p1) 
00:03:00:01:00:11:01:00:00:0f
Feb  7 08:22:28 dnsmasq-dhcp[25973]: DHCPADVERTISE(m1s1p1) 2000::e:3