IPv4NetworkConfigurator_1.test 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. %description:
  2. Tests IPv4NetworkConfigurator for a wired LAN.
  3. Topology:
  4. server <--> router <--> switch <--> clients
  5. %file: test.ned
  6. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  7. import inet.node.ethernet.Eth10M;
  8. import inet.node.ethernet.EtherSwitch;
  9. import inet.node.inet.Router;
  10. import inet.node.inet.StandardHost;
  11. network Test
  12. {
  13. parameters:
  14. int numHosts;
  15. submodules:
  16. configurator: IPv4NetworkConfigurator {
  17. parameters:
  18. dumpAddresses = true;
  19. }
  20. server: StandardHost;
  21. router: Router;
  22. switch: EtherSwitch;
  23. client[numHosts]: StandardHost;
  24. connections:
  25. server.ethg++ <--> Eth10M <--> router.ethg++;
  26. router.ethg++ <--> Eth10M <--> switch.ethg++;
  27. for i=0..numHosts-1 {
  28. client[i].ethg++ <--> Eth10M <--> switch.ethg++;
  29. }
  30. }
  31. %inifile: omnetpp.ini
  32. [General]
  33. network = Test
  34. cmdenv-express-mode = false
  35. tkenv-plugin-path = ../../../etc/plugins
  36. ned-path = .;../../../../src;../../lib
  37. sim-time-limit = 1s
  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. *.numHosts = 3
  44. %contains-regex: stdout
  45. Link 0
  46. server / eth0 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.1/30.*}
  47. router / eth0 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.2/30.*}
  48. Link 1
  49. router / eth1 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.9/29.*}
  50. client\[0\] / eth0 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.10/29.*}
  51. client\[1\] / eth0 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.11/29.*}
  52. client\[2\] / eth0 id=\d+ on:nwLayer.ifOut\[\d+\] MTU:1500 BROADCAST MULTICAST macAddr:0A-AA-00-00-00-[0-9A-F]{2} IPv4:\{.*inet_addr:10.0.0.12/29.*}
  53. %#--------------------------------------------------------------------------------------------------------------
  54. %not-contains: stdout
  55. undisposed object:
  56. %not-contains: stdout
  57. -- check module destructor
  58. %#--------------------------------------------------------------------------------------------------------------