multicast1.ned 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package inet.examples.rtp.multicast1;
  2. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  3. import inet.node.inet.Router;
  4. import inet.node.rtp.RTPHost;
  5. import ned.DatarateChannel;
  6. network RTPMulticast1
  7. {
  8. types:
  9. channel ethernet extends DatarateChannel
  10. {
  11. delay = normal(0.00015s, 0.00005s);
  12. datarate = 10Mbps;
  13. }
  14. submodules:
  15. host1: RTPHost {
  16. parameters:
  17. forwarding = false;
  18. profileName = "inet.transportlayer.rtp.RTPAVProfile";
  19. destinationAddress = "225.0.0.1";
  20. portNumber = 5004;
  21. bandwidth = 8000;
  22. @display("p=150,50");
  23. }
  24. host2: RTPHost {
  25. parameters:
  26. forwarding = false;
  27. profileName = "inet.transportlayer.rtp.RTPAVProfile";
  28. destinationAddress = "225.0.0.1";
  29. portNumber = 5004;
  30. bandwidth = 8000;
  31. @display("p=250,150");
  32. }
  33. host3: RTPHost {
  34. parameters:
  35. forwarding = false;
  36. profileName = "inet.transportlayer.rtp.RTPAVProfile";
  37. destinationAddress = "225.0.0.1";
  38. portNumber = 5004;
  39. bandwidth = 8000;
  40. @display("p=150,250");
  41. }
  42. host4: RTPHost {
  43. parameters:
  44. forwarding = false;
  45. profileName = "inet.transportlayer.rtp.RTPAVProfile";
  46. destinationAddress = "225.0.0.1";
  47. portNumber = 5004;
  48. bandwidth = 8000;
  49. @display("p=50,150");
  50. }
  51. router1: Router {
  52. parameters:
  53. multicastForwarding = true;
  54. @display("p=150,150");
  55. gates:
  56. pppg[];
  57. }
  58. configurator: IPv4NetworkConfigurator {
  59. config = xml("<config>"
  60. +"<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/>"
  61. +"<multicast-group hosts='**' address='225.0.0.1'/>"
  62. +"<multicast-route hosts='router1' groups='225.0.0.1' children='ppp*'/>"
  63. +"</config>");
  64. }
  65. connections:
  66. host1.pppg++ <--> ethernet <--> router1.pppg++;
  67. host2.pppg++ <--> ethernet <--> router1.pppg++;
  68. host3.pppg++ <--> ethernet <--> router1.pppg++;
  69. host4.pppg++ <--> ethernet <--> router1.pppg++;
  70. }