Score:0

Connect Internet through two different LAN Interfaces

my flag

I am trying to connect an IoT device to internet. It is running on Ubuntu.

It has two Ethernet interfaces. One is connected to a LTE modem + antenna (fast and cheap connection), and the other is connected to a Satellite modem + antenna (can connect everywhere, expensive and unreliable).

I have two types of message to send to my server:

  • An alarm, if any problem occurs on the device, that I want to send through Satellite, at anytime.

  • All the data when an LTE connection is available.

Most of the time no LTE connection is available.

Is there anyway I could program this networking strategy?

I thought about alternating between the interfaces with ifup and ifdown, but I don't want the data message to be interrupted by the alarm message and vice-versa.

I appreciate any solution or idea. Since the project is mostly written in python it would be awesome if there is a library solution that exists, but I am open to anything.

Thank you,

darth_epoxy avatar
nl flag
What is the output of `ip -o a` please?
my flag
@darth_epoxy I don't have the hardware yet, but I can forecast it will look something like this: `2: enx4865ee1425f9 inet 192.168.1.67/24 brd 192.168.1.255 scope global dynamic noprefixroute enx4865ee1425f9\ valid_lft 85425sec preferred_lft 85425sec` `3: enx4865ee1425f1 inet 192.168.2.32/24 brd 192.168.2.255 scope global dynamic noprefixroute enx4865ee1425f1\ valid_lft 85425sec preferred_lft 85425sec`
darth_epoxy avatar
nl flag
If it picks up 2 separate ethernets (entries starting with en) then you should be use and sqitch between them. your question is more of a unix network question rather than Ubuntu but if you are lucky a guru might read this.
Score:0
cn flag

You could do this with static routes, where you send over certain interface. You just have to make sure that the destination has a valid backroute so that all trafic that goes out over one interface will also get its answer on the same interface.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.