In my setup I have 2 different interfaces, one for WiFi and another for 4G/LTE. Both are USB dongles. I'm using Ubuntu 16.04 at the moment, but that can change. In my problem I need to mantain an IP session, meaning that when I go out of a WiFi hotspot coverage area I need to automatically change to LTE (and viceversa) in a transparent and lossless way. That is supposed to be acomplished having the same IP for both interfaces, since a change in the IP would bring packet loss.
Both interfaces have different subnets and gateways. WiFi is in 10.102.81.0/24 while LTE is in 10.10.0.148/30. This is a fixed setup, since WiFi addres depends on the WiFi network, and LTE addres depend on the cellular provider.
I have tried bonding, but I've read that it is necessary to have both interfaces in the same subnet, since it is not "IP level routing". I tried using aliases or configuring two different gateways, but nothing has worked so far. I also saw something about making a bridge, but I read it wouldn't work with WiFi.
So my question is: How could I make both WiFi and LTE interfaces on different subnets work as one unique interface, or at least make them work as a fault-tolerant system? Is it possible through bonding? If not, is there another way?
Thank you very much in advance.