Skip to content

Latest commit

 

History

History

forwarding

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Forwarding example

This example illustrates a more complicated P4 switching scenario.

Topology

topology

Image taken from p4lang/tutorials

Instructions

Run this example from the top-level directory:

python3 -m examples.forwarding.run

This will load the program from p4/forwarding.json which was compiled from p4/forwarding.p4 on the s* switches. The end hosts h* do not have any P4 program loaded.

What you will see

In the example h1 will ping h2, h3, and h4. You will see h2, h3, and h4 receiving the ping and h1 receiving a response from each. The change in TTL indicates how many intermediate nodes the packet was switched through.