Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Errors with Ubuntu static IP, when restarting the computer (https://www.askmehelpdesk.com/showthread.php?t=290583)

  • Dec 10, 2008, 09:48 AM
    ashley velez
    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
  • Dec 10, 2008, 02:19 PM
    ashley velez

    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
  • Dec 10, 2008, 02:20 PM
    ashley velez
    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

  • All times are GMT -7. The time now is 08:00 PM.