Skip to content

Commit 83e33b7

Browse files
committed
tutorials: added documentation for ospf tutorial and updated fingerprints
1 parent addb149 commit 83e33b7

45 files changed

Lines changed: 2797 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/fingerprint/tutorials.csv

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,42 @@
5454
/tutorials/bgp/, -f omnetpp.ini -c Step10 -r 0, 1000s, 15af-5952/tplx;4b9b-f62c/~tNl;80f2-c06a/~tND;f8e3-71d1/tyf, PASS,
5555
/tutorials/bgp/, -f omnetpp.ini -c Step11 -r 0, 1000s, d4d7-d8aa/tplx;2ad9-ebd9/~tNl;da16-c3a5/~tND;bff0-a5cf/tyf, PASS,
5656

57+
/tutorials/ospf/, -f omnetpp.ini -c Step1 -r 0, 1000s, dae5-8e27/tplx;09f0-c133/~tNl;9229-92b2/~tND;9d8c-f95a/tyf, PASS,
58+
/tutorials/ospf/, -f omnetpp.ini -c Step2 -r 0, 1000s, 03e8-3ff8/tplx;a7a8-90e0/~tNl;0aa7-b2e1/~tND;9d8c-f95a/tyf, PASS,
59+
/tutorials/ospf/, -f omnetpp.ini -c Step2a -r 0, 1000s, 3752-c5e5/tplx;e0cd-e6c9/~tNl;f361-14a7/~tND;9d8c-f95a/tyf, PASS,
60+
/tutorials/ospf/, -f omnetpp.ini -c Step3 -r 0, 1000s, 7b92-fb38/tplx;024e-4273/~tNl;a612-e65d/~tND;9d8c-f95a/tyf, PASS,
61+
/tutorials/ospf/, -f omnetpp.ini -c Step4 -r 0, 1000s, 0874-ba0e/tplx;3ca8-9ac0/~tNl;f5bc-626e/~tND;9d8c-f95a/tyf, PASS,
62+
/tutorials/ospf/, -f omnetpp.ini -c Step5 -r 0, 1000s, acb0-71bd/tplx;2b3b-296b/~tNl;fbb0-bf7b/~tND;9d8c-f95a/tyf, PASS,
63+
/tutorials/ospf/, -f omnetpp.ini -c Step5a -r 0, 1000s, 2737-3b42/tplx;ae7e-83c5/~tNl;31bd-0645/~tND;9d8c-f95a/tyf, PASS,
64+
/tutorials/ospf/, -f omnetpp.ini -c Step6 -r 0, 1000s, 9e22-857e/tplx;2b33-f8b6/~tNl;f5c7-ff51/~tND;9d8c-f95a/tyf, PASS,
65+
/tutorials/ospf/, -f omnetpp.ini -c Step7 -r 0, 1000s, 44f5-866b/tplx;46fd-31a2/~tNl;06b5-57bb/~tND;9d8c-f95a/tyf, PASS,
66+
/tutorials/ospf/, -f omnetpp.ini -c Step8 -r 0, 1000s, fe3b-4c01/tplx;7496-54a2/~tNl;39fc-0262/~tND;9d8c-f95a/tyf, PASS,
67+
/tutorials/ospf/, -f omnetpp.ini -c Step9 -r 0, 1000s, ea32-6864/tplx;8a62-0d96/~tNl;a3f1-ab31/~tND;9d8c-f95a/tyf, PASS,
68+
/tutorials/ospf/, -f omnetpp.ini -c Step10 -r 0, 1000s, 0979-2882/tplx;bd5d-8c1c/~tNl;62a7-3b60/~tND;9d8c-f95a/tyf, PASS,
69+
/tutorials/ospf/, -f omnetpp.ini -c Step10a -r 0, 1000s, bec2-84a6/tplx;813f-a25b/~tNl;8e14-a0e9/~tND;9d8c-f95a/tyf, PASS,
70+
/tutorials/ospf/, -f omnetpp.ini -c Step10b -r 0, 1000s, 1833-6481/tplx;4031-c5c9/~tNl;b0ad-b1aa/~tND;9d8c-f95a/tyf, PASS,
71+
/tutorials/ospf/, -f omnetpp.ini -c Step10d -r 0, 1000s, a6e1-1fe9/tplx;9f74-f9f1/~tNl;0326-df0a/~tND;9d8c-f95a/tyf, PASS,
72+
/tutorials/ospf/, -f omnetpp.ini -c Step11 -r 0, 1000s, 8bcc-a0c1/tplx;beda-dfa3/~tNl;cb64-9b90/~tND;9d8c-f95a/tyf, PASS,
73+
/tutorials/ospf/, -f omnetpp.ini -c Step12 -r 0, 1000s, 6947-bdbf/tplx;43e4-53e8/~tNl;d432-93e0/~tND;9d8c-f95a/tyf, PASS,
74+
/tutorials/ospf/, -f omnetpp.ini -c Step13 -r 0, 1000s, 9262-2399/tplx;231f-0d9c/~tNl;6355-ec37/~tND;9d8c-f95a/tyf, PASS,
75+
/tutorials/ospf/, -f omnetpp.ini -c Step14 -r 0, 1000s, 42d3-096e/tplx;7ee2-f7bb/~tNl;06f0-1d7e/~tND;9d8c-f95a/tyf, PASS,
76+
/tutorials/ospf/, -f omnetpp.ini -c Step15 -r 0, 1000s, 7702-64db/tplx;34d3-5823/~tNl;b93e-4947/~tND;9d8c-f95a/tyf, PASS,
77+
/tutorials/ospf/, -f omnetpp.ini -c Step16 -r 0, 1000s, 275d-a845/tplx;036e-bbfe/~tNl;0c48-dd9e/~tND;9d8c-f95a/tyf, PASS,
78+
/tutorials/ospf/, -f omnetpp.ini -c Step17 -r 0, 1000s, 088b-6cd7/tplx;43b6-6d34/~tNl;c46a-8e39/~tND;9d8c-f95a/tyf, PASS,
79+
/tutorials/ospf/, -f omnetpp.ini -c Step18 -r 0, 1000s, b833-3864/tplx;c917-01aa/~tNl;26b2-a605/~tND;9d8c-f95a/tyf, PASS,
80+
/tutorials/ospf/, -f omnetpp.ini -c Step18a -r 0, 1000s, 7878-ac47/tplx;e1be-651d/~tNl;24a2-9378/~tND;9d8c-f95a/tyf, PASS,
81+
/tutorials/ospf/, -f omnetpp.ini -c Step18b -r 0, 1000s, b833-3864/tplx;c917-01aa/~tNl;76a0-f440/~tND;9d8c-f95a/tyf, PASS,
82+
/tutorials/ospf/, -f omnetpp.ini -c Step18c -r 0, 1000s, d0ea-f5df/tplx;98b6-bdf6/~tNl;7605-ddc7/~tND;9d8c-f95a/tyf, PASS,
83+
/tutorials/ospf/, -f omnetpp.ini -c Step18d -r 0, 1000s, bb9b-2872/tplx;55fc-68bc/~tNl;2a45-c708/~tND;9d8c-f95a/tyf, PASS,
84+
/tutorials/ospf/, -f omnetpp.ini -c Step18e -r 0, 1000s, d1b4-0b3d/tplx;4264-fc26/~tNl;e7b2-7e77/~tND;9d8c-f95a/tyf, PASS,
85+
/tutorials/ospf/, -f omnetpp.ini -c Step19 -r 0, 1000s, 069c-6060/tplx;49c2-5f29/~tNl;d048-57f1/~tND;9d8c-f95a/tyf, PASS,
86+
/tutorials/ospf/, -f omnetpp.ini -c Step20 -r 0, 1000s, 84ad-6d51/tplx;cb0c-3234/~tNl;f6d1-7f28/~tND;9d8c-f95a/tyf, PASS,
87+
/tutorials/ospf/, -f omnetpp.ini -c Step21 -r 0, 1000s, d0b5-2683/tplx;8679-d394/~tNl;81a1-214c/~tND;9d8c-f95a/tyf, PASS,
88+
/tutorials/ospf/, -f omnetpp.ini -c Step22 -r 0, 1000s, 4bf0-bb19/tplx;275e-794d/~tNl;68a7-b9bf/~tND;9d8c-f95a/tyf, PASS,
89+
/tutorials/ospf/, -f omnetpp.ini -c Step23 -r 0, 1000s, e028-5391/tplx;a957-a3b9/~tNl;ea05-7c48/~tND;9d8c-f95a/tyf, PASS,
90+
/tutorials/ospf/, -f omnetpp.ini -c Step24 -r 0, 1000s, 2121-37f9/tplx;3712-1ee9/~tNl;748f-1d2a/~tND;9d8c-f95a/tyf, PASS,
91+
/tutorials/ospf/, -f omnetpp.ini -c Step25 -r 0, 1000s, dae5-8e27/tplx;09f0-c133/~tNl;9229-92b2/~tND;9d8c-f95a/tyf, PASS,
92+
5793
# /tutorials/visualization/, -f oldomnetpp.ini -c VisualizationTutorial01 -r 0, 500s, 0000-0000/tplx, PASS, # old omnetpp.ini
5894
# /tutorials/visualization/, -f oldomnetpp.ini -c VisualizationTutorial02 -r 0, 500s, 0000-0000/tplx, PASS,
5995
# /tutorials/visualization/, -f oldomnetpp.ini -c VisualizationTutorial03 -r 0, 500s, 0000-0000/tplx, PASS, # VisualizationTutorial03 extended

