LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2011, 02:36 AM   #16
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221

No I have absolutely no problem...I would like you to ask questions as I said even I get a chance to learn this way

You can try through DHCP

no need to put an additional entry of peerdns

Just follow other steps and let me know the results.
 
Old 10-05-2011, 03:03 AM   #17
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
yes i am using DHCP instead of static ip addresses....and i want to continue that way..

that means which step should i follow??the first one or the second one,i didn't understand your answers clearly,please don't mind and thanks once again....you are really helping me..

And can you please tell me whose ip address should i be giving in vi /etc/hosts?is it the machine ip or the nameservers ip?and what does the hostname mean here,if it"s the DNS server name which comes in the machine then for me it is localhost.localdomain...is this the right one?or is it the address for the nameservers?

And whose address should i be giving in /etc/resolv.conf directory....i have 2 nameservers,should i be giving both?or do i have to give both the nameservers ip and then machine ip?

please ur help will be highly appreciated...
 
Old 10-05-2011, 03:30 AM   #18
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
See if you are want to configure a DNS server then it is always better to use a static IP because in this way you can reserve the IP for DNS server but instead if you are using DHCP then there are chances that IP goes to someone else in you network which will lead to problems.


As I had tried with a static IP

But still if you want to continue with DHCP then

Code:
#ifconfig
for now let me take your machine's IP as 192.168.0.100
and your hostname localhost.localdomain.com

will show you your current IP address

This is the address which you will use in

Code:
/etc/resolv.conf
nameserver 192.168.0.100
nameserver (your primary DNS)
nameserver (your secondary DNS)

See the basic idea of using your IP in resolv.conf is because you are creating a local domain name which is not registered on internet so the DNS server which you are using will not recognize the domain name server which you are planning to create

So you need to assign your machines IP in resolv.conf to remove name resolution issue

So in the first option mention your machine's IP then the DNS servers which you are using as second and third option


In
Code:
/etc/hosts

192.168.0.100 localhost.localdomain.com


Same IP is to be used in /etc/hosts and /etc/resolv.conf
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-28-2012 12:50 AM
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 07:57 PM
LXer: Find out DNS Server Version With DNS Server Fingerprinting Tool LXer Syndicated Linux News 0 12-21-2007 06:30 PM
LXer: Find out DNS Server Version With DNS Server Fingeprinting Tool LXer Syndicated Linux News 0 12-21-2007 05:50 PM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration