[Kea-users] Running perfDHCP with interface in a bridge

Vikram Hosakote (vhosakot) vhosakot at cisco.com
Tue Jun 2 19:39:54 UTC 2015


Hi Marcin,

I was using a wrong tap interface for the -l argument. Sorry about it :)

After I used the right interface for -l, perfdhcp works like a charm now! :)

Have a great day!

Regards,
Vikram Hosakote
OpenStack Software Engineer    |    vhosakot at cisco.com<mailto:vhosakot at cisco.com>
Cloud and Virtualization Group  |    Cisco Systems

From: Marcin Siodelski <marcin at isc.org<mailto:marcin at isc.org>>
Date: Tuesday, June 2, 2015 at 3:25 PM
To: Vikram Hosakote <vhosakot at cisco.com<mailto:vhosakot at cisco.com>>, "kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>" <kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>>
Subject: Re: [Kea-users] Running perfDHCP with interface in a bridge

I am glad that it works for you. What has changed in your setup that it
started to work? Did you use different port as I suggested?

Marcin

On 02.06.2015 21:09, Vikram Hosakote (vhosakot) wrote:
Hi Marcin,
Hope you are doing good, and hope you enjoyed your conference!
Thanks for your reply! Very sorry for my reply.
Just wanted to let you know that perfdhcp is working perfectly fine for
me :)
I am running the following command.
sudo ip netns exec test-namespace /usr/local/sbin/perfdhcp -4 -b
mac=fa:16:00:00:00:00 -r 50 -R 50 -p 120 -l tapfce197b0-d5
Thanks a lot for all your help!
Regards,
Vikram Hosakote
OpenStack Software Engineer    |    vhosakot at cisco.com<mailto:vhosakot at cisco.com>
Cloud and Virtualization Group  |    Cisco System
From: Marcin Siodelski <marcin at isc.org<mailto:marcin at isc.org> <mailto:marcin at isc.org>>
Date: Tuesday, March 24, 2015 at 5:40 PM
To: Vikram Hosakote <vhosakot at cisco.com<mailto:vhosakot at cisco.com> <mailto:vhosakot at cisco.com>>,
"kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>"
<kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>>
Subject: Re: [Kea-users] Running perfDHCP with interface in a bridge
Hi Vikram,
I am currently on the conference and I will not have much time to focus
on that issue during this week.
I just had quick reading of it. From the server's standpoint the
perfdhcp acts as a relay agent and it works on the same port 67 as the
server. Binding both perfdhcp and the server to the same port on the
same interface results in a conflict and I presume this is why the
perfdhcp refuses to bind. It would be actually good if you could turn
the server off and rerun perfdhcp and see if it overcomes the "bind"
error. Obviously the perfdhcp will get no responses because the server
is down, but it would be a proof for me that this is a conflict between
the server and perfdhcp being bound to the same port.
Once you use the -L parameter and set a different local port for
perfdhcp there is no conflict anymore and it seems to work. But, in this
case the server receives the queries from perfdhcp from a different port
than standard DHCP port, in which case the server may either drop them
or may respond to port 67 which perfdhcp is not listening on.
Do you have any packet capture to see if the server is actually
responding? Do you know if dnsmasq responds to the port other than 67 or
68, if it receives the message from such port?
>From the reading of
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
it may be possible to change the default ports using the
"--dhcp-alternate-port" parameter.
Marcin
On 2015-03-23 20:56, Vikram Hosakote (vhosakot) wrote:
     Hi Marcin,
     Hope you are doing good!
     I have two tap interfaces inside a namespace, and the DHCP server
     (dnsmasq)
     30.30.30.3 is running on tap05f30e85-d2 listening on the DHCP server UDP
     port 67.
     Below are the IP addresses of the two tap interfaces inside the
     namespace
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be.
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be ip a
     21: tap05f30e85-d2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
     noqueue state UNKNOWN
           link/ether fa:16:3e:25:71:de brd ff:ff:ff:ff:ff:ff
           inet 30.30.30.3/24 brd 30.30.30.255 scope global tap05f30e85-d2
           inet6 fe80::f816:3eff:fe25:71de/64 scope link
     22: tap883a32b1-77: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
     noqueue state UNKNOWN
           link/ether fa:16:3e:6e:90:e7 brd ff:ff:ff:ff:ff:ff
           inet 30.30.30.101/24 brd 30.30.30.255 scope global tap883a32b1-77
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be ifconfig -a
     tap05f30e85-d2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
               inet 30.30.30.3  netmask 255.255.255.0  broadcast 30.30.30.255
               inet6 fe80::f816:3eff:fe25:71de  prefixlen 64  scopeid
     0x20<link>
               ether fa:16:3e:25:71:de  txqueuelen 0  (Ethernet)
               RX packets 105  bytes 27577 (26.9 KiB)
               RX errors 0  dropped 0  overruns 0  frame 0
               TX packets 42  bytes 6301 (6.1 KiB)
               TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
     tap883a32b1-77: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
               inet 30.30.30.101  netmask 255.255.255.0  broadcast
     30.30.30.255
               ether fa:16:3e:6e:90:e7  txqueuelen 0  (Ethernet)
               RX packets 36  bytes 5793 (5.6 KiB)
               RX errors 0  dropped 0  overruns 0  frame 0
               TX packets 110  bytes 27995 (27.3 KiB)
               TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
     Below is the DHCP server (dnsmasq) 30.30.30.3 running on tap05f30e85-d2
     listening on the DHCP server UDP port 67.
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be netstat -pan | grep 67
     udp        0      0 0.0.0.0:67              0.0.0.0:*
               18837/dnsmasq
     I ran perfdhcp inside the namespace
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be
     to simulate DHCP clients in order to receive DHCP responses from the
     DHCP server
     (30.30.30.3 running on tap05f30e85-d2 listening on the DHCP server UDP
     port 67).
     But, I keep seeing the errors below. When I use the non-default local
     DHCP port
     (-L 10067), I don’t see any errors, but I don’t see any responses from
     the DHCP server (dnsmasq).
     Could you please let me know what I am missing. I am using the latest
     version of
     perfdhcp (0.9.1-beta). Thanks a lot!
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 30.30.30.3
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 30.30.30.3
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     server=30.30.30.3
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca3170a000c01020304
     Error running perfdhcp: Failed to bind socket 3 to 30.30.30.3/port=67
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l tap883a32b1-77 30.30.30.3
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l
     tap883a32b1-77 30.30.30.3
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     interface=tap883a32b1-77
     server=30.30.30.3
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca3171a000c01020304
     Error running perfdhcp: Failed to bind socket 3 to 30.30.30.101/port=67
     ********************************
     The following works but I see no responses from the DHCP server
     30.30.30.3 (dnsmasq).
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l tap883a32b1-77 -L 10067 30.30.30.3
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l
     tap883a32b1-77 -L 10067 30.30.30.3
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     local-port=10067
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     interface=tap883a32b1-77
     server=30.30.30.3
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31722000c01020304
     ^CFailed to receive DHCPv4 packet: Interrupted system call
     ***Rate statistics***
     Rate: 0 exchanges/second, expected rate: 1 exchanges/second
     ***Statistics for: DISCOVER-OFFER***
     sent packets: 3
     received packets: 0
     drops: 3
     Delay summary unavailable! No packets received.
     ***Statistics for: REQUEST-ACK***
     sent packets: 0
     received packets: 0
     drops: 0
     Delay summary unavailable! No packets received.
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 all
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 all
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     broadcast
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     server=255.255.255.255
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31739000c01020304
     Error running perfdhcp: failed to connect to remote endpoint.
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l tap883a32b1-77 all
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l
     tap883a32b1-77 all
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     broadcast
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     interface=tap883a32b1-77
     server=255.255.255.255
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31756000c01020304
     Error running perfdhcp: Failed to bind socket 3 to 30.30.30.101/port=67
     ********************************
     The following works but I see no responses from the DHCP server
     30.30.30.3 (dnsmasq).
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l tap883a32b1-77 -L 10067 all
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l
     tap883a32b1-77 -L 10067 all
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     local-port=10067
     broadcast
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     interface=tap883a32b1-77
     server=255.255.255.255
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca3175b000c01020304
     ^CFailed to receive DHCPv4 packet: Interrupted system call
     ***Rate statistics***
     Rate: 0 exchanges/second, expected rate: 1 exchanges/second
     ***Statistics for: DISCOVER-OFFER***
     sent packets: 2
     received packets: 0
     drops: 2
     Delay summary unavailable! No packets received.
     ***Statistics for: REQUEST-ACK***
     sent packets: 0
     received packets: 0
     drops: 0
     Delay summary unavailable! No packets received.
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 all
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 all
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     broadcast
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     server=255.255.255.255
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca3176f000c01020304
     Error running perfdhcp: failed to connect to remote endpoint.
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 30.30.30.3
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 30.30.30.3
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     server=30.30.30.3
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31778000c01020304
     Error running perfdhcp: Failed to bind socket 3 to 30.30.30.3/port=67
     ********************************
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l tap883a32b1-77
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -l
     tap883a32b1-77
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     broadcast
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     interface=tap883a32b1-77
     server=255.255.255.255
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31907000c01020304
     Error running perfdhcp: Failed to bind socket 3 to 30.30.30.101/port=67
     ********************************
     The following works but I see no responses from the DHCP server
     30.30.30.3 (dnsmasq).
     [root at controller DHCP_CPNR_dev(keystone_admin)]# sudo ip netns exec
     qdhcp-9a5bcbe7-7f29-4eab-9296-207ea3a6b1be /usr/local/sbin/perfdhcp -x a
     -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -L 10067 30.30.30.3
     Running: perfdhcp -x a -4 -b mac=fa:16:3e:6e:90:e7 -r 1 -L 10067
     30.30.30.3
     IPv4
     lease-type=address-only (IA_NA option added to the client's request)
     rate[1/s]=1
     base[0]=mac=fa:16:3e:6e:90:e7
     drop-time[0]=1
     drop-time[1]=1
     aggressivity=1
     local-port=10067
     elp-offset=-1
     sid-offset=-1
     rip-offset=-1
     diagnostic-selectors=a
     server=30.30.30.3
     Set MAC to fa::16::3e::6e::90::e7
     Set DUID to 000100011ca31937000c01020304
     ^CFailed to receive DHCPv4 packet: Interrupted system call
     ***Rate statistics***
     Rate: 0 exchanges/second, expected rate: 1 exchanges/second
     ***Statistics for: DISCOVER-OFFER***
     sent packets: 4
     received packets: 0
     drops: 4
     Delay summary unavailable! No packets received.
     ***Statistics for: REQUEST-ACK***
     sent packets: 0
     received packets: 0
     drops: 0
     Delay summary unavailable! No packets received.
     [root at controller DHCP_CPNR_dev(keystone_admin)]#
     Regards,
     Vikram Hosakote
     OpenStack Software Engineer    |    vhosakot at cisco.com<mailto:vhosakot at cisco.com>
     <mailto:vhosakot at cisco.com>
     Cloud and Virtualization Group  |    Cisco System
     From: Vikram Hosakote <vhosakot at cisco.com<mailto:vhosakot at cisco.com>
     <mailto:vhosakot at cisco.com> <mailto:vhosakot at cisco.com>>
     Date: Friday, March 6, 2015 at 1:50 PM
     To: Marcin Siodelski <marcin at isc.org<mailto:marcin at isc.org> <mailto:marcin at isc.org>
     <mailto:marcin at isc.org>>,
     "kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>"
     <kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>>
     Subject: Re: [Kea-users] Running perfDHCP with interface in a bridge
     Hi Marcin,
     Firstly, thanks a lot for your reply :) I thought I would never get a
     reply as I got
     an email saying that my email will be held until the list moderator
     approves it
     as I am not a member of kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>. How did you see my email ? :)
     Looks like the list moderator approved my email. Thanks to the list
     moderator
     as well :)
     Secondly, thanks for the info. Sure, I will run perfDHCP with a tap
     interface in a
     bridge, and will let you know if I see any issues.
     Thanks again!
     The very reason humans have been successful is because they help,
     and they
     help strangers.
     Regards,
     Vikram Hosakote
     OpenStack Software Engineer    | vhosakot at cisco.com<mailto:vhosakot at cisco.com>
     <mailto:vhosakot at cisco.com>
     <mailto:vhosakot at cisco.com>
     Cloud and Virtualization Group  |    Cisco Systems
     From: Marcin Siodelski <marcin at isc.org<mailto:marcin at isc.org> <mailto:marcin at isc.org>
     <mailto:marcin at isc.org>>
     Date: Friday, March 6, 2015 at 7:16 AM
     To: Vikram Hosakote <vhosakot at cisco.com<mailto:vhosakot at cisco.com> <mailto:vhosakot at cisco.com>
     <mailto:vhosakot at cisco.com>>,
     "kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>"
     <kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <mailto:kea-users at lists.isc.org>
     <mailto:kea-users at lists.isc.org>>
     Subject: Re: [Kea-users] Running perfDHCP with interface in a bridge
     Hi Vikram,
     On 03/05/15 23:26, Vikram Hosakote (vhosakot) wrote:
          Hi,
          We are using perfDHCP to scale DHCP, and found the following
     link that
          says "perfdhcp does not seem to run if perfdhcp boxes have multiple
          bridge
          interfaces”. Is this true ?
          Please search “bridge” in the following link.
          http://lost-and-found-narihiro.blogspot.com/2013_04_01_archive.html
     AFAIK, the use of multiple bridge interfaces shouldn't cause any issues
     for perfdhcp. From this blog I don't exactly know what the problem could
     have been. The error message is cryptic but it doesn't seem to be
     related to the fact that the "eth1" interface wasn't not supported.
     I was recently using the perfdhcp on CentOS and didn't observe those
     issues.
     Please note that the latest version of perfdhcp is available with the
     Kea DHCP server 0.9.1-beta version, released on February 18th. I
     recommend to use this version. The versions shipped with BIND10 is old
     and there have been some improvements and fixes since then.
     Useful links:
     http://ftp.isc.org/isc/kea/
     http://kea.isc.org/wiki
          We would like to use perfDHCP with tap interfaces part of a bridge.
          Is this
          possible ? Can we run perfDHCP by passing a tap interface part of a
          bridge
          to the -l argument ?
     I don't see why this wouldn't work. It would be best if you could try
     running perfdhcp in your environment and in case you find any issues let
     us know and we can work together to reproduce the problem.
     Marcin Siodelski
     DHCP Software Engineer @ ISC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20150602/7e2f82d5/attachment.htm>


More information about the Kea-users mailing list