lost and found ( for me ? )

NSD3.2.15: query rate limiting


about NSD query rate limiting



[root@localhost ~]# cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
[root@localhost ~]# uname -ri
3.8.8-202.fc18.x86_64 x86_64

install NSD over yum
[root@localhost ~]# yum install -y nsd

[root@localhost ~]# nsd -v
NSD version 3.2.15
Written by NLnet Labs.

Copyright (C) 2001-2011 NLnet Labs.  This is free software.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.


configuration file
[root@localhost ~]# cd /etc/nsd/
[root@localhost nsd]# ls
nsd.conf

seen from man “nsd.conf” , fedora’s nsd package has been compiled with --enable-ratelimit.

man nsd.conf
server option

      rrl-size: <numbuckets>
             This  option  gives  the size of the hashtable. Default 1000000.
             More buckets use more memory, and reduce the chance of hash col‐
             lisions.

      rrl-ratelimit: <qps>
             The max qps allowed (from one query source). Default 200 qps. If
             set to 0 then it is disabled  (unlimited  rate),  also  set  the
             whilelist-ratelimit  to  0  to disable ratelimit processing.  If
             you set verbosity to 2 the blocked  and  unblocked  subnets  are
             logged.   Blocked queries are blocked and some receive TCP fall‐
             back replies.

      rrl-whitelist-ratelimit: <qps>
             The max qps for query  sorts  for  a  source,  which  have  been
             whitelisted. Default 2000 qps. With the rrl-whitelist option you
             can set specific queries to receive this qps  limit  instead  of
             the normal limit.  With the value 0 the rate is unlimited.


zone option

      rrl-whitelist: <rrltype>
             This  option  causes  queries of this rrltype to be whitelisted,
             for this zone. They receive  the  whitelist-ratelimit.  You  can
             give   multiple   lines,  each  enables  a  new  rrltype  to  be
             whitelisted for the zone. Default has none whitelisted. The rrl‐
             type  is  the  query  classification that the NSD RRL employs to
             make different types not interfere with one another.  The  types
             are  logged  in  the  loglines when a subnet is blocked (in ver‐
             bosity 2).  The RRL classification types are:  nxdomain,  error,
             referral, any, rrsig, wildcard, nodata, dnskey, positive, all.


nsd.conf
NSD is serving one zone “foo.com”
# egrep -v "#" nsd.conf | grep -v ^$
server:
ip4-only: yes
server-count: 1
pidfile: "/var/run/nsd/nsd.pid"
database: /var/lib/nsd/nsd.db
zone:
name: "foo.com"
zonefile: "/etc/nsd/zone_files/foo.com.db"




# dig @127.1 www.foo.com

; <<>> DiG 9.9.2-rl.028.23-P2-RedHat-9.9.2-10.P2.fc18 <<>> @127.1 www.foo.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37147
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.foo.com. IN A

;; ANSWER SECTION:
www.foo.com. 60 IN A 127.0.0.1

;; AUTHORITY SECTION:
foo.com. 60 IN NS ns1.foo.com.foo.com.
foo.com. 60 IN NS ns2.foo.com.foo.com.



configure rate limit.

# egrep -v "#" nsd.conf | grep -v ^$
server:
hide-version: yes
verbosity: 2
ip4-only: yes
server-count: 1
pidfile: "/var/run/nsd/nsd.pid"
rrl-ratelimit: 10
rrl-whitelist-ratelimit: 100
database: /var/lib/nsd/nsd.db
zone:
name: "foo.com"
zonefile: "/etc/nsd/zone_files/foo.com.db"
rrl-whitelist: nxdomain
rrl-whitelist: nodata

when sending “www.foo.com a” query at 300 qps.
NSD blocked
Apr 26 02:38:54 localhost nsd[1797]: ratelimit block www.foo.com. type positive target 192.168.11.0/24
Apr 26 02:39:23 localhost nsd[1797]: ratelimit unblock www.foo.com. type positive target 192.168.11.0/24

as for whitelist query type ( “nxdomain” and ”nodate” ) , NSD will block query if qps is over 100.

