Turn off Network-manager Network setup issues in Ubuntu

Source: Internet
Author: User
Tags nameserver

the Server Version "

in Ubuntu Server version, because only the command line mode is in place, you can only modify the/etc/network/interfaces if you want to set the network parameters . The specific settings are as follows:

(1) Ubuntu Server modifies IP address

Open/etc/network/interfaces

sudo vim/etc/network/interfaces

Add the following statement:

Auto Eth0

iface eth0 inet static

Address xxx.xxx.xxx.xxx #IP Address

netmask xxx.xxx.xxx.xxx # Subnet Mask

Gateway xxx.xxx.xxx.xxx # Gateway

(2) Ubuntu Server modifies DNS

Open/etc/resolv.conf

sudo vim/etc/resolv.conf

changed to read as follows:

Search Localdomain # If this server for DNS server, you can add this sentence, if not, you can not add

nameserver 172.16.3.4 # DNS that you want to modify

nameserver 172.16.3.3 # DNS that you want to modify

(3) the last step of Ubuntu Server and the most important step

in Rc.local to join this reboot network configuration command:

sudo/etc/init.d/networking Restart

"Desktop Version "



in Desktop version, in addition to modifying the/etc/network/interfaces to be configured, or directly in the Network-manager configured in. Reference the server version by interfaces modified methods . Network-manager Configuration and intuitive, follow the prompts step-by-step operation can be interested in friends, you can Google or Baidu.

But if you modify the interfaces , but also configured the Network-manager (hereinafter referred to as NM , you'll find some puzzling questions:

1 , Interfaces and NM the network settings in the system are not the same, the actual IP which one.

2 , sometimes inexplicable, the interface in the upper right corner of the network connection icon is lost.

3 , obviously in NM The correct network settings are configured, why can not be on the network.

in fact, we need to know interfaces and NM , these questions are not difficult to explain.

first, there are no Third-party network management tools in the system (such as NM ), the system defaults to using interfaces the parameters in the file are configured in the network. (Just like the server version)



then, when NM is installed in the system after that, NM The default takes over the network configuration of the system, using NM Configure your own network configuration parameters.

However, if the user is installing NM After (Desktop version defaults to install NM ), you manually modified the interfaces file, that nm automatically stops the management of the system network, the system changes the use of interfaces the parameters in the file are configured in the network.

at this point, modify NM again . the parameters in the system do not affect the actual network configuration. To enable the configuration in NM to take effect, you must re-enable the network configuration of the NM takeover system.

Now that we know the working relationship between the two, let's look at the three questions above:

1 , to see NM whether to take over, if not taken over, the system actual IP set to Interfaces prevail in the. Conversely, whichever is the NM.

2 , when NM when the receiver is stopped, the network connection icon is lost.

3 , it is also a matter of taking over.

If the user wants to desktop version, direct use of interfaces for network configuration, it's best to remove Network-manager .

If you want to continue using NM after the above problems occur For network configuration, you need to do the following:

sudo service network-manager stop # stop nm Service

sudo rm/var/lib/networkmanager/networkmanager.state # Remove nm the status file

sudo gedit/etc/networkmanager/nm-system-settings.conf # Turn on NM the configuration file

##  There's a line inside: Managed=true

##  If you mend/etc/network/interfaces by hand , NM would change the line by himself: Managed=false

##  will false Modify to True

sudo service Network-manager start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.