You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/ecn/README.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,26 +58,30 @@ for `h1`, `h11`, `h2`, `h22`, respectively:
58
58
```bash
59
59
mininet> xterm h1 h11 h2 h22
60
60
```
61
-
3. In `h2`'s XTerm, start the server that captures packets:
61
+
4. In `h2`'s XTerm, start the server that captures packets:
62
62
```bash
63
63
./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:
66
66
```bash
67
67
iperf -s -u
68
68
```
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
70
74
say for 30 seconds:
71
75
```bash
72
76
./send.py 10.0.2.2 "P4 is cool" 30
73
77
```
74
78
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
76
80
```bash
77
81
iperf -c 10.0.2.22 -t 15 -u
78
82
```
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
81
85
82
86
Your job is to extend the code in `ecn.p4` to implement the ECN logic
83
87
for setting the ECN flag.
@@ -158,7 +162,7 @@ and just print the `tos` values `grep tos h2.log` in a separate window
158
162
159
163
### Food for thought
160
164
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 )
162
166
163
167
### Troubleshooting
164
168
@@ -183,6 +187,16 @@ There are several ways that problems might manifest:
183
187
and the logs show that the queue length was not high enough to set
184
188
the ECN bit. Then either lower the threshold in the p4 code or
185
189
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
0 commit comments