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

Thread: Setting up a server with a static ip

  1. #1
    Join Date
    Dec 2009
    Beans
    14

    Setting up a server with a static ip

    I'm trying to set my computer up as a server. I've installed LAMP, but now my problem is getting a static ip. I've tried several tutorials, but with each one, I seem to somehow disable my internet connection.

    I'm almost positive that this is all over my head, but my aim is for it to not be. So any direction would be great, thank you.

  2. #2
    Join Date
    May 2008
    Beans
    2,525

    Re: Setting up a server with a static ip

    If you're using a router it's usually done in the routers configuration by assigning a static IP to the MAC of the interface you're using. Use ifconfig in a terminal on the server to find out the MAC address of your adapter.

    Ultimate Edition Links

  3. #3
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Setting up a server with a static ip

    This should give you some insight:
    Code:
    man interfaces
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

  4. #4
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Setting up a server with a static ip

    /etc/network/interfaces:
    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    #iface eth0 inet dhcp
    iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.1.1
    this should set your static ip to 192.168.1.2
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

  5. #5
    Join Date
    Dec 2009
    Beans
    14

    Re: Setting up a server with a static ip

    Is the MAC address the same as the HWaddr listed when ifconfig is run?

  6. #6
    Join Date
    Jul 2007
    Beans
    1,577

    Re: Setting up a server with a static ip

    Quote Originally Posted by Scootm View Post
    Is the MAC address the same as the HWaddr listed when ifconfig is run?
    Yes.

  7. #7
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Setting up a server with a static ip

    Quote Originally Posted by Scootm View Post
    Is the MAC address the same as the HWaddr listed when ifconfig is run?
    yes
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

  8. #8
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Setting up a server with a static ip

    Quote Originally Posted by 2hot6ft2 View Post
    If you're using a router it's usually done in the routers configuration by assigning a static IP to the MAC of the interface you're using. Use ifconfig in a terminal on the server to find out the MAC address of your adapter.
    +1. Using the router can make life a lot easier.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  9. #9
    Join Date
    Dec 2009
    Beans
    14

    Re: Setting up a server with a static ip

    Yes, I'm using a router, however, I can't figure out how to assign a static IP to the MAC address. I've tried looking up the manual (through the 192.168.1.1 router site) and it can't find the pdf. Ugh.

    Thanks, though. Lots of help so far.

  10. #10
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Setting up a server with a static ip

    Most routers (at least the last few I've used) will let you "reserve" an IP in the DHCP pool for specific MAC addresses. If yours has no such option it should at least have an option to disable DHCP (then you'd need to configure all your machines statically, but at least you'd have your server static).

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
  •