l2_switch

command
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

README

l2_switch

This example includes a simple P4 program for a L2 learning switch, along with its corresponding control plane program. The example does not implement the Spanning Tree Protocol and as such you should not use it in topologies which include loops.

If you are using bmv2 simple_switch_grpc, all you need to do to run the control plane program is:

# from the root of the repo
make
./bin/l2_switch --verbose --ports <comma-separated list of switch port numbers>

If you want to give it a try, I suggest creating a Mininet topology with a single simple_switch_grpc instance connecting 2 hosts:

# from the root of the repo
cd cmd/l2_switch/bmv2_mininet/
sudo python 1sw_demo.py

After that you can run ./bin/l2_switch:

./bin/l2_switch --verbose

Running in 'verbose' will log messages whenever new MAC addresses are learnt and also dump port counters (ingress and egress) periodically.

Finally, use the pingall command in the Mininet CLI to check connectivity.

Documentation

Overview

Package main generated by go-bindata.// sources: cmd/l2_switch/l2_switch.out/l2_switch.json cmd/l2_switch/l2_switch.out/l2_switch.p4i cmd/l2_switch/l2_switch.out/p4info.pb.txt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL