How to make ip Address static (eth0)












10















I'm having a really hard time configuring ubuntu 13.04 to have a static ip address. I have tried multiple solutions but everytime I reboot (can't do the network reset command because ubuntu freezes) I end up with no connection.



Here is what I get when i type ifconfig into the terminal:



eth0      Link encap:Ethernet  HWaddr 10:bf:48:bc:07:cb  
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::12bf:48ff:febc:7cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1763067 errors:0 dropped:0 overruns:0 frame:0
TX packets:1024326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2284491220 (2.2 GB) TX bytes:136809317 (136.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1840 errors:0 dropped:0 overruns:0 frame:0
TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185688 (185.6 KB) TX bytes:185688 (185.6 KB)


I have also tried this:



auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.160
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.222.0.94
dns-nameservers 24.222.0.95


If anyone could help me it would be very much appreciated.










share|improve this question

























  • Which IP are you trying to get static? And are you using NetworkManager at all?

    – Thomas Ward
    Jul 1 '13 at 2:19











  • @Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

    – RobotHumans
    Jul 1 '13 at 5:23











  • hmmmmm got it.. comment removed about network-manager

    – Qasim
    Jul 1 '13 at 5:24


















10















I'm having a really hard time configuring ubuntu 13.04 to have a static ip address. I have tried multiple solutions but everytime I reboot (can't do the network reset command because ubuntu freezes) I end up with no connection.



Here is what I get when i type ifconfig into the terminal:



eth0      Link encap:Ethernet  HWaddr 10:bf:48:bc:07:cb  
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::12bf:48ff:febc:7cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1763067 errors:0 dropped:0 overruns:0 frame:0
TX packets:1024326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2284491220 (2.2 GB) TX bytes:136809317 (136.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1840 errors:0 dropped:0 overruns:0 frame:0
TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185688 (185.6 KB) TX bytes:185688 (185.6 KB)


I have also tried this:



auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.160
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.222.0.94
dns-nameservers 24.222.0.95


If anyone could help me it would be very much appreciated.










share|improve this question

























  • Which IP are you trying to get static? And are you using NetworkManager at all?

    – Thomas Ward
    Jul 1 '13 at 2:19











  • @Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

    – RobotHumans
    Jul 1 '13 at 5:23











  • hmmmmm got it.. comment removed about network-manager

    – Qasim
    Jul 1 '13 at 5:24
















10












10








10


3






I'm having a really hard time configuring ubuntu 13.04 to have a static ip address. I have tried multiple solutions but everytime I reboot (can't do the network reset command because ubuntu freezes) I end up with no connection.



Here is what I get when i type ifconfig into the terminal:



eth0      Link encap:Ethernet  HWaddr 10:bf:48:bc:07:cb  
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::12bf:48ff:febc:7cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1763067 errors:0 dropped:0 overruns:0 frame:0
TX packets:1024326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2284491220 (2.2 GB) TX bytes:136809317 (136.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1840 errors:0 dropped:0 overruns:0 frame:0
TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185688 (185.6 KB) TX bytes:185688 (185.6 KB)


I have also tried this:



auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.160
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.222.0.94
dns-nameservers 24.222.0.95


If anyone could help me it would be very much appreciated.










share|improve this question
















I'm having a really hard time configuring ubuntu 13.04 to have a static ip address. I have tried multiple solutions but everytime I reboot (can't do the network reset command because ubuntu freezes) I end up with no connection.



Here is what I get when i type ifconfig into the terminal:



eth0      Link encap:Ethernet  HWaddr 10:bf:48:bc:07:cb  
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::12bf:48ff:febc:7cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1763067 errors:0 dropped:0 overruns:0 frame:0
TX packets:1024326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2284491220 (2.2 GB) TX bytes:136809317 (136.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1840 errors:0 dropped:0 overruns:0 frame:0
TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:185688 (185.6 KB) TX bytes:185688 (185.6 KB)


I have also tried this:



auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.160
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.222.0.94
dns-nameservers 24.222.0.95


If anyone could help me it would be very much appreciated.







networking internet ethernet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 1 '13 at 2:06









Eric Carvalho

41.9k17115147




41.9k17115147










asked Jul 1 '13 at 0:51









Jordan AngelucciJordan Angelucci

51114




51114













  • Which IP are you trying to get static? And are you using NetworkManager at all?

    – Thomas Ward
    Jul 1 '13 at 2:19











  • @Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

    – RobotHumans
    Jul 1 '13 at 5:23











  • hmmmmm got it.. comment removed about network-manager

    – Qasim
    Jul 1 '13 at 5:24





















  • Which IP are you trying to get static? And are you using NetworkManager at all?

    – Thomas Ward
    Jul 1 '13 at 2:19











  • @Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

    – RobotHumans
    Jul 1 '13 at 5:23











  • hmmmmm got it.. comment removed about network-manager

    – Qasim
    Jul 1 '13 at 5:24



















Which IP are you trying to get static? And are you using NetworkManager at all?

– Thomas Ward
Jul 1 '13 at 2:19





Which IP are you trying to get static? And are you using NetworkManager at all?

– Thomas Ward
Jul 1 '13 at 2:19













@Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

– RobotHumans
Jul 1 '13 at 5:23





@Qasim - Removing networkmanager is not a solution. I prefer wicd myself, but it's still not a solution. It could break loads of things to just rip it out. It's a lot like saying, just remove dnsmasq if you want old style DNS management. It could work, but it's not fixing the problem.

– RobotHumans
Jul 1 '13 at 5:23













hmmmmm got it.. comment removed about network-manager

– Qasim
Jul 1 '13 at 5:24







hmmmmm got it.. comment removed about network-manager

– Qasim
Jul 1 '13 at 5:24












2 Answers
2






active

oldest

votes


















6














Follow these steps to make the IP address of a system static:




  1. Open interface file (sudo vi /etc/network/interfaces)


  2. Look for



    auto eth0
    iface eth0 inet dhcp



  3. Replace the above commands with



    auto eth0
    iface eth0 inet static
    address 192.168.1.100(Enter desired ip here)
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1



  4. Then enter



    sudo ifdown eth0; sudo ifup eth0







share|improve this answer





















  • 2





    How is this different from what the OP shows?

    – guntbert
    Jun 17 '14 at 17:01



















0














This is what worked for me.



auto eth0
iface eth0 inet static
address 192.168.0.160
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 24.222.0.94 24.222.0.95





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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f314830%2fhow-to-make-ip-address-static-eth0%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









    6














    Follow these steps to make the IP address of a system static:




    1. Open interface file (sudo vi /etc/network/interfaces)


    2. Look for



      auto eth0
      iface eth0 inet dhcp



    3. Replace the above commands with



      auto eth0
      iface eth0 inet static
      address 192.168.1.100(Enter desired ip here)
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1



    4. Then enter



      sudo ifdown eth0; sudo ifup eth0







    share|improve this answer





















    • 2





      How is this different from what the OP shows?

      – guntbert
      Jun 17 '14 at 17:01
















    6














    Follow these steps to make the IP address of a system static:




    1. Open interface file (sudo vi /etc/network/interfaces)


    2. Look for



      auto eth0
      iface eth0 inet dhcp



    3. Replace the above commands with



      auto eth0
      iface eth0 inet static
      address 192.168.1.100(Enter desired ip here)
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1



    4. Then enter



      sudo ifdown eth0; sudo ifup eth0







    share|improve this answer





















    • 2





      How is this different from what the OP shows?

      – guntbert
      Jun 17 '14 at 17:01














    6












    6








    6







    Follow these steps to make the IP address of a system static:




    1. Open interface file (sudo vi /etc/network/interfaces)


    2. Look for



      auto eth0
      iface eth0 inet dhcp



    3. Replace the above commands with



      auto eth0
      iface eth0 inet static
      address 192.168.1.100(Enter desired ip here)
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1



    4. Then enter



      sudo ifdown eth0; sudo ifup eth0







    share|improve this answer















    Follow these steps to make the IP address of a system static:




    1. Open interface file (sudo vi /etc/network/interfaces)


    2. Look for



      auto eth0
      iface eth0 inet dhcp



    3. Replace the above commands with



      auto eth0
      iface eth0 inet static
      address 192.168.1.100(Enter desired ip here)
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1



    4. Then enter



      sudo ifdown eth0; sudo ifup eth0








    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 5 '17 at 7:12









    Community

    1




    1










    answered Jun 17 '14 at 15:00









    vijay kumar kdpvijay kumar kdp

    7713




    7713








    • 2





      How is this different from what the OP shows?

      – guntbert
      Jun 17 '14 at 17:01














    • 2





      How is this different from what the OP shows?

      – guntbert
      Jun 17 '14 at 17:01








    2




    2





    How is this different from what the OP shows?

    – guntbert
    Jun 17 '14 at 17:01





    How is this different from what the OP shows?

    – guntbert
    Jun 17 '14 at 17:01













    0














    This is what worked for me.



    auto eth0
    iface eth0 inet static
    address 192.168.0.160
    netmask 255.255.255.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 24.222.0.94 24.222.0.95





    share|improve this answer






























      0














      This is what worked for me.



      auto eth0
      iface eth0 inet static
      address 192.168.0.160
      netmask 255.255.255.0
      broadcast 192.168.0.255
      gateway 192.168.0.1
      dns-nameservers 24.222.0.94 24.222.0.95





      share|improve this answer




























        0












        0








        0







        This is what worked for me.



        auto eth0
        iface eth0 inet static
        address 192.168.0.160
        netmask 255.255.255.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        dns-nameservers 24.222.0.94 24.222.0.95





        share|improve this answer















        This is what worked for me.



        auto eth0
        iface eth0 inet static
        address 192.168.0.160
        netmask 255.255.255.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        dns-nameservers 24.222.0.94 24.222.0.95






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 17 at 20:36









        PerlDuck

        6,78211535




        6,78211535










        answered Jan 17 at 20:25









        RKaneKnightRKaneKnight

        11




        11






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f314830%2fhow-to-make-ip-address-static-eth0%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

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?