V
V
Vi2016-07-31 18:42:47
linux
Vi, 2016-07-31 18:42:47

Alternative network config files in Centos 7?

In Centos 7, there are interface files in /etc/sysconfig/network-scripts/ifcfg-*
after rebooting network, search domain and sometimes nameserver are loaded from somewhere, where else are configs read from?
This question is also of interest for Debian and Ubuntu, what is the general provision for configuration files, is there such a thing?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CityCat4, 2016-08-01
@CityCat4

If NetworkManager is running, it can generate /etc/resolv.conf and a network interface config file in sysconfig/network-scripts. If it is not running, then /etc/resolv.conf gets settings from the network interface config file.
There is no single standard for configs, and they are all made differently. This is exactly what distributions for some reason try to distinguish themselves from each other - everything is different in Debian than in CentOS.

D
Dmitry Shitskov, 2016-07-31
@Zarom

DNS settings on all systems are loaded from /etc/resolv.conf

D
Dmitry, 2016-07-31
@zmitrok62

Duc seems to come from here:
/etc/sysconfig/network-scripts/ifcfg-ethX
Add a line to it:
DOMAIN=domain.com
And when the interface is initialized, this info will get into resolv.conf.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question