11

I have seen a bunch of similar posts, but none is a duplicate.

I was born in China, this puts me behind the infamous Great Firewall of China (GFW), but I am a liberal progressive anarchist; I only use Google as my search engine. I browse English Wikipedia, and I watch YouTube, all of which are inaccessible behind the GFW, unless of course one can circumvent it. And in case it isn't clear, I prefer English over Chinese.

I have been various virtual private networks and proxy services to bypass the GFW over the years, and the Internet service providers I use are aware of my VPN usage and are constantly trying to disrupt my VPN connection. They hijack DNS resolutions and change the IP address to something unreachable, they increase the latency between my computer and foreign IP, they block some IP addresses, and they throttle my VPN connection bandwidth... But I always find a way to defeat them, though I have won countless battles, the war is never over.

I have a new idea; there are currently two networks in my home, and they are from two different ISPs (don't ask me how, long story). Both are connected to the outside via different optical network fibers. They correspond to one PPPoE account each, each account is used by a different modem, and I have complete control of both modems. I set up the connections myself, I disabled TR-069 and ACS periodic inform and other crap. Both modems are in my home.

So line A, modem A uses PPPoE A which is provided by China Telecom. Line B, modem B uses PPPoE B which is provided by China Mobile. Modem A's LAN address is 192.168.100.1, Modem B's LAN address is 192.168.1.1. I hope this is clear.

Now my computer is a desktop one, and it has a Ethernet port which is connected to an Ethernet cable which is in turn connected to one of the modems. It should be obvious, of course, but I bought a USB WLAN card sometime ago, when I didn't have two networks in my home. Now I want to make my computer connect to both networks at the same time, and it should connect to one via Ethernet and the other via Wi-Fi.

I want it so that the computer is always connected to both networks simultaneously through the two interfaces. The computer should have two public IP addresses always, every network request goes through both networks, and network bandwidth is bandwidth A + bandwidth B.

Is the above possible? I had seen this: Use wifi and ethernet simultaneously on Windows 10

But it doesn't work; I bridged the connections:

Enter image description here

(The Wi-Fi network the computer is connected to is named after Claire Wineland, and her birthday is the same as mine, though I was born in 1999.)

So the computer tells me that I am connected to the Wi-Fi, okay. I tried to access 192.168.100.1 (which is the LAN address of the modem the Wi-Fi is from), but I can't.

So I used my phone to access 192.168.100.1:

Enter image description here

As you can see from the modem administrator page, my computer (I named my computer after Eliza chatbot) isn't connected to the Wi-Fi.

Surely enough, if I disconnect the Ethernet cable, I can't access the Internet, but my computer still tells me that I have an Internet connection!

I can't make the computer use the Wi-Fi no matter what while the bridge exists. But after I deleted the bridge the computer is connected to the Wi-Fi again, I can access 192.168.100.1 on the computer:

Enter image description here

But the network indicator on the bottom right, if I hover the cursor over it, shows this:

Ethernet
Internet access

Clash Connected

Claire No Internet access

And it gets wild. After I delete the bridge connection, while I was unplugging the WLAN card, the computer screen flashes. More specifically, it turns completely black for a few seconds, and then back on. And after a few seconds completely black again, and then repeats this a few times. The USB port and HDMI port aren't close, and the cables didn't touch, but somehow the screen flashes black, because I disconnected the WLAN card.

After I plug the WLAN card back in, the screen flashes black again, and I cannot make the computer to connect to any Wi-Fi network. The interface doesn't show up:

Enter image description here

Control panel:

Enter image description here

So I unplugged the WLAN card. The screen flashes, and I wait some time. I plugged it back in, the screen flashes, but the problem is not solved. I repeat the process, screen flashes, etc.

I want the computer to use both Wi-Fi and Ethernet simultaneously, because two networks, each with two states (disrupted, undisrupted) means four states: (undisrupted, undisrupted), (undisrupted, disrupted), (disrupted, undisrupted) and (disrupted, disrupted), only in the last state I don't have any network access, this is for redundancy.

How can I make my computer connect to both networks simultaneously?


I just restarted the computer, and now I can use the WLAN card again. And the screen stopped flashing black. I have done nothing else to solve this issue. It seems like a driver issue, but it magically appeared, because I deleted the bridge connection and it somehow also affects GPU and display, and the issue magically disappeared after I restarted my computer... I guessed restarting my computer can somehow fix this problem, but it may very well fail to fix this. I don't have any explanations for this issue, though I swear it is real.

But still the question remains. How do I connect to two different WANs through Wi-Fi and Ethernet simultaneously? I had just disproven one wrong way to do it. Bridging connections on my computer don't work. Though I assure you I am more than capable of adjusting modem settings.


I have done some more research. I have read this.

While connected to both Wi-Fi and Ethernet, I can access both 192.168.100.1 and 192.168.1.1, but NCSI shows this:

Ethernet
Internet access

Claire Connected

And the icon is for a wired Internet connection. It means the Internet connection goes exclusively through Ethernet.

I tried to check my public IP address (after disconnecting my VPN) while both Ethernet and Wi-Fi are active, then disconnect the Ethernet and check public IP address, and then disconnect the Wi-Fi and connect to Ethernet and check the public IP address:

Enter image description here

So the computer only uses Ethernet while it is connected. How can I make sure both Wi-Fi and Ethernet are used all the time?

In other words, make NCSI show this:

Ethernet
Internet access

Claire Internet access


I relaxed my restrictions a bit. Now I want the computer to always use both connections simultaneously. It should have two public IP addresses, and it should use the bandwidth of both networks. But now I want the network requests to alternate between the networks. Half of them goes through one network, and half of them goes through the other.

I have some spare routers lying around, and they are in perfect working condition. I can try reprogramming them, and I want a bit more detailed steps as to how this might be achieved.


The software I am using is Clash for Windows:

Enter image description here

It is running on 127.0.0.1:7890. I don't know its protocol, but it should be either HTTPS or SOCKS5. The GitHub repository of Clash is this.

Some things about my computer's network connections:

PS C:\Users\xenig> ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : Eliza Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No

Unknown adapter clash:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Clash Tunnel Physical Address. . . . . . . . . : DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes IPv4 Address. . . . . . . . . . . : 198.18.0.1(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : DNS Servers . . . . . . . . . . . : 198.18.0.2 NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller Physical Address. . . . . . . . . : F4-B5-20-33-63-0B DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::5b52:a596:ec59:bf7f%13(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.1.3(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Monday, March 17, 2025 00:18:02 Lease Expires . . . . . . . . . . : Monday, March 17, 2025 01:18:02 Default Gateway . . . . . . . . . : fe80::1%13 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DHCPv6 IAID . . . . . . . . . . . : 116700448 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2E-86-B3-EB-F4-B5-20-33-63-0B DNS Servers . . . . . . . . . . . : fe80::1%13 8.8.8.8 NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 10:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Physical Address. . . . . . . . . : 06-5C-C2-69-B2-A1 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter WiFi:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : 802.11ac Wireless LAN Card Physical Address. . . . . . . . . : 00-5C-C2-69-B2-A1 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::2e3d:4618:28f1:f4%17(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.100.11(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Monday, March 17, 2025 00:18:59 Lease Expires . . . . . . . . . . : Tuesday, March 18, 2025 00:18:59 Default Gateway . . . . . . . . . : fe80::1%17 192.168.100.1 DHCP Server . . . . . . . . . . . : 192.168.100.1 DHCPv6 IAID . . . . . . . . . . . : 285236418 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2E-86-B3-EB-F4-B5-20-33-63-0B DNS Servers . . . . . . . . . . . : 192.168.100.1 NetBIOS over Tcpip. . . . . . . . : Enabled PS C:\Users\xenig> route print =========================================================================== Interface List 8...........................Clash Tunnel 13...f4 b5 20 33 63 0b ......Realtek PCIe GbE Family Controller 20...06 5c c2 69 b2 a1 ......Microsoft Wi-Fi Direct Virtual Adapter #2 17...00 5c c2 69 b2 a1 ......802.11ac Wireless LAN Card

1...........................Software Loopback Interface 1

IPv4 Route Table

Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.3 26 0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.11 50 1.0.0.0 255.0.0.0 198.18.0.2 198.18.0.1 0 2.0.0.0 254.0.0.0 198.18.0.2 198.18.0.1 0 4.0.0.0 252.0.0.0 198.18.0.2 198.18.0.1 0 8.0.0.0 248.0.0.0 198.18.0.2 198.18.0.1 0 16.0.0.0 240.0.0.0 198.18.0.2 198.18.0.1 0 32.0.0.0 224.0.0.0 198.18.0.2 198.18.0.1 0 64.0.0.0 192.0.0.0 198.18.0.2 198.18.0.1 0 127.0.0.0 255.0.0.0 On-link 127.0.0.1 331 127.0.0.1 255.255.255.255 On-link 127.0.0.1 331 127.255.255.255 255.255.255.255 On-link 127.0.0.1 331 128.0.0.0 128.0.0.0 198.18.0.2 198.18.0.1 0 192.168.1.0 255.255.255.0 On-link 192.168.1.3 281 192.168.1.3 255.255.255.255 On-link 192.168.1.3 281 192.168.1.255 255.255.255.255 On-link 192.168.1.3 281 192.168.100.0 255.255.255.0 On-link 192.168.100.11 306 192.168.100.11 255.255.255.255 On-link 192.168.100.11 306 192.168.100.255 255.255.255.255 On-link 192.168.100.11 306 198.18.0.0 255.255.0.0 On-link 198.18.0.1 256 198.18.0.1 255.255.255.255 On-link 198.18.0.1 256 198.18.255.255 255.255.255.255 On-link 198.18.0.1 256 224.0.0.0 240.0.0.0 On-link 127.0.0.1 331 224.0.0.0 240.0.0.0 On-link 192.168.100.11 306 224.0.0.0 240.0.0.0 On-link 192.168.1.3 281 224.0.0.0 240.0.0.0 On-link 198.18.0.1 256 255.255.255.255 255.255.255.255 On-link 127.0.0.1 331 255.255.255.255 255.255.255.255 On-link 192.168.100.11 306 255.255.255.255 255.255.255.255 On-link 192.168.1.3 281 255.255.255.255 255.255.255.255 On-link 198.18.0.1 256 =========================================================================== Persistent Routes: None

IPv6 Route Table

Active Routes: If Metric Network Destination Gateway 13 281 ::/0 fe80::1 17 306 ::/0 fe80::1 1 331 ::1/128 On-link 17 306 fe80::/64 On-link 13 281 fe80::/64 On-link 17 306 fe80::2e3d:4618:28f1:f4/128 On-link 13 281 fe80::5b52:a596:ec59:bf7f/128 On-link 1 331 ff00::/8 On-link 17 306 ff00::/8 On-link 13 281 ff00::/8 On-link 8 261 ff00::/8 On-link =========================================================================== Persistent Routes: None

I have downloaded go-dispatch-proxy. It seems to do exactly what I wanted, but I still don't know what command I should use.


Okay, I know how to run go-dispatch-proxy, but it isn't used:

PS C:\Users\xenig> D:\cliexec\go-dispatch-proxy.exe -lhost 198.18.0.1 -lport 7890 192.168.1.2 192.168.100.11
[INFO] Load balancer 1: 192.168.1.2, contention ratio: 1
[INFO] Load balancer 2: 192.168.100.11, contention ratio: 1
[INFO] Local server started on  198.18.0.1:7890
PS C:\Users\xenig> D:\cliexec\go-dispatch-proxy.exe 192.168.1.2 192.168.100.11
[INFO] Load balancer 1: 192.168.1.2, contention ratio: 1
[INFO] Load balancer 2: 192.168.100.11, contention ratio: 1
[INFO] Local server started on  127.0.0.1:8080

I dug through the settings of the software I am using and found that I can choose the interface it uses:

enter image description here

The interfaces are the same as shown in Control Panel

enter image description here

So all I need to do is to add a network adapter to the computer and let that adapter use the proxy server started by go-dispatch-proxy, and then just select that adapter in Clash, job done.

I don't know how, but I know this is not that hard to do, because every VPN software I used does this, and as you can see Clash is a virtual adapter added by the software, but I can't find anything relevant at all if I Google this. But I am extremely good at programming and I have extensively experience in tweaking Windows and networking devices. Just tell me how.

Ξένη Γήινος
  • 3,902
  • 13
  • 45
  • 84

6 Answers6

10

I want it so that the computer is always connected to both networks simultaneously through the two interfaces, the computer should have two public IP addresses always, every network request goes through both networks, and network bandwidth is bandwidth A + bandwidth B.

Sorry, what you want is not possible, or at least not without some extra tools and a server somewhere on the outside.

You can certainly have both interfaces active, you can have two public IP addresses, and you can use bandwidth from both ISPs. However, you can not send requests through both networks; the computer needs to know where to send each request.

It is hypothetically possible to create a set of GRE tunnels, each through a different ISP, to a proxy server which aggregates the flows, and bond the flows on your end. However, this is quite complex, non-standard, and difficult to maintain on both sides. Would not recommend.

Paul
  • 1,804
10

To answer some of your other questions here, you can run route print in cmd and take a look at how your computer decides which interface to send network traffic through. You should see something like this:

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.100.1    192.168.100.2      2
          0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.2     35

Windows will take the matching route with the lowest "Metric" value. The 0.0.0.0 destination matches everything (the default), so it decides where Windows sends internet traffic. These routes get added automatically when you connect an interface, but you can set static ones if you know what direction traffic should go in.

If you have two default routes with the same metric, then Windows will pick one at random to use. It will only use that one until something changes like it loses connection to the router. Windows cannot use them simultaneously or balance between them


Some other similar terms:

  • When you "Bridge" two interfaces together, the host effectively loses access to them. Everything that comes in one interface will get sent out the other without stopping. It's more for connecting two networks than for simultaneous use

  • Nic teaming/merging/aggregating/balancing etc. does let the host use multiple interfaces simultaneously as if they were a single interface with a single IP, but then you cannot connect them to two different networks


The "real" way to use multiple ISPs is with a single router that supports "Multi-WAN" (or "Dual WAN") features. Let the router handle swapping or balancing between your connections

Cpt.Whale
  • 10,914
5

I think there's 2 concepts here - that both connections are open but your OS will prefer to route through the interface with a better metric. By default wired connections have a better metric than wireless, and unless the connection is down it won't failover. Traffic explicitly sent through an interface will go through that interface. With that out of the way

I've not used/messed with it in years - but what you need is a 'load balancing proxy' - and passing your traffic through it. It won't be 'true' bonding - it'll send traffic through 2 or more connections, and try to intelligently make sure its balanced (or unbalanced in some ratio you request) - I experimented with dispatch-proxy in the past, but go-dispatch-proxy seems to be currently updated - speedify is a similar commercial product. In most cases you need to be able to run your client app like a web browser through a SOCKS proxy, and your load balancer listens, and sends your traffic via the different interfaces. You will not be combining the speeds of the connections on one connection, you will be spreading out traffic for better total speed.

Journeyman Geek
  • 133,878
1

There are definitely ways to do this, but not with vanilla Windows. This is literally not how it works. It may be possible to have multiple connections in Windows, like wired and wireless, but OS will still prioritize them and use just one.

In terms of solutions there are few:

  1. switch to Linux and there it's pretty much OOB via load balancing
  2. use 3rd party software like Speedify
  3. use hardware solution like load balancing routers or bonding routers (though I am not sure of that - didn't do any research, just heard something that bonding routers can combine connections).

Side note: VPN use is illegal in China, so if you will continue to insist on using it, be ready for more than just disruption by ISP...

AcePL
  • 1,919
0

Much of the first part of this answer might sound like a complaint, but, Ξένη Γήινος (question asker...), I encourage you to read through this. I see you put a lot of time into this, and so I decided to spend a bit of time (about 90 minutes to type this up) trying to be helpful. Please see the tips how to improve.

A couple of off-topic comments: First, I certainly respect your English (way better than any attempt I could pretend to make at communicating in Chinese).

Second, I'd be wary about including details like your birthdate, and the names of multiple providers if using multiple providers is uncommon, as that may make quickly identifying you a lot easier, which doesn't seem recommended when in China and trying to thwart restrictions the government wants people to follow.

Getting back to the question some more, I'd like to start off by saying that I don't like this question as-is. This site's guidelines indicate that for each "question" created/posted on the site, there should be just one key actual question. That way, a specific answer can be judged to be right, or not right, and once a right answer is identified, it can be accepted/upvoted. Otherwise, there can be these unpleasant scenarios where one submitted answer addresses some parts of the question better than a different submitted answer, and it isn't clear which answer is "best". That sort of problem can often be avoided if people just make each submitted site question contain one actual direct question, and if more information is needed, simply create one or more additional question postings on the site.

In particular, this line is terrifying:

I relaxed my restrictions a bit. Now I want

It seems like the poster's goal of this question was to make the poster happy, even if that is accomplished by the poster adjusting the requirements, which fundamentally changes the question. Questions are not meant to evolve like that. If you no longer want to pursue a course of action, you can simply leave a question alone, and create a new question.

Another scary observation is when I read:

after I deleted the bridge

...

And it gets wild.

...

After I plug the WLAN card back in...

So it seems like you are providing tons of details of a lengthy troubleshooting effort, which could only be addressed well form a rather high-level "design-type" of perspective, but I think you're hoping for some technical details, which would involve a more lower-level "precise technical steps" type of perspective. You aren't enabling the simple, short types of questions this site is designed for.

All that said, your question seem to suggest someone who knows a bit about networking, and would like to have equipment perform whatever design you come up with. The thing is, when you invent a new idea which varies quite a bit from standard practice, you often encounter limitations, software not being implemented the way you hoped, or other roadblocks, or at least difficulties. Let's try to put off goals of intricate routing designs until after there is much more experience setting things up successfully, when you are even more familiar with the standards and why some of these things are set up the way they are.

Shameless plug: I think you may learn some details from reading another answer I wrote up, TOOGAM's answer to "How to redirect/route IP address to another IP address?"

I suppose first I should make sure you understand the differences between using OSI Layer 2 and OSI Layer 3. With OSI Layer 2, you are often using MAC-48 addresses (often called "MAC addresses", but as an educator I've latched onto the phrase MAC-48 to help re-inforce them being 48 bits long), and that is where you are using Ethernet and Wi-Fi. Hardware drivers tend to support providing functionality between OSI Layer 1 (physical circuitry, cables/airwaves, etc.) and OSI Layer 2.

The big problem with trying to do much with OSI Layer 2 is that most software is designed to work with OSI Layer 3, so using protocols like IPv6 or IPv4, or even protocols at higher layers like OSI Layer 4 where you get TCP and UDP. Even if you figured out how to send a message using OSI Layer 2, that might not do any good unless the remote end is configured to do something with received OSI Layer 2 traffic.

So, for the most part, you're likely to want to be looking at using OSI Layer 3, as that is where a lot of software may be listening for traffic. And as you work with OSI Layer 3, protocols like NDP (neighbor discovery protocol, common with IPv6) or ARP (address resolution protocol, the method used more commonly when using IPv4) which help to convert communications between OSI Layers 3 and 2.

So, if you want to do compelx routing, I highly recommend staying focused on OSI Layer 2.

But, for a while, you do mention bridging. Bridging is rather like the technical process called "routing", which is done at OSI Layer 3 (using IP addresses), but focuses on OSI Layer 2 communications using MAC-48 addresses. Bridging can be useful in some cases, like when trying to run "virtual machine" software where your outer/host system passes OSI Layer 2 traffic directly to the MAC-48 address used on a virtual machine, which can help the multi-layer protocol of DHCP to work more easily. Bridging is also faster than OSI Layer 3 routing, but is typically going to be focused on networks where you are controlling more of the devices. (So, traffic meant within your local network, not traffic bound to remote network locations.) So, it has its use, but since more software uses OSI Layer 3, I recommend focusing there if possible. And trying to mix OSI Layer 2 rules with OSI Layer 3 rules may get more complex, and certainly not recommended for the beginner.

Also, if you are using bridging, you might be more likely to accidentally create a setup which causes a loop which does multiply traffic. (Actually, you did seem to think that the idea of multiplying traffic seemed desirable, as it sounds like you wanted traffic duplicated and sent out to different devices.) When you multiply traffic too much, which can commonly happen with some types of layer two loops, you may cause a "broadcast storm", which endlessly re-multiplies the traffic until you quickly exhaust network resources, usually causing devices to stop being available (at least until the broadcast storm ends, which might never happen until things are re-configured, so often a person reduces the storm by powering off a device, but without re-configuring, you may re-create the problem.)

Note that Wi-Fi is a Layer 2 protocol. But your Wi-Fi router may have an OSI Layer 3 address (e.g. an IPv4 address), and your Wi-Fi router may be able to perform OSI Layer 3 routing by using those OSI Layer 3 addresses.

Now, getting to some of the OSI Layer 3 topics...

The computer should have two public IP addresses always,

That's in theory fine. However, the sample addresses you gave, 192.168.100.# and 192.168.1.# are private IPv4 addresses (using standard terminology, e.g. RFC 3330 and RFC 1918).

Your biggest issue with trying to use public IPv4 addresses is likely that you might not be given many (or even any, at least not consistently) addresses from one or more ISPs. For the public IP address to work, the ISP needs to have control of that public address, and assign it to your equipment. That would typically be your outer equipment, like a modem, unless that outer equipment is using bridging to pass communications to a different system in your network. But more often, places have the outer equipment like a modem communicate with the ISP using OSI Layer 3 for multiple reasons, such as: By using OSI Lyaer 3 in the outer devices, then you can have multiple internal devices while not tapping the ISP with DHCP requests from each of the multiple internal devices.

But if you can set up all of the bridging rules to make sure that incoming traffic gets sent to your single personal computer which will handle that public IP address, that can happen.

Often, it is not best to think of IP addresses as assigned to a computer, but, rather, that an IP address is assigned to a "NIC", by which I mean the network interface circuitry related to ither a single Ethernet port, or a single Wi-Fi card. Each of those NICs can have an IPv4 address on it. That's fine.

Sometimes computers and/or devices will support some sort of virtual network "interface", which acts rather similar to a physical NIC like an Ethernet port, but what the virtual interface really does is to send traffic out one or more real physical "NICs". In such a case, an IP address may be assigned to that virtual interface. There have been some different details in how this has been implemented on different hardware and/or different software (maybe even running on the same hardware), so I won't give you much details in this generalized description. (If you want to try this and have problems, you may be best off asking a specific question which identifies what software and hardware you are trying to do that with.)

Since default routes are often based on the IP address a computer has, if you place one IPv4 address on an Ethernet port that connects to one ISP's modem, and the other IPv4 address on another Ehternet port that connects to the modem for the other ISP, then your computer will likely send traffic meant for one ISP using one IPv4 address which that ISP handles, and traffic meant for the other ISP will use the other IPv4 address. That ought to work fine, and could be used with a bridging setup.

But then, what about the Wi-Fi card?

Well, your Wi-Fi antennas are not going to connect to any Ethernet port. So they will connect to the Wi-Fi antennas on a remote device, like a remote Wi-Fi router. Likely, you will want that router connected to one or more devices, such as maybe using one Ethernet port on the Wi-Fi router to connect to one ISP, and the other Ethernet port on the Wi-Fi router to connect to the other modem.

Cpt.Whale's answer points out that you can use the "route" command. Each route will typically have a cost/metric to help give it a priority value. You can manually add additional routes.

When your computer sends out traffic using OSI Layer 3, it will have one OSI Layer 3 address which it sends the traffic to. That's it. Your computer doesn't get to tag your traffic with instructions that say, "if it gets to modem number one but then that ISP is down, then the traffic should take a right turn and go to modem number two". (Actually, there may be some standards related to that, and Wikipedia's page on "source routing", also known as "path addressing", may cover some details. However, due to potential for abuse, a lot of software, like operating system and routers, may not support that.) With that page calls "conventional routing", which will be more supported, basically your computer gets to decide what happens to get the data to the very next hop, like a modem on your local network. What the modem does with that traffic is up to that modem's configuration, not the computer which sent traffic to the modem.

Now, you may wish to have the modem do some advanced stuff like check whether the ISP is responding, and if not, perhaps redirect traffic to another location like the other modem. Now we may be entering the more complex realm of discussing topics like using a "routing protocol", or a router redundancy solution like CARP (or VRRP). But then we're getting into more complex territory, and would involve changing the configuration on those routing infrastructure devices, not the basic network configuration options on the local computer.

I hope all these details help you to have some direction that will be more likely to work out well for you. In my opinion, this question is likely rather unsalvage-able (for reasons I described at the top of this answer), so if you need further details, especially on a more limited topic, I recommend you consider making a new question with a much more narrow topic.

TOOGAM
  • 16,486
0

How can I make a Windows computer use Ethernet to connect to one network and Wi-Fi to another simultaneously?

Create a virtual "default gateway" that dispatches to the real gateways as appropriate. I'm not aware of any Windows software that does this. It'd be relatively simple to write such a program for Linux; the original Winsock was based on the UNIX networking model, so presumably the modern Windows networking API has similar affordances to the modern Linux one.

Afaik, Windows only supports one Default Gateway™, so there won't be a native solution. MichaelPlatts's article Source IP address selection on a Multi-Homed Windows Computer (via Kirk Lashbrook's answer) might be a good place to start.

For a lower-tech solution, Configuring multiple gateways on a network has some advice. (The page's text is rendered with JavaScript, which has broken, so I've extracted some relevant packages from the page source.)

Only a single gateway is used for all destinations that are not located on the subnet, even when you configure multiple default gateways. An example of this is when a computer is connected to both an intranet with multiple subnets and the Internet. With a default gateway configured for both adapters, you can either communicate with all computers on the Internet or all computers on the intranet, but not both.

Don't configure a default gateway for any other network adapter. Instead, use static routes or dynamic routing protocols to add the routes for the other disjoint networks to the local IP routing table. If the routing infrastructure uses Routing Information Protocol (RIP) for IPv4, you can turn on RIP Listener in Windows, which allows your computer to learn other routes on the network by "listening" to broadcast RIP messages, and then adding IPv4 routes to the routing table. If the routing infrastructure doesn't use RIP, you can't use RIP listening.

The alternative is to use the route add -p command to manually add the individual routes to the IPv4 routing table. For IPv6, you must use the netsh interface ipv6 add route command.

This will let you configure different routes for different destination IP addresses – dynamically, with the "virtual default gateway" approach, or statically with the built-in routing tables – but does not let you multiplex connections.

every network request goes through both networks

Aha! For that, simply use the Stream Control Transmission Protocol (SCTP). It requires writing your own software (client and server), will make your traffic stand out (since approximately nobody else uses SCTP), and is unlikely to get through CGNAT or other transport-layer traffic mangling systems, but you can do it.

I've never tried running SCTP traffic through the Great Firewall, but I wouldn't expect it's a good idea. On the modern internet, everything has to be TCP or UDP if you want it to Just Work™; so instead of assigning new protocol numbers we make horrible horrible hacks like QUIC. Speaking of, Multipath QUIC has an IETF draft RFC: Multipath Extension for QUIC. Since QUIC is the transport layer protocol for HTTP/3, I expect multipath web browsing to be possible on Linux by 2030, possible on Windows by 2045, and possible on FreeBSD by 2015.

It should have two public IP addresses, and it should use the bandwidth of both networks. But now I want the network requests to alternate between the networks. Half of them goes through one network, and half of them goes through the other.

I have some spare routers lying around, and they are in perfect working condition. I can try reprogramming them, and I want a bit more detailed steps as to how this might be achieved.

If you reprogram the router with the behaviour I described in my first paragraph, and connect it up to the real routers, that should work fine. It's probably the most practical solution, out of everything I've suggested in this answer (assuming Windows is a hard requirement, otherwise a Linux or BSD would be easier), but that would be a separate question, and probably best asked on a different Stack Exchange site.

wizzwizz4
  • 749