Skip to content

Commit b60ad39

Browse files
committed
tutorials: added RIP tutorial
The RIP tutorial was originally written by Ahmet Sekecioglu (Monash University, Melbourne, Australia)
1 parent a1e8d9b commit b60ad39

26 files changed

Lines changed: 2481 additions & 59 deletions

.oppfeatures

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,20 @@
13671367
compileFlags = ""
13681368
linkerFlags = ""
13691369
/>
1370+
<feature
1371+
id = "RipTutorial"
1372+
name = "RIP routing tutorial"
1373+
description = "A step-by-step tutorial starting from the basics, and introducing new features and concepts related to RIP routing."
1374+
initiallyEnabled = "true"
1375+
requires = "VisualizationCanvas Ethernet Rip"
1376+
labels = "tutorial rip routing"
1377+
nedPackages = "
1378+
inet.tutorials.rip
1379+
"
1380+
extraSourceFolders = ""
1381+
compileFlags = ""
1382+
linkerFlags = ""
1383+
/>
13701384
<feature
13711385
id = "RoutingShowcases"
13721386
name = "Routing showcases"

tests/fingerprint/tutorials.csv

Lines changed: 114 additions & 58 deletions
Large diffs are not rendered by default.

tutorials/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ The following tutorials are available:
2222
Wireless <wireless/doc/index>
2323
IPv4 Network Configurator <configurator/doc/index>
2424
Queueing <queueing/doc/index>
25-
Regression Testing and Fingerprints<fingerprint/doc/index>
25+
Regression Testing and Fingerprints <fingerprint/doc/index>
26+
RIP Routing <rip/doc/index>

tutorials/rip/RipNetworkA.ned

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
package inet.tutorials.rip;
2+
3+
import inet.common.scenario.ScenarioManager;
4+
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
5+
import inet.node.ethernet.Eth100M;
6+
import inet.node.ethernet.Eth10M;
7+
import inet.node.ethernet.EthernetSwitch;
8+
import inet.node.inet.Router;
9+
import inet.node.inet.StandardHost;
10+
import inet.visualizer.contract.IIntegratedVisualizer;
11+
12+
13+
network RipNetworkA
14+
{
15+
@display("bgb=2101.0125,829.44995");
16+
@figure[simtime](type="simTimeText"; pos=1550,60; prefix="SimTime: "; font=,14);
17+
submodules:
18+
configurator: Ipv4NetworkConfigurator {
19+
@display("p=757.8,76.30625");
20+
}
21+
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer {
22+
@display("p=1023.5563,76.30625");
23+
}
24+
scenarioManager: ScenarioManager {
25+
@display("p=1310.3625,76.30625");
26+
}
27+
host0: StandardHost {
28+
@display("p=97.81249,375.59998;i=,red");
29+
}
30+
host1: StandardHost {
31+
@display("p=97.81249,532.1");
32+
}
33+
host2: StandardHost {
34+
@display("p=97.81249,694.46875");
35+
}
36+
host3: StandardHost {
37+
@display("p=1271.5625,334.51874");
38+
}
39+
router0: Router {
40+
@display("p=543.83746,532.1");
41+
}
42+
router2: Router {
43+
@display("p=1508.2687,532.1");
44+
}
45+
router1: Router {
46+
@display("p=925.3062,532.1");
47+
}
48+
host4: StandardHost {
49+
@display("p=1271.5625,692.51245");
50+
}
51+
host5: StandardHost {
52+
@display("p=1473.0562,389.29373");
53+
}
54+
host6: StandardHost {
55+
@display("p=1977.7687,373.64374;i=,blue");
56+
}
57+
host7: StandardHost {
58+
@display("p=1977.7687,532.1");
59+
}
60+
host8: StandardHost {
61+
@display("p=1977.7687,692.51245");
62+
}
63+
switch0: EthernetSwitch {
64+
@display("p=318.86874,530.14374");
65+
}
66+
switch2: EthernetSwitch {
67+
@display("p=1727.3687,530.14374");
68+
}
69+
switch1: EthernetSwitch {
70+
@display("p=1271.5625,530.14374");
71+
}
72+
router3: Router {
73+
@display("p=1054.4187,334.51874");
74+
}
75+
router4: Router {
76+
@display("p=712.07495,334.51874");
77+
}
78+
connections:
79+
host2.ethg++ <--> Eth100M <--> switch0.ethg++;
80+
host1.ethg++ <--> Eth100M <--> switch0.ethg++;
81+
host0.ethg++ <--> Eth100M <--> switch0.ethg++;
82+
switch0.ethg++ <--> Eth100M <--> router0.ethg++;
83+
84+
switch1.ethg++ <--> Eth100M <--> host3.ethg++;
85+
switch1.ethg++ <--> Eth100M <--> host4.ethg++;
86+
switch1.ethg++ <--> Eth100M <--> host5.ethg++;
87+
switch1.ethg++ <--> Eth100M <--> router2.ethg++;
88+
89+
switch2.ethg++ <--> Eth100M <--> host6.ethg++;
90+
switch2.ethg++ <--> Eth100M <--> host7.ethg++;
91+
switch2.ethg++ <--> Eth100M <--> host8.ethg++;
92+
93+
router2.ethg++ <--> Eth100M <--> switch2.ethg++;
94+
router0.ethg++ <--> Eth10M <--> router1.ethg++;
95+
router1.ethg++ <--> Eth10M <--> switch1.ethg++;
96+
router0.ethg++ <--> Eth100M <--> router4.ethg++;
97+
router4.ethg++ <--> Eth100M <--> router3.ethg++;
98+
router3.ethg++ <--> Eth100M <--> switch1.ethg++;
99+
}

