IPv4NetworkConfigurator_1c.test 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. %description:
  2. Tests IPv4NetworkConfigurator for a wired LAN.
  3. Topology:
  4. server <--> router <--> 3 switches in a triangle <--> 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. switch1: EtherSwitch;
  21. switch2: EtherSwitch;
  22. switch3: EtherSwitch;
  23. server: StandardHost;
  24. router: Router;
  25. client[numHosts]: StandardHost;
  26. connections:
  27. server.ethg++ <--> Eth10M <--> router.ethg++;
  28. router.ethg++ <--> Eth10M <--> switch1.ethg++;
  29. switch1.ethg++ <--> Eth10M <--> switch2.ethg++;
  30. switch2.ethg++ <--> Eth10M <--> switch3.ethg++;
  31. switch3.ethg++ <--> Eth10M <--> switch1.ethg++;
  32. for i=0..numHosts-1 {
  33. client[i].ethg++ <--> Eth10M <--> switch3.ethg++;
  34. }
  35. }
  36. %inifile: omnetpp.ini
  37. [General]
  38. network = Test
  39. cmdenv-express-mode = false
  40. tkenv-plugin-path = ../../../etc/plugins
  41. ned-path = .;../../../../src;../../lib
  42. sim-time-limit = 1s
  43. #omnetpp 5.0 - 5.1 compatibility:
  44. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  45. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  46. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  47. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  48. *.numHosts = 3
  49. %contains-regex: stdout
  50. Link 0
  51. 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.*}
  52. 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.*}
  53. Link 1
  54. 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.*}
  55. 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.*}
  56. 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.*}
  57. 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.*}
  58. %#--------------------------------------------------------------------------------------------------------------
  59. %not-contains: stdout
  60. undisposed object:
  61. %not-contains: stdout
  62. -- check module destructor
  63. %#--------------------------------------------------------------------------------------------------------------