Network.ned 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. package inet.examples.bgpv4.BGPCompleteTest;
  2. import inet.common.misc.ThruputMeteringChannel;
  3. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  4. import inet.node.bgp.BGPRouter;
  5. import inet.node.ethernet.EtherSwitch;
  6. import inet.node.inet.StandardHost;
  7. import inet.node.ospfv2.OSPFRouter;
  8. network BGPTest
  9. {
  10. types:
  11. channel LINK_100 extends ThruputMeteringChannel
  12. {
  13. parameters:
  14. delay = 0;
  15. datarate = 100Mbps;
  16. thruputDisplayFormat = "#N";
  17. }
  18. submodules:
  19. A1: BGPRouter {
  20. parameters:
  21. @display("p=178,45");
  22. gates:
  23. pppg[2];
  24. }
  25. A2: BGPRouter {
  26. parameters:
  27. @display("p=168,93");
  28. gates:
  29. pppg[2];
  30. }
  31. B1: BGPRouter {
  32. parameters:
  33. @display("p=194,253");
  34. gates:
  35. pppg[2];
  36. ethg[1];
  37. }
  38. C1: BGPRouter {
  39. parameters:
  40. @display("p=322,45");
  41. gates:
  42. pppg[2];
  43. }
  44. C2: BGPRouter {
  45. parameters:
  46. @display("p=322,141");
  47. gates:
  48. pppg[2];
  49. }
  50. C3: BGPRouter {
  51. parameters:
  52. @display("p=450,45");
  53. gates:
  54. pppg[2];
  55. }
  56. C4: BGPRouter {
  57. parameters:
  58. @display("p=450,149");
  59. gates:
  60. pppg[2];
  61. }
  62. D1: BGPRouter {
  63. parameters:
  64. @display("p=562,141");
  65. gates:
  66. pppg[1];
  67. ethg[1];
  68. }
  69. E1: BGPRouter {
  70. parameters:
  71. @display("p=514,269");
  72. gates:
  73. pppg[1];
  74. ethg[1];
  75. }
  76. RA3: OSPFRouter {
  77. parameters:
  78. @display("p=102,43;i=device/router");
  79. gates:
  80. pppg[2];
  81. ethg[1];
  82. }
  83. RC5: OSPFRouter {
  84. parameters:
  85. @display("p=390,97;i=device/router");
  86. gates:
  87. pppg[4];
  88. }
  89. PA3: EtherSwitch {
  90. parameters:
  91. @display("p=52,86;i=device/switch");
  92. gates:
  93. ethg[3];
  94. }
  95. PB1: EtherSwitch {
  96. parameters:
  97. @display("p=132,302;i=device/switch");
  98. gates:
  99. ethg[3];
  100. }
  101. PD1: EtherSwitch {
  102. parameters:
  103. @display("p=612,78;i=device/switch");
  104. gates:
  105. ethg[3];
  106. }
  107. PE1: EtherSwitch {
  108. parameters:
  109. @display("p=452,318;i=device/switch");
  110. gates:
  111. ethg[3];
  112. }
  113. HA11: StandardHost {
  114. parameters:
  115. @display("p=58,146;i=device/pc");
  116. gates:
  117. ethg[1];
  118. }
  119. HA12: StandardHost {
  120. parameters:
  121. @display("p=114,146;i=device/pc");
  122. gates:
  123. ethg[1];
  124. }
  125. HB11: StandardHost {
  126. parameters:
  127. @display("p=246,306;i=device/pc");
  128. gates:
  129. ethg[1];
  130. }
  131. HB12: StandardHost {
  132. parameters:
  133. @display("p=206,338;i=device/pc");
  134. gates:
  135. ethg[1];
  136. }
  137. HD11: StandardHost {
  138. parameters:
  139. @display("p=582,194;i=device/pc");
  140. gates:
  141. ethg[1];
  142. }
  143. HD12: StandardHost {
  144. parameters:
  145. @display("p=630,194;i=device/pc");
  146. gates:
  147. ethg[1];
  148. }
  149. HE11: StandardHost {
  150. parameters:
  151. @display("p=518,364;i=device/pc");
  152. gates:
  153. ethg[1];
  154. }
  155. HE12: StandardHost {
  156. parameters:
  157. @display("p=550,316;i=device/pc");
  158. gates:
  159. ethg[1];
  160. }
  161. configurator: IPv4NetworkConfigurator {
  162. @display("p=58,351");
  163. config = xmldoc("IPv4Config.xml");
  164. //assignAddresses = false;
  165. //assignDisjunctSubnetAddresses = false;
  166. addStaticRoutes = false;
  167. addDefaultRoutes = false;
  168. addSubnetRoutes = false;
  169. }
  170. connections:
  171. //LAN RA3
  172. HA11.ethg[0] <--> LINK_100 <--> PA3.ethg[0];
  173. HA12.ethg[0] <--> LINK_100 <--> PA3.ethg[1];
  174. PA3.ethg[2] <--> LINK_100 <--> RA3.ethg[0];
  175. //LAN B1
  176. HB11.ethg[0] <--> LINK_100 <--> PB1.ethg[0];
  177. HB12.ethg[0] <--> LINK_100 <--> PB1.ethg[1];
  178. PB1.ethg[2] <--> LINK_100 <--> B1.ethg[0];
  179. //LAN D1
  180. HD11.ethg[0] <--> LINK_100 <--> PD1.ethg[0];
  181. HD12.ethg[0] <--> LINK_100 <--> PD1.ethg[1];
  182. PD1.ethg[2] <--> LINK_100 <--> D1.ethg[0];
  183. //LAN E1
  184. HE11.ethg[0] <--> LINK_100 <--> PE1.ethg[0];
  185. HE12.ethg[0] <--> LINK_100 <--> PE1.ethg[1];
  186. PE1.ethg[2] <--> LINK_100 <--> E1.ethg[0];
  187. //OSPF A
  188. RA3.pppg[0] <--> LINK_100 <--> A1.pppg[1];
  189. RA3.pppg[1] <--> LINK_100 <--> A2.pppg[1];
  190. //OSPF C
  191. RC5.pppg[0] <--> LINK_100 <--> C1.pppg[1];
  192. RC5.pppg[1] <--> LINK_100 <--> C2.pppg[1];
  193. RC5.pppg[2] <--> LINK_100 <--> C3.pppg[1];
  194. RC5.pppg[3] <--> LINK_100 <--> C4.pppg[1];
  195. //BGP
  196. A1.pppg[0] <--> LINK_100 <--> C1.pppg[0];
  197. A2.pppg[0] <--> LINK_100 <--> B1.pppg[0];
  198. B1.pppg[1] <--> LINK_100 <--> C2.pppg[0];
  199. C3.pppg[0] <--> LINK_100 <--> D1.pppg[0];
  200. C4.pppg[0] <--> LINK_100 <--> E1.pppg[0];
  201. }