Add network unit 23 on ICMP messages and traceroute.

Cover error reporting, ping echo and the TTL-based traceroute method.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-14 13:03:46 +02:00
commit cdcfe2237d
5 changed files with 139 additions and 18 deletions

View file

@ -31,7 +31,7 @@ GTK 4 interface.
German learning path German learning path
- **Správa počítačových sítí / Computer Network Administration** is open too - **Správa počítačových sítí / Computer Network Administration** is open too
(shown with a Wi-Fi icon) and leads to a 30-unit computer-networks path; (shown with a Wi-Fi icon) and leads to a 30-unit computer-networks path;
**units 1–22 are playable**, units 23–30 are locked placeholders **units 1–23 are playable**, units 24–30 are locked placeholders
- **Technické vybavení / Computer Hardware** is open (chip icon) and leads - **Technické vybavení / Computer Hardware** is open (chip icon) and leads
to a 10-unit hardware path; **units 1–3 are playable**, units 4–10 are to a 10-unit hardware path; **units 1–3 are playable**, units 4–10 are
locked placeholders locked placeholders
@ -62,7 +62,7 @@ GTK 4 interface.
- **Hints & model answers** – in exercises where you write or complete a German - **Hints & model answers** – in exercises where you write or complete a German
sentence the Czech meaning is shown right away as a hint, and clicking the sentence the Czech meaning is shown right away as a hint, and clicking the
check button also reveals the correct German sentence so you can compare check button also reveals the correct German sentence so you can compare
- **Computer networks path** – twenty-two unlocked units (theory slides + practice): - **Computer networks path** – twenty-three unlocked units (theory slides + practice):
1. **Výpočet IP adres / IP Address Calculation** – 4-slide VLSM walkthrough 1. **Výpočet IP adres / IP Address Calculation** – 4-slide VLSM walkthrough
and four interactive subnetting tasks (prefix, network, broadcast, host and four interactive subnetting tasks (prefix, network, broadcast, host
range) with check and “show solution” range) with check and “show solution”
@ -87,6 +87,7 @@ GTK 4 interface.
20. Směrovač a brána – slides + quiz 20. Směrovač a brána – slides + quiz
21. Adresy a rámce v ethernetu – slides + quiz 21. Adresy a rámce v ethernetu – slides + quiz
22. Paket IP – slides + quiz 22. Paket IP – slides + quiz
23. ICMP – slides + quiz
Progress for networks is saved to `progress/net.conf` (one flag per unit); Progress for networks is saved to `progress/net.conf` (one flag per unit);
completed network units show a checkmark on the path and count in Statistics completed network units show a checkmark on the path and count in Statistics
- **Computer hardware path** – three unlocked units (theory slides + quiz): - **Computer hardware path** – three unlocked units (theory slides + quiz):
@ -309,11 +310,11 @@ When launched, the application shows the welcome screen. From there:
unit 2 or **"Bei uns zu Hause"** for unit 3, then pick any bubble to start unit 2 or **"Bei uns zu Hause"** for unit 3, then pick any bubble to start
an exercise. Units 2 and 3 are available even if the earlier units are not an exercise. Units 2 and 3 are available even if the earlier units are not
finished yet. finished yet.
5. On the networks path, units **1–22** are open. Unit 1 (**Výpočet IP adres**) 5. On the networks path, units **1–23** are open. Unit 1 (**Výpočet IP adres**)
walks through four VLSM slides and then four interactive subnetting tasks walks through four VLSM slides and then four interactive subnetting tasks
with check / “show solution”. Units 2–22 each have theory slides followed by with check / “show solution”. Units 2–23 each have theory slides followed by
a multiple-choice quiz (basic concepts through IP packets). a multiple-choice quiz (basic concepts through ICMP).
Units 23–30 stay locked placeholders. Units 24–30 stay locked placeholders.
6. On the hardware path, units **1–3** are open (architecture / von Neumann, 6. On the hardware path, units **1–3** are open (architecture / von Neumann,
computer history generations, bit & byte), each with slides and a quiz. computer history generations, bit & byte), each with slides and a quiz.
Units 4–10 stay locked. Units 4–10 stay locked.
@ -464,7 +465,7 @@ moderním GTK 4 rozhraním stylovaným přes CSS.
- **Deutsch** je otevřený (bublina s německou vlajkou) a vede na německou - **Deutsch** je otevřený (bublina s německou vlajkou) a vede na německou
učební cestu učební cestu
- **Správa počítačových sítí** je také otevřená (ikona Wi‑Fi) a vede na cestu - **Správa počítačových sítí** je také otevřená (ikona Wi‑Fi) a vede na cestu
s 30 jednotkami; **jednotky 1–22 jsou hratelné**, 23–30 jsou zamčené s 30 jednotkami; **jednotky 1–23 jsou hratelné**, 24–30 jsou zamčené
placeholdery placeholdery
- **Technické vybavení** je otevřené (ikona čipu) a vede na cestu - **Technické vybavení** je otevřené (ikona čipu) a vede na cestu
s 10 jednotkami; **jednotky 1–3 jsou hratelné**, 4–10 jsou zamčené s 10 jednotkami; **jednotky 1–3 jsou hratelné**, 4–10 jsou zamčené
@ -490,7 +491,7 @@ moderním GTK 4 rozhraním stylovaným přes CSS.
„Was siehst du?“, řazení vět, chybějící písmena) „Was siehst du?“, řazení vět, chybějící písmena)
- **Nápovědy a vzorové odpovědi** – u psaných / doplňovaných vět je hned - **Nápovědy a vzorové odpovědi** – u psaných / doplňovaných vět je hned
český význam; po kontrole se ukáže i správná německá věta český význam; po kontrole se ukáže i správná německá věta
- **Cesta počítačových sítí** – dvaadvacet odemčených jednotek (snímky + cvičení): - **Cesta počítačových sítí** – třiadvacet odemčených jednotek (snímky + cvičení):
1. **Výpočet IP adres** – 4 snímky VLSM a čtyři interaktivní úlohy 1. **Výpočet IP adres** – 4 snímky VLSM a čtyři interaktivní úlohy
(prefix, síť, broadcast, rozsah uzlů) s kontrolou a „ukázat řešení“ (prefix, síť, broadcast, rozsah uzlů) s kontrolou a „ukázat řešení“
2. Základní pojmy a rozdělení sítí – snímky + kvíz 2. Základní pojmy a rozdělení sítí – snímky + kvíz
@ -514,6 +515,7 @@ moderním GTK 4 rozhraním stylovaným přes CSS.
20. Směrovač a brána – snímky + kvíz 20. Směrovač a brána – snímky + kvíz
21. Adresy a rámce v ethernetu – snímky + kvíz 21. Adresy a rámce v ethernetu – snímky + kvíz
22. Paket IP – snímky + kvíz 22. Paket IP – snímky + kvíz
23. ICMP – snímky + kvíz
Postup u sítí se ukládá do `progress/net.conf` (příznak na jednotku); Postup u sítí se ukládá do `progress/net.conf` (příznak na jednotku);
dokončené jednotky mají fajfku na cestě a počítají se ve Statistikách dokončené jednotky mají fajfku na cestě a počítají se ve Statistikách
- **Cesta technického vybavení** – tři odemčené jednotky (snímky + kvíz): - **Cesta technického vybavení** – tři odemčené jednotky (snímky + kvíz):
@ -734,10 +736,10 @@ Po spuštění se zobrazí úvodní obrazovka. Odtud:
4. Otevřete **"Neue Freunde"** (jednotka 1), **"Aus aller Welt"** (2) nebo 4. Otevřete **"Neue Freunde"** (jednotka 1), **"Aus aller Welt"** (2) nebo
**"Bei uns zu Hause"** (3) a vyberte bublinu cvičení. Jednotky 2 a 3 jdou **"Bei uns zu Hause"** (3) a vyberte bublinu cvičení. Jednotky 2 a 3 jdou
otevřít i bez dokončení předchozích. otevřít i bez dokončení předchozích.
5. Na síťové cestě jsou otevřené jednotky **1–22**. Jednotka 1 (**Výpočet IP 5. Na síťové cestě jsou otevřené jednotky **1–23**. Jednotka 1 (**Výpočet IP
adres**) má 4 snímky VLSM a pak 4 interaktivní úlohy s kontrolou / adres**) má 4 snímky VLSM a pak 4 interaktivní úlohy s kontrolou /
„ukázat řešení“. Jednotky 2–22 mají snímky teorie a kvíz s výběrem „ukázat řešení“. Jednotky 2–23 mají snímky teorie a kvíz s výběrem
(od základních pojmů po IP paket). Jednotky 23–30 zůstávají zamčené. (od základních pojmů po ICMP). Jednotky 24–30 zůstávají zamčené.
6. Na cestě technického vybavení jsou otevřené jednotky **1–3** (architektura / 6. Na cestě technického vybavení jsou otevřené jednotky **1–3** (architektura /
von Neumann, historie generací, bit a byte), každá se snímky a kvízem. von Neumann, historie generací, bit a byte), každá se snímky a kvízem.
Jednotky 4–10 zůstávají zamčené. Jednotky 4–10 zůstávají zamčené.
@ -781,8 +783,8 @@ exercise_u1.c cvičení jednotky 1 („Neue Freunde“)
exercise_u2.c cvičení jednotky 2 („Aus aller Welt“) exercise_u2.c cvičení jednotky 2 („Aus aller Welt“)
exercise_u3.c cvičení jednotky 3 („Bei uns zu Hause“) exercise_u3.c cvičení jednotky 3 („Bei uns zu Hause“)
settings.c panel nastavení (režim, téma, jazyk) settings.c panel nastavení (režim, téma, jazyk)
net.c cesta počítačových sítí (30 uzlů), jednotky 1–22 net.c cesta počítačových sítí (30 uzlů), jednotky 1–23
(1: VLSM cvičení; 2–22: kvízy s výběrem) (1: VLSM cvičení; 2–23: kvízy s výběrem)
hw.c cesta technického vybavení (10 uzlů), jednotky 1–3 hw.c cesta technického vybavení (10 uzlů), jednotky 1–3
(architektura, historie, bit/byte + kvízy) (architektura, historie, bit/byte + kvízy)
main.c vstupní bod aplikace a zapojení stránek main.c vstupní bod aplikace a zapojení stránek

