SlideShare a Scribd company logo
1 of 43
Stress your DUT
Using open source tools for network device dataplane testing.
Paweł Małachowski, 2018.03.20
@pawmal80
Agenda
 introduction
 software packet generators overview
 Packet Of Death story
 redGuardian regression testing internals
Basics
 RFC 2544 „Benchmarking Methodology for Network Interconnect Devices”
Frame sizes to be used on Ethernet 64, 128, 256, 512, 1024, 1280, 1518
 RFC 6815 „Use on Production Networks Considered Harmful”
 RFC2889 „Benchmarking Methodology for LAN Switching Devices”
 IMIX concept
Example metrics
 throughput (bps, pps)
 zero packet loss
 latency
 connection/flow setup rate
Example: packet switching/routing
 „Mellanox Spectrum vs. Broadcom StrataXGS Tomahawk 25GbE&100GbE
Performance Evaluation” (Tolly, 2016)
http://www.mellanox.com/related-docs/products/tolly-report-
performance-evaluation-2016-march.pdf
 „Cisco Integrated Services Routers—Performance Overview” (2010)
https://supportforums.cisco.com/legacyfs/online/legacy/7/2/6/134627-
white_paper_c11_595485.pdf
Example: routing lookup performance on Linux
 https://vincent.bernat.im/
en/blog/2017-ipv4-route-
lookup-linux
 https://vincent.bernat.im/
en/blog/2017-
performance-progression-
ipv4-route-lookup-linux
 great in-depth analysis
Example factors
 random dst IP
 MSS clamping?
 FIB size (Trie vs. DIR-m-n)
 port interaction
 VM interaction (NFV)
 do you have baseline?
Software packet generation: TX methods
API comment
socket (RAW, DGRAM)
pcap classic, mature, available everywhere
in-kernel Linux pktgen
AF_PACKET (V4+ZC) XDP cooperation
kernel bypass (DPDK,
Netmap, PF_RING ZC, Snabb)
fastest possible, available only on some platforms,
frequently require additional compiling/patching
Classic generators
Classic generators
 available OOTB or easy to install
 mature, well documented
 pcap(3) based
 „fast enough” in some cases
hping3
 command-line oriented TCP/IP packet assembler and analyzer
 notable options: flood, spoofing, addres/port randomization
 1 Mpps easy to achieve
 similar tools: nping (nmap)
hping3
% hping3 --syn 127.0.0.1 --destport ++31337
HPING 127.0.0.1 (lo 127.0.0.1): S set, 40 headers + 0 data bytes
len=40 ip=127.0.0.1 ttl=64 DF id=46879 sport=31337 flags=RA seq=0 win=0 rtt=7.7 ms
len=40 ip=127.0.0.1 ttl=64 DF id=46992 sport=31338 flags=RA seq=1 win=0 rtt=3.5 ms
len=40 ip=127.0.0.1 ttl=64 DF id=47120 sport=31339 flags=RA seq=2 win=0 rtt=3.3 ms
^C
--- 127.0.0.1 hping statistic ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3.3/4.8/7.7 ms
% hping3 --syn 127.0.0.1 --destport ++31337 --flood
tcpreplay
 tools for editing and replaying network traffic
 pcap(3) based, Netmap support
 idea: record your UDP traffic, replay it against tested service
 https://github.com/appneta/tcpreplay
tcpreplay
% tcpreplay -i eth2 -K -t -l 100000 ./test/test.pcap
File Cache is enabled
Actual: 14100000 packets (6270400000 bytes) sent in 9.07 seconds.
Rated: 645928366.4 Bps, 5167.42 Mbps, 1452473.52 pps
Flows: 37 flows, 3.81 fps, 14000000 flow packets, 100000 non-flow
Statistics for network device: eth2
Attempted packets: 14100000
Successful packets: 14100000
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Packet crafting
Scapy
 Python-based packet manipulation program/library
 packet (and layers) are Python objects, e.g. Ether(), IP()
 read/write pcap file/interface
 slow but useful for automated packet crafting
Scapy
$ sudo scapy
>>> ICMP()
<ICMP |>
>>> ICMP(seq=0xda).show()
###[ ICMP ]###
type= echo-request
code= 0
chksum= None
id= 0x0
seq= 0xda
>>> pkts=Ether() / IP(src="10.0.0.0/24", dst="192.168.1.1") / ICMP()
>>> pkts
<Ether type=0x800 |<IP frag=0 proto=icmp src=Net('10.0.0.0/24') dst=192.168.1.1 |<ICMP |>>>
>>> sendp(pkts, iface="eth1")
Sent 256 packets.
Ostinato
 „Wireshark in Reverse”
 craft packets with GUI
 send at specific rate
 DPDK acceleration
(prototype only, 2014)
 https://ostinato.org/
Ostinato
 click & learn
 available as GNS3 and
VIRL image
Accelerated generators
Accelerated generators
 kernel bypassing for maximum performance
 rough edges
 non–trivial to install, tune (core to RX/TX queue mapping,
driver and PCIe tuning) and operate
 poor man’s alternative for hardware packet generators
Snabb packetblaster
 Snabb (LuaJIT) based
 able to push 20x10Gbps with little CPU usage
 tight TX loop over preloaded packets
 https://github.com/snabbco/snabb/tree/master/src/program/packetblaster
% packetblaster replay myfile.cap 0000:01:00.0
DPDK pktgen
 classic DPDK-based packet generator
 CLI-oriented, multiple „pages”
 good for „naive” packet flooding
 http://pktgen-dpdk.readthedocs.io/,
http://dpdk.org/browse/apps/pktgen-dpdk/refs/
DPDK pktgen
 load pcap and randomize fields
 Lua scripts (API/control only)
% pktgen --socket-mem=128,16384 -w
0000:82:00.0,txq_inline=128 -l 0,12-23 -n 2 -- -N
-T -m "[12:13-23].0"
MoonGen
 „Scriptable High-Speed Packet Generator”
 DPDK + LuaJIT based
 craft your packets in Lua!
 nice, scientific approach
 https://github.com/emmericp/MoonGen
% moongen-simple start udp-simple:0:0:rate=1000mbit/s,ratePattern=poisson
T-Rex
 „generates L4-7 traffic based on pre-processing and smart replay of
real traffic templates”
 DPDK-based
 feature rich
 https://trex-tgn.cisco.com/,
https://github.com/cisco-system-traffic-generator
T-Rex
 IMIX floods
 application traffic
 TCP connections
% t-rex-64 -f cap2/imix_64.yaml
-c 4 -m 1 -d 100 -l 1000
WARP17
 „Lightweight solution for generating high volumes of session-based traffic
with high setup rates”
 DPDK-based
 http://warp17.net/,
https://github.com/Juniper/warp17
% warp17 -l 0-7 -n 2 -m 16384 -w 0000:01:00.1 -- --qmap-default max-q --
cmd-file=atds.cfg
WARP17
 server &
client
 TCP sessions
setup
 DUT as
middlebox
Packet Of Death
Packet Of Death
 repeatable fails of nightly regression
tests
 network card hangs, only machine
reboot helps
 WTF?
Packet of Death
 git log tests/
 facepalm
 vendor releases firmware upgrade
redGuardian testing framework
Goals
 functional regression
 local/pcap-based
 remote (real NICs)
 performance regression
Tools
 Python
 pytest
 Scapy
 DPDK pktgen
