# Using multiple ethernet connections?

**URL:** <https://forum.duplicati.com/t/using-multiple-ethernet-connections/9877>\
**Category:** Uncategorized\
**Created:** [May 15, 2020, 10:40pm UTC](https://forum.duplicati.com/t/using-multiple-ethernet-connections/9877 "2020-05-15T22:40:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [May 16, 2020, 6:06pm UTC](https://forum.duplicati.com/t/using-multiple-ethernet-connections/9877/7 "2020-05-16T18:06:01Z")

</div>

The main problem with fixing a [source port](https://tools.ietf.org/html/rfc793#page-15), given fixed [source IP](https://tools.ietf.org/html/rfc791#page-11) and destination IP and port, is you’re limited to a single end-to-end TCP connection, which seems like a non-starter, and HTTP doesn’t do it intentionally that I can see, either by its [standard](https://tools.ietf.org/html/rfc2616) or by implementation – feel free to cite any examples.

At the Microsoft .NET level, [HttpClient](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.-ctor?view=netframework-4.8) which Duplicati uses doesn’t even seem to allow such a setting.  
[Socket.Bind](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.bind?view=netframework-4.8) does, but Duplicati uses a higher-level API. Note also the [Remarks](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.bind?view=netframework-4.8#remarks) that show it’s optional:

> You do not need to call [Bind](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.bind?view=netframework-4.8) before using the [Connect](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.connect?view=netframework-4.8) method unless you need to use a specific local endpoint.

[Know your TCP system call sequences](https://developer.ibm.com/technologies/systems/articles/au-tcpsystemcalls/#bind) which comes from a Linux point of view says the same thing:

> For a client process, it is not mandatory to issue a bind call.

All the above is a bit redundant because everyone here seems to know [connect](http://manpages.ubuntu.com/manpages/focal/man2/connect.2.html) will bind, if need be.

I can’t find a Firefox source port in `about:config`. Exotic Linux tools such as [curl](http://manpages.ubuntu.com/manpages/focal/man1/curl.1.html) and [wget](http://manpages.ubuntu.com/manpages/focal/en/man1/wget.1.html) lack this.  
Granted, [nc](https://manpages.ubuntu.com/manpages/focal/man1/nc_openbsd.1.html) has it, but it’s about as low-level a tool as exists on Linux as a command. Its purpose is:

> The nc (or netcat) utility is used for just about anything under the sun involving TCP, UDP,  
> or UNIX-domain sockets. It can open TCP connections, send UDP packets, listen on arbitrary  
> TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6.

> [@cyr0nk0r](#):
>
> my router has no way of distinguishing

What can it distinguish? Does it know about anything QoS flavored, or is it only source/dest IP/port?  
If it can distinguish source IP, I see claims that Windows can have multiple IPs on one adapter, then

[How to Force an Application to Use a Specific Network Card](https://www.howtogeek.com/117890/how-to-force-an-application-to-use-a-specific-network-card/)  
[3 ForceBindIP GUI to Easily Bind Windows Application to Specific Network Adapter](https://www.raymond.cc/blog/bind-windows-application-to-specific-network-adapter-with-forcebindip/)  
might get you the rest of the way. Even though they say adapter, its interface appears to be address.  
You could possibly get it to run per-job if you’re willing to be [Using Duplicati from the Command Line](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/).

I haven’t tried this, and can’t vouch for it, but there seem to be a limited number of things available to signal downstream networking equipment how you’d like things handled. [IP TOS](https://tools.ietf.org/html/rfc791#page-11) field and successor [Differentiated Services DSCP](https://tools.ietf.org/html/rfc2474#page-7) come to mind (I’m not a QoS expert), but seem to have been ruled out.

So going back to the original question of can you “bind specific backup jobs to specific interfaces” the answer appears to be `yes` if jobs are processes starting each time, as opposed to a long-lived server.

Duplicati can run multiple long-lived servers if you prefer, each on its own port (8200, 8300, etc), so a job would just need to be put on the correct server for the desired interface, if jobs in GUI are wanted.

[Duplicati.GUI.TrayIcon.exe](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/#duplicatiguitrayiconexe) will do the search for you. For [Duplicati.Server.exe](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/#duplicatiserverexe) use --webservice-port. You might also need --server-datafolder so that multiple servers put their databases in different spots.

If you decide to try assigning jobs to interfaces, be careful about the Duplicati autoupdate design that starts a somewhat fixed initial install in Program Files, which launches the newest installed update…  
Firewalls that look at application paths get confused. Confusion is avoided by using updates by `.msi`.

---

_[View the full topic](https://forum.duplicati.com/t/using-multiple-ethernet-connections/9877)._