20
i18n.c
View file

@ -329,6 +329,12 @@ const TrEntry tr_ui[] = {
"8 slides about the IP datagram and header, then a quiz."}, "8 slides about the IP datagram and header, then a quiz."},
{"net_ex22_title", "Kvíz: paket IP", {"net_ex22_title", "Kvíz: paket IP",
"Quiz: IP packet"}, "Quiz: IP packet"},
{"net_unit23", "ICMP",
"ICMP"},
{"net_unit23_sub", "5 snímků o ICMP zprávách a traceroute a pak kvíz.",
"5 slides about ICMP messages and traceroute, then a quiz."},
{"net_ex23_title", "Kvíz: ICMP",
"Quiz: ICMP"},
{"net_quiz_intro", {"net_quiz_intro",
"Vyberte u každé otázky jednu správnou odpověď a stiskněte Zkontrolovat.", "Vyberte u každé otázky jednu správnou odpověď a stiskněte Zkontrolovat.",
"Choose one correct answer for each question and press Check."}, "Choose one correct answer for each question and press Check."},
@ -374,6 +380,8 @@ const TrEntry tr_ui[] = {
"Quiz on Ethernet addresses and frames"}, "Quiz on Ethernet addresses and frames"},
{"net_quiz22_head", "Kvíz k IP paketu", {"net_quiz22_head", "Kvíz k IP paketu",
"Quiz on the IP packet"}, "Quiz on the IP packet"},
{"net_quiz23_head", "Kvíz k ICMP",
"Quiz on ICMP"},
{"net_slide_next", "Další", "Next"}, {"net_slide_next", "Další", "Next"},
{"net_slide_prev", "Zpět", "Back"}, {"net_slide_prev", "Zpět", "Back"},
{"net_slide_start", "Přejít na cvičení", "Go to the exercise"}, {"net_slide_start", "Přejít na cvičení", "Go to the exercise"},
@ -722,6 +730,18 @@ const TrEntry tr_content[] = {
"PROTOCOL 17 = UDP"}, "PROTOCOL 17 = UDP"},
{"Ethernet MTU = 1500 B", NULL, {"Ethernet MTU = 1500 B", NULL,
"Ethernet MTU = 1500 B"}, "Ethernet MTU = 1500 B"},
{"ICMP posílá informace o chybách a stavu přenosu", NULL,
"ICMP sends information about errors and transfer status"},
{"ICMP jede uvnitř IP datagramu", NULL,
"ICMP is carried inside an IP datagram"},
{"Source Quench = zpomal odesílání kvůli zahlcení", NULL,
"Source Quench = slow down sending due to congestion"},
{"Time Exceeded = TTL kleslo na 0", NULL,
"Time Exceeded = TTL dropped to 0"},
{"Echo Request/Reply = ping", NULL,
"Echo Request/Reply = ping"},
{"Traceroute zvyšuje TTL a čte Time Exceeded", NULL,
"Traceroute raises TTL and reads Time Exceeded"},
{"čtrnáct", NULL, "fourteen"}, {"čtrnáct", NULL, "fourteen"},
{"sedmnáct", NULL, "seventeen"}, {"sedmnáct", NULL, "seventeen"},
{"dvacet", NULL, "twenty"}, {"dvacet", NULL, "twenty"},

