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.
Hello. Just found these forums so please be nice :-).
I figure myself rather competent with Slackware 8, but this one's been bugging me for awhile. I host a few servers off of cable modems in this area (business class *and* the no-no home-class, so that probably doesn't matter). My usual setup is Apache/PHP/MySQL (latest, in fact I put in one today with all the latest) on Slackware 8, and the server also functions as the router with IP Masquerading. So my webserver has two ethernet cards, one connected to the cable modem, and one connected to the hub that connects the computers in the LAN. The Slack box runs dhcpd for IPs internally.
Here's the problem. If I'm sitting at home and I view sites on the server at the office, they come up instantly. If I view sites on the server at the office on the office's LAN, there are extreme delays (30-90 seconds) on page requests. Same thing goes for the other way around: If I'm at the office and I hit sites on a server at home, it's as fast as any site. If I'm at home and I browse sites locally, it lags like crazy. I would think that this would be the other way around.
My DNS entries are hosted in NYC (about four hours' drive from where I'm at), but if that was the problem it would be the problem all over. The servers are pretty much copies of one another (I always reference existing config files, sometimes copy them straight over if the config is similar enough). Both LANs access the outside internet (i.e. anything I'm not hosting locally) very quickly. I just had to move some sites home and I'm kind of frustrated because it seems I either get the luxury of working on sites locally (say, with HomeSite or UltraEdit over a Samba connection), or I get the luxury of not waiting 60 seconds to see a change I've made after I hit refresh, but never both.
Hardware is pretty standard, 10/100 cards and hubs all around, good wiring. All Intel or AMD machines. Workstation OS has been Windows 98, Windows 2000, and Windows XP (no flames please, they're good for what they're good for and their mere existence is not the problem, that I'm relatively sure of).
Please tell me the problem is simple to fix... it's been driving me crazy for longer than I care to admit :-)
Sounds like a weird problem, I don't think I have the answer but maybe a few things which might help you get closer to the solution.
You could check the /etc/nsswitch.conf file to make sure it's using the right place to resolve the domain name. Might be trying to get it from some nis server which is slow.
You could also try to rule out any dns problems by accessing everything by ip number. You might have to configure apache for that to since it usually uses the FQDN. And make sure apache is not trying to reverse dns ip numbers for it's log files.
I don't think it has anything to do with routing because then other traffic would also be slow. Unless you've got special routes for web traffic.
Turns out I *was* using HostnameLookups in Apache. I turn it off, and everything flies. It's too bad though, I sort of like seeing where hits are coming from.
Now, is there a best-of-both-worlds scenario, where I can have it do hostname lookups just outside the LAN, and/or provide hostnames for the internal IPs?
I suppose you could add all the host names to /etc/hosts and then make sure you check files first when resolving hostnames. Might get tricky though since you are using dhcp for your clients unless you've set it up so that each machine always gets the same ip number.
I've never really worked with a dhcp server but I suppose it should be able to pass on the hostname and ip number it just leased to a client. Maybe it would work well in combination with a nis server or maybe a caching dns server. But I really wouldn't know how to get that set up.
I was just looking around on the net and I found something better. Apache comes with a small program called logresolve. It resolves ip numbers in log files. You can schedule it as a cron job to resolve the ip numbers in your log files every so often, without it ever affecting the speed of apache when it runs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.