Core-Gui --batch cannot run 802.11 EMANE networking correctly
I have a simple network setup with 3 servers (A, B, C), and 2 WLANs (1, 2). Server A is connected to WLANs 1 and 2. Server B is connected to WLAN 1. Server C is connected to WLAN 2. The distance per 100 pixels is set to 1500 meters so the servers do not connect at start. Server A is configured to not have a DefaultRoute, and runs DHCP on both of its interfaces (eth0, eth1). Servers B and C both run DHCPD. When you move A within range of either B or C, if EMANE is working correctly, A will get a valid IP address.
If you invoke core-gui --batch network.imn, this is not the case. Core-gui starts up differently when you supply the --batch option (as compared to the --start option, or starting the network from the GUI). There is no layer-2 connectivity.
To solve this problem, you need to either start network simulations using the actual GUI, or to use the --start option with a virtual frame buffer. This is not always possible (think automated testing). I have noticed this behavior running on physical hardware, in Virtual Machines, and also Docker containers (my main use case).
To summarize, the following command will not start EMANE / layer 2 connectivity properly:
core-gui --batch network.imn
The following command will start EMANE / layer 2 connectivity properly:
xvfb-run core-gui --start network.imn
I have attached my network.imn file for testing, and can provide my Docker setup if need be, although you should observe this functionality on your host. I've done all of my testing on some flavor of Ubuntu 14.04
Was this addressed by another bug fix? I have the same problem using "basic_range". It works on the GUI, but not in batch.
Is there a work-around for either EMANE or basic_range?
@gmlevin Thanks for pointing this out, I assume you are trying the latest on master?
I'll try a small example this weekend and see if I can reproduce.
I am using 4e6ec1a bharnden 2018-09-11 Update mobility.py (HEAD, tag: release-5.2)
Looks like just one commit above that on master. Thanks for checking.
$ git oneline -5 master
f8ec15f bharnden 2018-09-17 fixes #188 - remove session on delete (master)
4e6ec1a bharnden 2018-09-11 Update mobility.py (HEAD, tag: release-5.2)
9020c01 bharnden 2018-09-10 Set theme jekyll-theme-cayman
5f1a261 bharnden 2018-09-10 Merge pull request #186 from coreemu/rel/5.2
I had assumed this was something that had worked before, it appears at least for a wlan, that core-gui batch mode has never worked for a wlan, since I went back and tried it on 4.8 just now as well.
In 5.2 I can see that the GUI is failing to send messages that would be sent otherwise. I would assume the same applies for the EMANE case as well, which Ill try checking too.
The hope would be eventually this is desire could be fulfilled by an eventual new GUI as the current one is a bit hard to modify.
Just curious, what exactly is your use case for using batch mode?
We would like to run nightly regression tests driven by scripts, when there would not be a GUI available.
Thanks for looking into this. We would like to have automated nightly testing.
Gary Levin
On Sun, Feb 3, 2019, 1:01 AM bharnden <[email protected] wrote:
I had assumed this was something that had worked before, it appears at least for a wlan, that core-gui batch mode has never worked for a wlan.
In 5.2 I can see that the GUI is failing to send messages that would be sent otherwise. I would assume the same applies for the EMANE case as well, which Ill try checking too.
The hope would be eventually this is desire could be fulfilled by an eventual new GUI as the current one is a bit hard to modify.
Just curious, what exactly is your use case for using batch mode?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coreemu/core/issues/91#issuecomment-460025895, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWBbxgOG84jAo78vGhYMiGIrKICUmNKks5vJnsugaJpZM4KGitu .
It's a different approach and might not be ideal, but you could potentially formally script the CORE scenarios. It would provide a lot more control if desired and ways to potentially interact with nodes and issue commands directly if desired. There's overhead in figuring it out for sure and the documentation to help with that is not robust, another TODO for the year.
Some examples can be seen here: https://github.com/coreemu/core/tree/master/daemon/examples/api
Alternatively, we would likely create a formal script to allow pushing XML files in a similar matter to batch mode. Which would still be yet another path, but would mimic things a lot better.