Difference between /etc/network and /etc/NetworkManager in Ubuntu

Rodnower

I use Ubuntu 12.04.1.

I understand networking, and the meaning of files in both folders, but the question is:

"How are they coexisting?"

For example, if I have this configuration of eth0 in /etc/network/interfaces:

auto eth0
iface eth0 inet static
address 192.168.0.2
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

and this one in /etc/NetworkManager/system-connections:

[802-3-ethernet]
duplex=full
mac-address=00:1E:33:71:CD:A4

[connection]
id=eth0
uuid=4c12ff66-028a-4338-bad5-fa6e9c5e6939
type=802-3-ethernet

[ipv6]
method=auto

[ipv4]
method=manual
dns=192.168.0.1;
addresses1=192.168.0.1;24;192.168.0.1;

What will be the resulting address of the interface, 192.168.0.1 or 192.168.0.2, and why so ?

UtahJarhead

/etc/network is what your Operating System uses to assign network addresses. NetworkManager is what Ubuntu (and other distros like RedHat) use to force /etc/network to do its bidding. It will automatically configure the network services. Many implementations now do not allow NetworkManager to override /etc/network settings. NetworkManager used to really bugger things up in a server environment.

So in short, /etc/network is for manual configuration of the network. /etc/NetworkManager is for automatic configuration of the network addresses. It's useful for laptops or other PCs that change networks a lot. Tends to be a headache in a server environment, so many disable NetworkManager and just run with /etc/network

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Difference between / and /root in Ubuntu?

分類Dev

Difference between ubuntu and ARM Ubuntu

分類Dev

Difference between ubuntu desktop and ubuntu desktop usb

分類Dev

no difference between runlevel 3 and 5 in ubuntu 15.04

分類Dev

What's the difference between Ubuntu 16.04 and Ubuntu 16.04 LTS?

分類Dev

What is the difference between Ubuntu Kylin and Ubuntu with default language chinese?

分類Dev

Difference between | and ||

分類Dev

difference between $ and $$

分類Dev

difference between tar and deb

分類Dev

Difference between UTC and GMT

分類Dev

What is the difference between * and *|* in CSS?

分類Dev

Difference between objectForKey and valueForKey?

分類Dev

Difference between Destroy and Delete

分類Dev

What's the difference between "as?", "as!", and "as"?

分類Dev

Difference between two lists

分類Dev

Difference between antMatcher and mvcMatcher

分類Dev

Difference between getCanonicalPath and toRealPath

分類Dev

Difference between @RibbonClient and @LoadBalanced

分類Dev

Difference between await and ContinueWith

分類Dev

Difference between ObservableCollection and BindingList

分類Dev

Difference Between Select and SelectMany

分類Dev

Difference between getCanonicalPath and toRealPath

分類Dev

Difference between objectForKey and valueForKey?

分類Dev

Difference between objectForKey and valueForKey?

分類Dev

Is there a difference between -1 and ~0?

分類Dev

Difference between fgets and gets

分類Dev

difference between pty and a pipe

分類Dev

Difference between bytearray and list

分類Dev

Difference between Find and FindAsync