Applying configuration from NetworkManager

10,494

Restart Your Network

It might be the case that you didn't restart your network. To do so, open a terminal (Ctrl+Alt+T) and run the following command:

sudo /etc/init.d/networking restart

If this doesn't work, try the next option.

Editing /etc/network/interfaces File

  • Open a terminal (Ctrl+Alt+T).

  • Open the /etc/network/interfaces file.

sudo vim /etc/network/interfaces
  • Find and remove the following entry:
iface eth0 inet dhcp
  • Assuming the required settings are as follows:

    • Host IP address 192.168.1.100
    • Netmask: 255.255.255.0
    • Network ID: 192.168.1.0
    • Broadcast IP: 192.168.1.255
    • Gateway/Router IP: 192.168.1.254
    • DNS Server: 192.168.1.254

Add the new network settings to the file:

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
  • Save and close the file. Restart the network:
sudo /etc/init.d/networking restart
  • Now, we need to define the new DNS servers. Open the file /etc/resolv.conf:
sudo vim /etc/resolv.conf
  • You need to remove old DNS server assigned by DHCP server:
search myisp.com
nameserver 192.168.1.254
nameserver 202.54.1.20
nameserver 202.54.1.30
  • Save and close the file.

Source: http://www.cyberciti.biz/tips/howto-ubuntu-linux-convert-dhcp-network-configuration-to-static-ip-configuration.html.

Share:
10,494

Related videos on Youtube

Arek
Author by

Arek

Updated on September 18, 2022

Comments

  • Arek
    Arek almost 2 years

    After save config in NetworkManager, I put in terminal command: "ifconfig". The changes saved from NetworkManager does not applying, and configuration interface is empty.

    I try for DHCP AND manual (static) configuration.

    I configured connection manually by ifconfig command, but NetworkManager overwrite by empty configuration NetworkManager.

    I copied NetworkManager configuration from working copy ubuntu 10.04 to ubuntu 12.04.01 and still don't save configuration, on connection eth0.

    Ubuntu 12.04.01 Installed from USB, In previously Ubuntu version 10.04 work fine.

    • green
      green almost 12 years
      please provide some more information.
    • Arek
      Arek almost 12 years
      I added more information
    • green
      green almost 12 years
      OK. So, did you try to change DHCP to manual? But it still shows the same IP in ifconfig?
    • Arek
      Arek almost 12 years
      exactly. Is the NetworkManager save any logs about working or exceptions or errors maybe this help ?
    • green
      green almost 12 years
      try restarting your network: sudo /etc/init.d/networking restart and check again.
  • Arek
    Arek almost 12 years
    After edit /etc/network/interfaces and /etc/init.d/networking restart, the config of eth0 ifconfig still empty, ifconfig and syslog may help: pastebin.com/pPF9vuvQ
  • green
    green almost 12 years
    it seems that the IP address you're trying to assign is not available or there is some problem with your network.
  • green
    green almost 12 years
    This link suggests checking the cables.
  • Arek
    Arek almost 12 years
    Hm cables it's ok, becouse now I post this comment from the same computer but from 10.04, Installation of 12.04 is on other partition.
  • green
    green almost 12 years
    Try deleting the network profile and make a new one. Shutdown everything related to the network (your computer, router, network ports, etc) and start again.