BackboneAndOneStub.ned 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package inet.examples.ospfv2.areatests;
  2. import inet.common.misc.ThruputMeteringChannel;
  3. import inet.common.scenario.ScenarioManager;
  4. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  5. network OSPF_BackboneAndOneStubTest
  6. {
  7. @display("bgb=480,300");
  8. types:
  9. channel C extends ThruputMeteringChannel
  10. {
  11. delay = 0.1us;
  12. datarate = 100Mbps;
  13. thruputDisplayFormat = "#N";
  14. }
  15. submodules:
  16. Backbone: TestArea {
  17. parameters:
  18. extGates = 1;
  19. @display("p=138,156;b=136,136");
  20. }
  21. Stub1: TestArea {
  22. parameters:
  23. extGates = 1;
  24. @display("p=325,156;b=136,136");
  25. }
  26. configurator: IPv4NetworkConfigurator {
  27. parameters:
  28. config = xml("<config>"+
  29. "<interface hosts='**.B[*]' names='eth0' address='192.168.3.x' netmask='255.255.255.x' />"+
  30. "<interface hosts='Backbone.*' address='192.168.1.x' netmask='255.255.255.x' />"+
  31. "<interface hosts='Stub1.*' address='192.168.2.x' netmask='255.255.255.x' />"+
  32. "<multicast-group hosts='**.R[*]' address='224.0.0.5 224.0.0.6' />"+
  33. "<route hosts='**.H[*]' destination='*' netmask='0.0.0.0' interface='eth0' />"+
  34. "<route hosts='**.R[*] **.B[*]' destination='224.0.0.0' netmask='240.0.0.0' interface='eth0' />"+
  35. "<route hosts='**.R[*] **.B[*]' destination='224.0.0.0' netmask='240.0.0.0' interface='eth1' />"+
  36. "<route hosts='**.R[*] **.B[*]' destination='224.0.0.0' netmask='240.0.0.0' interface='eth2' />"+
  37. "</config>");
  38. addStaticRoutes = false;
  39. addDefaultRoutes = false;
  40. @display("p=75,43");
  41. }
  42. scenarioManager: ScenarioManager {
  43. @display("p=187,43");
  44. }
  45. connections:
  46. Backbone.ethg[0] <--> C <--> Stub1.ethg[0];
  47. }