-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.html
More file actions
136 lines (117 loc) · 3.45 KB
/
Copy pathtemplate.html
File metadata and controls
136 lines (117 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TCP Simulation Report</title>
<style>
@page {
size: A4;
margin: 2cm;
}
body {
font-family: "Lucida Console", "Courier New", monospace;
font-size: 12pt;
}
h1 { font-family: Gentium, Georgia, serif; }
h2 { font-family: Gentium, Georgia, serif; }
/* Use Fira Code or Monospace for all monospace sections */
.message-line,
.mono,
.lsp {
white-space: nowrap;
margin: 0.2em 0;
line-height: 1.3em;
}
.node-label {
margin: 0.8em 0 0 0;
font-weight: bold;
}
.inner {
list-style-type: none;
padding-left: 0;
}
/* ---- NEW PAGE BEFORE MESSAGE SEQUENCE ---- */
h2.message-seq-title {
page-break-before: always;
}
.img-container {
text-align: center;
margin: 2em 0;
}
img {
max-width: 100%;
height: auto;
border: 1px solid #333;
}
.log-list {
list-style: none;
padding: 0;
margin: 0;
font-family: monospace;
}
.log-list li {
display: grid;
grid-template-columns: 60px 120px 80px 100px 160px;
gap: 8px;
}
.log-list .header {
font-weight: bold;
}
</style>
</head>
<body>
<h1>TCP Congestion Control</h1>
<div class="node-label">Simulation Parameters:</div>
<ul class="inner">
<li class="mono">MSS (Maximum Segment Size): {{ mss }} bytes</li>
<li class="mono">RWND (Receiver Window): {{ rwnd }} bytes</li>
<li class="mono">cwnd_0 (Initial congestion Window): {{ mss }} bytes</li>
</ul>
<h2>Evolution Graph</h2>
<div class="img-container">
<img src="data:image/png;base64,{{ plot_b64 }}" alt="Congestion Graph">
</div>
<ul class="log-list">
<li class="header">
<span>Step</span>
<span>Event</span>
<span>CWND</span>
<span>SSTRESH</span>
<span>State</span>
</li>
{% for row in logs %}
<li>
<span>{{ row.step }}</span>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
{% endfor %}
</ul>
<h2 class="message-seq-title">Solution</h2>
The red line is the value of the sstrash, when cwdn>=sstrash then the state switches to "congestion avoidance" and the growth is linear.
When cwnd is reset to MSS the congestion event must have been severe (unless a mild congestion happened when cwnd=2*mss).
<div class="img-container">
<img src="data:image/png;base64,{{ plot_b64_sol }}" alt="Congestion Graph">
</div>
<ul class="log-list">
<li class="header">
<span>Step</span>
<span>Event</span>
<span>CWND</span>
<span>SSTRESH</span>
<span>State</span>
</li>
{% for row in logs %}
<li>
<span>{{ row.step }}</span>
<span>{{ row.event }}</span>
<span>{{ row.cwnd }}</span>
<span>{{ row.ssthresh }}</span>
<span>{{ row.state }}</span>
</li>
{% endfor %}
</ul>
</body>
</html>