How to add DNS IP address through terminal ?
Hi,
In Red Hat Linux GUI interface i know that under Network Configuration there is a DNS tab and there I want write my DNS IP address. Well I want to add DSN entries through command line. which file should I edit and write Primary DNS: Secondary DNS: Teriary DNS: thanks garden |
Edit
Quote:
Quote:
|
thanks for reply .well what about # etc/sysconfig/network file.What is the purpose of this file ?
|
Quote:
Kind regards |
thanks "repo" for the reply.About gateway it clear but when we go to # cat /etc/host i can see
Code:
127.0.0.1 localhost.localdomain localhost By default after fresh installation in GUI interface under Network Configuration DNS tab i can see Hostname as localhost.localdomain and this can be viewed in Code:
cat /etc/hosts Code:
127.0.0.1 localhost.localdomain localhost So to put DNS IP address in this file is wrong ? Please again guide me . thanks |
Quote:
You can however use the hosts file to put some isolated nodes. See http://linux.die.net/man/5/hosts Kind regards |
so
Code:
/etc/resolv.conf Example Quote:
192.168.1.200 is primary DNS,192.168.1.201 is Secondary DNS and 192.168.1.202 is Tretiary DNS I am sure now i am correct! thanks |
As long as the ip's are from a dns server, it's correct.
Kind regards |
thanks "repo" a lot :hattip:
one thing which i want to confirm again that nameserver is a keyword here or it can be as anything else # vi /etc/resolv.conf Quote:
|
All times are GMT -5. The time now is 01:15 PM. |