1
main.c
View file

@ -268,6 +268,7 @@ void activate(GtkApplication *app, gpointer user_data) {
{"netunit20", "netex20", build_net_unit20_page, build_net_unit20_exercise_page}, {"netunit20", "netex20", build_net_unit20_page, build_net_unit20_exercise_page},
{"netunit21", "netex21", build_net_unit21_page, build_net_unit21_exercise_page}, {"netunit21", "netex21", build_net_unit21_page, build_net_unit21_exercise_page},
{"netunit22", "netex22", build_net_unit22_page, build_net_unit22_exercise_page}, {"netunit22", "netex22", build_net_unit22_page, build_net_unit22_exercise_page},
{"netunit23", "netex23", build_net_unit23_page, build_net_unit23_exercise_page},
}; };
for (guint i = 0; i < G_N_ELEMENTS(net_pages); i++) { for (guint i = 0; i < G_N_ELEMENTS(net_pages); i++) {

View file

@ -71,7 +71,8 @@
#define NET20_SLIDES 7 #define NET20_SLIDES 7
#define NET21_SLIDES 8 #define NET21_SLIDES 8
#define NET22_SLIDES 8 #define NET22_SLIDES 8
#define NET_LESSONS 22 #define NET23_SLIDES 5
#define NET_LESSONS 23
#define HW_UNITS 10 #define HW_UNITS 10
#define HW_LESSONS 3 #define HW_LESSONS 3
#define HW_SLIDES 3 #define HW_SLIDES 3
@ -1107,6 +1108,7 @@ GtkWidget *build_net_unit19_page(void);
GtkWidget *build_net_unit20_page(void); GtkWidget *build_net_unit20_page(void);
GtkWidget *build_net_unit21_page(void); GtkWidget *build_net_unit21_page(void);
GtkWidget *build_net_unit22_page(void); GtkWidget *build_net_unit22_page(void);
GtkWidget *build_net_unit23_page(void);
GtkWidget *net_qz_combo(void); GtkWidget *net_qz_combo(void);
void net_qz_set_prefix(GtkComboBoxText *c, int pfx); void net_qz_set_prefix(GtkComboBoxText *c, int pfx);
int net_qz_prefix(GtkComboBoxText *c); int net_qz_prefix(GtkComboBoxText *c);
@ -1142,6 +1144,7 @@ GtkWidget *build_net_unit19_exercise_page(void);
GtkWidget *build_net_unit20_exercise_page(void); GtkWidget *build_net_unit20_exercise_page(void);
GtkWidget *build_net_unit21_exercise_page(void); GtkWidget *build_net_unit21_exercise_page(void);
GtkWidget *build_net_unit22_exercise_page(void); GtkWidget *build_net_unit22_exercise_page(void);
GtkWidget *build_net_unit23_exercise_page(void);
void activate(GtkApplication *app, gpointer user_data); void activate(GtkApplication *app, gpointer user_data);
int main(int argc, char **argv); int main(int argc, char **argv);

99
net.c
View file

@ -5,7 +5,7 @@
NetLesson net_lessons[NET_LESSONS] = { NetLesson net_lessons[NET_LESSONS] = {
/* UI unit N maps to lesson content: unit 1 = IP/VLSM (extra); /* UI unit N maps to lesson content: unit 1 = IP/VLSM (extra);
* units 2–22 = source topics (Základní pojmy … IP paket). */ * units 2–23 = source topics (Základní pojmy … ICMP). */
{ .n_slides = NET_SLIDES, .unit_page = "netunit1", .ex_page = "netex1" }, { .n_slides = NET_SLIDES, .unit_page = "netunit1", .ex_page = "netex1" },
{ .n_slides = NET2_SLIDES, .unit_page = "netunit2", .ex_page = "netex2" }, { .n_slides = NET2_SLIDES, .unit_page = "netunit2", .ex_page = "netex2" },
{ .n_slides = NET3_SLIDES, .unit_page = "netunit3", .ex_page = "netex3" }, { .n_slides = NET3_SLIDES, .unit_page = "netunit3", .ex_page = "netex3" },
@ -28,6 +28,7 @@ NetLesson net_lessons[NET_LESSONS] = {
{ .n_slides = NET20_SLIDES, .unit_page = "netunit20", .ex_page = "netex20" }, { .n_slides = NET20_SLIDES, .unit_page = "netunit20", .ex_page = "netex20" },
{ .n_slides = NET21_SLIDES, .unit_page = "netunit21", .ex_page = "netex21" }, { .n_slides = NET21_SLIDES, .unit_page = "netunit21", .ex_page = "netex21" },
{ .n_slides = NET22_SLIDES, .unit_page = "netunit22", .ex_page = "netex22" }, { .n_slides = NET22_SLIDES, .unit_page = "netunit22", .ex_page = "netex22" },
{ .n_slides = NET23_SLIDES, .unit_page = "netunit23", .ex_page = "netex23" },
}; };
void net_paragraph(GtkWidget *box, const char *text) { void net_paragraph(GtkWidget *box, const char *text) {
@ -470,7 +471,7 @@ void net_add_node(GtkFixed *fixed, int index) {
"net_unit6", "net_unit7", "net_unit8", "net_unit9", "net_unit10", "net_unit6", "net_unit7", "net_unit8", "net_unit9", "net_unit10",
"net_unit11", "net_unit12", "net_unit13", "net_unit14", "net_unit15", "net_unit11", "net_unit12", "net_unit13", "net_unit14", "net_unit15",
"net_unit16", "net_unit17", "net_unit18", "net_unit19", "net_unit20", "net_unit16", "net_unit17", "net_unit18", "net_unit19", "net_unit20",
"net_unit21", "net_unit22" "net_unit21", "net_unit22", "net_unit23"
}; };
card = gtk_button_new(); card = gtk_button_new();
@ -1981,6 +1982,63 @@ GtkWidget *build_net_unit22_page(void) {
slides, NET22_SLIDES); slides, NET22_SLIDES);
} }
GtkWidget *build_net_unit23_page(void) {
static const NetSlide slides[NET23_SLIDES] = {
{
"1 / 5 • ICMP", "Řídicí zprávy",
"Tip: síťová vrstva, ale nese se v IP datagramu",
{
"Zasílá informace o chybách a stavu přenosu.",
"ICMP paket jede přímo v IP datagramu.",
"Směrovače s ním pracují i bez transportní vrstvy.",
NULL,
},
},
{
"2 / 5 • Zprávy I", "Quench, TTL, Unreachable",
NULL,
{
"Source Quench: hrozí zahlcení – zpomal odesílání.",
"Time Exceeded: TTL kleslo na 0, paket zahozen (tracert).",
"Destination Unreachable: cíl (síť/uzel/protokol/port)",
"není dostupný.",
NULL,
},
},
{
"3 / 5 • Zprávy II", "Redirect a Echo",
NULL,
{
"Redirect: přesměruj přenos na jiný (rychlejší) router.",
"Echo Request / Echo Reply: test dostupnosti (ping).",
NULL,
},
},
{
"4 / 5 • Traceroute", "Princip TTL",
"Tip: typicky max. 30 skoků",
{
"Odešle paket s TTL = 1; první router odpoví Time Exceeded.",
"Pak TTL = 2, 3… a tak se zjišťují skoky na cestě.",
"Pokračuje, dokud paket nedorazí do cíle nebo nevyprší limit.",
NULL,
},
},
{
"5 / 5 • Shrnutí", "K čemu ICMP slouží",
NULL,
{
"Diagnostika a hlášení chyb na síťové vrstvě.",
"Základ příkazů ping a traceroute / tracert.",
NULL,
},
},
};
return build_net_unit_page(&net_lessons[22], "net_unit23", "net_unit23_sub",
slides, NET23_SLIDES);
}
/* Solutions below are the canonical "largest subnet first, in order A–D" /* Solutions below are the canonical "largest subnet first, in order A–D"
* allocation. Scenario 3 does not fit into a /24 as written, which is why * allocation. Scenario 3 does not fit into a /24 as written, which is why
* its "solution" explains that instead. */ * its "solution" explains that instead. */
@ -3348,3 +3406,40 @@ GtkWidget *build_net_unit22_exercise_page(void) {
(int)G_N_ELEMENTS(net22_qs)); (int)G_N_ELEMENTS(net22_qs));
} }
const ChoiceQ net23_qs[] = {
{"ICMP slouží především k:",
{"Zasílání informací o chybách a stavu přenosu",
"Jen směrování OSPF tabulek", "Jen lámání optiky",
"Jen EtherType 0800h"}, 4, 0},
{"ICMP paket se přenáší:",
{"Přímo v IP datagramu", "Jen jako Ethernet II bez IP",
"Jen v UDP bez IP", "Jen jako MAC bez datagramu"}, 4, 0},
{"Source Quench znamená:",
{"Varování před zahlcením – zpomal odesílání",
"TTL kleslo na 0", "Cíl je nedostupný", "Echo Reply"}, 4, 0},
{"Time Exceeded nastane, když:",
{"TTL v IP hlavičce klesne na 0", "Router nemá firewall",
"Použijeme jen SNAP", "MTU je 1500"}, 4, 0},
{"Echo Request / Reply využívá příkaz:",
{"ping", "lámačka", "cut-through", "hub"}, 4, 0},
{"Traceroute zjišťuje cestu tak, že:",
{"Postupně zvyšuje TTL a čeká na Time Exceeded",
"Posílá jen ARP bez IP", "Ignoruje směrovače",
"Používá jen CAM tabulku"}, 4, 0},
};
const char *net23_hints[] = {
"ICMP posílá informace o chybách a stavu přenosu",
"ICMP jede uvnitř IP datagramu",
"Source Quench = zpomal odesílání kvůli zahlcení",
"Time Exceeded = TTL kleslo na 0",
"Echo Request/Reply = ping",
"Traceroute zvyšuje TTL a čte Time Exceeded",
};
GtkWidget *build_net_unit23_exercise_page(void) {
return build_net_mcq_page(22, "netunit23", "net_ex23_title", "net_quiz23_head",
net23_qs, net23_hints,
(int)G_N_ELEMENTS(net23_qs));
}