DHCP_2.test 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. %description:
  2. Testing DHCP protocol
  3. %#--------------------------------------------------------------------------------------------------------------
  4. %file: test.ned
  5. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  6. import inet.node.inet.StandardHost;
  7. import ned.DatarateChannel;
  8. network Dhcptest
  9. {
  10. types:
  11. channel C extends DatarateChannel
  12. {
  13. delay = 0.1us;
  14. datarate = 10Mbps;
  15. }
  16. submodules:
  17. configurator: IPv4NetworkConfigurator {
  18. parameters:
  19. config = xml("<config><interface hosts='dhcpServer' address='192.168.1.1' netmask='255.255.255.0' /></config>");
  20. }
  21. dhcpClient: StandardHost {
  22. parameters:
  23. numUdpApps = 1;
  24. udpApp[0].typename = "DHCPClient";
  25. @display("p=66,76");
  26. }
  27. dhcpServer: StandardHost {
  28. parameters:
  29. numUdpApps = 1;
  30. udpApp[0].typename = "DHCPServer";
  31. @display("p=277,76");
  32. }
  33. connections:
  34. dhcpClient.pppg++ <--> C <--> dhcpServer.pppg++;
  35. }
  36. %#--------------------------------------------------------------------------------------------------------------
  37. %inifile: omnetpp.ini
  38. [General]
  39. tkenv-plugin-path = ../../../etc/plugins
  40. ned-path = .;../../../../src;../../lib
  41. #omnetpp 5.0 - 5.1 compatibility:
  42. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  43. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  44. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  45. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  46. network = Dhcptest
  47. sim-time-limit = 10500s
  48. cmdenv-express-mode = false
  49. **.dhcpServer.udpApp[0].typename = "DHCPServer"
  50. **.dhcpServer.udpApp[0].numReservedAddresses = 100 # ip to start to lease
  51. **.dhcpServer.udpApp[0].maxNumClients = 100 # number of ip to lease
  52. **.dhcpServer.udpApp[0].dns = "" # dns to assign
  53. **.dhcpServer.udpApp[0].leaseTime = 1000s # lease time in seconds
  54. %#--------------------------------------------------------------------------------------------------------------
  55. %#--------------------------------------------------------------------------------------------------------------
  56. %contains-regex: stdout
  57. Running simulation\.\.\.
  58. .*
  59. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  60. .*
  61. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  62. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  63. .*
  64. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  65. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  66. .*
  67. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  68. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  69. .*
  70. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  71. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  72. .*
  73. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  74. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  75. .*
  76. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  77. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  78. .*
  79. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  80. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  81. .*
  82. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  83. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  84. .*
  85. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  86. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  87. .*
  88. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  89. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  90. .*
  91. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  92. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  93. .*
  94. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  95. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  96. .*
  97. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  98. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  99. .*
  100. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  101. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  102. .*
  103. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  104. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  105. .*
  106. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  107. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  108. .*
  109. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  110. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  111. .*
  112. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  113. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  114. .*
  115. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  116. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  117. .*
  118. The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
  119. DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
  120. \*\* Event
  121. %#--------------------------------------------------------------------------------------------------------------
  122. %not-contains: stdout
  123. undisposed object:
  124. %not-contains: stdout
  125. -- check module destructor
  126. %#--------------------------------------------------------------------------------------------------------------