tutorials/rip/RipNetworkB.ned

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package inet.tutorials.rip;
2+
3+
import inet.common.scenario.ScenarioManager;
4+
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
5+
import inet.node.ethernet.Eth100M;
6+
import inet.node.ethernet.EthernetSwitch;
7+
import inet.node.inet.Router;
8+
import inet.node.inet.StandardHost;
9+
import inet.visualizer.contract.IIntegratedVisualizer;
10+
11+
12+
network RipNetworkB
13+
{
14+
@display("bgb=2068.1626,705.175");
15+
@figure[simtime](type="simTimeText"; pos=1550,60; prefix="SimTime: "; font=,14);
16+
submodules:
17+
configurator: Ipv4NetworkConfigurator {
18+
@display("p=694.65,78.9375");
19+
}
20+
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer {
21+
@display("p=936.72504,78.9375");
22+
}
23+
scenarioManager: ScenarioManager {
24+
@display("p=1210.375,78.9375");
25+
}
26+
host0: StandardHost {
27+
@display("p=118.40625,131.5625");
28+
}
29+
host1: StandardHost {
30+
@display("p=118.40625,347.325");
31+
}
32+
host2: StandardHost {
33+
@display("p=118.40625,576.2438");
34+
}
35+
router0: Router {
36+
@display("p=765.6938,347.325");
37+
}
38+
router1: Router {
39+
@display("p=1263,347.325");
40+
}
41+
host3: StandardHost {
42+
@display("p=1926.0751,131.5625");
43+
}
44+
host4: StandardHost {
45+
@display("p=1926.0751,347.325");
46+
}
47+
host5: StandardHost {
48+
@display("p=1926.0751,576.2438");
49+
}
50+
switch0: EthernetSwitch {
51+
@display("p=407.84375,344.69376");
52+
}
53+
switch1: EthernetSwitch {
54+
@display("p=1607.6937,344.69376");
55+
}
56+
connections:
57+
host2.ethg++ <--> Eth100M <--> switch0.ethg++;
58+
host1.ethg++ <--> Eth100M <--> switch0.ethg++;
59+
host0.ethg++ <--> Eth100M <--> switch0.ethg++;
60+
switch0.ethg++ <--> Eth100M <--> router0.ethg++;
61+
62+
switch1.ethg++ <--> Eth100M <--> host3.ethg++;
63+
switch1.ethg++ <--> Eth100M <--> host4.ethg++;
64+
switch1.ethg++ <--> Eth100M <--> host5.ethg++;
65+
66+
router0.ethg++ <--> Eth100M <--> router1.ethg++;
67+
router1.ethg++ <--> Eth100M <--> switch1.ethg++;
68+
}

