/
VoIPStreamTrafficTest.ned
85 lines (78 loc) · 2.61 KB
/
VoIPStreamTrafficTest.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
//
// Copyright (C) 2006 Andras Varga
//
// This library is free software, you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation;
// either version 2 of the License, or any later version.
// The library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
package inet.examples.voipstream.VoIPStreamTrafficTest;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.ethernet.EtherSwitch;
import inet.nodes.inet.Router;
import inet.nodes.inet.StandardHost;
import ned.DatarateChannel;
network VoIPStreamTrafficTest
{
@display("bgb=750,447");
types:
channel line1 extends DatarateChannel
{
parameters:
delay = 100us;
datarate = 100Mbps;
}
channel line2 extends DatarateChannel
{
parameters:
delay = 10us;
datarate = 100Mbps;
}
submodules:
client: StandardHost {
parameters:
@display("p=54,133;i=device/laptop_l");
}
switch: EtherSwitch {
parameters:
@display("p=190,224;i=device/switch");
}
router2: Router {
parameters:
@display("p=376,297;i=abstract/router");
}
router1: Router {
parameters:
@display("p=266,144;i=abstract/router");
}
server: StandardHost {
parameters:
@display("p=589,58;i=device/server_l");
}
configurator: IPv4NetworkConfigurator {
parameters:
config = xml("<config><interface hosts='*' address='10.0.x.x' netmask='255.255.x.x'/></config>");
@display("p=44,19;i=block/cogwheel_s");
}
host1: StandardHost {
@display("p=54,310");
}
host2: StandardHost {
@display("p=589,332");
}
switch2: EtherSwitch {
@display("p=473,224");
}
connections:
client.ethg++ <--> line1 <--> switch.ethg++;
router1.ethg++ <--> line1 <--> switch.ethg++;
router1.ethg++ <--> line2 <--> router2.ethg++;
switch2.ethg++ <--> line2 <--> router2.ethg++;
switch2.ethg++ <--> line1 <--> server.ethg++;
switch2.ethg++ <--> line1 <--> host2.ethg++;
switch.ethg++ <--> line1 <--> host1.ethg++;
}