[ when qps is under 100. NSD does not block ]

send 50 NXDOMAIN QPS
all queries succeed.
# dnsperf -s 192.168.11.42 -d query_list.txt -Q 50 -l 100
Statistics:

 Queries sent:         500
 Queries completed:    500 (100.00%)
 Queries lost:         0 (0.00%)

 Response codes:       NXDOMAIN 500 (100.00%)
 Average packet size:  request 28, response 79
 Run time (s):         10.000201
 Queries per second:   49.998995

 Average Latency (s):  0.000400 (min 0.000245, max 0.001611)
 Latency StdDev (s):   0.000061





no logs

[ when qps is over 100. NSD blocked ]

send 200 NXDOMAIN QPS. NSD blocked.
# dnsperf -s 192.168.11.42 -d query_list.txt -Q 200 -l 10
Statistics:

 Queries sent:         810
 Queries completed:    610 (75.31%)
 Queries lost:         200 (24.69%)

 Response codes:       NXDOMAIN 610 (100.00%)
 Average packet size:  request 28, response 63
 Run time (s):         10.000159
 Queries per second:   60.999030

 Average Latency (s):  0.000431 (min 0.000094, max 0.002196)
 Latency StdDev (s):   0.000257

NSD blocked.
Apr 26 02:41:47 localhost nsd[1797]: ratelimit block foo.com. type nxdomain(whitelisted) target 192.168.11.0/24

install NSD 3.2.15 on CentOS6



# cat /etc/centos-release
CentOS release 6.4 (Final)
# uname -ri
2.6.32-358.2.1.el6.x86_64 x86_64

install epel repo to install pdns via yum.
# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum install nsd -y

# nsd -v
NSD version 3.2.15
Written by NLnet Labs.

Copyright (C) 2001-2011 NLnet Labs.  This is free software.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

/etc/nsd/nsd.conf
# egrep -v "#" nsd.conf | egrep -v ^$
server:
        ip6-only: no

        database: "/var/lib/nsd/nsd.db"
        server-count: 1
        zonesdir: "/etc/nsd"
zone:
       name: foo.com
       zonefile: foo.com.db

sotre zone file ( foo.com.db ) under /etc/nsd directory
# ls /etc/nsd/
foo.com.db  nsd.conf

start nsd
# /etc/init.d/nsd restart

# dig @127.1 www.foo.com +norec +short
127.0.0.1

restart nsd
# nsdc rebuild
zonec: reading zone "foo.com".
zonec: processed 4000 RRs in "foo.com".
global_region: 8053 objects (8052 small/1 large), 113920 bytes allocated (4087 wasted) in 28 chunks, 2030 cleanups, 0 in recyclebin
db->region: 4076 objects (4076 small/0 large), 273624 bytes allocated (5129 wasted) in 67 chunks, 66 cleanups, 1056 in recyclebin 0 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

zonec: done with no errors.

To serve multiple zones , add zones like this:

nsd.conf
zone:
       name: "foo.com"
       zonefile: "foo.com.db"

       name: "bar.com"
       zonefile: "bar.com.db"

# /etc/init.d/nsd restart

install PowerDNS on CentOS6.4 64bit



# cat /etc/centos-release
CentOS release 6.4 (Final)
# uname -ri
2.6.32-358.2.1.el6.x86_64 x86_64

install epel repo to install pdns via yum.
# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

install MySQL
# yum install -y mysql mysql-server

start MySQL
# /etc/init.d/mysqld start

creat a user
# mysqladmin -u root password passwd

install PowerDNS via yum
# yum install -y pdns pdns-backend-mysql

configure DB for powerDNS
# mysql -u root -p
mysql> CREATE DATABASE powerdns;

mysql> GRANT ALL ON powerdns.* TO 'pdns_admin'@'localhost' IDENTIFIED BY 'passwd';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL ON powerdns.* TO 'pdns_admin'@'localhost.localdomain' IDENTIFIED BY 'passwd';
Query OK, 0 rows affected (0.00 sec)

