Score:0

Private network collision with two WAN interfaces from different ISPs

bm flag

I have a host that have two WAN interfaces connected to the two different ISP (lets say it is LTE modem and WiFi module). Each interface get it's IPv4 address, network and gateway using DHCP and almost always it is private IPv4 address.

The issue is that two ISPs can decide to give IPv4 address from same network (for example LTE modem will get 10.10.0.1/24 and WiFi module 10.10.0.2/24). Such configuration breaks network routing on the host.

Is there any best practices to handle such kind of issues?

cn flag
Is there a "best practice" for endpoints that have two Internet connections? No, there is not.
cn flag
`The issue is that two ISPs can decide to give IPv4 address from same network` There are hundreds of millions of endpoints like this, it is hardly an "issue".
Score:1
br flag

In your example, there will be no problem as the subnets 10.0.0.1/24 and 10.10.0.2/24 do not overlap. However should they overlap, you will indeed run into problems. Which exactly will mostly depend on the handling of such a situation by the specific operating system. The best way to avoid that is to log into your Wifi / LTE modem and change their respective DHCP client ranges to be mutually exclusive. If that is not an option, you could think about setting a fixed IP configuration for one or both of your interfaces in order to avoid a CIDR overlap.

Kamil Zaripov avatar
bm flag
Yes, indeed, I've made an typo. In example LTE modem should get 10.10.0.1/24 and WiFi module 10.10.0.2/24.
br flag
@KamilZaripov In that case, yes, you'll run into problems and depending on what Operating System you use, it may choose to just ignore one or both of the lines. Using a fixed IP may help you, if that still is not an option you can manually deactivate one of the interfaces. As both interfaces provide redundant routes your machine will only ever use one at a time anyway. If you wanted to use both you'd need a load balancing device in between to take full advantage of the bandwidth of both WAN connections.
Kamil Zaripov avatar
bm flag
My operation system is Linux, but both fixed IP and deactivating all interfaces except one is not an option. It seems that it is possible to use both links simultaneously using iptables (for SNAT) and arptables (to fix gw address). If it will work pretty stable - I will post it as an answer here.
I sit in a Tesla and translated this thread with Ai:

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.