How can the following be done without using network-manager or another GUI-tool (for example by configuring /etc/networking/interfaces
etc):
Automatically (and without delay) switch to LAN if available and back to WLAN if not LAN is available anymore.
If possible each time the same IP should be used (may be static, but it doesn't need to be).
My system is ubuntu 16.04.1.