-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.ned
107 lines (91 loc) · 2.67 KB
/
package.ned
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
package m1;
import inet.examples.inet.ipv4hook.MyHost;
import inet.examples.inet.ipv4hook.MyRouter;
import inet.examples.wireless.hiddennode.SinkNode;
import inet.networklayer.common.InterfaceTable;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.gpsr.GPSRRouter;
import inet.node.inet.StandardHost;
//import inet.networklayer.ipv4.IPv4;
import inet.node.inet.Router;
import ned.DatarateChannel;
@license(LGPL);
//
// TODO documentation
//
network Network
{
parameters:
int n;
@display("bgb=586,409");
types:
channel ethernet extends DatarateChannel
{
delay = 0;
datarate = 10Mbps;
}
channel fiberrouter extends DatarateChannel
{
delay = 0;
datarate = 512Mbps;
}
submodules:
cl5[n]: StandardHost {
@display("p=466,36");
}
cl2[n]: StandardHost {
@display("p=377,28");
}
cl3[n]: StandardHost {
@display("p=282,364");
}
cl4[n]: StandardHost {
@display("p=102,351");
}
srv1: StandardHost {
@display("p=50,83;i=device/server2");
}
router: Router {
@display("p=114,154");
}
router1: Router {
@display("p=411,123");
}
router2: Router {
@display("p=422,234");
}
router3: Router {
@display("p=243,263");
}
router4: Router {
@display("p=338,312");
}
cl1[n]: StandardHost {
@display("p=153,79");
}
router5: Router {
@display("p=277,190");
}
router6: Router {
@display("p=184,183");
}
configurator: IPv4NetworkConfigurator {
@display("p=241,24");
}
connections:
srv1.ethg++ <--> ethernet <--> router.ethg++;
router2.ethg++ <--> ethernet <--> router1.ethg++;
router2.ethg++ <--> ethernet <--> router4.ethg++;
router3.ethg++ <--> ethernet <--> router5.ethg++;
router5.ethg++ <--> ethernet <--> router2.ethg++;
router.ethg++ <--> ethernet <--> router6.ethg++;
router6.ethg++ <--> ethernet <--> router5.ethg++;
router6.ethg++ <--> ethernet <--> router3.ethg++;
for i=0..n-1 {
router3.ethg++ <--> ethernet <--> cl4[i].ethg++;
router1.ethg++ <--> ethernet <--> cl5[i].ethg++;
router4.ethg++ <--> ethernet <--> cl3[i].ethg++;
cl1[i].ethg++ <--> ethernet <--> router.ethg++;
router1.ethg++ <--> ethernet <--> cl2[i].ethg++;
}
}