Skip to content

Commit 83d5af4

Browse files
Update README.md in reference to #680 (#681)
* Update README.md Added 5th point for Troubleshooting and Food for thought Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * Added Space Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * Updated README.md Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * corrected number bullets Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * Spacing Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * more spacing Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> * Note line changed Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com> --------- Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com>
1 parent 3715311 commit 83d5af4

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

exercises/ecn/README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,30 @@ for `h1`, `h11`, `h2`, `h22`, respectively:
5858
```bash
5959
mininet> xterm h1 h11 h2 h22
6060
```
61-
3. In `h2`'s XTerm, start the server that captures packets:
61+
4. In `h2`'s XTerm, start the server that captures packets:
6262
```bash
6363
./receive.py
64-
```
65-
4. in `h22`'s XTerm, start the iperf UDP server:
64+
```
65+
5. in `h22`'s XTerm, start the iperf UDP server:
6666
```bash
6767
iperf -s -u
6868
```
69-
5. In `h1`'s XTerm, send one packet per second to `h2` using send.py
69+
70+
**Note:** Since we want packets sent by `h1` to at least sometimes experience long packet queues in switch `s1`, its important to have a synchronized and simultaneous flow of packets, which will be done via 6th and 7th step.<br> Hence, at first, type both (6th & 7th) commands together in the respective Xterm windows and later press the Enter button (`h1` and then `h11`) immediately for both Xterm windows, to clog up the traffic effectively.
71+
72+
73+
6. In `h1`'s XTerm, send one packet per second to `h2` using send.py
7074
say for 30 seconds:
7175
```bash
7276
./send.py 10.0.2.2 "P4 is cool" 30
7377
```
7478
The message "P4 is cool" should be received in `h2`'s xterm,
75-
6. In `h11`'s XTerm, start iperf client sending for 15 seconds
79+
7. In `h11`'s XTerm, start iperf client sending for 15 seconds
7680
```bash
7781
iperf -c 10.0.2.22 -t 15 -u
7882
```
79-
7. At `h2`, the `ipv4.tos` field (DiffServ+ECN) is always 1
80-
8. type `exit` to close each XTerm window
83+
8. At `h2`, the `ipv4.tos` field (DiffServ+ECN) is always 1
84+
9. type `exit` to close each XTerm window
8185

8286
Your job is to extend the code in `ecn.p4` to implement the ECN logic
8387
for setting the ECN flag.
@@ -158,7 +162,7 @@ and just print the `tos` values `grep tos h2.log` in a separate window
158162

159163
### Food for thought
160164

161-
How can we let the user configure the threshold?
165+
How can we let the user configure the threshold? (lookout in the top segment of p4 code or search for ECN_THRESHOLD )
162166

163167
### Troubleshooting
164168

@@ -183,6 +187,16 @@ There are several ways that problems might manifest:
183187
and the logs show that the queue length was not high enough to set
184188
the ECN bit. Then either lower the threshold in the p4 code or
185189
reduce the link bandwidth in `topology.json`
190+
5. When running the traffic from `h1` to `h2` at 1 packet/second (send.py), note that this flow only lasts for 30 seconds. Therefore, it is crucial to start the high-rate traffic from `h11` to
191+
`h22` within **10 seconds** after starting the `h1` to `h2` flow.<br>
192+
If you wait the full 30 seconds (or close to it) before starting the high-rate traffic, the `h1` to `h2` flow will have already finished. In that case, it will not experience queuing delay,
193+
which could significantly change the expected results of your experiment i.e. `tos` value will remain `0x1`, and would never hit the expected `0x3` spike.
194+
195+
To overcome this issue, use a larger duration value (e.g., 60) when calling `send.py`, to make the `h1``h2` flow last longer and increase the chance of overlapping with congestion from the
196+
high-rate flow i.e.
197+
```bash
198+
./send.py 10.0.2.2 "P4 is cool" 60
199+
```
186200

187201
#### Cleaning up Mininet
188202

0 commit comments

Comments
 (0)