tutorials/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ The following tutorials are available:
2525
Regression Testing and Fingerprints <fingerprint/doc/index>
2626
RIP Routing <rip/doc/index>
2727
BGP Routing <bgp/doc/index>
28+
OSPF Routing <ospf/doc/index>

tutorials/ospf/doc/conclusion.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Conclusion
2+
==========
3+
4+
Congratulations, you’ve made it! You should now be able to set up OSPF routing
5+
for networks in the INET Framework. Use the link below if you have questions or
6+
you'd like to help us improve this tutorial.
7+
8+
Discussion
9+
----------
10+
11+
Use `this page <https://github.com/inet-framework/inet-tutorials/issues/??>`__ in
12+
the GitHub issue tracker for commenting on this tutorial.

tutorials/ospf/doc/index.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
OSPF Routing Tutorial
2+
=====================
3+
4+
This tutorial demonstrates the operation of the OSPF routing protocol model in INET.
5+
6+
Contents:
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
:glob:
11+
12+
step1
13+
step2
14+
step2a
15+
step3
16+
step4
17+
step4a
18+
step5
19+
step5a
20+
step6
21+
step7
22+
step8
23+
step9
24+
step10
25+
step10a
26+
step10b
27+
step10c
28+
step10d
29+
step11
30+
step12
31+
step13
32+
step14
33+
step15
34+
step16
35+
step17
36+
step17a
37+
step17b
38+
step17c
39+
step18
40+
step18a
41+
step18b
42+
step18c
43+
step18d
44+
step18e
45+
step19
46+
step20
47+
step21
48+
step22
49+
step23
50+
step24
51+
step25
52+
conclusion