redGuardian testing framework
Example testcase
def _conf(cfg):
cfg.add_target_v4('0.0.0.0/0')
@with_config(_conf)
class TestForward:
def test_ipv4_fragment_beyond_end(self, tester):
"""Fragmented packets with sum of fragment offset and IP length exceeding 65535 are dropped"""
src = '1.2.3.4'
dst = '10.0.0.1'
tester.run(PASS << RAND_ETH << [
PASS << IP(src=src, dst=dst, proto='udp', id=1, frag=8189) / Payload(3), # =65535
DROP << IP(src=src, dst=dst, proto='udp', id=1, frag=8189) / Payload(4), # =65536
])
„Expected” packet actions
Action Expected behaviour
DROP silent drop
PASS passthrough
DEC_TTL decrement TTL
DELAY wait (e.g. for state expiration)
FRAGMENT perform IP fragmentation
STRIP_VLAN remove 802.1Q tag
TRUNCATE truncate packet (packet sampling)
…
Example performance testcase
TTL1 = RAND_ETH / IP(src=RandIP(), dst=RandIP(), ttl=1) / TCP()
class TestPerfInvalid(TestPerfBase):
def test_ttl1_drop(self, perf_tester, cfg):
cfg.add_target_v4('0.0.0.0/0')
perf_tester.perf_pcap = TTL1
self.run(perf_tester, cfg, 'ttl1_drop')
$ tests/run.sh --perf tests/perf/test_perf_invalid.py::TestPerfInvalid::test_ttl1_drop
platform linux -- Python 3.5.3, pytest-3.4.0, py-1.5.2, pluggy-0.6.0 --
/home/pawmal/git/dpapp/dataplane/tests/venv/bin/python
perf_cfg: pktgen_default.cfg
rootdir: /home/pawmal/git/dpapp/dataplane, inifile:
plugins: xdist-1.22.0, forked-0.2
collected 1 item
tests/perf/test_perf_invalid.py::TestPerfInvalid::test_ttl1_drop PASSED [100%]
PERF ttl1_drop rx_median 14.730; tx_median 0.000; rx_mean 14.620; tx_mean 0.000; gen_rx 0.000; gen_tx
14.813; gen_rx_Mbps 0; gen_tx_Mbps 9954
Performance regression tracking
 multiple
performance
scenarios
 compare Mpps
between nightly
builds
 1 core E5-2695 v4
2.10GHz, random
tuples
Additional materials
NIC benchmarking
 https://fast.dpdk.org/doc/perf/DPDK_17_11_Intel_NIC_perfo
rmance_report.pdf
 https://fast.dpdk.org/doc/perf/DPDK_17_11_Mellanox_NIC_
performance_report.pdf
 consider these „theoretical maximum”
Testing frameworks
 DPDK Test Suite: https://dpdk.org/doc/dts/gsg/index.html
 fd.io/VPP Continuous System Integration and Testing (CSIT):
https://docs.fd.io/csit/master/doc/
Summary
 theoretical vs. real life vs. IMIX
 understand your DUT internals
 networking product development without automated testing
is impossible
^D
@redguardianeu

More Related Content

What's hot

The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML ApocalypseMario Heiderich
 
Time-Based Blind SQL Injection
Time-Based Blind SQL InjectionTime-Based Blind SQL Injection
Time-Based Blind SQL Injectionmatt_presson
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haimharryvanhaaren
 
Attacking GRX - GPRS Roaming eXchange
Attacking GRX - GPRS Roaming eXchangeAttacking GRX - GPRS Roaming eXchange
Attacking GRX - GPRS Roaming eXchangeP1Security
 
PHP unserialization vulnerabilities: What are we missing?
PHP unserialization vulnerabilities: What are we missing?PHP unserialization vulnerabilities: What are we missing?
PHP unserialization vulnerabilities: What are we missing?Sam Thomas
 
How to Intercept a Conversation Held on the Other Side of the Planet
How to Intercept a Conversation Held on the Other Side of the PlanetHow to Intercept a Conversation Held on the Other Side of the Planet
How to Intercept a Conversation Held on the Other Side of the PlanetPositive Hack Days
 
Hệ thống quản lý và phân tích log tập trung elk stack
Hệ thống quản lý và phân tích log tập trung elk stackHệ thống quản lý và phân tích log tập trung elk stack
Hệ thống quản lý và phân tích log tập trung elk stacklaonap166
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...CODE BLUE
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewMichael Furman
 
Towards the Internet of Relevant Things: the IEEE 802.15.4e Standard
Towards the Internet of Relevant Things: the IEEE 802.15.4e StandardTowards the Internet of Relevant Things: the IEEE 802.15.4e Standard
Towards the Internet of Relevant Things: the IEEE 802.15.4e StandardGiuseppe Anastasi
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOWASP Delhi
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracingViller Hsiao
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
So you want to be a red teamer
So you want to be a red teamerSo you want to be a red teamer
So you want to be a red teamerJorge Orchilles
 
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraintInviqa
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...CODE BLUE
 
DNS exfiltration using sqlmap
DNS exfiltration using sqlmapDNS exfiltration using sqlmap
DNS exfiltration using sqlmapMiroslav Stampar
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operationsSunny Neo
 

What's hot (20)

The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML Apocalypse
 
Time-Based Blind SQL Injection
Time-Based Blind SQL InjectionTime-Based Blind SQL Injection
Time-Based Blind SQL Injection
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haim
 
Attacking GRX - GPRS Roaming eXchange
Attacking GRX - GPRS Roaming eXchangeAttacking GRX - GPRS Roaming eXchange
Attacking GRX - GPRS Roaming eXchange
 
PHP unserialization vulnerabilities: What are we missing?
PHP unserialization vulnerabilities: What are we missing?PHP unserialization vulnerabilities: What are we missing?
PHP unserialization vulnerabilities: What are we missing?
 
How to Intercept a Conversation Held on the Other Side of the Planet
How to Intercept a Conversation Held on the Other Side of the PlanetHow to Intercept a Conversation Held on the Other Side of the Planet
How to Intercept a Conversation Held on the Other Side of the Planet
 
Hệ thống quản lý và phân tích log tập trung elk stack
Hệ thống quản lý và phân tích log tập trung elk stackHệ thống quản lý và phân tích log tập trung elk stack
Hệ thống quản lý và phân tích log tập trung elk stack
 
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
[cb22] Tracking the Entire Iceberg - Long-term APT Malware C2 Protocol Emulat...
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's New
 
Towards the Internet of Relevant Things: the IEEE 802.15.4e Standard
Towards the Internet of Relevant Things: the IEEE 802.15.4e StandardTowards the Internet of Relevant Things: the IEEE 802.15.4e Standard
Towards the Internet of Relevant Things: the IEEE 802.15.4e Standard
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilities
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracing
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Hacking oracle using metasploit
Hacking oracle using metasploitHacking oracle using metasploit
Hacking oracle using metasploit
 
So you want to be a red teamer
So you want to be a red teamerSo you want to be a red teamer
So you want to be a red teamer
 
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraint
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
 
DNS exfiltration using sqlmap
DNS exfiltration using sqlmapDNS exfiltration using sqlmap
DNS exfiltration using sqlmap
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 

Similar to Stress your DUT

PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsKohei KaiGai
 
pgconfasia2016 plcuda en
pgconfasia2016 plcuda enpgconfasia2016 plcuda en
pgconfasia2016 plcuda enKohei KaiGai
 
Introduction to FPGA acceleration
Introduction to FPGA accelerationIntroduction to FPGA acceleration
Introduction to FPGA accelerationMarco77328
 
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...Databricks
 
Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例Kazuhito Ohkawa
 
20170602_OSSummit_an_intelligent_storage
20170602_OSSummit_an_intelligent_storage20170602_OSSummit_an_intelligent_storage
20170602_OSSummit_an_intelligent_storageKohei KaiGai
 
Dpdk accelerated Ostinato
Dpdk accelerated OstinatoDpdk accelerated Ostinato
Dpdk accelerated Ostinatopstavirs
 
