LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-05-2007, 02:36 PM   #16
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49

Everything looks cool. The 255 zone does just what it says in named.conf, it stops broadcast queries and other things that should be kept on the LAN from wasting the root servers time replying to a query they wouldn't have answers for anyway. Everything does look ok, but does everything work? Can you ping from one windows machine to another by name, and can the linux box also ping by name?

Peace,
JimBass
 
Old 02-05-2007, 05:19 PM   #17
Suhy
LQ Newbie
 
Registered: Aug 2005
Distribution: CentOS, Fedora
Posts: 25

Original Poster
Rep: Reputation: 15
Great!!
Big thnx, ring me for a beer, when you come to Ljubljana

about working.... i think everything works ok.
well before i set up this ddns situation was like this:
i had samba on server, from clients i could ping from one windows machine to another(i think that computer browser was responsible for that, or some other service) and i could ping server "mango" server. But i couldn't ping from server to any windows machine.

Today's situation is:
i can ping from anywhere to anyone.. From windows computer i can ping hostnames if I enter "primary dns suffix"(at computer name settings) or not.

well from linux server "mango" i need to ping by fqdn like ping mango.sadovnjak.local or cili.sadovnjak.local. If i ping only mango or only cili i don't get response.


at nslookup is similar story: from windows machines everything works by typing only hostnames, and on linux server i have to type fqdn. one thing, to get response in nslookup from localhost, i have to type localhost. from windows machines. from linux server i get response from localhost. and from localhost .
 
Old 02-05-2007, 05:44 PM   #18
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yeah, that is to be expected. Windows networks within the windows networking protocol, which SAMBA is reverse engineered to emulate.

To solve the issue with linux only being able to ping by the FQDN, simply add:
Code:
search sadovnjak.local
That tells the linux box that any name not in the /etc/hosts file should be passed on to the dns server, with sadovnjak.local added on. That should make everything cool.

Should I ever get over to Slovenia, I'll be gald to find you for that beer!

Peace,
JimBass
 
Old 02-05-2007, 06:45 PM   #19
Suhy
LQ Newbie
 
Registered: Aug 2005
Distribution: CentOS, Fedora
Posts: 25

Original Poster
Rep: Reputation: 15
search line in resolve.conf does the job in nslookup and i can ping only by hostname.
Problem solved.

p.s.why does dig return in this case, that a.root-servers.net is SOA in "authority section" and i don't get an answer?
 
Old 02-05-2007, 07:09 PM   #20
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Depends, what specifically are you asking dig? I can see a couple of problems.

If you issue a command like "dig shortname", BIND itself can't do anything with a command except resolve it if it knows, or forward it to the roots if it doesn't. If you type in "dig mickeymouse", BIND doesn't know the answer, so it forwards it to the roots, who also don't know. The reason it works from the command line, is when you ask for mickeymouse, the line you just added to named.conf doesn't ask for mickeymouse, but for mickeymouse.sadovnjak.local, which BIND can resolve.

If I didn't guess what you were asking, then please post what you actually asked from the dig command, and what the output was.

By the way, nslookup is a nearly useless tool for investigating DNS settings. Dig is way more useful.

Peace,
JimBass
 
Old 02-06-2007, 01:24 PM   #21
Suhy
LQ Newbie
 
Registered: Aug 2005
Distribution: CentOS, Fedora
Posts: 25

