123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- %description:
- Testing DHCP protocol
- %#--------------------------------------------------------------------------------------------------------------
- %file: test.ned
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.node.inet.StandardHost;
- import ned.DatarateChannel;
- network Dhcptest
- {
- types:
- channel C extends DatarateChannel
- {
- delay = 0.1us;
- datarate = 10Mbps;
- }
- submodules:
- configurator: IPv4NetworkConfigurator {
- parameters:
- config = xml("<config><interface hosts='dhcpServer' address='192.168.1.1' netmask='255.255.255.0' /></config>");
- }
- dhcpClient: StandardHost {
- parameters:
- numUdpApps = 1;
- udpApp[0].typename = "DHCPClient";
- @display("p=66,76");
- }
- dhcpServer: StandardHost {
- parameters:
- numUdpApps = 1;
- udpApp[0].typename = "DHCPServer";
- @display("p=277,76");
- }
- connections:
- dhcpClient.pppg++ <--> C <--> dhcpServer.pppg++;
- }
- %#--------------------------------------------------------------------------------------------------------------
- %inifile: omnetpp.ini
- [General]
- tkenv-plugin-path = ../../../etc/plugins
- ned-path = .;../../../../src;../../lib
- #omnetpp 5.0 - 5.1 compatibility:
- eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
- output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
- output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
- snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
- network = Dhcptest
- sim-time-limit = 10500s
- cmdenv-express-mode = false
- **.dhcpServer.udpApp[0].typename = "DHCPServer"
- **.dhcpServer.udpApp[0].numReservedAddresses = 100 # ip to start to lease
- **.dhcpServer.udpApp[0].maxNumClients = 100 # number of ip to lease
- **.dhcpServer.udpApp[0].dns = "" # dns to assign
- **.dhcpServer.udpApp[0].leaseTime = 1000s # lease time in seconds
- %#--------------------------------------------------------------------------------------------------------------
- %#--------------------------------------------------------------------------------------------------------------
- %contains-regex: stdout
- Running simulation\.\.\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- .*
- The requested IP 192\.168\.1\.100/255\.255\.255\.0 is available\. Assigning it to dhcpClient\.
- DHCPACK message arrived in RENEWING state\. The renewing process was successful\.
- \*\* Event
- %#--------------------------------------------------------------------------------------------------------------
- %not-contains: stdout
- undisposed object:
- %not-contains: stdout
- -- check module destructor
- %#--------------------------------------------------------------------------------------------------------------
|