It is possible to configure both pppoe and dhcp on the same interface?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












I would like to setup on a debian 9 machine inside the /etc/interfaces file both the dhcp and pppoe config.



So that I can move my machine with it's eth0 and attach it:



  • to a friend house that has pppoe, in this case the machine see pppoe available and establish a connection with it (I have the provider config file already setup on the machine)


  • to my house where I have my router with dhcp, and I benefit from dhcp for getting my IP address


  • Is it possible to do that?


  • Should I specify inside interfaces both pppoe and inet dhcp?






share|improve this question


























    up vote
    3
    down vote

    favorite
    1












    I would like to setup on a debian 9 machine inside the /etc/interfaces file both the dhcp and pppoe config.



    So that I can move my machine with it's eth0 and attach it:



    • to a friend house that has pppoe, in this case the machine see pppoe available and establish a connection with it (I have the provider config file already setup on the machine)


    • to my house where I have my router with dhcp, and I benefit from dhcp for getting my IP address


    • Is it possible to do that?


    • Should I specify inside interfaces both pppoe and inet dhcp?






    share|improve this question
























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I would like to setup on a debian 9 machine inside the /etc/interfaces file both the dhcp and pppoe config.



      So that I can move my machine with it's eth0 and attach it:



      • to a friend house that has pppoe, in this case the machine see pppoe available and establish a connection with it (I have the provider config file already setup on the machine)


      • to my house where I have my router with dhcp, and I benefit from dhcp for getting my IP address


      • Is it possible to do that?


      • Should I specify inside interfaces both pppoe and inet dhcp?






      share|improve this question














      I would like to setup on a debian 9 machine inside the /etc/interfaces file both the dhcp and pppoe config.



      So that I can move my machine with it's eth0 and attach it:



      • to a friend house that has pppoe, in this case the machine see pppoe available and establish a connection with it (I have the provider config file already setup on the machine)


      • to my house where I have my router with dhcp, and I benefit from dhcp for getting my IP address


      • Is it possible to do that?


      • Should I specify inside interfaces both pppoe and inet dhcp?








      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 15 at 13:13









      Yaron

      3,19421027




      3,19421027










      asked Mar 15 at 11:39









      user3450548

      84411128




      84411128




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          To answer your question, yes it should be possible to use both dynamic and static IP interface configurations. You do this by creating virtual interfaces to use the same physical interface. Each virtual interface will need to be configured properly to your network's needs.



          I am not as familiar with PPPoE but I have found some links that could help you. This post covers how to configure having both static and dynamic interfaces. Here is the Official Debian Wiki on how to set up PPPoE. Again I suggest you read through the Debian Wiki on how to do network configuration using different interface settings.



          According to the aforementioned links, your /etc/network/interfaces should look something like this:



          auto lo eth0 eth0:0
          iface lo inet loopback

          iface eth0 inet dhcp

          iface eth0:0 inet manual

          auto dsl-provider
          iface dsl-provider inet ppp
          pre-up /sbin/ifconfig eth0:0 up
          provider dsl-provider



          Don't forget to run pppoeconf to generate and/or modify /etc/ppp/peers/dsl-provider, /etc/ppp/*ap-secrets files and /etc/network/interfaces.
          It is best, in most cases, to keep the suggested answers




          I would substitute eth0 with whatever the name of your device actually appears by default to keep things simple. However I highly suggest you read through the Debian manual on how to set up networking before you do anything. Remember to figure out where your network is getting its configuration information from and make the appropriate changes there. Best of Luck!






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f430378%2fit-is-possible-to-configure-both-pppoe-and-dhcp-on-the-same-interface%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            To answer your question, yes it should be possible to use both dynamic and static IP interface configurations. You do this by creating virtual interfaces to use the same physical interface. Each virtual interface will need to be configured properly to your network's needs.



            I am not as familiar with PPPoE but I have found some links that could help you. This post covers how to configure having both static and dynamic interfaces. Here is the Official Debian Wiki on how to set up PPPoE. Again I suggest you read through the Debian Wiki on how to do network configuration using different interface settings.



            According to the aforementioned links, your /etc/network/interfaces should look something like this:



            auto lo eth0 eth0:0
            iface lo inet loopback

            iface eth0 inet dhcp

            iface eth0:0 inet manual

            auto dsl-provider
            iface dsl-provider inet ppp
            pre-up /sbin/ifconfig eth0:0 up
            provider dsl-provider



            Don't forget to run pppoeconf to generate and/or modify /etc/ppp/peers/dsl-provider, /etc/ppp/*ap-secrets files and /etc/network/interfaces.
            It is best, in most cases, to keep the suggested answers




            I would substitute eth0 with whatever the name of your device actually appears by default to keep things simple. However I highly suggest you read through the Debian manual on how to set up networking before you do anything. Remember to figure out where your network is getting its configuration information from and make the appropriate changes there. Best of Luck!






            share|improve this answer


























              up vote
              2
              down vote



              accepted










              To answer your question, yes it should be possible to use both dynamic and static IP interface configurations. You do this by creating virtual interfaces to use the same physical interface. Each virtual interface will need to be configured properly to your network's needs.



              I am not as familiar with PPPoE but I have found some links that could help you. This post covers how to configure having both static and dynamic interfaces. Here is the Official Debian Wiki on how to set up PPPoE. Again I suggest you read through the Debian Wiki on how to do network configuration using different interface settings.



              According to the aforementioned links, your /etc/network/interfaces should look something like this:



              auto lo eth0 eth0:0
              iface lo inet loopback

              iface eth0 inet dhcp

              iface eth0:0 inet manual

              auto dsl-provider
              iface dsl-provider inet ppp
              pre-up /sbin/ifconfig eth0:0 up
              provider dsl-provider



              Don't forget to run pppoeconf to generate and/or modify /etc/ppp/peers/dsl-provider, /etc/ppp/*ap-secrets files and /etc/network/interfaces.
              It is best, in most cases, to keep the suggested answers




              I would substitute eth0 with whatever the name of your device actually appears by default to keep things simple. However I highly suggest you read through the Debian manual on how to set up networking before you do anything. Remember to figure out where your network is getting its configuration information from and make the appropriate changes there. Best of Luck!






              share|improve this answer
























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                To answer your question, yes it should be possible to use both dynamic and static IP interface configurations. You do this by creating virtual interfaces to use the same physical interface. Each virtual interface will need to be configured properly to your network's needs.



                I am not as familiar with PPPoE but I have found some links that could help you. This post covers how to configure having both static and dynamic interfaces. Here is the Official Debian Wiki on how to set up PPPoE. Again I suggest you read through the Debian Wiki on how to do network configuration using different interface settings.



                According to the aforementioned links, your /etc/network/interfaces should look something like this:



                auto lo eth0 eth0:0
                iface lo inet loopback

                iface eth0 inet dhcp

                iface eth0:0 inet manual

                auto dsl-provider
                iface dsl-provider inet ppp
                pre-up /sbin/ifconfig eth0:0 up
                provider dsl-provider



                Don't forget to run pppoeconf to generate and/or modify /etc/ppp/peers/dsl-provider, /etc/ppp/*ap-secrets files and /etc/network/interfaces.
                It is best, in most cases, to keep the suggested answers




                I would substitute eth0 with whatever the name of your device actually appears by default to keep things simple. However I highly suggest you read through the Debian manual on how to set up networking before you do anything. Remember to figure out where your network is getting its configuration information from and make the appropriate changes there. Best of Luck!






                share|improve this answer














                To answer your question, yes it should be possible to use both dynamic and static IP interface configurations. You do this by creating virtual interfaces to use the same physical interface. Each virtual interface will need to be configured properly to your network's needs.



                I am not as familiar with PPPoE but I have found some links that could help you. This post covers how to configure having both static and dynamic interfaces. Here is the Official Debian Wiki on how to set up PPPoE. Again I suggest you read through the Debian Wiki on how to do network configuration using different interface settings.



                According to the aforementioned links, your /etc/network/interfaces should look something like this:



                auto lo eth0 eth0:0
                iface lo inet loopback

                iface eth0 inet dhcp

                iface eth0:0 inet manual

                auto dsl-provider
                iface dsl-provider inet ppp
                pre-up /sbin/ifconfig eth0:0 up
                provider dsl-provider



                Don't forget to run pppoeconf to generate and/or modify /etc/ppp/peers/dsl-provider, /etc/ppp/*ap-secrets files and /etc/network/interfaces.
                It is best, in most cases, to keep the suggested answers




                I would substitute eth0 with whatever the name of your device actually appears by default to keep things simple. However I highly suggest you read through the Debian manual on how to set up networking before you do anything. Remember to figure out where your network is getting its configuration information from and make the appropriate changes there. Best of Luck!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 26 at 19:05

























                answered Mar 16 at 13:43









                kemotep

                1,0941616




                1,0941616






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430378%2fit-is-possible-to-configure-both-pppoe-and-dhcp-on-the-same-interface%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay