Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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 .
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!
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.
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)
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?
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.
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.
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.