Let's compile blindbox.p4
and bring
up a switch in Mininet to test its behavior.
-
In your shell, run:
pip install -r requirements.txt
This will install the dependencies needed for the project.
-
In your shell, run:
make run
This will:
- compile
blindbox.p4
, and - start a Mininet instance with a single switch (
s1
), connecting three hosts
(h1
, andh2
). - The hosts are assigned IPs of
10.0.1.1
, and10.0.2.2
.
- compile
-
You should now see a Mininet command prompt. Open two terminals for
h1
andh2
, respectively:mininet> xterm h1 h2
-
Each host includes a small Python-based messaging client and server. In
h2
's xterm, start the server:python -m client.receiver
-
In
h1
's xterm, send a message toh2
:python -m client.sender "This is a safe message."
The message will be received.
-
In
h1
's xterm, send a message toh2
:python -m client.sender "This is a malicious message."
The message will be received but will be marked as malicious.
-
Type
exit
to leave each xterm and the Mininet command line. Then, to stop mininet:make stop
And to delete all pcaps, build files, and logs:
make clean
In the latter two cases above, make run
may leave a Mininet instance
running in the background. Use the following command to clean up
these instances:
make stop