LDPTEST.ned 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. //
  2. // This library is free software, you can redistribute it
  3. // and/or modify
  4. // it under the terms of the GNU Lesser General Public License
  5. // as published by the Free Software Foundation;
  6. // either version 2 of the License, or any later version.
  7. // The library is distributed in the hope that it will be useful,
  8. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. // See the GNU Lesser General Public License for more details.
  11. //
  12. package inet.examples.mpls.ldp;
  13. import inet.common.lifecycle.LifecycleController;
  14. import inet.common.scenario.ScenarioManager;
  15. import inet.node.inet.StandardHost;
  16. import inet.node.mpls.LDP_LSR;
  17. import ned.DatarateChannel;
  18. network LDPTEST
  19. {
  20. parameters:
  21. **.networkLayer.configurator.networkConfiguratorModule = "";
  22. types:
  23. channel C5 extends DatarateChannel
  24. {
  25. datarate = 600kbps;
  26. delay = 5us;
  27. }
  28. channel C10 extends DatarateChannel
  29. {
  30. datarate = 600kbps;
  31. delay = 10us;
  32. }
  33. channel C15 extends DatarateChannel
  34. {
  35. datarate = 600kbps;
  36. delay = 15us;
  37. }
  38. submodules:
  39. LSR1: LDP_LSR {
  40. parameters:
  41. peers = "ppp0 ppp1 ppp2";
  42. @display("p=150,200");
  43. gates:
  44. pppg[4];
  45. }
  46. LSR2: LDP_LSR {
  47. parameters:
  48. peers = "ppp0 ppp1 ppp2 ppp3";
  49. @display("p=250,200");
  50. gates:
  51. pppg[4];
  52. }
  53. LSR3: LDP_LSR {
  54. parameters:
  55. peers = "ppp0 ppp1 ppp2";
  56. @display("p=350,200");
  57. gates:
  58. pppg[4];
  59. }
  60. LSR4: LDP_LSR {
  61. parameters:
  62. peers = "ppp0 ppp1 ppp2";
  63. @display("p=250,100");
  64. gates:
  65. pppg[4];
  66. }
  67. LSR5: LDP_LSR {
  68. parameters:
  69. peers = "ppp0 ppp1 ppp2";
  70. @display("p=250,300");
  71. gates:
  72. pppg[4];
  73. }
  74. host1: StandardHost { // client
  75. parameters:
  76. @display("p=40,200;i=device/pc2");
  77. }
  78. host2: StandardHost { // client
  79. parameters:
  80. @display("p=440,200;i=device/pc2");
  81. }
  82. host3: StandardHost { // client
  83. parameters:
  84. @display("p=250,10;i=device/pc2");
  85. }
  86. host4: StandardHost { // client
  87. parameters:
  88. @display("p=250,390;i=device/pc2");
  89. }
  90. scenarioManager: ScenarioManager {
  91. parameters:
  92. @display("p=150,50");
  93. }
  94. lifecycleController: LifecycleController {
  95. parameters:
  96. @display("p=350,50");
  97. }
  98. connections:
  99. LSR1.pppg[0] <--> C15 <--> LSR2.pppg[0];
  100. LSR1.pppg[1] <--> C5 <--> LSR4.pppg[0];
  101. LSR1.pppg[2] <--> C5 <--> LSR5.pppg[0];
  102. LSR2.pppg[1] <--> C5 <--> LSR3.pppg[0];
  103. LSR2.pppg[2] <--> C5 <--> LSR4.pppg[1];
  104. LSR2.pppg[3] <--> C5 <--> LSR5.pppg[1];
  105. LSR3.pppg[1] <--> C10 <--> LSR4.pppg[2];
  106. LSR3.pppg[2] <--> C10 <--> LSR5.pppg[2];
  107. host1.pppg++ <--> C10 <--> LSR1.pppg[3];
  108. host2.pppg++ <--> C10 <--> LSR3.pppg[3];
  109. host3.pppg++ <--> C10 <--> LSR4.pppg[3];
  110. host4.pppg++ <--> C10 <--> LSR5.pppg[3];
  111. }