Compilation of different P4 examples. In overall, these examples cover
almost all the simple switch
features (with some exceptions). Thus, they
can perfectly be used as a guide or cheat sheet.
To run the examples without any modification you have to first install p4-utils. P4-utils its a set of tools built on top of mininet that help with the developement and testing of p4 networks.
Examples are classified in different categories depending on which is the
feature they exhibit
the most.
- Packet reflector
- Packet Repeater
- Source Routing
- Dropping packets with wrong checksum
- Equal-Cost Multipath
- Flowlet Switching
- Simple L3 Forwarding 1
- Simple L3 Forwarding 2