[Kea-users] perfdhcp error

Tomek Mrugalski tomasz at isc.org
Wed Sep 2 10:33:58 UTC 2015


On 02/09/15 07:32, Vikram Hosakote (vhosakot) wrote:
> I have been running perfdhcp using an interface inside a Linux namespace 
> successfully. I have also been able to successfully run multiple
> instances of perfdhcp using interfaces in multiple namespaces simultaneously.
Cool. Thanks for sharing this info.

> But, when I have 2,000 namespaces and run perfdhcp inside each of these
> namespaces, I see that perfdhcp throws the following error even though the 
> interface used by perfdhcp has an IP address. This error is NOT seen when I
> run perfdhcp instances in a few (100-200) namespaces but is seen when I
> run them in 2,000 namespaces.
I'm not familiar with the namespaces you mention, but I presume each
namespace creates its own network interface that is visible through ip,
right?

So when creating 2000 namespaces, how many network interfaces are
reported by sudo ip l? I think you may have hit the boundary of our
netlink interface that assumes that the information about interfaces
will not be larger than 32KB. If my theory is right, the info provided
by the kernel is larger than the buffer we provide (32K), so it's
getting truncated and we parse only the first 32KB of data. That means
that if you have a lot (2000 you mentioned definitely falls into that
category)
of interfaces, only the initial couple hundred would be visible by
perfdhcp (or kea for that matter, as they share libdhcp++).

Can you do an experiment? Please configure 2000 namespaces and get a
list interfaces: ip l. Try to run perfdhcp on one of the first 50 or so
interfaces. If my theory is right, it should work. Now try to run it on
one of the last interfaces returned by ip l. It should fail.

If that is so, I have an easy fix for you. Open
src/lib/dhcp/iface_mgr_linux.cc and see lines 123, 125. There are
SNDBUF_SIZE and RCVBUF_SIZE. Please increase RCVBUF_SIZE and see if it
helps.

Tomek

> 
> Error running perfdhcp: There is no address for interface:
> tapa748acb8-a1, port: 67, address  family: AF_INET
> 
> Below is the interface tapa748acb8-a1 (inside the namespace 
> testns-DHCP-network-0) that has the IP address 1.0.0.1. The interface is up.
> 
> # sudo ip netns exec testns-DHCP-network-0 ifconfig
> tapa748acb8-a1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 1.0.0.1  netmask 255.255.255.0  broadcast 1.0.0.255
>         ether ee:ff:ff:ff:ff:ef  txqueuelen 0  (Ethernet)
>         RX packets 138  bytes 9280 (9.0 KiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 45  bytes 3590 (3.5 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> Below is the perfdhcp output (with verbose diagnostics enabled). Could you 
> please let me know what the issue is. What am I missing ? Is this a 
> scale/concurrency issue ? The same exact perfdhcp command below works 
> perfectly fine when I have a few (100-200) namespaces and run perfdhcp
> instances using interfaces in them.
> 
> # sudo ip netns exec testns-DHCP-network-0 /usr/local/sbin/perfdhcp -x
> aeistT -4 -b mac=fa:16:00:00:00:00 -r 5 -R 5 -p 10 -l tapa748acb8-a1
> Running: perfdhcp -x aeistT -4 -b mac=fa:16:00:00:00:00 -r 5 -R 5 -p 10
> -l tapa748acb8-a1
> IPv4
> lease-type=address-only (IA_NA option added to the client's request)
> rate[1/s]=5
> clients=5
> base[0]=mac=fa:16:00:00:00:00
> test-period=10
> drop-time[0]=1
> drop-time[1]=1
> aggressivity=1
> broadcast
> elp-offset=-1
> sid-offset=-1
> rip-offset=-1
> diagnostic-selectors=aeistT
> interface=tapa748acb8-a1
> server=255.255.255.255
> Set MAC to fa::16::00::00::00::00
> Set DUID to 000100011d793ce4000c01020304
> Error running perfdhcp: There is no address for interface:
> tapa748acb8-a1, port: 67, address  family: AF_INET
> # 
> 
> 
> Regards,
> Vikram Hosakote
> OpenStack Software Engineer
> vhosakot at cisco.com <mailto:vhosakot at cisco.com>
> Cloud and Virtualization Group
> Cisco Systems
> Boxborough, MA, USA
> 
> 
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
> 




More information about the Kea-users mailing list