IGMPTestNetwork.ned 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import inet.node.ethernet.EtherSwitch;
  2. import ned.DatarateChannel;
  3. import inet.node.inet.StandardHost;
  4. import inet.node.inet.Router;
  5. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  6. import inet.common.scenario.ScenarioManager;
  7. network IGMPTestNetwork
  8. {
  9. types:
  10. channel ethernetline extends DatarateChannel
  11. {
  12. delay = 0.1us;
  13. datarate = 10Mbps;
  14. }
  15. submodules:
  16. configurator: IPv4NetworkConfigurator {
  17. config = default(xml("\
  18. <config>\
  19. <interface hosts='*' address='10.x.x.x' netmask='255.0.0.0'/>\
  20. <interface hosts='router1' address='10.0.0.1' netmask='255.0.0.0'/>\
  21. </config>"));
  22. @display("p=347,31");
  23. }
  24. scenarioManager: ScenarioManager {
  25. @display("p=73,42");
  26. }
  27. host: StandardHost {
  28. @display("p=221,50");
  29. }
  30. host2: StandardHost {
  31. @display("p=81,152");
  32. }
  33. // Querier router
  34. router: Router {
  35. @display("p=384,152");
  36. multicastForwarding = true;
  37. }
  38. etherSwitch: EtherSwitch {
  39. @display("p=221,151");
  40. }
  41. // Non-querier router
  42. nqrouter: Router {
  43. @display("p=221,275");
  44. multicastForwarding = true;
  45. }
  46. connections:
  47. host.ethg++ <--> ethernetline <--> etherSwitch.ethg++;
  48. host2.ethg++ <--> ethernetline <--> etherSwitch.ethg++;
  49. etherSwitch.ethg++ <--> ethernetline <--> router.ethg++;
  50. etherSwitch.ethg++ <--> ethernetline <--> nqrouter.ethg++;
  51. }