IGMP_host_groupstates.test 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. %description: Tests group specific state transitions of Non-Querier IGMP hosts
  2. RFC 2236 6.:
  3. ________________
  4. | |
  5. | |
  6. --------->| Non-Member |<---------
  7. | | | |
  8. | |________________| |
  9. | leave group | join group | leave group
  10. | (stop timer, |(send report, | (send leave
  11. | send leave if | set flag, | if flag set)
  12. | flag set) | start timer) |
  13. ________|________ | ________|________
  14. | |<--------- | |
  15. | |<-------------------| |
  16. | | query received | |
  17. | Delaying Member | (start timer) | Idle Member |
  18. ---->| |------------------->| |
  19. | | | report received | |
  20. | | | (stop timer, | |
  21. | | | clear flag) | |
  22. | |_________________|------------------->|_________________|
  23. | query received | timer expired
  24. | (reset timer if | (send report,
  25. | Max Resp Time | set flag)
  26. | < current timer) |
  27. -------------------
  28. This scenario checks the following trajectories:
  29. NON MEMBER --> join group --> DELAYING MEMBER --> timer expired --> IDLE MEMBER --> leave group --> NON MEMBER
  30. NON MEMBER --> join group --> DELAYING MEMBER --> leave group --> NON MEMBER
  31. NON MEMBER --> join group --> DELAYING MEMBER --> timer expired --> IDLE MEMBER --> query received --> DELAYING MEMBER -->
  32. --> report received --> IDLE MEMBER -> query received --> DELAYING MEMBER --> query received --> DELAYING MEMBER
  33. %inifile: omnetpp.ini
  34. [General]
  35. ned-path = .;../../../../src;../../lib
  36. sim-time-limit=400s
  37. cmdenv-express-mode = true
  38. #omnetpp 5.0 - 5.1 compatibility:
  39. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  40. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  41. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  42. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  43. network=IGMPTestNetwork
  44. **.igmpType = "TestIGMP"
  45. **.scenarioManager.script = xmldoc("scenario.xml")
  46. **.host.networkLayer.igmp.outputFile = "host-output.txt"
  47. **.router.*.igmp.startupQueryInterval = 500s
  48. %file: scenario.xml
  49. <scenario>
  50. <!-- 1. join group, wait for timer expiry (max 10s), and leave group -->
  51. <join t="100" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.1"/>
  52. <leave t="111" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.1"/>
  53. <!-- 2. join group and leave immediately -->
  54. <join t="200" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.2"/>
  55. <leave t="200" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.2"/>
  56. <!-- 3. join group, wait for timer expiry, receive query, receive report, receive query, received query -->
  57. <join t="300" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.3"/>
  58. <send t="320" module="router.networkLayer.igmp" ifname="eth0" what="query" group="225.0.0.3"/>
  59. <join t="320" module="host2.networkLayer.igmp" ifname="eth0" group="225.0.0.3"/>
  60. <send t="350" module="router.networkLayer.igmp" ifname="eth0" what="query" group="225.0.0.3"/>
  61. <send t="350" module="router.networkLayer.igmp" ifname="eth0" what="query" group="225.0.0.3"/>
  62. </scenario>
  63. %contains-regex: host-output.txt
  64. t=100 host/eth0/225.0.0.1: NON_MEMBER --> join group <send report> --> DELAYING_MEMBER
  65. t=.* host/eth0/225.0.0.1: DELAYING_MEMBER --> timer expired <send report> --> IDLE_MEMBER
  66. t=111 host/eth0/225.0.0.1: IDLE_MEMBER --> leave group <send leave> --> NON_MEMBER
  67. %contains-regex: host-output.txt
  68. t=200 host/eth0/225.0.0.2: NON_MEMBER --> join group <send report> --> DELAYING_MEMBER
  69. t=200 host/eth0/225.0.0.2: DELAYING_MEMBER --> leave group <send leave> --> NON_MEMBER
  70. %contains-regex: host-output.txt
  71. t=300 host/eth0/225.0.0.3: NON_MEMBER --> join group <send report> --> DELAYING_MEMBER
  72. t=.* host/eth0/225.0.0.3: DELAYING_MEMBER --> timer expired <send report> --> IDLE_MEMBER
  73. t=320\..* host/eth0/225.0.0.3: IDLE_MEMBER --> query received <> --> DELAYING_MEMBER
  74. t=320\..* host/eth0/225.0.0.3: DELAYING_MEMBER --> report received <> --> IDLE_MEMBER
  75. .*
  76. t=350\..* host/eth0/225.0.0.3: IDLE_MEMBER --> query received <> --> DELAYING_MEMBER
  77. t=350\..* host/eth0/225.0.0.3: DELAYING_MEMBER --> query received <> --> DELAYING_MEMBER
  78. %#--------------------------------------------------------------------------------------------------------------
  79. %not-contains: stdout
  80. undisposed object:
  81. %not-contains: stdout
  82. -- check module destructor
  83. %#--------------------------------------------------------------------------------------------------------------