ip address changes on ubuntu server

There are 4 replies in this Thread which was already clicked 286 times. The last Post () by lfc4ever.

    • Official Post

    This is normal when DHCP is enabled, set a static ip address in your router or in terminal..


    open the /etc/network/interfaces file.


    Code
    sudo vi /etc/network/interfaces


    If you are using DHCP for your primary network card which is usually eth0, you will see the following lines


    Code
    auto eth0
    iface eth0 inet[COLOR='#FF0000'] dhcp[/COLOR]


    As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should add and here is the example and you can change these settings according to your network settings.


    Code
    auto eth0
    iface eth0 inet [COLOR='#FF0000']static[/COLOR]
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1


    Restart the neworking service using the following command


    Code
    sudo /etc/init.d/networking restart
  • Most routers these days have the option of setting any network device to a static ip mate, go through your router settings and look for your server, usually Use this IP is set to no, set it to yes if setting manual ip on ubuntu is confusing.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!