對 DNS 進行壓力測試

  • 環境 debian
  • apt install dnsperf

    • 看安裝訊息
  • Exp. google.com, facebook.com …

    echo "google.com A
    facebook.com A
    youtube.com A
    amazon.com A
    wikipedia.org A" > queries.txt

  • Exp. DNS : 192.168.11.6

    dnsperf -s 192.168.11.6 -d queries.txt -c 20 -l 30

    測試結果:

    root@aac:~# dnsperf -s 192.168.11.6 -d queries.txt -c 20 -l 30
    DNS Performance Testing Tool
    Version 2.10.0
    
    [Status] Command line: dnsperf -s 192.168.11.6 -d queries.txt -c 20 -l 30
    [Status] Sending queries (to 192.168.11.6:53)
    [Status] Started at: Sat Feb 22 06:48:14 2025
    [Status] Stopping after 30.000000 seconds
    [Status] Testing complete (time limit)
    
    Statistics:
    
      Queries sent:         573736
      Queries completed:    573736 (100.00%)
      Queries lost:         0 (0.00%)
    
      Response codes:       NOERROR 9997 (1.74%), REFUSED 563739 (98.26%)
      Average packet size:  request 29, response 29
      Run time (s):         30.000292
      Queries per second:   19124.347190
    
      Average Latency (s):  0.003655 (min 0.000152, max 0.482989)
      Latency StdDev (s):   0.006873

  • tech/dnsperf.txt
  • 上一次變更: 2025/02/22 07:04
  • jonathan