ospf_fig6_simple.test.fail 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. %description:
  2. Testing OSPF routing
  3. Detects bugs in OSPF on RFC2328 fig.6. network
  4. These UDP communications don't work yet:
  5. Area3.N10.host0 <--> N15.host0
  6. N12.host0 <--> Area3.H1
  7. %#--------------------------------------------------------------------------------------------------------------
  8. %file: test.ned
  9. import inet.linklayer.ethernet.EtherHub;
  10. import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
  11. import inet.nodes.inet.StandardHost;
  12. import inet.nodes.ospfv2.OSPFRouter;
  13. import inet.util.ThruputMeteringChannel;
  14. channel C extends ThruputMeteringChannel
  15. {
  16. delay = 0.1us;
  17. datarate = 100Mbps;
  18. thruputDisplayFormat = "#N";
  19. }
  20. module OspfLan
  21. {
  22. parameters:
  23. int h; // number of hosts on the hub
  24. @display("i=cloud");
  25. gates:
  26. inout ethg[];
  27. submodules:
  28. hub: EtherHub {
  29. @display("is=s");
  30. }
  31. host[h]: StandardHost {
  32. @display("is=s");
  33. }
  34. connections:
  35. for i=0..sizeof(ethg)-1 {
  36. hub.ethg++ <--> ethg[i];
  37. }
  38. for i=0..h-1 {
  39. hub.ethg++ <--> C <--> host[i].ethg++;
  40. }
  41. }
  42. network Fig6
  43. {
  44. parameters:
  45. @display("p=10,10;b=704,560");
  46. submodules:
  47. RT5: OSPFRouter {
  48. parameters:
  49. @display("p=496,144");
  50. gates:
  51. ethg[6];
  52. }
  53. RT6: OSPFRouter {
  54. parameters:
  55. @display("p=424,208");
  56. gates:
  57. ethg[3];
  58. }
  59. RT7: OSPFRouter {
  60. parameters:
  61. @display("p=496,328");
  62. gates:
  63. ethg[4];
  64. }
  65. RT10: OSPFRouter {
  66. parameters:
  67. @display("p=424,328");
  68. gates:
  69. ethg[3];
  70. }
  71. RT11: OSPFRouter {
  72. parameters:
  73. @display("p=282,404");
  74. gates:
  75. ethg[2];
  76. }
  77. N12: OspfLan {
  78. parameters:
  79. h = 1;
  80. @display("p=620,277");
  81. }
  82. N15: OspfLan {
  83. parameters:
  84. h = 1;
  85. @display("p=608,356");
  86. }
  87. Area2_N6: EtherHub {
  88. parameters:
  89. @display("p=504,467");
  90. }
  91. Area2_N8: EtherHub {
  92. parameters:
  93. @display("p=411,467");
  94. }
  95. Area3_RT12: OSPFRouter {
  96. parameters:
  97. @display("p=148,360");
  98. gates:
  99. ethg[3];
  100. }
  101. Area3_N9: EtherHub {
  102. parameters:
  103. @display("p=148,284");
  104. }
  105. Area3_N10: OspfLan {
  106. parameters:
  107. h = 1;
  108. @display("p=148,452");
  109. }
  110. Area3_H1: StandardHost {
  111. parameters:
  112. @display("p=64,360;i=device/pc_s");
  113. }
  114. configurator: IPv4NetworkConfigurator {
  115. parameters:
  116. config = xml("<config>"+"\n"+
  117. "<interface among='Area2_N8.* RT10 RT11' address='10.2.21.x' netmask='255.255.255.0' />"+"\n"+
  118. "<interface hosts='Area2_N6.*' address='10.2.22.x' netmask='255.255.255.0' />"+"\n"+
  119. "<interface hosts='RT7 RT10' towards='Area2_N6.*' address='10.2.22.x' netmask='255.255.255.0' />"+"\n"+
  120. "<interface among='Area3_N10.* Area3_RT12' address='10.3.31.x' netmask='255.255.255.0' />"+"\n"+
  121. "<interface among='Area3_H1 Area3_RT12' address='10.3.33.x' netmask='255.255.255.0' />"+"\n"+
  122. "<interface among='Area3_N9 Area3_N9.* Area3_RT* RT11' address='10.3.34.x' netmask='255.255.255.0' />"+"\n"+
  123. "<interface hosts='RT5 RT7' towards='N12.*' address='10.99.12.x' netmask='255.255.255.0' />"+"\n"+
  124. "<interface hosts='N12.*' address='10.99.12.x' netmask='255.255.255.0' />"+"\n"+
  125. "<interface among='RT5 RT6 RT7 RT10' address='10.0.104.x' netmask='255.255.255.x' />"+"\n"+
  126. "<interface among='RT7 N15.*' address='10.99.15.x' netmask='255.255.255.0' />"+"\n"+
  127. "<route hosts='Area3_H1 Area*_N*.host[*] N*.host[*]' destination='*' netmask='0.0.0.0' interface='eth0' />"+"\n"+
  128. "</config>"+"\n");
  129. addStaticRoutes = false;
  130. addDefaultRoutes = false;
  131. @display("p=120,43");
  132. }
  133. connections allowunconnected:
  134. Area3_RT12.ethg[1] <--> C <--> Area3_H1.ethg++;
  135. Area3_RT12.ethg[0] <--> C <--> Area3_N9.ethg++;
  136. Area3_RT12.ethg[2] <--> C <--> Area3_N10.ethg++;
  137. RT11.ethg[0] <--> C <--> Area3_N9.ethg++;
  138. Area2_N8.ethg++ <--> C <--> RT11.ethg[1];
  139. Area2_N8.ethg++ <--> C <--> RT10.ethg[1];
  140. Area2_N6.ethg++ <--> C <--> RT10.ethg[2];
  141. Area2_N6.ethg++ <--> C <--> RT7.ethg[1];
  142. RT5.ethg[3] <--> C <--> RT7.ethg[0];
  143. RT5.ethg[2] <--> C <--> RT6.ethg[2];
  144. RT5.ethg[4] <--> C <--> N12.ethg++;
  145. RT6.ethg[1] <--> C <--> RT10.ethg[0];
  146. RT7.ethg[3] <--> C <--> N12.ethg++;
  147. RT7.ethg[2] <--> C <--> N15.ethg++;
  148. }
  149. %#--------------------------------------------------------------------------------------------------------------
  150. %inifile: omnetpp.ini
  151. [General]
  152. description = "Full network test"
  153. network = Fig6
  154. ned-path = .;../../../../src;../../lib
  155. tkenv-plugin-path = ../../../etc/plugins
  156. sim-time-limit = 300s
  157. #omnetpp 5.0 - 5.1 compatibility:
  158. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  159. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  160. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  161. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  162. **.ospf.ospfConfig = xmldoc("ASConfig.xml")
  163. **.arp.cacheTimeout = 1s
  164. *.usenew = true
  165. **.Area3_N10.host[0].numUdpApps = 2
  166. **.N15.host[0].numUdpApps = 2
  167. **.N12.host[0].numUdpApps = 2
  168. **.Area3_H1.numUdpApps = 2
  169. **.udpApp[0].typename = "UDPEchoApp"
  170. **.udpApp[0].localPort = 1234
  171. **.udpApp[1..].typename = "UDPBasicApp"
  172. **.udpApp[1..].destPort = 1234
  173. **.udpApp[1..].messageLength = 32 bytes
  174. **.udpApp[1..].sendInterval = 1s
  175. **.udpApp[1..].startTime = 100s
  176. **.udpApp[1..].stopTime = this.startTime + 100s
  177. **.Area3_N10.host[0].udpApp[1].destAddresses = "N15.host[0]"
  178. **.N15.host[0].udpApp[1].destAddresses = "Area3_N10.host[0]"
  179. **.N12.host[0].udpApp[1].destAddresses = "Area3_H1"
  180. **.Area3_H1.udpApp[1].destAddresses = "N12.host[0]"
  181. %#--------------------------------------------------------------------------------------------------------------
  182. %file: ASConfig.xml
  183. <?xml version="1.0"?>
  184. <OSPFASConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="OSPF.xsd">
  185. <!-- Areas -->
  186. <Area id="0.0.0.0">
  187. <AddressRange address="RT5>RT6" mask="RT5>RT6" status="Advertise" />
  188. <AddressRange address="RT5>RT7" mask="RT5>RT7" status="Advertise" />
  189. <AddressRange address="RT6>RT10" mask="RT6>RT10" status="Advertise" />
  190. <AddressRange address="RT6>RT5" mask="RT6>RT5" status="Advertise" />
  191. <AddressRange address="RT7>RT5" mask="RT7>RT5" status="Advertise" />
  192. <AddressRange address="RT10>RT6" mask="RT10>RT6" status="Advertise" />
  193. </Area>
  194. <Area id="0.0.0.2">
  195. <AddressRange address="RT7>Area2_N6" mask="RT7>Area2_N6" status="Advertise" />
  196. <AddressRange address="RT10>Area2_N6" mask="RT10>Area2_N6" status="Advertise" />
  197. <AddressRange address="RT10>Area2_N8" mask="RT10>Area2_N8" status="Advertise" />
  198. <AddressRange address="RT11>Area2_N8" mask="RT11>Area2_N8" status="Advertise" />
  199. </Area>
  200. <Area id="0.0.0.3">
  201. <AddressRange address="RT11>Area3_N9" mask="RT11>Area3_N9" status="Advertise" />
  202. <AddressRange address="Area3_RT12>Area3_N9" mask="Area3_RT12>Area3_N9" status="Advertise" />
  203. <AddressRange address="Area3_RT12>Area3_H1" mask="Area3_RT12>Area3_H1" status="Advertise" />
  204. <AddressRange address="Area3_RT12>Area3_N10" mask="Area3_RT12>Area3_N10" status="Advertise" />
  205. </Area>
  206. <!-- Routers -->
  207. <Router name="RT5" RFC1583Compatible="true">
  208. <BroadcastInterface toward="RT6" areaID="0.0.0.0" interfaceOutputCost="7" />
  209. <BroadcastInterface toward="RT7" areaID="0.0.0.0" interfaceOutputCost="6" />
  210. <ExternalInterface toward="N12" advertisedExternalNetworkAddress="RT5>N12" advertisedExternalNetworkMask="RT5>N12" externalInterfaceOutputCost="8" externalInterfaceOutputType="Type2" forwardingAddress="0.0.0.0" externalRouteTag="0x00" />
  211. </Router>
  212. <Router name="RT6" RFC1583Compatible="true">
  213. <BroadcastInterface toward="RT10" areaID="0.0.0.0" interfaceOutputCost="7" />
  214. <BroadcastInterface toward="RT5" areaID="0.0.0.0" interfaceOutputCost="6" />
  215. </Router>
  216. <Router name="RT7" RFC1583Compatible="true">
  217. <BroadcastInterface toward="RT5" areaID="0.0.0.0" interfaceOutputCost="6" />
  218. <BroadcastInterface toward="Area2_N6" areaID="0.0.0.2" interfaceOutputCost="1" routerPriority="1" />
  219. <ExternalInterface toward="N15" advertisedExternalNetworkAddress="RT7>N15" advertisedExternalNetworkMask="RT7>N15" externalInterfaceOutputCost="9" externalInterfaceOutputType="Type2" forwardingAddress="0.0.0.0" externalRouteTag="0x00" />
  220. <ExternalInterface toward="N12" advertisedExternalNetworkAddress="RT7>N12" advertisedExternalNetworkMask="RT7>N12" externalInterfaceOutputCost="2" externalInterfaceOutputType="Type2" forwardingAddress="0.0.0.0" externalRouteTag="0x00" />
  221. </Router>
  222. <Router name="RT10" RFC1583Compatible="true">
  223. <BroadcastInterface toward="RT6" areaID="0.0.0.0" interfaceOutputCost="5" />
  224. <BroadcastInterface toward="Area2_N8" areaID="0.0.0.2" interfaceOutputCost="3" routerPriority="1" />
  225. <BroadcastInterface toward="Area2_N6" areaID="0.0.0.2" interfaceOutputCost="1" routerPriority="1" />
  226. <VirtualLink endPointRouterID="RT11%routerId" transitAreaID="0.0.0.2" />
  227. </Router>
  228. <Router name="RT11" RFC1583Compatible="true">
  229. <BroadcastInterface toward="Area3_N9" areaID="0.0.0.3" interfaceOutputCost="1" routerPriority="1" />
  230. <BroadcastInterface toward="Area2_N8" areaID="0.0.0.2" interfaceOutputCost="2" routerPriority="1" />
  231. <VirtualLink endPointRouterID="RT10%routerId" transitAreaID="0.0.0.2" />
  232. </Router>
  233. <Router name="Area3_RT12" RFC1583Compatible="true">
  234. <BroadcastInterface toward="Area3_N9" areaID="0.0.0.3" interfaceOutputCost="1" routerPriority="1" />
  235. <HostInterface toward="Area3_H1" areaID="0.0.0.3" attachedHost="Area3_H1" linkCost="10" />
  236. <BroadcastInterface toward="Area3_N10" areaID="0.0.0.3" interfaceOutputCost="2" routerPriority="1" />
  237. </Router>
  238. </OSPFASConfig>
  239. %#--------------------------------------------------------------------------------------------------------------
  240. %contains: results/General-0.sca
  241. scalar Fig6.N12.host[0].udpApp[0] echoedPk:count 100
  242. %contains: results/General-0.sca
  243. scalar Fig6.N12.host[0].udpApp[1] sentPk:count 100
  244. %contains: results/General-0.sca
  245. scalar Fig6.N12.host[0].udpApp[1] rcvdPk:count 100
  246. %contains: results/General-0.sca
  247. scalar Fig6.N15.host[0].udpApp[0] echoedPk:count 100
  248. %contains: results/General-0.sca
  249. scalar Fig6.N15.host[0].udpApp[1] sentPk:count 100
  250. %contains: results/General-0.sca
  251. scalar Fig6.N15.host[0].udpApp[1] rcvdPk:count 100
  252. %contains: results/General-0.sca
  253. scalar Fig6.Area3_N10.host[0].udpApp[0] echoedPk:count 100
  254. %contains: results/General-0.sca
  255. scalar Fig6.Area3_N10.host[0].udpApp[1] sentPk:count 100
  256. %contains: results/General-0.sca
  257. scalar Fig6.Area3_N10.host[0].udpApp[1] rcvdPk:count 100
  258. %contains: results/General-0.sca
  259. scalar Fig6.Area3_H1.udpApp[0] echoedPk:count 100
  260. %contains: results/General-0.sca
  261. scalar Fig6.Area3_H1.udpApp[1] sentPk:count 100
  262. %contains: results/General-0.sca
  263. scalar Fig6.Area3_H1.udpApp[1] rcvdPk:count 100
  264. %#--------------------------------------------------------------------------------------------------------------
  265. %not-contains: stdout
  266. undisposed object:
  267. %not-contains: stdout
  268. -- check module destructor
  269. %#--------------------------------------------------------------------------------------------------------------