Network drops eveytime I change my IP












0














Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?










share|improve this question









New contributor




Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0














    Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?










    share|improve this question









    New contributor




    Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0







      Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?










      share|improve this question









      New contributor




      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?







      networking ip






      share|improve this question









      New contributor




      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited yesterday









      vidarlo

      8,91342442




      8,91342442






      New contributor




      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      Darren Mew

      1




      1




      New contributor




      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          2














          You should know how a machine commonly (always) reaches the internet.



          It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.



          Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.



          But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.



          To set a route, use ip:



          ip route add default via 192.168.132.1


          This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.



          But my real question is why you would want to change your IP. You probably don't.



          In addition, you may have to set DNS servers to suitable values.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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
            });


            }
            });






            Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1104498%2fnetwork-drops-eveytime-i-change-my-ip%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









            2














            You should know how a machine commonly (always) reaches the internet.



            It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.



            Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.



            But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.



            To set a route, use ip:



            ip route add default via 192.168.132.1


            This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.



            But my real question is why you would want to change your IP. You probably don't.



            In addition, you may have to set DNS servers to suitable values.






            share|improve this answer


























              2














              You should know how a machine commonly (always) reaches the internet.



              It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.



              Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.



              But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.



              To set a route, use ip:



              ip route add default via 192.168.132.1


              This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.



              But my real question is why you would want to change your IP. You probably don't.



              In addition, you may have to set DNS servers to suitable values.






              share|improve this answer
























                2












                2








                2






                You should know how a machine commonly (always) reaches the internet.



                It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.



                Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.



                But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.



                To set a route, use ip:



                ip route add default via 192.168.132.1


                This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.



                But my real question is why you would want to change your IP. You probably don't.



                In addition, you may have to set DNS servers to suitable values.






                share|improve this answer












                You should know how a machine commonly (always) reaches the internet.



                It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.



                Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.



                But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.



                To set a route, use ip:



                ip route add default via 192.168.132.1


                This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.



                But my real question is why you would want to change your IP. You probably don't.



                In addition, you may have to set DNS servers to suitable values.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                vidarlo

                8,91342442




                8,91342442






















                    Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.













                    Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.












                    Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1104498%2fnetwork-drops-eveytime-i-change-my-ip%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

                    Questions related to Moebius Transform of Characteristic Function of the Primes

                    List of scandals in India

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?