IGMPv3_host1.test 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. %description:
  2. Checks that a host reports multicast state changes of the interface.
  3. See RFC 3376 5.1.
  4. %#--------------------------------------------------------------------------------------------------------------
  5. %inifile: omnetpp.ini
  6. [General]
  7. ned-path = .;../../../../src;../../lib
  8. sim-time-limit=10s
  9. cmdenv-express-mode = false
  10. #cmdenv-log-prefix = "%t %N: "
  11. #omnetpp 5.0 - 5.1 compatibility:
  12. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  13. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  14. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  15. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  16. network=TestIGMPNetwork
  17. **.igmpType = "IGMPv3"
  18. **.IPForward = false
  19. **.multicastForwarding = false
  20. **.scenarioManager.script = xmldoc("scenario.xml")
  21. %#--------------------------------------------------------------------------------------------------------------
  22. %file: scenario.xml
  23. <scenario>
  24. <dump t="1" module="node.tester" ifname="eth0" what="groups"/>
  25. <set-filter t="2" module="node.tester" ifname="eth0" group="225.0.0.1" sources="I 10.0.0.1 10.0.0.2"/>
  26. <dump t="2" module="node.tester" ifname="eth0" what="groups"/>
  27. <set-filter t="3" module="node.tester" ifname="eth0" group="225.0.0.1" sources="I 10.0.0.1"/>
  28. <dump t="3" module="node.tester" ifname="eth0" what="groups"/>
  29. <set-filter t="4" module="node.tester" ifname="eth0" group="225.0.0.1" sources="E 10.0.0.2"/>
  30. <dump t="4" module="node.tester" ifname="eth0" what="groups"/>
  31. <set-filter t="5" module="node.tester" ifname="eth0" group="225.0.0.1" sources="E 10.0.0.1 10.0.0.2"/>
  32. <dump t="5" module="node.tester" ifname="eth0" what="groups"/>
  33. <set-filter t="6" module="node.tester" ifname="eth0" group="225.0.0.1" sources="I 10.0.0.1"/>
  34. <dump t="6" module="node.tester" ifname="eth0" what="groups"/>
  35. </scenario>
  36. %#--------------------------------------------------------------------------------------------------------------
  37. %#
  38. %# First check that join/leave commands has modified the interface state
  39. %#
  40. %postrun-command: grep "IGMPTester: .* groups = " test.out > groups.out || true
  41. %contains: groups.out
  42. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E.
  43. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 I 10.0.0.1 10.0.0.2.
  44. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 I 10.0.0.1.
  45. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 E 10.0.0.2.
  46. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 E 10.0.0.1 10.0.0.2.
  47. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 I 10.0.0.1.
  48. %#
  49. %# Now check the state transitions of the IGMP module
  50. %#
  51. %postrun-command: grep ".*[Ss]tate" test.out > igmp.out || true
  52. %contains: igmp.out
  53. State of group '225.0.0.1' on interface 'eth0' has changed:
  54. Old state: INCLUDE().
  55. New state: INCLUDE(10.0.0.1,10.0.0.2).
  56. State of group '225.0.0.1' on interface 'eth0' has changed:
  57. Old state: INCLUDE(10.0.0.1,10.0.0.2).
  58. New state: INCLUDE(10.0.0.1).
  59. State of group '225.0.0.1' on interface 'eth0' has changed:
  60. Old state: INCLUDE(10.0.0.1).
  61. New state: EXCLUDE(10.0.0.2).
  62. State of group '225.0.0.1' on interface 'eth0' has changed:
  63. Old state: EXCLUDE(10.0.0.2).
  64. New state: EXCLUDE(10.0.0.1,10.0.0.2).
  65. State of group '225.0.0.1' on interface 'eth0' has changed:
  66. Old state: EXCLUDE(10.0.0.1,10.0.0.2).
  67. New state: INCLUDE(10.0.0.1).
  68. %#
  69. %# Now check that the IGMP module sent the reports immediately
  70. %#
  71. %postrun-command: grep "IGMPTester: Received" test.out > received.out || true
  72. %contains: received.out
  73. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=ALLOW 10.0.0.1 10.0.0.2>.
  74. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=BLOCK 10.0.0.2>.
  75. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=TO_EX 10.0.0.2>.
  76. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=BLOCK 10.0.0.1>.
  77. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=TO_IN 10.0.0.1>.
  78. %#--------------------------------------------------------------------------------------------------------------
  79. %not-contains: stdout
  80. undisposed object:
  81. %not-contains: stdout
  82. -- check module destructor
  83. %#--------------------------------------------------------------------------------------------------------------