Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] Setting Static IP on Server 8.04 CLI

  1. #1
    Join Date
    Jun 2007
    Beans
    12

    [SOLVED] Setting Static IP on Server 8.04 CLI

    I am new to Ubuntu Server i just downloaded it and installed it... VERY EASY! only thing is i am not familar with any CLI commands. If someone could let me know what the command for setting a static address, subnet and gateway.

  2. #2
    Join Date
    Aug 2007
    Location
    Atlanta, GA
    Beans
    53
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Setting Static IP on Server 8.04 CLI

    You can try this, it works in 6.0.6


    vi /etc/network/interfaces

    See This Link For the layout
    http://howtoforge.com/perfect_setup_ubuntu_6.06_p3



    VI Is tricky at first - Print this for your reference!
    http://www.digilife.be/quickreferences/QRC/Vi%20Reference%20Card.pdf

  3. #3
    Join Date
    Aug 2007
    Location
    Colombia
    Beans
    41
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Setting Static IP on Server 8.04 CLI

    you could add the network information on the file /etc/network/interfaces, in that way everytime your system boots it will configure your network adapter automatically

    in cli commands, you can use ifconfig or ip

    ip belongs to the package named iproute (it's awesome)

    for more info about them, check
    man ifconfig
    man ip

  4. #4
    Join Date
    Jun 2007
    Beans
    12

    Re: Setting Static IP on Server 8.04 CLI

    ok i guess i am having one of those days.... i guess i am going to need a hand holding session. i have checked out both your options, i ran into the ID10T error so i am having a Brain fart. dumb down for me today it has been a ruff day in the world of windows...

    if someone could just break it down into setups it would be greatly appreciated.

  5. #5
    Join Date
    Aug 2007
    Location
    From the land down under
    Beans
    1,241
    Distro
    Ubuntu Development Release

    Re: Setting Static IP on Server 8.04 CLI

    Quote Originally Posted by freakypcteck View Post
    ok i guess i am having one of those days.... i guess i am going to need a hand holding session. i have checked out both your options, i ran into the ID10T error so i am having a Brain fart. dumb down for me today it has been a ruff day in the world of windows...

    if someone could just break it down into setups it would be greatly appreciated.
    Assuming you know how to use vi editior(If you don't you should probably be using ubuntu desktop edition):



    1. sudo vi /etc/network/interfaces

    2. in that file is something that might look like this:

    Code:
    iface eth0 inet dhcp
    change dhcp to be static:

    Code:
    iface eth0 inet static
    and include underneath it:

    Code:
            address 192.168.0.100 (what you want your static ip to be)
            netmask 255.255.255.0 (is normal, just need to copy)
            broadcast 192.168.0.255 (copy)
            gateway 192.168.0.1 (whatever your routers ip address is)
    save and quit vi

    3. sudo /etc/init.d/networking restart

    and it should now be whatever ip address you put in the 'address' section.

  6. #6

    Re: Setting Static IP on Server 8.04 CLI

    Quote Originally Posted by ikt View Post
    Assuming you know how to use vi editior(If you don't you should probably be using ubuntu desktop edition):
    could i add that i have been administrating linux and BSD boxes for about 5 years on the CLI and i don't know how to use vi either (tought it was VIM actually) i personally use nano /etc/network/interfaces wich is a lot easier and does the job well.

    all the rest this guy told you is perfect

    you could also see the applied settings with the command

    Code:
    ifconfig

  7. #7
    Join Date
    Aug 2007
    Location
    From the land down under
    Beans
    1,241
    Distro
    Ubuntu Development Release

    Re: Setting Static IP on Server 8.04 CLI

    Quote Originally Posted by songshu View Post
    could i add that i have been administrating linux and BSD boxes for about 5 years on the CLI and i don't know how to use vi either (thought it was VIM actually) i personally use nano /etc/network/interfaces which is a lot easier and does the job well.
    that's cool, I probably should have said a 'cli text editor'.

  8. #8

    Re: Setting Static IP on Server 8.04 CLI

    you could do it with commands as well.
    something like so:
    Code:
    ifconfig eth0 192.168.0.100 netmask 255.255.255.0 up
    ifconfig eth0

    but everytime you start your computer it actually reads the file in /etc/network/interfaces so you would have to do it again everytime.

    a nice place to start is here https://help.ubuntu.com/8.04/serverguide/C/index.html

  9. #9
    Join Date
    Jun 2007
    Beans
    12

    Re: Setting Static IP on Server 8.04 CLI

    thanks the nano is better for me, when i try to save the file i get an error witing /ect/network/interfaces: No such file or directory. i know i am doing something wrong. thanks for the help guys.

  10. #10

    Re: Setting Static IP on Server 8.04 CLI

    nano /etc/network/interfaces


    mind the etc

Page 1 of 2 12 LastLast

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
  •