Results 1 to 4 of 4

Thread: IP adressingf in UBUNTU

  1. #1
    Join Date
    May 2008
    Beans
    4

    IP adressingf in UBUNTU

    Hi, I have a computer running Hardy that I was trying to set up as a lab computer, however it would not request an IP address from the DHCP server to let it see the other computers on my network and the internet. I eventually got this fixed and working, but I was wondering is there a command line way to request an IP address, something similar to the windows "ipconfig /renew"

    Sorry if this is a dumb question, but I could not find a listing for this in the docs.

    Thank you:

  2. #2
    Join Date
    Jun 2006
    Location
    Switzerland
    Beans
    Hidden!
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: IP adressingf in UBUNTU

    Code:
    sudo /etc/init.d/networking restart

  3. #3
    Join Date
    Aug 2006
    Location
    North East England
    Beans
    576
    Distro
    Ubuntu

    Re: IP adressingf in UBUNTU

    You can set a static IP by typing
    Code:
    sudo nano /etc/network/interfaces
    You will get a file like this:
    auto lo
    iface lo inet loopback

    iface eth0 inet dhcp

    auto eth0
    Change it to something like this:
    auto lo
    iface lo inet loopback


    iface eth0 inet static
    address 192.168.1.XXX
    netmask 255.255.255.0
    gateway 192.168.1.1

    auto eth0
    Where XXX is the IP address you want the server to have
    Hope this helps!

  4. #4
    Join Date
    Nov 2007
    Location
    UK
    Beans
    288
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: IP adressingf in UBUNTU

    You'll have to do the networkign restart thing hyperch mentionned after setting the static IP in interfaces.

    If the OP is looking for something just to do renew dhcp requests can they not use

    Code:
    sudo dhclient -r eth0
    sudo dhclient eth0

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
  •