Ask Experts Questions for FREE Help !
Ask
    ashley velez's Avatar
    ashley velez Posts: 67, Reputation: 1
    Junior Member
     
    #1

    Dec 10, 2008, 09:48 AM
    Errors with Ubuntu static IP, when restarting the computer
    I have a PC with the ubuntu OS

    I am having errors with setting a static IP.
    I will set the static IP by editing the interfaces file to say:


    Auto lo
    Iface lo inet loopback

    Auto eth0
    Iface eth0 inet static
    Address 10.66.30.101
    Netmask 255.255.0.0
    Broadcast 10.66.255.255
    Gateway 10.66.30.1


    The I restart the networking by, /etc/init.d/networking restart
    That works with no errors,
    Then I run the command /sbin/ifconfig to see if that changes took effect, that works without any problems
    I'll have internet access

    Then when I restart my PC, I no longer have internet access.

    I also tried something I saw in a forum that said to run the command
    Apt-get remove network-manager-gnome, then set the static ip, and it should work upon restart, but that didn't work either
    Does anyone have any ideas or know the solution?



    I also just tried setting an alias, I still have internet connectivity, but the alias didn't take, it still shows me as just the orig. ip,
    I tried creating the alias by editing /etc/dhcp3/dhclient.conf

    I uncommented the alias section and filled it in to my requirements, so it looks like this

    Alias {interface "eth0";
    Fixed-address 10.66.30.101;
    Option subnet-mask 255.255.0.0;}

    Then restarted networking, no errors, but still no ip of 10.66.30.101
    ashley velez's Avatar
    ashley velez Posts: 67, Reputation: 1
    Junior Member
     
    #2

    Dec 10, 2008, 02:19 PM

    I solved this problem, by setting an alias instead of a static IP. So no matter what the IP address changes to, you will always see the computer as the alias IP address.

    Go to /etc/network/interfaces , edit this file to say
    (changing the ip and subnet to what you need)


    Auto lo
    Iface lo inet loopback

    Auto eth0
    Iface eth0 inet dhcp

    Auto eth0:0
    Iface eth0:0 inet static
    Name Ethernet alias LAN card
    Address 10.66.30.101
    Netmask 255.255.0.0
    Broadcast 10.66.255.255

    Then /etc/init.d/networking restart
    ashley velez's Avatar
    ashley velez Posts: 67, Reputation: 1
    Junior Member
     
    #3

    Dec 10, 2008, 02:20 PM
    If you have 2 NIC's like me and need 2 static IPs write this in the interfaces file, of course editing it with your address


    Auto lo
    Iface lo inet loopback

    Auto eth0
    Iface eth0 inet dhcp

    Auto eth0:0
    Iface eth0:0 inet static
    Name Ethernet alias LAN card
    Address 10.66.30.101
    Netmask 255.255.0.0
    Broadcast 10.66.255.255

    Auto eth1
    Iface eth1 inet dhcp

    Auto eth1:1
    Iface eth1:1 inet static
    Name Ethernet alias LAN card
    Address 10.66.30.102
    Netmask 255.255.0.0
    Broadcast 10.66.255.255

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

My Computer is restarting continuously and not booting [ 4 Answers ]

Yesterday I was on my computer, its an HP Pavilion dv9308nr Notebook PC, when it suddenly put itself to sleep. Or at least the monitor went black. I did what I usually do to bring it back up, which is shake the mouse and if that fails, quickly push the power button. Well, the mouse was dead, the...

Computer keeps restarting during start-up? [ 5 Answers ]

I turned my Computer on one day, and then two seconds later it restarted itself, then 3 seconds later it would restart itself, and went a little further each restart until it got to the log in screen, then it would be okay from there ever since then (which was like 1 1/2 months ago). I thought I...

Computer continually restarting [ 1 Answers ]

Hi I'm trying to build a computer out of some spare parts for my brother, When I start the computer up it goes through post and then starts to load windows but before it shows the windows XP graphic it resets (it does this forever until you turn it off_). The MOBO has an integrated graphics card on...

Computer will not boot up and keeps restarting itself [ 12 Answers ]

Hello all. I'm new here and have encountered a really unfortunately problem with my hp laptop. This morning I was running a dj program and just letting it play music. I've done it countless times in thepast and has given me no problems, until today that is. It crashed. I easily noticed it...


View more questions Search