mysql>  FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql>  USE powerdns;
Database changed
mysql>  CREATE TABLE domains (
   ->  id INT auto_increment,
   ->  name VARCHAR(255) NOT NULL,
   ->  master VARCHAR(128) DEFAULT NULL,
   ->  last_check INT DEFAULT NULL,
   ->  type VARCHAR(6) NOT NULL,
   ->  notified_serial INT DEFAULT NULL,
   ->  account VARCHAR(40) DEFAULT NULL,
   ->  primary key (id)
   ->  );
CREATE UNIQUE INDEX name_index ON domains(name);
CREATE TABLE records (
Query OK, 0 rows affected (0.05 sec)

mysql>  CREATE UNIQUE INDEX name_index ON domains(name);
id INT auto_increment,
domain_id INT DEFAULT NULL,
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>  CREATE TABLE records (
   ->  id INT auto_increment,
   ->  domain_id INT DEFAULT NULL,
   ->  name VARCHAR(255) DEFAULT NULL,
   ->  type VARCHAR(6) DEFAULT NULL,
   ->  content VARCHAR(255) DEFAULT NULL,
   ->  ttl INT DEFAULT NULL,
   ->  prio INT DEFAULT NULL,
   ->  change_date INT DEFAULT NULL,
   ->  primary key(id)
   ->  );
CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
Query OK, 0 rows affected (0.03 sec)

mysql>  CREATE INDEX rec_name_index ON records(name);
CREATE INDEX domain_id ON records(domain_id);
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>  CREATE INDEX nametype_index ON records(name,type);
CREATE TABLE supermasters (
ip VARCHAR(25) NOT NULL,
nameserver VARCHAR(255) NOT NULL,
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>  CREATE INDEX domain_id ON records(domain_id);
account VARCHAR(40) DEFAULT NULL
);Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>  CREATE TABLE supermasters (
   ->  ip VARCHAR(25) NOT NULL,
   ->  nameserver VARCHAR(255) NOT NULL,
   ->  account VARCHAR(40) DEFAULT NULL
   ->  );
Query OK, 0 rows affected (0.05 sec)

mysql> quit
Bye

configure pdns.conf
# egrep -v ^# /etc/pdns/pdns.conf | grep -v ^$
setuid=pdns
setgid=pdns
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=pdns_admin
gmysql-password=passwd
gmysql-dbname=powerdns
master=yes
out-of-zone-additional-processing=yes
slave=no

start pdns
# /etc/init.d/pdns restart
Restarting PowerDNS authoritative nameserver: stopping and waiting..done
Starting PowerDNS authoritative nameserver: started

convert bind config for powerDNS
# zone2sql --named-conf=/etc/named.conf --gmysql > zones.sql
100% done
6 domains were fully parsed, containing 4022 records

import zones.qsl into powerdns database.
# mysql -u root -p powerdns < zones.sql
Enter password:

# dig @127.1 www.foo.com

; <<>> DiG 9.9.2-vjs287.12 <<>> @127.1 www.foo.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11057
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;www.foo.com.                   IN      A

;; ANSWER SECTION:
www.foo.com.            86400   IN      A       127.0.0.1

perfdhcp : DHCP stress tool


perfdhcp on CentOS 6 : fail

perfdhcp on Mint14 : fail
perfdhcp Fedora 18 : success ( as of now )

In my environment , perfdhcp does not seem to run if perfdhcp boxes have multiple bridge interfaces ( virbrX )
In case of CentOS and Mint14 , I’m using KVM on both boxes , which means these boxes have multiple bridge interfaces.
In case of Fedora , that box does not have bridge interfaces.
** please note that this is as-is based info **

about perfdhcp

perfdhcp has been shipped with BIND10 source code.
When compiling BIND10 , perfdhcp will be compiled as well.
Assume that you have already compiled BIND10 from the source code.

[ fail perfdhcp on CentOS6 ]

I compiled BIND10 on CentOS 6.4 64bit box.
# cat /etc/centos-release
CentOS release 6.4 (Final)

# uname -ri
2.6.32-358.2.1.el6.x86_64 x86_64

# bind10 --version
bind10 20110223 (BIND 10 1.0.0)

# /usr/local/bin/perfdhcp –help
Error parsing command line options: unknown command line option
perfdhcp [-hv] [-4|-6] [-r<rate>] [-t<report>] [-R<range>] [-b<base>]
   [-n<num-request>] [-p<test-period>] [-d<drop-time>] [-D<max-drop>]
   [-l<local-addr|interface>] [-P<preload>] [-a<aggressivity>]
   [-L<local-port>] [-s<seed>] [-i] [-B] [-c] [-1]
   [-T<template-file>] [-X<xid-offset>] [-O<random-offset]
   [-E<time-offset>] [-S<srvid-offset>] [-I<ip-offset>]
   [-x<diagnostic-selector>] [-w<wrapped>] [server]

The [server] argument is the name/address of the DHCP server to
contact.  For DHCPv4 operation, exchanges are initiated by
transmitting a DHCP DISCOVER to this address.
<snip>

run perfdhcp
nn , perfdhcp stopped...
# /usr/local/bin/perfdhcp -l eth1
Running: perfdhcp -l eth1
Error running perfdhcp: unknown label character: 101

on ISC-DHCP box
# dhcpd --version
isc-dhcpd-4.2.4

# egrep -v ^# dhcpd.conf | grep -v ^$
INTERFACES="eth3";
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.150.0 netmask 255.255.255.0 {
       interface eth3;
       range 192.168.150.10 192.168.150.200;
       option subnet-mask 255.255.255.0;
       option broadcast-address 192.168.150.255;
       option routers 192.168.150.254;
       ping-check false;
}

# egrep -i udp /var/log/syslog
Apr 18 19:49:03 ubuntu-1 dhcpd: 4 bad udp checksums in 5 packets

the workaround on this error is configuring the following iptables on ISC-DHCP box.
# iptables -A POSTROUTING -t mangle -p udp --dport 67 -j CHECKSUM --checksum-fill

# iptables -n -L -t mangle
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
CHECKSUM   udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:68 CHECKSUM fill
CHECKSUM   udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:67 CHECKSUM fill

try again. ,,, perfdhcp stopped
/usr/local/bin/perfdhcp -l eth1
Running: perfdhcp -l eth1
Error running perfdhcp: unknown label character: 101

check ISC-DHCP box.
perfdhcp is using same MAC address.
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPOFFER on 192.168.150.10 to 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPOFFER on 192.168.150.10 to 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPOFFER on 192.168.150.10 to 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.1
Apr 18 20:12:36 ubuntu-1 dhcpd: DHCPOFFER on 192.168.150.10 to 00:0c:01:02:03:04 via 192.168.150.1

senn from “perfdhcp --help” , default MAC address is 00:0c:01:02:03:04..

-b<base>: The base mac, duid, IP, etc, used to simulate different
   clients.  This can be specified multiple times, each instance is
   in the <type>=<value> form, for instance:
   (and default) mac=00:0c:01:02:03:04.

nnn , still error
# perfdhcp -4 -l eth1 -R 50 -n 1000 -r 10 -x aeistT
Running: perfdhcp -4 -l eth1 -R 50 -n 1000 -r 10 -x aeistT
IPv4
rate[1/s]=10
clients=50
num-request[0]=1000
drop-time[0]=1
drop-time[1]=1
aggressivity=1
broadcast
elp-offset=-1
sid-offset=-1
rip-offset=-1
diagnostic-selectors=aeistT
interface=eth1
server=255.255.255.255
Set MAC to 00::0c::01::02::03::04
Set DUID to 0001000119024e25000c01020304
Error running perfdhcp: unknown label character: 101

[ fail perfdhcp on Mint14]

Okay , I’ll build BIND10 on Mint 14 box and try perfdhcp on that box.
# uname -ri
3.5.0-27-generic x86_64

build BIND10
# git clone git://git.bind10.isc.org/bind10
# cd bind10
# autoreconf --install

# ./configure
configure: WARNING: /usr/bin/python3.2-config does not exist or is not executable, so we could not detect python development environment.  Your system may require an additional package (e.g. "python3-dev").  Alternatively, if you are sure you have python headers and libraries, define PYTHON_INCLUDES and PYTHON_LDFLAGS and run this script.
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: Missing Python.h

# python --version
Python 2.7.3

install python 3.3 via apt-get
# apt-get install python3.3 python3.3-dev -y

# ./configure
hecking botan/botan.h presence... no
checking for botan/botan.h... no
configure: error: Missing required header files.

# apt-get install -y libbotan1.10-dev

# ./configure
checking log4cplus/logger.h usability... no
checking log4cplus/logger.h presence... no
checking for log4cplus/logger.h... no
configure: error: Missing required header files.

# apt-get install -y liblog4cplus-dev

# ./configure
checking boost/shared_ptr.hpp presence... no
checking for boost/shared_ptr.hpp... no
configure: error: Missing required header files.

# apt-get install libboost-all-dev -y

# ./configure
    BIND 10 source configure results:
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Package:
 Name:          bind10
 Version:       20130221

C++ Compiler:    g++

Flags:
 DEFS:          -DHAVE_CONFIG_H
 CPPFLAGS:       -DOS_LINUX  -I$(top_srcdir)/ext/asio -I$(top_srcdir)/ext/coroutine -DASIO_DISABLE_THREADS=1
 CXXFLAGS:      -g -O2
 LDFLAGS:
 B10_CXXFLAGS:   -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Werror -fPIC
 OS Family:     Linux
 Python:        -I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m

                 -L/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu  -Wl,-R/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu
                -lpython3.3
 Boost:
 Botan:         -I/usr/include/botan-1.10

                -lbotan-1.10   -lbotan-1.10
 Log4cplus:
                 -llog4cplus -pthread
 SQLite:
                -lsqlite3

Features:
  SQLite3

Developer:
 Enable Debugging: no
 Google Tests: no
 Valgrind: not found
 C++ Code Coverage: no
 Python Code Coverage: no
 Logger checks: no
 Generate Documentation: no


 Now you can type "make" to build BIND 10

# make
# make install

nn , error ..okay
# /usr/local/sbin/bind10 --version
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 72, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-log.so.1: cannot open shared object file: No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
   from apport.fileutils import likely_packaged, get_recent_crashes
 File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
   from apport.report import Report
 File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
   import apport.fileutils
 File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
   from apport.packaging_impl import impl as packaging
 File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
   import apt
 File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
   import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 72, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-log.so.1: cannot open shared object file: No such file or directory

nnn , I can not find the root cause of this…

compile form soruce code instead of git.

uninstall bind10
# make uninstall

build bind10 from the source code
 636  tar xzvf bind10-1.0.0.tar.gz
 637  cd bind10-1.0.0/
 638  ./configure
 639  make;make install

another error..
# /usr/local/sbin/bind10 –version
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 71, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/__init__.py", line 5, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-cfgclient.so.0: cannot open shared object file: No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
   from apport.fileutils import likely_packaged, get_recent_crashes
 File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
   from apport.report import Report
 File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
   import apport.fileutils
 File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
   from apport.packaging_impl import impl as packaging
 File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
   import apt
 File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
   import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 71, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/__init__.py", line 5, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-cfgclient.so.0: cannot open shared object file: No such file or directory

packages which are required to run bind10 are missing ??
# apt-get install build-essential autoconf libtool pkg-config zlib1g-dev libssl-dev libexpat1-dev libreadline6-dev libboost-all-dev libbotan1.10-dev liblog4cplus-dev libsqlite3-dev python3.3-dev sqlite3 python3-setuptools

still error
# bind10 --version
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 71, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/__init__.py", line 5, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-cfgclient.so.0: cannot open shared object file: No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
   from apport.fileutils import likely_packaged, get_recent_crashes
 File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
   from apport.report import Report
 File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
   import apport.fileutils
 File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
   from apport.packaging_impl import impl as packaging
 File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
   import apt
 File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
   import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
 File "/usr/local/libexec/bind10/b10-init", line 71, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/__init__.py", line 5, in <module>
   import isc.cc
 File "/usr/local/lib/python3/dist-packages/isc/cc/__init__.py", line 2, in <module>
   from isc.cc.session import *
 File "/usr/local/lib/python3/dist-packages/isc/cc/session.py", line 25, in <module>
   import isc.log
ImportError: libb10-cfgclient.so.0: cannot open shared object file: No such file or directory

seen from Google results , the workaround is just issuing “ldconfig” …
# ldconfig
# bind10 --version
bind10 20110223 (BIND 10 1.0.0)

finally I could build bind10 :D

The purpose of compiling bind10 on Mint 14 box is … to use perfdhcp !!
let’s use perfdhcp on Mint 14 box.

run perfdhcp
another process is grabing port 67 ..
# /usr/local/bin/perfdhcp -4 -l eth3 -R 50 -n 1000 -r 10 -x aeistT
Running: perfdhcp -4 -l eth3 -R 50 -n 1000 -r 10 -x aeistT
IPv4
rate[1/s]=10
clients=50
num-request[0]=1000
drop-time[0]=1
drop-time[1]=1
aggressivity=1
broadcast
elp-offset=-1
sid-offset=-1
rip-offset=-1
diagnostic-selectors=aeistT
interface=eth3
server=255.255.255.255
Set MAC to 00::0c::01::02::03::04
Set DUID to 00010001190261b7000c01020304
Error running perfdhcp: Failed to bind socket 3 to 192.168.150.5/port=67

# lsof -ni:67
COMMAND  PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 3222 libvirt-dnsmasq    4u  IPv4  18965      0t0  UDP *:bootps

kill this process and run perfdhcp
nnn , same error..
# lsof -ni:67
COMMAND  PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 3222 libvirt-dnsmasq    4u  IPv4  18965      0t0  UDP *:bootps
# kill 3222

# lsof -ni:67
# /usr/local/bin/perfdhcp -4 -l eth3 -R 50 -n 1000 -r 10 -x aeistT
Running: perfdhcp -4 -l eth3 -R 50 -n 1000 -r 10 -x aeistT
IPv4
rate[1/s]=10
clients=50
num-request[0]=1000
drop-time[0]=1
drop-time[1]=1
aggressivity=1
broadcast
elp-offset=-1
sid-offset=-1
rip-offset=-1
diagnostic-selectors=aeistT
interface=eth3
server=255.255.255.255
Set MAC to 00::0c::01::02::03::04
Set DUID to 0001000119026534000c01020304
Error running perfdhcp: unknown label character: 101

both CentOS perfdhcp and Mint perfdhcp box has many interfaces , because I’m using KVM on both boxes.. is this the root cause ??
# ifconfig | awk '{print $1}' | egrep "(vir|lo|eth)"
eth0
eth1
eth2
eth3
lo
virbr0
virbr1
virbr2
virbr3
virbr4
virbr5

[ success perfdhcp on Fedora 18 ]

I build Fedora18 VM with KVM.
This VM has no bridge interfaces.
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

run perfdhcp
Okay , I can run perfdhcp w/o any problems as of now.
It seems that perfdhcp can not run if that box has bridge interfaces.
# /usr/local/bin/perfdhcp -4 -l eth1 -x aeistT
Running: perfdhcp -4 -l eth1 -x aeistT
IPv4
drop-time[0]=1
drop-time[1]=1
aggressivity=1
broadcast
elp-offset=-1
sid-offset=-1
rip-offset=-1
diagnostic-selectors=aeistT
interface=eth1
server=255.255.255.255
Set MAC to 00::0c::01::02::03::04
Set DUID to 000100011902839e000c01020304

DHCPD logs
Apr 18 22:23:35 ubuntu-1 dhcpd: DHCPDISCOVER from 00:0c:01:02:03:04 via 192.168.150.17
Apr 18 22:23:35 ubuntu-1 dhcpd: DHCPOFFER on 192.168.150.10 to 00:0c:01:02:03:04 via 192.168.150.17