Traceroute.ned 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. //
  2. // Copyright (C) 2008 Irene Ruengeler
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. package inet.examples.emulation.traceroute;
  19. import inet.node.ethernet.EtherSwitch;
  20. import inet.node.inet.Router;
  21. import inet.node.inet.StandardHost;
  22. import ned.DatarateChannel;
  23. network Traceroute
  24. {
  25. parameters:
  26. double testTimeout @unit(s) = default(0s);
  27. bool testing = default(false);
  28. types:
  29. channel pppline extends DatarateChannel
  30. {
  31. delay = 100ms;
  32. datarate = 1 Gbps;
  33. }
  34. channel ethline extends DatarateChannel
  35. {
  36. delay = 100ms;
  37. datarate = 1 Gbps;
  38. }
  39. submodules:
  40. cli1: StandardHost {
  41. parameters:
  42. forwarding = false;
  43. routingTable.routingFile = "cli1.mrt";
  44. @display("p=37,62;i=old/laptop3");
  45. gates:
  46. ethg[1];
  47. }
  48. cli2: StandardHost {
  49. parameters:
  50. forwarding = false;
  51. routingTable.routingFile = "cli2.mrt";
  52. @display("p=35,131;i=old/laptop3");
  53. gates:
  54. ethg[1];
  55. }
  56. cli3: StandardHost {
  57. parameters:
  58. forwarding = false;
  59. routingTable.routingFile = "cli3.mrt";
  60. @display("p=40,223;i=old/laptop3");
  61. gates:
  62. ethg[1];
  63. }
  64. cli4: StandardHost {
  65. parameters:
  66. forwarding = false;
  67. routingTable.routingFile = "cli4.mrt";
  68. @display("p=40,295;i=old/laptop3");
  69. gates:
  70. ethg[1];
  71. }
  72. cli5: StandardHost {
  73. parameters:
  74. forwarding = false;
  75. routingTable.routingFile = "cli5.mrt";
  76. @display("p=40,383;i=old/laptop3");
  77. gates:
  78. ethg[1];
  79. }
  80. cli6: StandardHost {
  81. parameters:
  82. forwarding = false;
  83. routingTable.routingFile = "cli6.mrt";
  84. @display("p=40,439;i=old/laptop3");
  85. gates:
  86. ethg[1];
  87. }
  88. cli7: StandardHost {
  89. parameters:
  90. forwarding = false;
  91. routingTable.routingFile = "cli7.mrt";
  92. @display("p=40,511;i=old/laptop3");
  93. gates:
  94. ethg[1];
  95. }
  96. cli8: StandardHost {
  97. parameters:
  98. forwarding = false;
  99. routingTable.routingFile = "cli8.mrt";
  100. @display("p=40,575;i=old/laptop3");
  101. gates:
  102. ethg[1];
  103. }
  104. switch1: EtherSwitch {
  105. parameters:
  106. @display("p=127,102;i=device/switch");
  107. gates:
  108. ethg[3];
  109. }
  110. switch2: EtherSwitch {
  111. parameters:
  112. @display("p=129,254;i=device/switch");
  113. gates:
  114. ethg[3];
  115. }
  116. switch3: EtherSwitch {
  117. parameters:
  118. @display("p=137,398;i=device/switch");
  119. gates:
  120. ethg[3];
  121. }
  122. switch4: EtherSwitch {
  123. parameters:
  124. @display("p=138,534;i=device/switch");
  125. gates:
  126. ethg[3];
  127. }
  128. router1: Router {
  129. parameters:
  130. routingTable.routingFile = "router1.mrt";
  131. @display("p=220,101;i=device/router_s");
  132. gates:
  133. pppg[1];
  134. ethg[1];
  135. }
  136. router2: Router {
  137. parameters:
  138. routingTable.routingFile = "router2.mrt";
  139. @display("p=236,253;i=device/router_s");
  140. gates:
  141. pppg[1];
  142. ethg[1];
  143. }
  144. router3: Router {
  145. parameters:
  146. routingTable.routingFile = "router3.mrt";
  147. @display("p=252,397;i=device/router_s");
  148. gates:
  149. pppg[1];
  150. ethg[1];
  151. }
  152. router4: Router {
  153. parameters:
  154. routingTable.routingFile = "router4.mrt";
  155. @display("p=268,533;i=device/router_s");
  156. gates:
  157. pppg[1];
  158. ethg[1];
  159. }
  160. Router5: Router {
  161. parameters:
  162. routingTable.routingFile = "Router5.mrt";
  163. @display("p=372,165;i=device/router");
  164. gates:
  165. pppg[3];
  166. }
  167. Router6: Router {
  168. parameters:
  169. routingTable.routingFile = "Router6.mrt";
  170. @display("p=396,445;i=device/router");
  171. gates:
  172. pppg[3];
  173. }
  174. extRouter: Router {
  175. parameters:
  176. routingTable.routingFile = "extRouter.mrt";
  177. numExtInterfaces = 1;
  178. @display("p=500,293;i=device/router_l");
  179. gates:
  180. pppg[2];
  181. }
  182. connections allowunconnected:
  183. cli1.ethg[0] <--> ethline <--> switch1.ethg[0];
  184. cli2.ethg[0] <--> ethline <--> switch1.ethg[1];
  185. switch1.ethg[2] <--> ethline <--> router1.ethg[0];
  186. router1.pppg[0] <--> pppline <--> Router5.pppg[0];
  187. Router5.pppg[2] <--> pppline <--> extRouter.pppg[0];
  188. cli3.ethg[0] <--> ethline <--> switch2.ethg[0];
  189. cli4.ethg[0] <--> ethline <--> switch2.ethg[1];
  190. switch2.ethg[2] <--> ethline <--> router2.ethg[0];
  191. router2.pppg[0] <--> pppline <--> Router5.pppg[1];
  192. cli5.ethg[0] <--> ethline <--> switch3.ethg[0];
  193. cli6.ethg[0] <--> ethline <--> switch3.ethg[1];
  194. switch3.ethg[2] <--> ethline <--> router3.ethg[0];
  195. router3.pppg[0] <--> pppline <--> Router6.pppg[0];
  196. Router6.pppg[2] <--> pppline <--> extRouter.pppg[1];
  197. cli7.ethg[0] <--> ethline <--> switch4.ethg[0];
  198. cli8.ethg[0] <--> ethline <--> switch4.ethg[1];
  199. switch4.ethg[2] <--> ethline <--> router4.ethg[0];
  200. router4.pppg[0] <--> pppline <--> Router6.pppg[1];
  201. }