Wednesday, May 27, 2009

TCP/IP Network Configuration Files in UNIX/LINUX

For configuring the tcp/ip network you need to edit files in '/etc'

files follows

/etc/resolv.conf
/etc/hosts


Linux to first resolve a host name by looking at the local hosts file(/etc/hosts), then if the name is not found look to your DNS server as defined by /etc/resolv.conf

first we will edit /etc/resolv.conf

File: /etc/resolv.conf - host name resolver configuration file
search name-of-domain.com - Name of your domain or ISP's domain if using their name server nameserver 192.168.1.1 - IP address of primary name server
nameserver 192.168.1.2 - IP address of secondary name server

INFO ON resolv.conf: This configures Linux so that it knows which DNS server will be resolving domain names into IP addresses. If using DHCP client, this will automatically be sent to you by the ISP and loaded into this file as part of the DHCP protocol. If using a static IP address, ask the ISP or check another machine on your network

second we will edit /etc/hosts

File: /etc/hosts - locally resolve node names to IP addresses

127.0.0.1 localhost.localdomain localhost
192.168.19.167 node-name(its the system hostname)

INFO ON /etc/hosts : This informs Linux of local systems on the network which are not handled by the DNS server

NOTE : when adding hosts to this file, place the fully qualified name first.because it sendmail configure with hosts conf file.

0 comments:

Hit Counters