Setting default network interface?












0















I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.



When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?










share|improve this question














bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.



    When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?










    share|improve this question














    bumped to the homepage by Community 4 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0


      1






      I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.



      When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?










      share|improve this question














      I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.



      When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?







      debian networking network-interface ethernet defaults






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 21 '18 at 14:14









      user5104897user5104897

      149114




      149114





      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          You just need to set the default gateway to the correct interface.



          It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces



          This is a minimal configuration example for your /etc/network/interfaces file:



          auto eth0
          iface eth0 inet static
          address 192.168.0.100
          netmask 255.255.255.0
          gateway 192.168.0.1
          dns-nameserver 192.168.0.1 8.8.8.8


          You need to replace the values with your personal network settings.
          Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.



          Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.






          share|improve this answer































            0














            Supposing you've got DHCP on both interfaces:




            1. Right click on the Network Manager tray icon

            2. Choose Edit Connections...

            3. Double click your eth6 connection

            4. In the IPv4 Settings tab choose Automatic (DHCP) address only

            5. Close the window clicking Save






            share|improve this answer























              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',
              autoActivateHeartbeat: false,
              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%2f425673%2fsetting-default-network-interface%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              You just need to set the default gateway to the correct interface.



              It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces



              This is a minimal configuration example for your /etc/network/interfaces file:



              auto eth0
              iface eth0 inet static
              address 192.168.0.100
              netmask 255.255.255.0
              gateway 192.168.0.1
              dns-nameserver 192.168.0.1 8.8.8.8


              You need to replace the values with your personal network settings.
              Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.



              Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.






              share|improve this answer




























                0














                You just need to set the default gateway to the correct interface.



                It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces



                This is a minimal configuration example for your /etc/network/interfaces file:



                auto eth0
                iface eth0 inet static
                address 192.168.0.100
                netmask 255.255.255.0
                gateway 192.168.0.1
                dns-nameserver 192.168.0.1 8.8.8.8


                You need to replace the values with your personal network settings.
                Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.



                Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.






                share|improve this answer


























                  0












                  0








                  0







                  You just need to set the default gateway to the correct interface.



                  It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces



                  This is a minimal configuration example for your /etc/network/interfaces file:



                  auto eth0
                  iface eth0 inet static
                  address 192.168.0.100
                  netmask 255.255.255.0
                  gateway 192.168.0.1
                  dns-nameserver 192.168.0.1 8.8.8.8


                  You need to replace the values with your personal network settings.
                  Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.



                  Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.






                  share|improve this answer













                  You just need to set the default gateway to the correct interface.



                  It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces



                  This is a minimal configuration example for your /etc/network/interfaces file:



                  auto eth0
                  iface eth0 inet static
                  address 192.168.0.100
                  netmask 255.255.255.0
                  gateway 192.168.0.1
                  dns-nameserver 192.168.0.1 8.8.8.8


                  You need to replace the values with your personal network settings.
                  Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.



                  Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 21 '18 at 14:28









                  MarcMarc

                  3443




                  3443

























                      0














                      Supposing you've got DHCP on both interfaces:




                      1. Right click on the Network Manager tray icon

                      2. Choose Edit Connections...

                      3. Double click your eth6 connection

                      4. In the IPv4 Settings tab choose Automatic (DHCP) address only

                      5. Close the window clicking Save






                      share|improve this answer




























                        0














                        Supposing you've got DHCP on both interfaces:




                        1. Right click on the Network Manager tray icon

                        2. Choose Edit Connections...

                        3. Double click your eth6 connection

                        4. In the IPv4 Settings tab choose Automatic (DHCP) address only

                        5. Close the window clicking Save






                        share|improve this answer


























                          0












                          0








                          0







                          Supposing you've got DHCP on both interfaces:




                          1. Right click on the Network Manager tray icon

                          2. Choose Edit Connections...

                          3. Double click your eth6 connection

                          4. In the IPv4 Settings tab choose Automatic (DHCP) address only

                          5. Close the window clicking Save






                          share|improve this answer













                          Supposing you've got DHCP on both interfaces:




                          1. Right click on the Network Manager tray icon

                          2. Choose Edit Connections...

                          3. Double click your eth6 connection

                          4. In the IPv4 Settings tab choose Automatic (DHCP) address only

                          5. Close the window clicking Save







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 22 '18 at 9:12









                          Ferenc WágnerFerenc Wágner

                          2,984920




                          2,984920






























                              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.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f425673%2fsetting-default-network-interface%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