Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Setting up Static IP Address - 12.04LTS

  1. #11
    Join Date
    Aug 2005
    Location
    West of the Animas
    Beans
    20,228
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Setting up Static IP Address - 12.04LTS

    Quote Originally Posted by tizothony View Post
    how to lookup google ip address in ubuntu Plz
    If I understand you correctly, then try this:
    Code:
    ping -c3 www.google.com
    My computer says:
    chili@LAPTOP410:~$ ping -c3 www.google.com
    PING www.google.com (173.194.75.103) 56(84) bytes of data.
    64 bytes from ve-in-f103.1e100.net (173.194.75.103): icmp_req=1 ttl=41 time=37.3 ms
    <snip>
    Is that the information you needed?
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  2. #12
    Join Date
    Jan 2011
    Beans
    51

    Re: Setting up Static IP Address - 12.04LTS

    Sorry to write in a solved post but just for persons who have ubuntu versions before 12.04,the problem could be the change in how network manager is now configured

    Previously we would put the dns nameserver in /etc/resolve.conf

    now its placed in the /etc/network/interface as

    dns-nameservers...............

  3. #13
    Join Date
    Mar 2011
    Beans
    1

    Re: Setting up Static IP Address - 12.04LTS

    Thanks to those contributing to this thread. I was able to solve my problem by reading trough.

  4. #14
    Join Date
    Aug 2012
    Beans
    1

    Re: Setting up Static IP Address - 12.04LTS

    Thanks for this thread, It help me a lot and solved my problem.

  5. #15
    Join Date
    Mar 2007
    Location
    Liverpool
    Beans
    152

    Re: Setting up Static IP Address - 12.04LTS

    I wasn't able to easily set a static ip address, so I came up with this.

    All I want to do is ssh into my home laptop on occasion. This works when I know the ip, but it is dynamic & changes from time to time.

    So that I always know the current ip to ssh into, I did this

    gedit send_ip.sh &
    copy in "cat <(date) <(curl icanhazip.com)> /home/me/Dropbox/current_ip.txt" without the quotes
    save, close.
    chmod +x send_ip.sh

    crontab -e

    */5 * * * * /bin/bash cat <(date) <(curl icanhazip.com)> /path_to_it/send_ip.sh

    [(all one line), close & save]

    Now the current_ip.txt is updated by cron every 5 minutes, so I know where to ssh to.
    Last edited by jalirious; February 22nd, 2013 at 05:02 PM.

  6. #16
    Join Date
    Oct 2013
    Beans
    6

    Re: Setting up Static IP Address - 12.04LTS

    Quote Originally Posted by tizothony View Post
    how to lookup google ip address in ubuntu Plz
    ping the ip or domain name

    For example : ping www.google.com to find ip address of google.

    you can also use http://www.ip-details.com/domain-host-search/ to find website ip address .

  7. #17
    Join Date
    Oct 2013
    Beans
    1

    Smile Re: Setting up Static IP Address - 12.04LTS

    Quote Originally Posted by chili555 View Post
    I'd suggest:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.178
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 192.168.1.1
    Thanks this really helped and with the obvious slight change of addresses to suit my range 192.168.10.xxx I got my Ubuntu Server 10.04LTS working.

    Craig....

  8. #18
    Join Date
    May 2008
    Location
    Saint Louis
    Beans
    50
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setting up Static IP Address - 12.04LTS

    Quote Originally Posted by chili555 View Post
    I know of no compelling reason that an ordinary home computer needs a static IP. That said, I have two computers in my home on which I've set up static IPs. My wife's computer runs Ubuntu 12.04. As you might guess, I'm the in-house support. I think it's fun to log on to her computer with ssh and do administrative tasks.

    I have a printer attached to a computer and all the other computers in the house use it. It's much easier to set up with a static IP rather than samba, bind, etc. Beyond that, and perhaps a home server, I don't believe there is any speed or stability reason to use static IP addresses.

    You've made a few mistakes. First, you have IP addresses for both wired and wireless. If you have the option for wired, use it in preference to wireless. It's faster and more secure. Flip the wireless switch or key combination to OFF.

    Second, as you know, there is a provision in Network Manager to set up static IP addresses. There is no need and possibly some complication to mix NM and /etc/network/interfaces. I suggest the NM method but not both. Of course, you could remove NM altogether and use manual methods entirely.

    Next, you've picked an IP address that appears to be within the range used in the DHCP server in the router. You want one outside the range so there is no collision. For example, I've set my router to allow ten addresses by DHCP from 192.168.1.3 to x.12. All my static IPs are in the rage of 192.168.1.100 and up.

    Also, you haven't specified DNS nameservers. When a computer is given an IP address by DHCP, the router supplies DNS nameserver addresses. If you set static IPs, you are assumed to be in charge of such details.

    If you want to try again, I'd suggest:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.178
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 192.168.1.1
    thank you kindly for this post. ubuntu server 12.04.4

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •