VoIPStreamTrafficTest.ned 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // Copyright (C) 2006 Andras Varga
  3. //
  4. // This library is free software, you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public License
  6. // as published by the Free Software Foundation;
  7. // either version 2 of the License, or any later version.
  8. // The library is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. // See the GNU Lesser General Public License for more details.
  12. //
  13. package inet.examples.voipstream.VoIPStreamTrafficTest;
  14. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  15. import inet.node.ethernet.EtherSwitch;
  16. import inet.node.inet.Router;
  17. import inet.node.inet.StandardHost;
  18. import ned.DatarateChannel;
  19. network VoIPStreamTrafficTest
  20. {
  21. @display("bgb=750,447");
  22. types:
  23. channel line1 extends DatarateChannel
  24. {
  25. parameters:
  26. delay = 100us;
  27. datarate = 100Mbps;
  28. }
  29. channel line2 extends DatarateChannel
  30. {
  31. parameters:
  32. delay = 10us;
  33. datarate = 100Mbps;
  34. }
  35. submodules:
  36. client: StandardHost {
  37. parameters:
  38. @display("p=54,133;i=device/laptop_l");
  39. }
  40. switch: EtherSwitch {
  41. parameters:
  42. @display("p=190,224;i=device/switch");
  43. }
  44. router2: Router {
  45. parameters:
  46. @display("p=376,297;i=abstract/router");
  47. }
  48. router1: Router {
  49. parameters:
  50. @display("p=266,144;i=abstract/router");
  51. }
  52. server: StandardHost {
  53. parameters:
  54. @display("p=589,58;i=device/server_l");
  55. }
  56. configurator: IPv4NetworkConfigurator {
  57. parameters:
  58. config = xml("<config><interface hosts='*' address='10.0.x.x' netmask='255.255.x.x'/></config>");
  59. @display("p=44,19;i=block/cogwheel_s");
  60. }
  61. host1: StandardHost {
  62. @display("p=54,310");
  63. }
  64. host2: StandardHost {
  65. @display("p=589,332");
  66. }
  67. switch2: EtherSwitch {
  68. @display("p=473,224");
  69. }
  70. connections:
  71. client.ethg++ <--> line1 <--> switch.ethg++;
  72. router1.ethg++ <--> line1 <--> switch.ethg++;
  73. router1.ethg++ <--> line2 <--> router2.ethg++;
  74. switch2.ethg++ <--> line2 <--> router2.ethg++;
  75. switch2.ethg++ <--> line1 <--> server.ethg++;
  76. switch2.ethg++ <--> line1 <--> host2.ethg++;
  77. switch.ethg++ <--> line1 <--> host1.ethg++;
  78. }