How exactly are NetworkManager, networkd, netplan, ifupdown2, and iproute2 interacting?











up vote
2
down vote

favorite
2












I am learning about Linux networking on my Kubuntu 18.04 workstation, and I see there that both NetworkManager and networkd-dispatcher are running:



oleg@eclectic:~$ sudo ps -ef | grep -i net
root 56 2 0 Oct11 ? 00:00:00 [netns]
root 1097 1 0 Oct11 ? 00:00:02 /usr/sbin/NetworkManager --no-daemon
root 1098 1 0 Oct11 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
root 1250 1 0 Oct11 ? 00:00:02 /usr/sbin/inetd
root 1593 1097 0 Oct11 ? 00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper...


NetworkManager seems to be configured to handle "everything" by netplan:



oleg@eclectic:~$ cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager


I believe that netplan would hand everything off to networkd if NetworkManager was not installed.



There are also a bunch of files in /etc/network/, and I am not sure what is handling those. A lot of packages seem to use this directory:



oleg@eclectic:~$ dpkg -S /etc/network
avahi-daemon, ifupdown2, wpasupplicant, openvpn, postfix, netbase, avahi-autoipd, wireless-tools, clamav-freshclam: /etc/network


My initial thoughts after some Googling are that NetworkManager and networkd are both running, but netplan generates configuration such that only one is actually doing something. But I do not know how I would verify this, figure out the chain of operations, or configure it to suit my nefarious plans for dummy0.



Question: How exactly are NetworkManager, networkd, and netplan working together? In other words, as the computer boots up, which processes hand what of to what other processes? How do tools from packages like net-tools, ifupdown2, and iproute2 and directories like /etc/network/ fit into all this? And finally, how can I figure this out myself and learn the details using the command line?



Update: I am not looking for a high-level overview. Rather, I want to know how these components are interacting, conflicting, or avoiding conflict on the kernel level or similar.










