New build script, and now building mininet from source (#69)
* moved basic exercise to new run script * forgot some files * CLI output now goes to logs * typo, and forgot topo file * fixed net.stop() bug * added temporary change to makefile * typos hard
This commit is contained in:
committed by
Robert Soule
parent
37d1632865
commit
bce45ca8e6
1
P4D2_2017_Fall/exercises/basic/Makefile
Normal file
1
P4D2_2017_Fall/exercises/basic/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../utils/Makefile
|
||||
@@ -32,7 +32,7 @@ up a switch in Mininet to test its behavior.
|
||||
|
||||
1. In your shell, run:
|
||||
```bash
|
||||
./run.sh
|
||||
make run
|
||||
```
|
||||
This will:
|
||||
* compile `basic.p4`, and
|
||||
@@ -57,6 +57,14 @@ server. In `h2`'s xterm, start the server:
|
||||
```
|
||||
The message will not be received.
|
||||
5. Type `exit` to leave each xterm and the Mininet command line.
|
||||
Then, to stop mininet:
|
||||
```bash
|
||||
make stop
|
||||
```
|
||||
And to delete all pcaps, build files, and logs:
|
||||
```bash
|
||||
make clean
|
||||
```
|
||||
|
||||
The message was not received because each switch is programmed
|
||||
according to `basic.p4`, which drops all packets on arrival.
|
||||
@@ -154,7 +162,7 @@ running in the background. Use the following command to clean up
|
||||
these instances:
|
||||
|
||||
```bash
|
||||
mn -c
|
||||
make stop
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"program": "basic.p4",
|
||||
"language": "p4-16",
|
||||
"targets": {
|
||||
"multiswitch": {
|
||||
"auto-control-plane": true,
|
||||
"cli": true,
|
||||
"pcap_dump": true,
|
||||
"bmv2_log": true,
|
||||
"links": [["h1", "s1"], ["s1", "s2"], ["s1", "s3"], ["s3", "s2"], ["s2", "h2"], ["s3", "h3"]],
|
||||
"hosts": {
|
||||
"h1": {
|
||||
},
|
||||
"h2": {
|
||||
},
|
||||
"h3": {
|
||||
}
|
||||
},
|
||||
"switches": {
|
||||
"s1": {
|
||||
"entries": "s1-commands.txt"
|
||||
},
|
||||
"s2": {
|
||||
"entries": "s2-commands.txt"
|
||||
},
|
||||
"s3": {
|
||||
"entries": "s3-commands.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
P4APPRUNNER=../../utils/p4apprunner.py
|
||||
mkdir -p build
|
||||
tar -czf build/p4app.tgz * --exclude='build'
|
||||
#cd build
|
||||
sudo python $P4APPRUNNER p4app.tgz --build-dir ./build
|
||||
16
P4D2_2017_Fall/exercises/basic/topology.json
Normal file
16
P4D2_2017_Fall/exercises/basic/topology.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"hosts": [
|
||||
"h1",
|
||||
"h2",
|
||||
"h3"
|
||||
],
|
||||
"switches": {
|
||||
"s1": { "cli_input" : "s1-commands.txt" },
|
||||
"s2": { "cli_input" : "s2-commands.txt" },
|
||||
"s3": { "cli_input" : "s3-commands.txt" }
|
||||
},
|
||||
"links": [
|
||||
["h1", "s1"], ["s1", "s2"], ["s1", "s3"],
|
||||
["s3", "s2"], ["s2", "h2"], ["s3", "h3"]
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user