Hardware & Software Platforms for HPC, AI and ML
Hardware & Software Platforms for HPC, AI and MLHardware & Software Platforms for HPC, AI and ML
Hardware & Software Platforms for HPC, AI and MLinside-BigData.com
 
20180920_DBTS_PGStrom_EN
20180920_DBTS_PGStrom_EN20180920_DBTS_PGStrom_EN
20180920_DBTS_PGStrom_ENKohei KaiGai
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
ATO Linux Performance 2018
ATO Linux Performance 2018ATO Linux Performance 2018
ATO Linux Performance 2018Brendan Gregg
 
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)Ontico
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFBrendan Gregg
 
Steen_Dissertation_March5
Steen_Dissertation_March5Steen_Dissertation_March5
Steen_Dissertation_March5Steen Larsen
 
import rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythonimport rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythongroveronline
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging RubyAman Gupta
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Jakub Botwicz
 

Similar to Stress your DUT (20)

PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
 
pgconfasia2016 plcuda en
pgconfasia2016 plcuda enpgconfasia2016 plcuda en
pgconfasia2016 plcuda en
 
Introduction to FPGA acceleration
Introduction to FPGA accelerationIntroduction to FPGA acceleration
Introduction to FPGA acceleration
 
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...
Accelerating Real Time Analytics with Spark Streaming and FPGAaaS with Prabha...
 
Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
20170602_OSSummit_an_intelligent_storage
20170602_OSSummit_an_intelligent_storage20170602_OSSummit_an_intelligent_storage
20170602_OSSummit_an_intelligent_storage
 
Dpdk accelerated Ostinato
Dpdk accelerated OstinatoDpdk accelerated Ostinato
Dpdk accelerated Ostinato
 
Hardware & Software Platforms for HPC, AI and ML
Hardware & Software Platforms for HPC, AI and MLHardware & Software Platforms for HPC, AI and ML
Hardware & Software Platforms for HPC, AI and ML
 
20180920_DBTS_PGStrom_EN
20180920_DBTS_PGStrom_EN20180920_DBTS_PGStrom_EN
20180920_DBTS_PGStrom_EN
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
uCluster
uClusteruCluster
uCluster
 
ATO Linux Performance 2018
ATO Linux Performance 2018ATO Linux Performance 2018
ATO Linux Performance 2018
 
RAPIDS Overview
RAPIDS OverviewRAPIDS Overview
RAPIDS Overview
 
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPF
 
Steen_Dissertation_March5
Steen_Dissertation_March5Steen_Dissertation_March5
Steen_Dissertation_March5
 
import rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythonimport rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Python
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
 

More from Redge Technologies

[PL] DDoS na sieć ISP (KIKE 2023)
[PL] DDoS na sieć ISP (KIKE 2023)[PL] DDoS na sieć ISP (KIKE 2023)
[PL] DDoS na sieć ISP (KIKE 2023)Redge Technologies
 
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoSRedge Technologies
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionRedge Technologies
 
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...Redge Technologies
 
Spy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platformSpy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platformRedge Technologies
 
100Mpps czyli jak radzić sobie z atakami DDoS?
100Mpps czyli jak radzić sobie z atakami DDoS?100Mpps czyli jak radzić sobie z atakami DDoS?
100Mpps czyli jak radzić sobie z atakami DDoS?Redge Technologies
 
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa IT
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa ITSCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa IT
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa ITRedge Technologies
 
100 M pakietów na sekundę dla każdego.
100 M pakietów na sekundę dla każdego. 100 M pakietów na sekundę dla każdego.
100 M pakietów na sekundę dla każdego. Redge Technologies
 

More from Redge Technologies (12)

[PL] DDoS na sieć ISP (KIKE 2023)
[PL] DDoS na sieć ISP (KIKE 2023)[PL] DDoS na sieć ISP (KIKE 2023)
[PL] DDoS na sieć ISP (KIKE 2023)
 
BGP zombie routes
BGP zombie routesBGP zombie routes
BGP zombie routes
 
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS
100M pakietów na sekundę czyli jak radzić sobie z atakami DDoS
 
BGP hijacks and leaks
BGP hijacks and leaksBGP hijacks and leaks
BGP hijacks and leaks
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solution
 
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...
Ochrona przed atakami DDoS na platformie x86. Czy można mieć jednocześnie wyd...
 
Spy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platformSpy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platform
 
100Mpps czyli jak radzić sobie z atakami DDoS?
100Mpps czyli jak radzić sobie z atakami DDoS?100Mpps czyli jak radzić sobie z atakami DDoS?
100Mpps czyli jak radzić sobie z atakami DDoS?
 
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa IT
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa ITSCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa IT
SCAP – standaryzacja formatów wymiany danych w zakresie bezpieczeństwa IT
 
Na froncie walki z DDoS
Na froncie walki z DDoSNa froncie walki z DDoS
Na froncie walki z DDoS
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
100 M pakietów na sekundę dla każdego.
100 M pakietów na sekundę dla każdego. 100 M pakietów na sekundę dla każdego.
100 M pakietów na sekundę dla każdego.
 

Recently uploaded

Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.CarlotaBedoya1
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 

Recently uploaded (20)

Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 

Stress your DUT

  • 1. Stress your DUT Using open source tools for network device dataplane testing. Paweł Małachowski, 2018.03.20 @pawmal80
  • 2. Agenda  introduction  software packet generators overview  Packet Of Death story  redGuardian regression testing internals
  • 3. Basics  RFC 2544 „Benchmarking Methodology for Network Interconnect Devices” Frame sizes to be used on Ethernet 64, 128, 256, 512, 1024, 1280, 1518  RFC 6815 „Use on Production Networks Considered Harmful”  RFC2889 „Benchmarking Methodology for LAN Switching Devices”  IMIX concept
  • 4. Example metrics  throughput (bps, pps)  zero packet loss  latency  connection/flow setup rate
  • 5. Example: packet switching/routing  „Mellanox Spectrum vs. Broadcom StrataXGS Tomahawk 25GbE&100GbE Performance Evaluation” (Tolly, 2016) http://www.mellanox.com/related-docs/products/tolly-report- performance-evaluation-2016-march.pdf  „Cisco Integrated Services Routers—Performance Overview” (2010) https://supportforums.cisco.com/legacyfs/online/legacy/7/2/6/134627- white_paper_c11_595485.pdf
  • 6. Example: routing lookup performance on Linux  https://vincent.bernat.im/ en/blog/2017-ipv4-route- lookup-linux  https://vincent.bernat.im/ en/blog/2017- performance-progression- ipv4-route-lookup-linux  great in-depth analysis
  • 7. Example factors  random dst IP  MSS clamping?  FIB size (Trie vs. DIR-m-n)  port interaction  VM interaction (NFV)  do you have baseline?
  • 8. Software packet generation: TX methods API comment socket (RAW, DGRAM) pcap classic, mature, available everywhere in-kernel Linux pktgen AF_PACKET (V4+ZC) XDP cooperation kernel bypass (DPDK, Netmap, PF_RING ZC, Snabb) fastest possible, available only on some platforms, frequently require additional compiling/patching
  • 10. Classic generators  available OOTB or easy to install  mature, well documented  pcap(3) based  „fast enough” in some cases
  • 11. hping3  command-line oriented TCP/IP packet assembler and analyzer  notable options: flood, spoofing, addres/port randomization  1 Mpps easy to achieve  similar tools: nping (nmap)
  • 12. hping3 % hping3 --syn 127.0.0.1 --destport ++31337 HPING 127.0.0.1 (lo 127.0.0.1): S set, 40 headers + 0 data bytes len=40 ip=127.0.0.1 ttl=64 DF id=46879 sport=31337 flags=RA seq=0 win=0 rtt=7.7 ms len=40 ip=127.0.0.1 ttl=64 DF id=46992 sport=31338 flags=RA seq=1 win=0 rtt=3.5 ms len=40 ip=127.0.0.1 ttl=64 DF id=47120 sport=31339 flags=RA seq=2 win=0 rtt=3.3 ms ^C --- 127.0.0.1 hping statistic --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 3.3/4.8/7.7 ms % hping3 --syn 127.0.0.1 --destport ++31337 --flood
  • 13. tcpreplay  tools for editing and replaying network traffic  pcap(3) based, Netmap support  idea: record your UDP traffic, replay it against tested service  https://github.com/appneta/tcpreplay
  • 14. tcpreplay % tcpreplay -i eth2 -K -t -l 100000 ./test/test.pcap File Cache is enabled Actual: 14100000 packets (6270400000 bytes) sent in 9.07 seconds. Rated: 645928366.4 Bps, 5167.42 Mbps, 1452473.52 pps Flows: 37 flows, 3.81 fps, 14000000 flow packets, 100000 non-flow Statistics for network device: eth2 Attempted packets: 14100000 Successful packets: 14100000 Failed packets: 0 Truncated packets: 0 Retried packets (ENOBUFS): 0 Retried packets (EAGAIN): 0
  • 16. Scapy  Python-based packet manipulation program/library  packet (and layers) are Python objects, e.g. Ether(), IP()  read/write pcap file/interface  slow but useful for automated packet crafting
  • 17. Scapy $ sudo scapy >>> ICMP() <ICMP |> >>> ICMP(seq=0xda).show() ###[ ICMP ]### type= echo-request code= 0 chksum= None id= 0x0 seq= 0xda >>> pkts=Ether() / IP(src="10.0.0.0/24", dst="192.168.1.1") / ICMP() >>> pkts <Ether type=0x800 |<IP frag=0 proto=icmp src=Net('10.0.0.0/24') dst=192.168.1.1 |<ICMP |>>> >>> sendp(pkts, iface="eth1") Sent 256 packets.
  • 18. Ostinato  „Wireshark in Reverse”  craft packets with GUI  send at specific rate  DPDK acceleration (prototype only, 2014)  https://ostinato.org/
  • 19. Ostinato  click & learn  available as GNS3 and VIRL image
  • 21. Accelerated generators  kernel bypassing for maximum performance  rough edges  non–trivial to install, tune (core to RX/TX queue mapping, driver and PCIe tuning) and operate  poor man’s alternative for hardware packet generators
  • 22. Snabb packetblaster  Snabb (LuaJIT) based  able to push 20x10Gbps with little CPU usage  tight TX loop over preloaded packets  https://github.com/snabbco/snabb/tree/master/src/program/packetblaster % packetblaster replay myfile.cap 0000:01:00.0
  • 23. DPDK pktgen  classic DPDK-based packet generator  CLI-oriented, multiple „pages”  good for „naive” packet flooding  http://pktgen-dpdk.readthedocs.io/, http://dpdk.org/browse/apps/pktgen-dpdk/refs/
  • 24. DPDK pktgen  load pcap and randomize fields  Lua scripts (API/control only) % pktgen --socket-mem=128,16384 -w 0000:82:00.0,txq_inline=128 -l 0,12-23 -n 2 -- -N -T -m "[12:13-23].0"
  • 25. MoonGen  „Scriptable High-Speed Packet Generator”  DPDK + LuaJIT based  craft your packets in Lua!  nice, scientific approach  https://github.com/emmericp/MoonGen % moongen-simple start udp-simple:0:0:rate=1000mbit/s,ratePattern=poisson
  • 26. T-Rex  „generates L4-7 traffic based on pre-processing and smart replay of real traffic templates”  DPDK-based  feature rich  https://trex-tgn.cisco.com/, https://github.com/cisco-system-traffic-generator
  • 27. T-Rex  IMIX floods  application traffic  TCP connections % t-rex-64 -f cap2/imix_64.yaml -c 4 -m 1 -d 100 -l 1000
  • 28. WARP17  „Lightweight solution for generating high volumes of session-based traffic with high setup rates”  DPDK-based  http://warp17.net/, https://github.com/Juniper/warp17 % warp17 -l 0-7 -n 2 -m 16384 -w 0000:01:00.1 -- --qmap-default max-q -- cmd-file=atds.cfg
  • 29. WARP17  server & client  TCP sessions setup  DUT as middlebox
  • 31. Packet Of Death  repeatable fails of nightly regression tests  network card hangs, only machine reboot helps  WTF?
  • 32. Packet of Death  git log tests/  facepalm  vendor releases firmware upgrade
  • 33. redGuardian testing framework Goals  functional regression  local/pcap-based  remote (real NICs)  performance regression Tools  Python  pytest  Scapy  DPDK pktgen
  • 35. Example testcase def _conf(cfg): cfg.add_target_v4('0.0.0.0/0') @with_config(_conf) class TestForward: def test_ipv4_fragment_beyond_end(self, tester): """Fragmented packets with sum of fragment offset and IP length exceeding 65535 are dropped""" src = '1.2.3.4' dst = '10.0.0.1' tester.run(PASS << RAND_ETH << [ PASS << IP(src=src, dst=dst, proto='udp', id=1, frag=8189) / Payload(3), # =65535 DROP << IP(src=src, dst=dst, proto='udp', id=1, frag=8189) / Payload(4), # =65536 ])
  • 36. „Expected” packet actions Action Expected behaviour DROP silent drop PASS passthrough DEC_TTL decrement TTL DELAY wait (e.g. for state expiration) FRAGMENT perform IP fragmentation STRIP_VLAN remove 802.1Q tag TRUNCATE truncate packet (packet sampling) …
  • 37. Example performance testcase TTL1 = RAND_ETH / IP(src=RandIP(), dst=RandIP(), ttl=1) / TCP() class TestPerfInvalid(TestPerfBase): def test_ttl1_drop(self, perf_tester, cfg): cfg.add_target_v4('0.0.0.0/0') perf_tester.perf_pcap = TTL1 self.run(perf_tester, cfg, 'ttl1_drop') $ tests/run.sh --perf tests/perf/test_perf_invalid.py::TestPerfInvalid::test_ttl1_drop platform linux -- Python 3.5.3, pytest-3.4.0, py-1.5.2, pluggy-0.6.0 -- /home/pawmal/git/dpapp/dataplane/tests/venv/bin/python perf_cfg: pktgen_default.cfg rootdir: /home/pawmal/git/dpapp/dataplane, inifile: plugins: xdist-1.22.0, forked-0.2 collected 1 item tests/perf/test_perf_invalid.py::TestPerfInvalid::test_ttl1_drop PASSED [100%] PERF ttl1_drop rx_median 14.730; tx_median 0.000; rx_mean 14.620; tx_mean 0.000; gen_rx 0.000; gen_tx 14.813; gen_rx_Mbps 0; gen_tx_Mbps 9954
  • 38. Performance regression tracking  multiple performance scenarios  compare Mpps between nightly builds  1 core E5-2695 v4 2.10GHz, random tuples
  • 40. NIC benchmarking  https://fast.dpdk.org/doc/perf/DPDK_17_11_Intel_NIC_perfo rmance_report.pdf  https://fast.dpdk.org/doc/perf/DPDK_17_11_Mellanox_NIC_ performance_report.pdf  consider these „theoretical maximum”
  • 41. Testing frameworks  DPDK Test Suite: https://dpdk.org/doc/dts/gsg/index.html  fd.io/VPP Continuous System Integration and Testing (CSIT): https://docs.fd.io/csit/master/doc/
  • 42. Summary  theoretical vs. real life vs. IMIX  understand your DUT internals  networking product development without automated testing is impossible