LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   what is the use of network-script, resolv.conf, network (https://www.linuxquestions.org/questions/linux-software-2/what-is-the-use-of-network-script-resolv-conf-network-516238/)

nawuza 01-04-2007 08:49 AM

what is the use of network-script, resolv.conf, network
 
i am really new in linux,could somebody tell me network-script, resolv.conf, network is used for what?!...

NSWKim 01-04-2007 09:00 AM

Networking of course
 
Assuming you're using a redhat variant since you have no distro listed:

network: general information like Hostname and Gateway
network-scripts: location of network initialization and config scripts
resolv.conf: configuration of your local nameservers.

MensaWater 01-04-2007 09:06 AM

You need to specify your distro for some of this.

resolv.conf is where you specify which name servers or domains to search. These are necessary for doing name lookups (e.g. with commands like nslookup, host or dig or with programs that use C routines such as gethostbyname. They check for the server name and return its IP address.

Say you had a resolv.conf like the following:

mydomain.com mydomain.net
nameserver=10.0.0.1
nameserver=10.0.0.2

The line would check for a fully qualified domain name FQDN that had either mydomain.com or mydomain.net on it if you had not specified a FQDN. (e.g. typing "host www.yahoo.com" would be specifiying a FQDN but typing "host myserver" is NOT a FQDN. "host myserver" would first check for myserver.mydomain.com and if not found would check for myserver.mydomain.net).

The next two lines tell it which nameserver (typically a DNS server but not always) to search for. It will first check the one at 10.0.0.1 and if it doesn't find an answer or doesn't respond it will check the one at 10.0.0.2.

network.script and network vary by distro.

For example on RedHat/Fedora there is a directory called /etc/sysconfig that contains a subdirectory called network-scripts that contains various things such as the ifcfg-eth# scripts used for starting up each interface at boot.

Also RedHat/Fedora contains /etc/sysconfig/network which basically contains the FQDN for the server it is on as well as the default gateway.

nawuza 01-06-2007 08:23 AM

thanks a bunch..now i really know those file usage.:newbie:


All times are GMT -5. The time now is 12:05 AM.