share|improve this question




























    up vote
    2
    down vote

    favorite
    2












    I am learning about Linux networking on my Kubuntu 18.04 workstation, and I see there that both NetworkManager and networkd-dispatcher are running:



    oleg@eclectic:~$ sudo ps -ef | grep -i net
    root 56 2 0 Oct11 ? 00:00:00 [netns]
    root 1097 1 0 Oct11 ? 00:00:02 /usr/sbin/NetworkManager --no-daemon
    root 1098 1 0 Oct11 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
    root 1250 1 0 Oct11 ? 00:00:02 /usr/sbin/inetd
    root 1593 1097 0 Oct11 ? 00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper...


    NetworkManager seems to be configured to handle "everything" by netplan:



    oleg@eclectic:~$ cat /etc/netplan/01-network-manager-all.yaml 
    # Let NetworkManager manage all devices on this system
    network:
    version: 2
    renderer: NetworkManager


    I believe that netplan would hand everything off to networkd if NetworkManager was not installed.



    There are also a bunch of files in /etc/network/, and I am not sure what is handling those. A lot of packages seem to use this directory:



    oleg@eclectic:~$ dpkg -S /etc/network
    avahi-daemon, ifupdown2, wpasupplicant, openvpn, postfix, netbase, avahi-autoipd, wireless-tools, clamav-freshclam: /etc/network


    My initial thoughts after some Googling are that NetworkManager and networkd are both running, but netplan generates configuration such that only one is actually doing something. But I do not know how I would verify this, figure out the chain of operations, or configure it to suit my nefarious plans for dummy0.



    Question: How exactly are NetworkManager, networkd, and netplan working together? In other words, as the computer boots up, which processes hand what of to what other processes? How do tools from packages like net-tools, ifupdown2, and iproute2 and directories like /etc/network/ fit into all this? And finally, how can I figure this out myself and learn the details using the command line?



    Update: I am not looking for a high-level overview. Rather, I want to know how these components are interacting, conflicting, or avoiding conflict on the kernel level or similar.










    share|improve this question


























      up vote
      2
      down vote

      favorite
      2









      up vote
      2
      down vote

      favorite
      2






      2





      I am learning about Linux networking on my Kubuntu 18.04 workstation, and I see there that both NetworkManager and networkd-dispatcher are running:



      oleg@eclectic:~$ sudo ps -ef | grep -i net
      root 56 2 0 Oct11 ? 00:00:00 [netns]
      root 1097 1 0 Oct11 ? 00:00:02 /usr/sbin/NetworkManager --no-daemon
      root 1098 1 0 Oct11 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
      root 1250 1 0 Oct11 ? 00:00:02 /usr/sbin/inetd
      root 1593 1097 0 Oct11 ? 00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper...


      NetworkManager seems to be configured to handle "everything" by netplan:



      oleg@eclectic:~$ cat /etc/netplan/01-network-manager-all.yaml 
      # Let NetworkManager manage all devices on this system
      network:
      version: 2
      renderer: NetworkManager


      I believe that netplan would hand everything off to networkd if NetworkManager was not installed.



      There are also a bunch of files in /etc/network/, and I am not sure what is handling those. A lot of packages seem to use this directory:



      oleg@eclectic:~$ dpkg -S /etc/network
      avahi-daemon, ifupdown2, wpasupplicant, openvpn, postfix, netbase, avahi-autoipd, wireless-tools, clamav-freshclam: /etc/network


      My initial thoughts after some Googling are that NetworkManager and networkd are both running, but netplan generates configuration such that only one is actually doing something. But I do not know how I would verify this, figure out the chain of operations, or configure it to suit my nefarious plans for dummy0.



      Question: How exactly are NetworkManager, networkd, and netplan working together? In other words, as the computer boots up, which processes hand what of to what other processes? How do tools from packages like net-tools, ifupdown2, and iproute2 and directories like /etc/network/ fit into all this? And finally, how can I figure this out myself and learn the details using the command line?



      Update: I am not looking for a high-level overview. Rather, I want to know how these components are interacting, conflicting, or avoiding conflict on the kernel level or similar.










      share|improve this question















      I am learning about Linux networking on my Kubuntu 18.04 workstation, and I see there that both NetworkManager and networkd-dispatcher are running:



      oleg@eclectic:~$ sudo ps -ef | grep -i net
      root 56 2 0 Oct11 ? 00:00:00 [netns]
      root 1097 1 0 Oct11 ? 00:00:02 /usr/sbin/NetworkManager --no-daemon
      root 1098 1 0 Oct11 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
      root 1250 1 0 Oct11 ? 00:00:02 /usr/sbin/inetd
      root 1593 1097 0 Oct11 ? 00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper...


      NetworkManager seems to be configured to handle "everything" by netplan:



      oleg@eclectic:~$ cat /etc/netplan/01-network-manager-all.yaml 
      # Let NetworkManager manage all devices on this system
      network:
      version: 2
      renderer: NetworkManager


      I believe that netplan would hand everything off to networkd if NetworkManager was not installed.



      There are also a bunch of files in /etc/network/, and I am not sure what is handling those. A lot of packages seem to use this directory:



      oleg@eclectic:~$ dpkg -S /etc/network
      avahi-daemon, ifupdown2, wpasupplicant, openvpn, postfix, netbase, avahi-autoipd, wireless-tools, clamav-freshclam: /etc/network


      My initial thoughts after some Googling are that NetworkManager and networkd are both running, but netplan generates configuration such that only one is actually doing something. But I do not know how I would verify this, figure out the chain of operations, or configure it to suit my nefarious plans for dummy0.



      Question: How exactly are NetworkManager, networkd, and netplan working together? In other words, as the computer boots up, which processes hand what of to what other processes? How do tools from packages like net-tools, ifupdown2, and iproute2 and directories like /etc/network/ fit into all this? And finally, how can I figure this out myself and learn the details using the command line?



      Update: I am not looking for a high-level overview. Rather, I want to know how these components are interacting, conflicting, or avoiding conflict on the kernel level or similar.







      networking linux-kernel networkmanager systemd-networkd netplan






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 19 at 17:13

























      asked Oct 12 at 18:02









      Oleg

      7034924




      7034924






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          systemd-networkd when its enabled honors configurations in /etc/systemd/network



          Whereas NetworkManager will follow some automatic rules like it will try to connect to a wired connection if it finds one.



          Both are enabled and disabled as systemd services and systemd using udev creates the device files for the network adapters. Generally you probably shouldn't have both enabled at the same time but if you do you'd need to be careful that their configurations don't conflict.



          netplan before either network manager starts creates configurations for either based on its own configuration. In this way netplan is really a configuration abstraction and wheather it uses systemd-networkd or NetworkManager is part of the configuration.



          iproute2 is a package of tools for configuring network interfaces at the command line. It includes link configuration similar to network managers and the old ifconfig. While net-tools, ipupdown and ifupdown2 use network configurations in /etc/network/interfaces to configure and deconfigure interfaces.



          ifupdown or its other versions can be used to manage networks but its not automatic but a systemd service can be used to start it at boot.



          ifupdown2 uses dependency graphs similar to what systemd does but with network interfaces. Further it acts as an abstraction to other tools like iproute2






          share|improve this answer





















          • Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
            – Oleg
            Oct 19 at 17:11











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475146%2fhow-exactly-are-networkmanager-networkd-netplan-ifupdown2-and-iproute2-inter%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          systemd-networkd when its enabled honors configurations in /etc/systemd/network



          Whereas NetworkManager will follow some automatic rules like it will try to connect to a wired connection if it finds one.



          Both are enabled and disabled as systemd services and systemd using udev creates the device files for the network adapters. Generally you probably shouldn't have both enabled at the same time but if you do you'd need to be careful that their configurations don't conflict.



          netplan before either network manager starts creates configurations for either based on its own configuration. In this way netplan is really a configuration abstraction and wheather it uses systemd-networkd or NetworkManager is part of the configuration.



          iproute2 is a package of tools for configuring network interfaces at the command line. It includes link configuration similar to network managers and the old ifconfig. While net-tools, ipupdown and ifupdown2 use network configurations in /etc/network/interfaces to configure and deconfigure interfaces.



          ifupdown or its other versions can be used to manage networks but its not automatic but a systemd service can be used to start it at boot.



          ifupdown2 uses dependency graphs similar to what systemd does but with network interfaces. Further it acts as an abstraction to other tools like iproute2






          share|improve this answer





















          • Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
            – Oleg
            Oct 19 at 17:11















          up vote
          3
          down vote













          systemd-networkd when its enabled honors configurations in /etc/systemd/network



          Whereas NetworkManager will follow some automatic rules like it will try to connect to a wired connection if it finds one.



          Both are enabled and disabled as systemd services and systemd using udev creates the device files for the network adapters. Generally you probably shouldn't have both enabled at the same time but if you do you'd need to be careful that their configurations don't conflict.



          netplan before either network manager starts creates configurations for either based on its own configuration. In this way netplan is really a configuration abstraction and wheather it uses systemd-networkd or NetworkManager is part of the configuration.



          iproute2 is a package of tools for configuring network interfaces at the command line. It includes link configuration similar to network managers and the old ifconfig. While net-tools, ipupdown and ifupdown2 use network configurations in /etc/network/interfaces to configure and deconfigure interfaces.



          ifupdown or its other versions can be used to manage networks but its not automatic but a systemd service can be used to start it at boot.



          ifupdown2 uses dependency graphs similar to what systemd does but with network interfaces. Further it acts as an abstraction to other tools like iproute2






          share|improve this answer





















          • Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
            – Oleg
            Oct 19 at 17:11













          up vote
          3
          down vote










          up vote
          3
          down vote









          systemd-networkd when its enabled honors configurations in /etc/systemd/network



          Whereas NetworkManager will follow some automatic rules like it will try to connect to a wired connection if it finds one.



          Both are enabled and disabled as systemd services and systemd using udev creates the device files for the network adapters. Generally you probably shouldn't have both enabled at the same time but if you do you'd need to be careful that their configurations don't conflict.



          netplan before either network manager starts creates configurations for either based on its own configuration. In this way netplan is really a configuration abstraction and wheather it uses systemd-networkd or NetworkManager is part of the configuration.



          iproute2 is a package of tools for configuring network interfaces at the command line. It includes link configuration similar to network managers and the old ifconfig. While net-tools, ipupdown and ifupdown2 use network configurations in /etc/network/interfaces to configure and deconfigure interfaces.



          ifupdown or its other versions can be used to manage networks but its not automatic but a systemd service can be used to start it at boot.



          ifupdown2 uses dependency graphs similar to what systemd does but with network interfaces. Further it acts as an abstraction to other tools like iproute2






          share|improve this answer












          systemd-networkd when its enabled honors configurations in /etc/systemd/network



          Whereas NetworkManager will follow some automatic rules like it will try to connect to a wired connection if it finds one.



          Both are enabled and disabled as systemd services and systemd using udev creates the device files for the network adapters. Generally you probably shouldn't have both enabled at the same time but if you do you'd need to be careful that their configurations don't conflict.



          netplan before either network manager starts creates configurations for either based on its own configuration. In this way netplan is really a configuration abstraction and wheather it uses systemd-networkd or NetworkManager is part of the configuration.



          iproute2 is a package of tools for configuring network interfaces at the command line. It includes link configuration similar to network managers and the old ifconfig. While net-tools, ipupdown and ifupdown2 use network configurations in /etc/network/interfaces to configure and deconfigure interfaces.



          ifupdown or its other versions can be used to manage networks but its not automatic but a systemd service can be used to start it at boot.



          ifupdown2 uses dependency graphs similar to what systemd does but with network interfaces. Further it acts as an abstraction to other tools like iproute2







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 12 at 23:49









          jdwolf

          2,610216




          2,610216












          • Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
            – Oleg
            Oct 19 at 17:11


















          • Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
            – Oleg
            Oct 19 at 17:11
















          Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
          – Oleg
          Oct 19 at 17:11




          Thank you for the compare/ contrast, but I was looking for more about how these components interact with each other, on a much deeper level. For example, what exactly happens in the kernel when both systemd and NetworkManager try to control the same interface at the same time? What do the iproute2/ ifupdown tools do in the kernel that conflicts (or avoids conflict) with networkd/ NetworkManager? What commands can I use to see which tools did what to which interfaces (on the udev/ kernel level)?
          – Oleg
          Oct 19 at 17:11


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475146%2fhow-exactly-are-networkmanager-networkd-netplan-ifupdown2-and-iproute2-inter%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt