Announcement

Collapse
No announcement yet.

Systemd's Networkd Now Supports Bonding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Systemd's Networkd Now Supports Bonding

    Phoronix: Systemd's Networkd Now Supports Bonding

    Systemd's networkd system service for networking now has basic support for bonding...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    It's probably obvious that I'm not a networking expert because of my question but will this allow me to make use of an Ethernet connection and a USB tethered phone (looks like an Ethernet interface) simultaneously? For example, in a round-robin or maybe even load balanced way where connections can be spread between the interfaces (ie. a browser may make multiple TCP connections, P2P software, etc.). I've tried doing this before but never got it working. I ended up looking into iptables since this is a routing thing but just ended up getting lost. I'm looking for something like this Windows software: http://www.connectify.me/dispatch/.

    Comment


    • #3
      Originally posted by guido12 View Post
      It's probably obvious that I'm not a networking expert because of my question but will this allow me to make use of an Ethernet connection and a USB tethered phone (looks like an Ethernet interface) simultaneously? For example, in a round-robin or maybe even load balanced way where connections can be spread between the interfaces (ie. a browser may make multiple TCP connections, P2P software, etc.). I've tried doing this before but never got it working. I ended up looking into iptables since this is a routing thing but just ended up getting lost. I'm looking for something like this Windows software: http://www.connectify.me/dispatch/.
      I don't really know, but it's probably possible. The more obvious usecase would be two Gbit ethernet ports for double bandwidth, but I don't see why you shouldn't be able to do it with dissimilar interfaces.

      Comment


      • #4
        Originally posted by Nobu View Post
        I don't really know, but it's probably possible. The more obvious usecase would be two Gbit ethernet ports for double bandwidth, but I don't see why you shouldn't be able to do it with dissimilar interfaces.
        I read somewhere that the problem with these 'ideas' is that applications, libraries, and protocols so far aren't smart enough to piece together the info from different sources. So you can have 2 apps using 2 different interfaces, but you cant have 1 app using 2 interfaces because it doesn't know reconstruct the data from two different sources. Maybe there's been work done, or maybe the original post was wrong, but thats just what I read last time this came up. If someone who is more knowledgeable or has experience with the topic could post to clarify, that'd be great.
        All opinions are my own not those of my employer if you know who they are.

        Comment


        • #5
          Originally posted by Nobu View Post
          I don't really know, but it's probably possible. The more obvious usecase would be two Gbit ethernet ports for double bandwidth, but I don't see why you shouldn't be able to do it with dissimilar interfaces.
          That's what I was hoping. Most of the network bonding/teaming instructions I've found talked about Ethernet interfaces though. I couldn't find instructions I could understand where someone did it with different types of interfaces. The ones who claimed to have gotten it to work were too vague for me to figure out how they did it. Also, supposedly, using round-robin or load balancing doesn't need special hardware support. I didn't have much look trying to use iptables either.

          Too bad Phoronix doesn't do how-to articles.

          Originally posted by Ericg View Post
          I read somewhere that the problem with these 'ideas' is that applications, libraries, and protocols so far aren't smart enough to piece together the info from different sources. So you can have 2 apps using 2 different interfaces, but you cant have 1 app using 2 interfaces because it doesn't know reconstruct the data from two different sources. Maybe there's been work done, or maybe the original post was wrong, but thats just what I read last time this came up. If someone who is more knowledgeable or has experience with the topic could post to clarify, that'd be great.
          Maybe my understanding of networking isn't correct then. I thought the interface used is hidden from the application. From my understanding, an application creates a TCP or UDP socket to some remote IP address. The network stack handles the part about which interface to use and other routing stuff. Once the TCP/UDP connection is created, the application transmits/receives data through that socket like any other socket. The network stack remembers to keep using the same interface that was used when the connection was created so the source/destination IPs of the packets stay the same. If the application creates a new TCP/UDP socket, the network stack could use a different interface for it but the application isn't affected because it already should know how to handle data using more than one socket. The application will use the same local and remote IP addresses but the network stack would do some IP address translation (not sure if that's the right term) to make sure routing works okay (ie. replace the local IP used with the interface's IP on outgoing packets and vice versa on incoming packets).

          So from the application point of view, it typically only knows about the IP address, source/destination port and socket type. The route used isn't really known to the application.

          I was concerned with how the remote side would handle this though. For example, if I'm browsing a secure site and they detect a single session being used by multiple IPs. The site might flag this and do something.

          If my understanding was wrong then I guess it makes sense why I never got this working.

          Comment


          • #6
            Originally posted by Ericg View Post
            I read somewhere that the problem with these 'ideas' is that applications, libraries, and protocols so far aren't smart enough to piece together the info from different sources. So you can have 2 apps using 2 different interfaces, but you cant have 1 app using 2 interfaces because it doesn't know reconstruct the data from two different sources. Maybe there's been work done, or maybe the original post was wrong, but thats just what I read last time this came up. If someone who is more knowledgeable or has experience with the topic could post to clarify, that'd be great.
            Multipath TCP. There's an experimental module for it.iOS 7 makes use of it to allow siri to move more easily between wwan and wlan.

            Comment


            • #7
              Originally posted by guido12 View Post
              From my understanding, an application creates a TCP or UDP socket to some remote IP address. The network stack handles the part about which interface to use and other routing stuff.
              I think you probably already have this information, but I'm posting it just in case. An IP server can choose which interfaces it wants to listen on when it bind()s his listen socket to the IP address of a local interface. He can use the special address IF_ANY to listen on all local interfaces. See man pages bind(2) and ip(7). In the case of a bridged interface, the kernel provides a "software" interface with its own IP address that applications can listen on, without them even knowing about the real "hardware" interfaces that make up the bridge and actually bring the packets in and take them out. Those underlying interfaces get no IP addresses when they're part of a bridge. See for example http://www.tldp.org/HOWTO/BRIDGE-STP...he-bridge.html , even if that's about brctl which perhaps is now deprecated in favor of the ip command or something like that.

              Comment


              • #8
                Originally posted by guido12 View Post
                It's probably obvious that I'm not a networking expert because of my question but will this allow me to make use of an Ethernet connection and a USB tethered phone (looks like an Ethernet interface) simultaneously? For example, in a round-robin or maybe even load balanced way where connections can be spread between the interfaces (ie. a browser may make multiple TCP connections, P2P software, etc.). I've tried doing this before but never got it working. I ended up looking into iptables since this is a routing thing but just ended up getting lost. I'm looking for something like this Windows software: http://www.connectify.me/dispatch/.
                Back in 2003 there was a patch to the Linux kernel iptables that allowed the use of two or more interfaces for IP masquerade. It did round robin and failover, just as you want.

                A new connection would be assigned an interface and it had to stay on that interface. If the connection went down, all of those TCP connections also went down. But new connections would be created on the remaining interfaces.

                It looks like that's now built-in. Check this out: http://parkersamp.com/2010/03/howto-...uter-firewall/

                I think the magic happens in the command "ip route add default equalize nexthop via 192.168.10.1 dev eth1 nexthop via 192.168.9.1 dev eth2 nexthop via 192.168.8.1 dev eth3"

                Comment


                • #9
                  Sorry for my ignorance, but what is the relation between Networkd and NetworkManager? Will Networkd replace it?

                  Comment


                  • #10
                    Originally posted by guido12 View Post
                    It's probably obvious that I'm not a networking expert because of my question but will this allow me to make use of an Ethernet connection and a USB tethered phone (looks like an Ethernet interface) simultaneously? For example, in a round-robin or maybe even load balanced way where connections can be spread between the interfaces (ie. a browser may make multiple TCP connections, P2P software, etc.). I've tried doing this before but never got it working. I ended up looking into iptables since this is a routing thing but just ended up getting lost. I'm looking for something like this Windows software: http://www.connectify.me/dispatch/.

                    This won't work with bonding. It's usually used for similar devices and the other end needs to support it as well.

                    Comment

                    Working...
                    X