P4sim: Simulating Programmable Switches in ns-3

Programming Protocol-Independent Packet Processors (P4) has enabled network researchers to program packet processing pipelines to prototype and implement novel network functions in hardware and software testbeds.P4 support in simulators, like network simulator version 3 (ns-3) can benefit significantly from ns-3's featurerich ecosystem.However, existing P4 simulators have poor scalability, inaccurate timing, and limited architectural support.This paper introduces P4sim, a high-performance simulator developed on top of ns-3.P4sim enhances queue modeling and packet scheduling, ensuring efficient packet processing and precise simulation time representation.The evaluation results confirm that P4sim effectively manages packet processing, supporting data rates up to 10 Gbps.Furthermore, P4sim supports various architectures, like V1Model, Portable Switch Architecture (PSA), and Portable NIC Architecture (PNA).It enables seamless transition between Behavioral Model version 2 (bmv2) and P4sim, allowing researchers to shift from rapid prototyping to large-scale network simulations with the same P4 code.

Authors

Institutions

Publication Details

Published
2025-08-18
DOI
https://doi.org/10.1145/3747204.3747210
Primary Topic
Interconnection Networks and Systems
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

P4sim: Simulating Programmable Switches in ns-3

Giang T. Nguyen, Mingyu Ma
Interconnection Networks and Systems
article

P4sim: Simulating Programmable Switches in ns-3

Giang T. Nguyen, Mingyu Ma
article en

Abstract

Programming Protocol-Independent Packet Processors (P4) has enabled network researchers to program packet processing pipelines to prototype and implement novel network functions in hardware and software testbeds.P4 support in simulators, like network simulator version 3 (ns-3) can benefit significantly from ns-3's featurerich ecosystem.However, existing P4 simulators have poor scalability, inaccurate timing, and limited architectural support.This paper introduces P4sim, a high-performance simulator developed on top of ns-3.P4sim enhances queue modeling and packet scheduling, ensuring efficient packet processing and precise simulation time representation.The evaluation results confirm that P4sim effectively manages packet processing, supporting data rates up to 10 Gbps.Furthermore, P4sim supports various architectures, like V1Model, Portable Switch Architecture (PSA), and Portable NIC Architecture (PNA).It enables seamless transition between Behavioral Model version 2 (bmv2) and P4sim, allowing researchers to shift from rapid prototyping to large-scale network simulations with the same P4 code.

Hochschule für Technik und Wirtschaft Dresden – University of Applied Sciences (DE)
Deutsche Forschungsgemeinschaft, Technische Universität Dresden
Affordable and clean energy
Openalex Percentile: Top 77%
Interconnection Networks and Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

P4sim: Simulating Programmable Switches in ns-3 — Giang T. Nguyen, Mingyu Ma · (2025) | TGRS Research Map | TGRS