Results 1 to 8 of 8

Thread: Switching to STATIC from DHCP

  1. #1
    Join Date
    Apr 2008
    Beans
    26

    Switching to STATIC from DHCP

    Hi. I have a newly built machine which I would like to switch from using DHCP to static. I tried doing this with the GUI but everytime I rebooted it it came back up DHCP. I read there is a bug with Network manager, so okay I am fine with doing it via cli.

    The /etc/network dir lacks any ifcfg-eth0 that I can find, and there is no /etc/sysconfig to be found. The first thing I need to do is change BOOTPROTO=dhcp to BOOTPROTO=static, but I cannot find where this is done in ubuntu.

    Any takers?

  2. #2
    Join Date
    Dec 2004
    Location
    hacking on my Debian box
    Beans
    1,305

    Re: Switching to STATIC from DHCP


  3. #3
    Join Date
    Apr 2008
    Beans
    26

    Re: Switching to STATIC from DHCP

    Quote Originally Posted by glotz View Post
    Unfortunately no, that is of no use to me. I need to make the server NOT use dhcp, using the command line, and 'Network Configuration' in the GUI does not work.

  4. #4
    Join Date
    Apr 2008
    Location
    /home/ibutho
    Beans
    1,365

    Re: Switching to STATIC from DHCP

    Edit /etc/network/interfaces and change the entry for your network device (e.g. eth0) from something like
    Code:
    auto eth0
    iface eth0 inet dhcp
    to something like
    Code:
    iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1

  5. #5
    Join Date
    Apr 2008
    Beans
    26

    Re: Switching to STATIC from DHCP

    Quote Originally Posted by ibutho View Post
    Edit /etc/network/interfaces and change the entry for your network device (e.g. eth0) from something like
    Code:
    auto eth0
    iface eth0 inet dhcp
    to something like
    Code:
    iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1
    Thanks! I got a similar answer from the great google in the sky. I'll mark this one solved.

  6. #6
    Join Date
    Jan 2006
    Location
    Houston
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Switching to STATIC from DHCP

    Quote Originally Posted by ibutho View Post
    Edit /etc/network/interfaces and change the entry for your network device (e.g. eth0) from something like
    Code:
    auto eth0
    iface eth0 inet dhcp
    to something like
    Code:
    iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1
    I also have to edit the
    /etc/resolv.conf
    add nameserver xxx.xxx.xxx
    nameserver xxx.xxx.xxx.
    Dev
    AMD 1055T 6 Cores O'c 3.8 ghz Ram 8 gigs
    Video ATI 4240
    Motherboard AsRock 880

  7. #7
    Join Date
    Oct 2010
    Beans
    2

    Re: Switching to STATIC from DHCP

    One other different thing you could do
    Still use HDCP
    but reserve the IP address based on the MAC address
    therefore therre would be no change on your side
    just on the DHCP server side

  8. #8
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,634
    Distro
    Ubuntu

    Re: Switching to STATIC from DHCP

    Old thread.

    Closed.

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
  •