Results 1 to 5 of 5

Thread: Using a Wi-Fi network with one application and Ethernet for everything else

  1. #1

    Question Using a Wi-Fi network with one application and Ethernet for everything else

    Sorry for my terrible English. If you don't understand what I'm saying, ask and I will try to explain it with different words and give examples.

    Here is what I'm trying to achieve:


    • Everything to go through the ethernet connection by default.
    • And certain application(s) to go through a wireless network.

    I'm running openSUSE Tumbleweed with Xfce desktop environment and I'm trying to use qBittorrent with a specific wireless network but use the ethernet for everything else (the browser and other internet applications).

    My network interfaces (I've replaced my MAC addresses with 00:00:00:00:00:00):
    Code:
    $ ip link show
    Code:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    I've done some research and I found this https://unix.stackexchange.com/quest...work-interface the accepted answer suggests using network namespaces but I couldn't get it to work

    Here is what I did
    Code:
    user@linux-2qn0:~> sudo ip netns add test_ns
    user@linux-2qn0:~> sudo ip link set wlp3s0 netns test_ns
    RTNETLINK answers: Invalid argument
    user@linux-2qn0:~>
    I've tried Wi-Fi on/off in Xfce's NetworkManager but it gave the same error RTNETLINK answers: Invalid argument
    I'm probably doing something obviously wrong and/or there is a much better way to do this thru the awesome YaST GUI tools but I couldn't figure it out. Thanks for any help you are able to provide.
    Last edited by BigonFifon; 09-Mar-2018 at 14:29. Reason: slight rewording

  2. #2

    Default Re: Using a Wi-Fi network with one application and Ethernet for everything else

    I forgot to explain why I want to do this. (it's not particularly useful information but still)
    I have 2 ISPs at my home. Because of the placement of the routers, I connect to one of the routers using a wired connection and I use wireless for the other one.
    Obviously, I cannot combine both of the connections but I would like to be able to assign one application to use one network interface e.g. wireless and the rest to use the other interface.

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,593

    Question Re: Using a Wi-Fi network with one application and Ethernet for everything else

    Never really tested it properly but, the impression that I have is that Network Manager tends to use the link with the most bandwidth -- I've never really tested if Network Manager will perform something which looks like load sharing over the available links.

    The RTNETLINK error raised by "ip link set wlp3s0 netns test_ns" is possibly due to an issue in the '/etc/sysconfig/network/ifcfg-wlp3s0' file:
    • Please check the value of entries such as "NETMASK??=" and "ADDRESS??=" -- where '??' is an integer value resulting from the process which created the new network name space.

    N.B.: StackExchange: "Bind unix program to specific network interface" <https://unix.stackexchange.com/quest...work-interface>:
    # Set test to use eth0, after this point eth0 is not usable by programs
    # outside the namespace

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Using a Wi-Fi network with one application and Ethernet for everything else

    It's late, but wouldn't some firewall tule work? Bittorrent traffic goes through a specific port, forward that port to the wireless interface, close all other ports...... Just thinking if this could be done.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5

    Default Re: Using a Wi-Fi network with one application and Ethernet for everything else

    Thanks for your replies.

    The RTNETLINK error raised by "ip link set wlp3s0 netns test_ns" is possibly due to an issue in the '/etc/sysconfig/network/ifcfg-wlp3s0' file:
    The file doesn't exist tried WiFi off/on
    Code:
    user@linux-2qn0:~> cat /etc/sysconfig/network/ifcfg-wlp3s0
    cat: /etc/sysconfig/network/ifcfg-wlp3s0: No such file or directory
    Code:
    user@linux-2qn0:~> ls /etc/sysconfig/network/
    config  ifcfg-enp2s0f0      ifcfg-lo        if-down.d  providers
    dhcp    ifcfg-enp2s0f0.bak  ifcfg.template  if-up.d    scripts
    It's late,
    Is it late for an answer? Idk it's not late to me.

    Bittorrent traffic goes through a specific port, forward that port to the wireless interface, close all other ports...... Just thinking if this could be done.
    I don't know much about firewalls but I guess I have to experiment.

    One more thing. I've noticed that some applications have an option to select the network interface and/or to bind to a specific IP
    For example in the Advanced settings in qBittorrent
    I tried changing the network interface to wlp3s0 and tried all the IPs from that interface, restarted the application each time but qBittorrent couldn't connect to any torrents.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •