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.
First off let me say that whatever is broken I did it.
My home environment started off with 3 desktop (wired only) computers, 2 laptop (they use both wired and wi-fi) computers, and 1 wired inkjet printer.
I've a friend that manages one of those mini-storage sites. Someone didn't pay their fees and the contents was confiscated. There was several computers and some other computer related items and he sold them all to me for $500.
So my environment grew to be:
8 desktop computers (3 of these has enough CPU, RAM, Disk to
run KVM - so I did)
2 laptop computers
3 tablet computers
2 smart phones
2 Ethernet wired inkjet printers
Needless to say my hosts file became very large and I seemed to be always updating my paper documentation.
So this one machine where I was running my PostgreSQL DBMS, NFS server, KVM with 5 virtual machines I'll call server A. Server B is running KVM with 5 machines (I install my BITNAMI modules here).
I saw a article on using BIND so I could run nslookup and I could reduce the size of my hosts file, plus I could make it 'look' more professional.
Everything was working well (sort of) until I tried to modify my 2 Windows machines (1 desktop and 1 laptop) and realized that I didn't know how to define 4 name servers in Windows and my 2 eComStation (OS/2 Warp 4) desktops.
So I removed BIND from Server A, restored the hosts file and the resolv.conf. I rebooted server A and I expected that all would be back as it was before I got experimental.
From server A I can ping all of my machines by name and IP address. I cannot ping server A from any other machine on my network. What did I do???
Needless to say my hosts file became very large and I seemed to be always updating my paper documentation.
You say that as if it's a normal thing to be managing name resolution by means of editing hosts files. It really isn't.
You need to set up proper name resolution. Configure a DNS server (BIND is a good choice) to be authoritative for a local zone with a name not found on the Internet, and have all your hosts use that server as their only DNS server.
1. There is detail missing, but I am thinking you may have trimmed some hosts files and populated resolv.conf on some machines when you implemented bind. Did you put things back when you dropped bind?
2. No one needs four resolvers defined on a machine.
One bind (or other DNS protocol) server is really all you need for a network. A second is nice to have for failover. Your machines no longer know how to find each others address, resolving from names is broken.
You have choices about moving forward:
1. you could put bind back. This is easy enough, set it to forward requests out to your ISP DNS or to google (8.8.8.8 perhaps) to get external addresses, and load up your local net into bind, and aim all of your other machines at your bind server as primary, and the ISP (or google) as secondary. If you have a secondary DNS machine in your network, slide that between the other two in your resolver list.
2. You could research DNSMASQ and implement that insted of bind. It does not need the table structures used by bind, and is easier to manage. It can load local names directly from your hosts file, and forward servers directly from resolv.conf, automagically. You can also configure it as a DHCP server that automagicly loads the resolution tables when it provides IP identity and settings.
I have done both. Either solution will fix up your network.
In either case you need to make sure that your server is responding to DNS requests properly, listening on your network, and that all of your client machines are aimed at it for resolution.
You could also set up a configuration distribution software to keep the hosts files in sync and forget about bind, but that is just ugly.
The reason I ended up with four name servers because the article I used produced a master on server A and a slave on server B (192.168.1.168 and 192.168.1.169). My ISP provides 2 name servers also, which won't provide nslookup for my internal network.
So I get to my Windows boxes, they only have room for 2 DNS IP addresses. Should I have defined my Windows DNS as 192.168.1.168 and 8.8.8.8? (This would also work on my eComStation (OS/2 Warp 4) boxes)?
I'm going back machine by machine and making sure everything is defined the same, so if it's wrong it will be consistently wrong.
So I get to my Windows boxes, they only have room for 2 DNS IP addresses. Should I have defined my Windows DNS as 192.168.1.168 and 8.8.8.8? (This would also work on my eComStation (OS/2 Warp 4) boxes)?
You only need to specify 1 DNS server, and that should be your internal server. The DNS service on that box should be configured to perform recursive lookups using a forwarder.
You can use any publicly available DNS server as a forwarder, but your ISP probably has at least two servers dedicated to providing DNS services to their customers, so you should consider using those.
Configuring multiple DNS servers on a client doesn't work the way one might expect. The client will only ever use the first server as long as it's available, but will switch to the second if the first doesn't respond or returns an error message. Note that the response "I don't know the IP address or this host" (NXDOMAIN) is not considered en error message. Also, one the client switches to another DNS server, it will keep using it until it's rebooted or another DNS error condition arises.
In other words, you should only specify two or more DNS servers if they all provide the exact same services with regards to resolving names. Your internal master/slave setup certainly qualifies, but mixing internal and external DNS servers is bound to cause problems.
You will probably find it easier to set up dnsmasq rather than bind as your nameserver. It will consult /etc/hosts for the names of your local machines and forward other requests to the upstream nameserver that it picks up automatically from your /etc/resolv.conf. You don't have to bother with setting up local zones and whatnot. dnsmasq will also act as the DHCP server for your network.
Other things to keep in mind are:
1. you had two DNS servers exactly so that if one failed your clients could fail over to the other. TWO would have been the most useful number unless BOTH failed.
2. Most IP stacks max out at three. you can list a dozen, but only the first three nameservers will EVER be used.
This leads to my preferred settings, set the DNS servers in the local network to forward to ISP servers first, and Google or another public DNS as a third option. Set your CLIENTS to use your local DNS first, a secondary or backup DNS or your ISP DNS second, and a public or fallback ISP dns as third. If you ever fail through all three you have bigger problems than playing with your nameservers alone will fix.
I find bind easy to set up using WEBMIN, more control but more chances to mess it up at command-line and using VI. DNSMASQ is all VI work at first (unless someone has built a WEBMIN module for it, I have not checked) but is easier to configure at that level.
Once set up and working well, I have never had either fail me.
Windows is NOT limited to having two nameservers. Microsoft just makes you dig deeper into the network settings to find where you can add more.
They do have a point, two should normally be enough.
We run 2 windblows dc's with no issues. Aherm.. except Micro$oft's buggy active directory and other crap. In general, 1 failover is fine but it's a good idea to integrate an email alert or something.
First of all let me thank all of you that responded to my plight.
I got interrupted by work so that is why I've taken so long to reply.
All seems to be working correctly at this time, but what fixed it may surprise you. I saw that I could go from server a to servers b, c, d, etc. The problem was the reverse trip. The temporary solution was to turn iptables (firewall) off. Now who or what changed the firewall I do not know. I must have been implemented at some reboot when implementing bind.
I'm trying to correct the firewall issues so I can turn it back on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.