1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- %description:
- Tests IPv4NetworkConfigurator for a wired LAN.
- Topology:
- server <--> router <--> 3 switches in a triangle <--> clients
- %file: test.ned
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.node.ethernet.Eth10M;
- import inet.node.ethernet.EtherSwitch;
- import inet.node.inet.Router;
- import inet.node.inet.StandardHost;
- network Test
- {
- parameters:
- int numHosts;
- submodules:
- configurator: IPv4NetworkConfigurator {
- parameters:
- dumpAddresses = true;
- }
- switch1: EtherSwitch;
- switch2: EtherSwitch;
- switch3: EtherSwitch;
- server: StandardHost;
- router: Router;
- client[numHosts]: StandardHost;
- connections:
- server.ethg++ <--> Eth10M <--> router.ethg++;
- router.ethg++ <--> Eth10M <--> switch1.ethg++;
- switch1.ethg++ <--> Eth10M <--> switch2.ethg++;
- switch2.ethg++ <--> Eth10M <--> switch3.ethg++;
- switch3.ethg++ <--> Eth10M <--> switch1.ethg++;
- for i=0..numHosts-1 {
- client[i].ethg++ <--> Eth10M <--> switch3.ethg++;
- }
- }
- %inifile: omnetpp.ini
- [General]
- network = Test
- cmdenv-express-mode = false
- tkenv-plugin-path = ../../../etc/plugins
- ned-path = .;../../../../src;../../lib
- sim-time-limit = 1s
- #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"
- *.numHosts = 3
- %contains-regex: stdout
- Link 0
- 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.*}
- 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.*}
- Link 1
- 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.*}
- 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.*}
- 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.*}
- 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.*}
- %#--------------------------------------------------------------------------------------------------------------
- %not-contains: stdout
- undisposed object:
- %not-contains: stdout
- -- check module destructor
- %#--------------------------------------------------------------------------------------------------------------
|