Make added route persistent after restart

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











up vote
1
down vote

favorite












I am adding this line to add a route Route add –net 0.0.0.0 netmask 0.0.0.0 gw 95.98.108.14



However, when I restart the machine, the route is gone and I had to insert it again.



How can I make it persistent. I am on Red Hat 6.5 Santiago







share|improve this question


























    up vote
    1
    down vote

    favorite












    I am adding this line to add a route Route add –net 0.0.0.0 netmask 0.0.0.0 gw 95.98.108.14



    However, when I restart the machine, the route is gone and I had to insert it again.



    How can I make it persistent. I am on Red Hat 6.5 Santiago







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am adding this line to add a route Route add –net 0.0.0.0 netmask 0.0.0.0 gw 95.98.108.14



      However, when I restart the machine, the route is gone and I had to insert it again.



      How can I make it persistent. I am on Red Hat 6.5 Santiago







      share|improve this question














      I am adding this line to add a route Route add –net 0.0.0.0 netmask 0.0.0.0 gw 95.98.108.14



      However, when I restart the machine, the route is gone and I had to insert it again.



      How can I make it persistent. I am on Red Hat 6.5 Santiago









      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 8 at 12:53









      Jeff Schaller

      31.3k846105




      31.3k846105










      asked Feb 8 at 12:07









      tony9099

      1074




      1074




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.



           example:
          # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

          will be:

          GATEWAY0=192.168.10.1
          NETMASK0=255.255.255.0
          ADDRESS0=192.168.100.0

          GATEWAY1=10.64.34.1
          NETMASK1= 255.255.255.240
          ADDRESS1=10.64.34.10

          # service network restart


          more info here






          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%2f422786%2fmake-added-route-persistent-after-restart%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










            You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.



             example:
            # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

            will be:

            GATEWAY0=192.168.10.1
            NETMASK0=255.255.255.0
            ADDRESS0=192.168.100.0

            GATEWAY1=10.64.34.1
            NETMASK1= 255.255.255.240
            ADDRESS1=10.64.34.10

            # service network restart


            more info here






            share|improve this answer


























              up vote
              2
              down vote



              accepted










              You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.



               example:
              # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

              will be:

              GATEWAY0=192.168.10.1
              NETMASK0=255.255.255.0
              ADDRESS0=192.168.100.0

              GATEWAY1=10.64.34.1
              NETMASK1= 255.255.255.240
              ADDRESS1=10.64.34.10

              # service network restart


              more info here






              share|improve this answer
























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.



                 example:
                # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

                will be:

                GATEWAY0=192.168.10.1
                NETMASK0=255.255.255.0
                ADDRESS0=192.168.100.0

                GATEWAY1=10.64.34.1
                NETMASK1= 255.255.255.240
                ADDRESS1=10.64.34.10

                # service network restart


                more info here






                share|improve this answer














                You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.



                 example:
                # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

                will be:

                GATEWAY0=192.168.10.1
                NETMASK0=255.255.255.0
                ADDRESS0=192.168.100.0

                GATEWAY1=10.64.34.1
                NETMASK1= 255.255.255.240
                ADDRESS1=10.64.34.10

                # service network restart


                more info here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 8 at 12:26

























                answered Feb 8 at 12:15









                Kingofkech

                4801318




                4801318






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422786%2fmake-added-route-persistent-after-restart%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