Examples

June 12, 2025 · View on GitHub

Contributions are welcome! Feel free to submit additional examples to help expand this collection.

The tested results is put in p4sim-artifact-icns3 .

Examples

The example consists of two parts:

  • A simulation script in ns-3, which is used to build the simulation environment.

  • A set of files in the p4src directory, including the network topology description (topo.txt), the P4 program(*.p4, *.p4i, *.json), and the corresponding flow table configuration (flowtable_x.txt).

Example List

Example NameDescriptionArchitecture
basic_tunnel [1]Tunnel with custom headerV1model
firewall [2]A basic stateful firewallV1model
ipv4_forwardBasic forwarding based on ip_dstV1model
load_balance [3]Load balancing in spine-leaf networkV1model
p4_basic [4]Basic forwarding based on ip_dstV1model
qosForwarding with priorityV1model
fat treeLarge-scale network with fat tree topoV1model
simple_pnaIPv4 forwarding with PNA architecturePNA
simple_psaIPv4 forwarding with PSA architecturePSA
simple_v1modelIPv4 forwarding with V1model architectureV1model

References