tutorials/rip/RipNetworkC.ned

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
package inet.tutorials.rip;
2+
3+
import inet.common.scenario.ScenarioManager;
4+
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
5+
import inet.node.ethernet.Eth100M;
6+
import inet.node.ethernet.EthernetSwitch;
7+
import inet.node.inet.Router;
8+
import inet.node.inet.StandardHost;
9+
import inet.visualizer.contract.IIntegratedVisualizer;
10+
11+
12+
network RipNetworkC
13+
{
14+
@display("bgb=2066.82,862.47003");
15+
@figure[simtime](type="simTimeText"; pos=1550,60; prefix="SimTime: "; font=,14);
16+
submodules:
17+
configurator: Ipv4NetworkConfigurator {
18+
@display("p=683.76,77.700005");
19+
}
20+
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer {
21+
@display("p=936.72504,78.9375");
22+
}
23+
scenarioManager: ScenarioManager {
24+
@display("p=1210.375,78.9375");
25+
}
26+
host0: StandardHost {
27+
@display("p=116.55,271.95");
28+
}
29+
host1: StandardHost {
30+
@display("p=116.55,489.51");
31+
}
32+
host2: StandardHost {
33+
@display("p=116.55,717.43");
34+
}
35+
router0: Router {
36+
@display("p=986.79004,271.95");
37+
}
38+
router1: Router {
39+
@display("p=1289.8201,489.51");
40+
}
41+
host3: StandardHost {
42+
@display("p=1924.37,271.95");
43+
}
44+
host4: StandardHost {
45+
@display("p=1924.37,489.51");
46+
}
47+
host5: StandardHost {
48+
@display("p=1924.37,717.43");
49+
}
50+
switch0: EthernetSwitch {
51+
@display("p=406.63,486.92");
52+
}
53+
switch1: EthernetSwitch {
54+
@display("p=1605.8,486.92");
55+
}
56+
router2: Router {
57+
@display("p=704.48,489.51");
58+
}
59+
router3: Router {
60+
@display("p=986.79004,717.43");
61+
}
62+
connections:
63+
host2.ethg++ <--> Eth100M <--> switch0.ethg++;
64+
host1.ethg++ <--> Eth100M <--> switch0.ethg++;
65+
host0.ethg++ <--> Eth100M <--> switch0.ethg++;
66+
switch0.ethg++ <--> Eth100M <--> router2.ethg++;
67+
68+
switch1.ethg++ <--> Eth100M <--> host3.ethg++;
69+
switch1.ethg++ <--> Eth100M <--> host4.ethg++;
70+
switch1.ethg++ <--> Eth100M <--> host5.ethg++;
71+
72+
router0.ethg++ <--> Eth100M <--> router1.ethg++;
73+
router1.ethg++ <--> Eth100M <--> switch1.ethg++;
74+
router2.ethg++ <--> Eth100M <--> router3.ethg++;
75+
router2.ethg++ <--> Eth100M <--> router0.ethg++;
76+
router3.ethg++ <--> Eth100M <--> router0.ethg++;
77+
router3.ethg++ <--> Eth100M <--> router1.ethg++;
78+
}

tutorials/rip/Step9.anf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<scave:Analysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:scave="http://www.omnetpp.org/omnetpp/scave">
3+
<inputs>
4+
<inputs name="/inet/tutorials/rip/results/Step9-*.vec"/>
5+
<inputs name="/inet/tutorials/rip/results/Step9-*.sca"/>
6+
</inputs>
7+
<datasets>
8+
<datasets name="packetReceived:vector(packetBytes)">
9+
<items xsi:type="scave:Add" filterPattern="module(RipNetworkA.host6.app[0]) AND name(&quot;packetReceived:vector(packetBytes)&quot;)" type="VECTOR"/>
10+
<items xsi:type="scave:LineChart" name="packetReceived:vector(packetBytes)"/>
11+
</datasets>
12+
</datasets>
13+
<chartSheets/>
14+
</scave:Analysis>

tutorials/rip/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 RIP 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/rip/doc/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
RIP Routing Tutorial
2+
====================
3+
4+
This tutorial demonstrates the operation of the RIP routing protocol model in INET.
5+
6+
Contents:
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
:glob:
11+
12+
step?
13+
step1?
14+
conclusion

tutorials/rip/doc/media

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

0 commit comments

Comments
 (0)