Which is the role of the /etc/host file? In which occasions you
may want to use it?
when you want to map or block any website you can map
site with the ip address like shown below
127.0.0.1 www.yahoo.com
so if you have added this line to the hosts file yahoo will be redirected to the loopback ip within your system only
In which scenarios you may want to use the DNS server instead of
the /etc/host file?
when system is not finding the route to the internet at
that time DNS server need to be placed in
between.
Which is the role of the /etc/services file? In which occasions
you may want to edit/update it?
when we want to find that which services are running or
is it installed or not at that time we need
/etc/services
If you develop an application which uses port 5000 to communicate with the database, which is the entry that you need to add in the /etc/services file?
127.0.0.1:5000 www.website.com
Which user is allowed to make changes to the /etc/services
file?
sudo or root user
Which is the role of the /etc/resolv.conf file?
resolv.conf is the name of a computer file used in
various operating systems to configure the system's Domain Name
System (DNS) resolver.
Which is the relationship between the /etc/resolv.conf and the
DNS server?
The file is a plain-text file usually created by the
network administrator or by applications that manage the
configuration tasks of the system. when DNS servers are managed by
the machines
How many DNS servers can you define in the /etc/resolve.conf
file?
there is no limit
What is a full qualified domain name?
A fully qualified domain name (FQDN), sometimes also
referred to as an absolute domain name
Which is the role of the /etc/nsswitch.conf?
The Name Service Switch (NSS) configuration file,
/etc/nsswitch.conf, is used by the GNU C Library and certain other
applications to determine the sources from which to obtain
name-service information in a range of categories, and in what
order. Each category of information is identified by a database
name.
How do you force a server to use the host file to try to resolve
a computer name first and then the DNS server?
by default it will check hosts file no need to force
it
Thanks
Which are the 4 main TCP/IP Configuration files? Which is the role of the /etc/host file?...