Original Poster
Rep: Reputation: 15
just to explain one thing.. line: "search sadovnjak.local" i added to resolve.conf and not named.conf(when i added this line in named.conf, service named wouldn't start at all)

Code:
[root@mango ~]# dig mango

; <<>> DiG 9.2.4 <<>> mango
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21613
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mango.                         IN      A

;; AUTHORITY SECTION:
.                       10487   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2007020501 1800 900 604800 86400
;; Query time: 14 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Feb  6 19:49:48 2007
;; MSG SIZE  rcvd: 98

[root@mango ~]#
this result i get in dig query

Code:
[root@mango ~]# nslookup
> mango
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   mango.sadovnjak.local
Address: 10.10.10.1
>
And this in nslookup query

So, if I understand correctly, dig query does not do the same as nslookup, right? Dig doestn't use suffix from resolve.conf i added(search sadovnjak.local)?

and with fqdn dig works just fine, like this
Code:
> [root@mango ~]# dig mango.sadovnjak.local

; <<>> DiG 9.2.4 <<>> mango.sadovnjak.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35293
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mango.sadovnjak.local.         IN      A

;; ANSWER SECTION:
mango.sadovnjak.local.  86400   IN      A       10.10.10.1

;; AUTHORITY SECTION:
sadovnjak.local.        86400   IN      NS      mango.sadovnjak.local.

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Feb  6 20:09:20 2007
;; MSG SIZE  rcvd: 69

[root@mango ~]#
nslookup uses content of resolve.conf file and dig doesn't. Right? Dig just doesn't do any magic like adding some suffix writen in some config files, it simply ask bind the exact word you type. Right?
 
Old 02-06-2007, 01:54 PM   #22
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yes, BIND will only look up FQDNs. When you issue the command
Code:
dig mango
BIND has no idea what mango is, so it passes it to the root. Asking any other command line tool, like ping, or anything using the TCP/IP stack for a short name, the added line in resolv.conf (search sadovnjak.local) expands the abbreviated mango to the full mango.sadovnjak.local.

Adding "search sadovnjak.local" to named.conf of course would break named. The actual resolution of names is done by the BIND program, so you can't prepend sadovnjak.local to every query, or you'd be looking up linuxquestions.org.sadovnjak.local, which obviously isn't what you want.

Nslookup is not any good to troubleshoot issues. The only "good" way to see what is going on is with dig.

Peace,
JimBass
 
Old 02-07-2007, 04:18 AM   #23
Suhy
LQ Newbie
 
Registered: Aug 2005
Distribution: CentOS, Fedora
Posts: 25

Original Poster
Rep: Reputation: 15
Thumbs up

I got it

So, everything is working now perfectly, i got some new skills thanks to you, obviously now i have to learn some stuff about dig.

thnx again.
 
Old 02-07-2007, 09:27 AM   #24
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
You're welcome for the help.

Dig is a very simple yet flexible tool. In its simplest form, just dig name works fine. It gives a ton of output, which is why many coders prefer nslookup, it's easier to extract just the answer from nslookup. Some common modifiers to dig include:

Code:
dig domain               (simple what address does this have)
dig -t mx domain          (what is the name and address of the mail exchanger)
dig -x IPaddress          (what is the reverse map (PTR) of the address)
dig domain @nameserver    (what address does the domain have according to this nameserver)
dig +trace domain         (show all the delegations from the root to the authoritative domain)
And of course, all of those can be combined as you need them. There are a ton of the + modifiers, which are all documented in the dig manpage. I rarely if ever use anything other than +trace, but there are plenty of them that might be handy at some point.

Peace,
JimBass
 
Old 02-07-2007, 07:59 PM   #25
Suhy
LQ Newbie
 
Registered: Aug 2005
Distribution: CentOS, Fedora
Posts: 25

Original Poster
Rep: Reputation: 15
thnx again,.... +trace is quite interesting
 
Old 02-17-2007, 09:56 PM   #26
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
I have a how-to on my website http://www.opensourcehowto.org for setting up DDNS(Dynamic Domain Name Server) and DHCP(Dynamic Host Configuration Protocol)

DDNS and DHCP
http://www.opensourcehowto.org/how-t...-and-dhcp.html
 
  


Reply



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
DDNS with BIND and ISC-DHCPD joel112 Linux - Software 1 05-25-2006 11:06 AM
DHCPD configuration help sleepisforwimps Linux - Networking 2 08-22-2005 07:05 PM
BIND 9/DHCPD DDNS Not Functioning Corxscrew Linux - Networking 2 02-07-2005 05:43 AM
dhcpd and/or BIND (named) problem sneumyer Linux - Networking 2 09-06-2004 04:33 PM
dhcpd configuration peok Linux - Networking 4 10-31-2003 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:25 PM.

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
Open Source Consulting | Domain Registration