tutorials/ospf/doc/media

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../media/tutorials/ospf/doc

tutorials/ospf/doc/step1.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Step 1. Pinging after OSPF convergence
2+
======================================
3+
4+
Goals
5+
-----
6+
7+
The goal of this step is to demonstrate basic OSPF operation in a single-area network
8+
and verify that hosts can communicate after OSPF convergence.
9+
10+
OSPF (Open Shortest Path First) is a link-state routing protocol. Routers running OSPF
11+
exchange Link State Advertisements (LSAs) to build a complete topology database (LSDB).
12+
Each router then runs the SPF (Shortest Path First) algorithm on this database to
13+
compute the shortest paths to all destinations and populate its routing table.
14+
15+
This step shows OSPF operating in a single area (Area 0.0.0.0), with routers establishing
16+
adjacencies, exchanging LSAs, building their LSDBs, and computing routes. After convergence,
17+
hosts can ping each other across the network using the OSPF-computed routes.
18+
19+
Configuration
20+
~~~~~~~~~~~~~
21+
22+
This step uses the `OspfNetwork` topology with five routers (R1-R5) and nine
23+
hosts (host0-host8) connected via switches and point-to-point links.
24+
25+
.. figure:: media/OspfNetwork.png
26+
:width: 100%
27+
:align: center
28+
29+
.. literalinclude:: ../OspfNetwork.ned
30+
:start-at: network OspfNetwork
31+
:language: ned
32+
33+
The configuration in ``omnetpp.ini`` is the following:
34+
35+
.. literalinclude:: ../omnetpp.ini
36+
:language: ini
37+
:start-at: Step1
38+
:end-before: ------
39+
40+
Results
41+
~~~~~~~
42+
43+
When the simulation starts:
44+
45+
1. All OSPF routers discover their neighbors and establish adjacencies.
46+
47+
2. Routers exchange Hello packets, then Database Description packets, Link
48+
State Request/Update packets to synchronize their LSDBs.
49+
50+
3. Each router runs the SPF algorithm to compute lowest cost paths (running Dijkstra's weighted shortest path algorithm) to all subnetworks
51+
in the area.
52+
53+
4. The routing tables are populated with OSPF-learned routes. For example, R1
54+
learns routes to the 10.0.0.24/29 network (behind R3) via the path through
55+
R2 and R5->R4.
56+
57+
5. The R5->R4 path turns out to be higher hop-count but lower cost than the R2 path due to cost associated with link datarates.
58+
59+
6. At t=60s, **host0** begins pinging **host6**. The ping succeeds because OSPF
60+
has computed valid routes between all subnetworks.
61+
62+
.. The routing table visualizer shows that all routers have complete routing
63+
.. information for reaching all networks in the OSPF area.
64+
65+
Sources:
66+
:download:`omnetpp.ini <../omnetpp.ini>`,
67+
:download:`OspfNetwork.ned <../OspfNetwork.ned>`
68+
69+
Discussion
70+
----------
71+
72+
Use `this page <https://github.com/inet-framework/inet-tutorials/issues/TODO>`__ in
73+
the GitHub issue tracker for commenting on this tutorial.

tutorials/ospf/doc/step10.rst

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Step 10. Network Topology Changes
2+
=================================
3+
4+
Goals
5+
-----
6+
7+
The goal of this step is to examine how OSPF reacts to network topology changes.
8+
9+
OSPF routers monitor the state of their links. When a link state changes (e.g., up/down),
10+
the router generates a new LSA and floods it throughout the area. Other routers receive
11+
the update, update their LSDBs, and run the SPF algorithm to calculate new routes.
12+
13+
Configuration
14+
~~~~~~~~~~~~~
15+
16+
This step uses the ``TopologyChange`` network. The OSPF configuration in
17+
``ASConfig_tp_priority.xml`` assigns different priorities to the routers connected to
18+
the central switch (Switch2) to deterministically select the DR and BDR.
19+
20+
* **R1**: Priority 10 (DR)
21+
* **R5**: Priority 9 (BDR)
22+
* **R2, R6**: Priority 1 (DROthers)
23+
24+
The simulation script disconnects the link between **R4** and **Switch3** at t=60s.
25+
26+
.. figure:: media/TopologyChange.png
27+
:width: 100%
28+
:align: center
29+
30+
.. literalinclude:: ../TopologyChange.ned
31+
:start-at: network TopologyChange
32+
:language: ned
33+
34+
The configuration in ``omnetpp.ini`` is the following:
35+
36+
.. literalinclude:: ../omnetpp.ini
37+
:language: ini
38+
:start-at: Step10
39+
:end-before: ------
40+
41+
The OSPF configuration:
42+
43+
.. literalinclude:: ../ASConfig_tp_priority.xml
44+
:language: xml
45+
46+
Results
47+
~~~~~~~
48+
49+
When the link between R4 and Switch3 breaks at t=60s:
50+
51+
1. **R4** detects the link down event.
52+
2. R4 generates a new Router LSA that *excludes* the link to Switch3's network.
53+
3. R4 floods this new LSA to its neighbors (R3).
54+
4. The LSA propagates through the network (R3 → R2 → Switch2 → others).
55+
5. All routers update their LSDB and remove the route to the network that was behind Switch3
56+
(if it's no longer reachable).
57+
58+
This demonstrates the basic mechanism of LSA flooding and database synchronization upon
59+
topology change.
60+
61+
Sources:
62+
:download:`omnetpp.ini <../omnetpp.ini>`,
63+
:download:`TopologyChange.ned <../TopologyChange.ned>`,
64+
:download:`ASConfig_tp_priority.xml <../ASConfig_tp_priority.xml>`
65+
66+
Discussion
67+
----------
68+
69+
Use `this page <https://github.com/inet-framework/inet-tutorials/issues/TODO>`__ in
70+
the GitHub issue tracker for commenting on this tutorial.

tutorials/ospf/doc/step10a.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Step 10a. Router R4 goes down
2+
=============================
3+
4+
Goals
5+
-----
6+
7+
The goal of this step is to demonstrate OSPF's reaction when an entire router fails.
8+
9+
When a router completely fails (as opposed to just a single link), all of its adjacencies
10+
are lost simultaneously. Neighboring routers detect the failure and update the topology
11+
accordingly.
12+
13+
Configuration
14+
~~~~~~~~~~~~~
15+
16+
This configuration is based on Step 10. The simulation script shuts down router **R4** at t=60s.
17+
18+
.. figure:: media/TopologyChange.png
19+
:width: 100%
20+
:align: center
21+
22+
The configuration in ``omnetpp.ini`` is the following:
23+
24+
.. literalinclude:: ../omnetpp.ini
25+
:language: ini
26+
:start-at: Step10a
27+
:end-before: ------
28+
29+
Results
30+
~~~~~~~
31+
32+
When R4 is shutdown at t=60s:
33+
34+
1. All routers adjacent to **R4** (R3, and any others) detect the adjacency loss when they stop
35+
receiving Hello packets.
36+
37+
2. After the Dead Interval expires, these neighbors declare R4 dead and remove it from their
38+
neighbor lists.
39+
40+
3. Routers that had adjacencies with R4 generate new LSAs reflecting the topology change
41+
(removing links to R4).
42+
43+
4. These LSAs are flooded throughout the area.
44+
45+
5. All routers update their LSDBs, removing R4's Router LSA and any links to R4.
46+
47+
In General, routes that used a failed router as a next-hop or transit router are recomputed, using alternative paths
48+
if available.
49+
50+
Sources:
51+
:download:`omnetpp.ini <../omnetpp.ini>`,
52+
:download:`TopologyChange.ned <../TopologyChange.ned>`,
53+
:download:`ASConfig_tp_priority.xml <../ASConfig_tp_priority.xml>`
54+
55+
Discussion
56+
----------
57+
58+
Use `this page <https://github.com/inet-framework/inet-tutorials/issues/TODO>`__ in
59+
the GitHub issue tracker for commenting on this tutorial.

tutorials/ospf/doc/step10b.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Step 10b. Router R2 (DROTHER) goes down
2+
=======================================
3+
4+
Goals
5+
-----
6+
7+
The goal of this step is to demonstrate what happens when a DROther router fails on a
8+
multi-access network.
9+
10+
When a DROther (a router that is neither DR nor BDR) fails, the impact is limited since
11+
DROthers do not have special responsibilities in the OSPF protocol operation. The DR and
12+
BDR are unaffected, and the multi-access network continues to operate normally.
13+
14+
Configuration
15+
~~~~~~~~~~~~~
16+
17+
This configuration is based on Step 10. The simulation script shuts down router **R2**
18+
(a DROther) at t=60s.
19+
20+
.. figure:: media/TopologyChange.png
21+
:width: 100%
22+
:align: center
23+
24+
The configuration in ``omnetpp.ini`` is the following:
25+
26+
.. literalinclude:: ../omnetpp.ini
27+
:language: ini
28+
:start-at: Step10b
29+
:end-before: ------
30+
31+
Results
32+
~~~~~~~
33+
34+
When R2 (a DROther) is shutdown at t=60s:
35+
36+
1. The DR and BDR on Switch2 detect that R2 has failed when Hello packets stop arriving.
37+
38+
2. The DR generates a new Network LSA for Switch2 that no longer lists R2 as an attached router.
39+
40+
3. Other routers adjacent to R2 on other interfaces also detect the failure and update their
41+
LSAs accordingly.
42+
43+
4. The topology change is flooded throughout the area.
44+
45+
5. Importantly, **no DR/BDR re-election occurs** on Switch2. The existing DR and BDR continue
46+
their roles.
47+
48+
In general, Routing around the failed router is recomputed using alternative paths, if available.
49+
50+
This demonstrates that DROther failures have minimal impact on the OSPF protocol operation
51+
on multi-access networks.
52+
53+
Sources:
54+
:download:`omnetpp.ini <../omnetpp.ini>`,
55+
:download:`TopologyChange.ned <../TopologyChange.ned>`,
56+
:download:`ASConfig_tp_priority.xml <../ASConfig_tp_priority.xml>`
57+
58+
Discussion
59+
----------
60+
61+
Use `this page <https://github.com/inet-framework/inet-tutorials/issues/TODO>`__ in
62+
the GitHub issue tracker for commenting on this tutorial.

0 commit comments

Comments
 (0)