Jump to content
xisto Community
nightfox1405241487

Server Slow On LAN, Fast On The Internet

Recommended Posts

Hey,Here's a weird problem I've encountered. On my test server running CentOS and Apache2 w/ the Apache2 Manual installed and accessible from the web, everything seems fine. So I access it via my home network on which the server is located and the manual loads like I'm on a 56K connection. To give you an idea of the speed, it's just a tweak faster than using MySpace during peak hours. MySpace is still slower than my server though. But today at school, I try it and the thing loads like it was on an OC-93 fiber line at a data center!AND- if I try to FTP into the server on my LAN, it takes forever! But at school when I tried it, it was like FTPing into my site here at Xisto, maybe even faster due to the server having 0 load.What is up with my network? Or is it the way CentOS/Apache is configured? Thanks for any help![N]F

Share this post


Link to post
Share on other sites

This may sound stupid, but we have seen a big difference in a couple datacenters this way.
Check your speed duplex settings on the computers vs the switch.

most switches are set to auto/auto by default.
and so isnt most nic's.. change them to manual settings.
if your switch goes 100 full, set that on the switch and on your machine.

- C



Hey,
Here's a weird problem I've encountered. On my test server running CentOS and Apache2 w/ the Apache2 Manual installed and accessible from the web, everything seems fine. So I access it via my home network on which the server is located and the manual loads like I'm on a 56K connection. To give you an idea of the speed, it's just a tweak faster than using MySpace during peak hours. MySpace is still slower than my server though. But today at school, I try it and the thing loads like it was on an OC-93 fiber line at a data center!

AND- if I try to FTP into the server on my LAN, it takes forever! But at school when I tried it, it was like FTPing into my site here at Xisto, maybe even faster due to the server having 0 load.

What is up with my network? Or is it the way CentOS/Apache is configured?

Thanks for any help!

[N]F


Share this post


Link to post
Share on other sites

hello everyone ... who can tell me whoat kind of cable do i hace to use to connect 2 pc`c on lan.i have a stright cable but i have an error(limited or no conectivity) can anyone help me ? thanks a lot


Technically, you need a crossover cable, but many new PCs and network cards auto-detect.


Hey,
Here's a weird problem I've encountered. On my test server running CentOS and Apache2 w/ the Apache2 Manual installed and accessible from the web, everything seems fine. So I access it via my home network on which the server is located and the manual loads like I'm on a 56K connection. To give you an idea of the speed, it's just a tweak faster than using MySpace during peak hours. MySpace is still slower than my server though. But today at school, I try it and the thing loads like it was on an OC-93 fiber line at a data center!

AND- if I try to FTP into the server on my LAN, it takes forever! But at school when I tried it, it was like FTPing into my site here at Xisto, maybe even faster due to the server having 0 load.

What is up with my network? Or is it the way CentOS/Apache is configured?

Thanks for any help!

[N]F


Other things that can cause that problem:

1) Bad cable, cable too long, or bad interference (too many packet retries slows down link)
2) Too many collisions (probably not a problem on your home network)
3) Too many hubs or switches (If you have hubs/switches stacked too deep, you can have problems)

I would guess #1 for a home network: Do you have a really long cable snaking across the house, a bad splice, or a Cat-5 coupler or two in there? If you crimp your own, you may have a bad crimp.

Share this post


Link to post
Share on other sites

Hey,

 

Here's a weird problem I've encountered. On my test server running CentOS and Apache2 w/ the Apache2 Manual installed and accessible from the web, everything seems fine. So I access it via my home network on which the server is located and the manual loads like I'm on a 56K connection. To give you an idea of the speed, it's just a tweak faster than using MySpace during peak hours. MySpace is still slower than my server though. But today at school, I try it and the thing loads like it was on an OC-93 fiber line at a data center!

 

AND- if I try to FTP into the server on my LAN, it takes forever! But at school when I tried it, it was like FTPing into my site here at Xisto, maybe even faster due to the server having 0 load.

 

What is up with my network? Or is it the way CentOS/Apache is configured?

 

Thanks for any help!

 

[N]F

 


It's got to be some switching/routing or IP resolution issue.

 

Whats the configuration of your home network? What kind of ethernet cards do you use to connect and what's your switch/hub ?

 

Try this for a starter. Goto your CentOS Server and open up the /etc/hosts file.

Add the IP of the computer you access your server from and the Windows name of the same machine (assuming this is a windows platform).. save & quit.

Example:

CONSOLE

shell> vi /etc/hosts

 

10.19.168.50 mymachine_name.mydomain mymachine_name

127.0.0.1 servermachine_name.mydomain servermachine_name localhost.localdomain localhost

As you can see - each in this table, each IP is made to correspond to a variety of NetBIOS/NetBEUI names that your Windows machine might have.

 

I'll use my personal network example.. My windows based development platform is called Developix and my Fedora Core 4 server is named Getafix. My network is configured with the 10.19.168.0/24 subnet. I decided to call my domain as testdomain. This is how my hosts file looks like:

CONSOLE

10.19.168.50 developix.testdomain developix

127.0.0.1 getafix.testdomain getafix localhost.localdomain localhost

NOTE: What appears to be a SPACE between each name segment here is actually a TAB character. So instead of pressing the SPACE-BAR you should use the TAB key.

 

Also in the same /etc folder you'll find another file called hosts.allow. Edit that too and add the first three octets of your subnet.

Example:

CONSOLE

shell> vi /etc/hosts.allow

 

#

# hosts.allow This file describes the names of the hosts which are

# allowed to use the local INET services, as decided

# by the '/usr/sbin/tcpd' server.

#

ALL: LOCAL, localhost, 10.19.168.

~

 

 

Now try to access your server and see if there's any big difference in access speed. Don't ask me why - I couldn't spot the exact reason, but it did massively improve connectivity in my case. I found this experimentally. So I assumed it had to be some IP/domain resolution related issue. Also my FC4 has SELinux installed - this could be it's doing too. Maybe having your own access IPs hardcoded into these files somehow makes access a lot quicker.

 

Try it and let me know. If it acts the same way for you - then my doubts will be confirmed.

Share this post


Link to post
Share on other sites

hello everyone ... who can tell me whoat kind of cable do i hace to use to connect 2 pc`c on lan.i have a stright cable but i have an error(limited or no conectivity) can anyone help me ? thanks a lot


isnt it a CROSSOVER cable?

and one question- what kind of cable do i need for PoE (power over ethernet)

Share this post


Link to post
Share on other sites

*BUMP* :P so that nightfox takes notice of the solution I posted.. I need to know whether it works out for him too.. then it'll alleviate a lot of doubts.. and I''ll know for sure that the reason I was thinking was indeed the real reason behind this problem.

Share this post


Link to post
Share on other sites

*BUMP* :P so that nightfox takes notice of the solution I posted.. I need to know whether it works out for him too.. then it'll alleviate a lot of doubts.. and I''ll know for sure that the reason I was thinking was indeed the real reason behind this problem.

lol, thanks m^e! It also appears to work on any distro that I launch on my network. Like I had a 333 MHz PII Red Hat 9 machine and it loaded fast when I accessed it via 192.168.1.107 but when I accessed it via my network domain, it's like the request was being sent all around the globe asking every server if they had that file... it was slow like 28K slow... probably less!

I'm going to print out a copy of your fix to try it. My server is currently down for some hardware swapping and a fresh Red Hat 9 install. Then I'll give it a test!

Anyway, my network is like a slightly smaller version of a enterprise network. It really is. My router has one computer attached, and one cable that runs through my house to my room and from there into my old network hub which I got from my school for free. From there a wireless access point and usually 3-2 PCs will be connected and two connect via the router's access point and/or the other access point (the other one is mainly so I can get a better connection outside need be). But I'm going to go ahead and print out your fix and try it.

Thanks, m^e!!

To answer your question, giantsfanster, as far as I know any Cat5/5e cable will take PoE. My school just put in a new IP phone system from Cisco and some of the new switches put power through the existing Ethernet wiering to power some of the phones. Of course, not all of the IP phone switches were PoE but it does eliminate power jacks. You also have to be careful with it too. If you use too short of a cable, you could fry the electronics/ethernet card or whatever it is that is using PoE.

I found a link for a PoE Injector/Power Supply. They have some technical data that you may be interested in. Here's the link: http://www.l-com.com/content/hyperlinkbrand.html.

[N]F
Edited by nightfox (see edit history)

Share this post


Link to post
Share on other sites

Ok, m^e... it didn't appear to work... except, I'm on a Fedora Core 5 server now.

Here's something funny: FTP is blazing fast but HTTP downloads are still VERY sluggish...

I modified the files to reflect what you had (changed of course to match my network) and restarted eth0. Sluggish.

I'm curious here...hmmm... m^e (or anyone else if you want to), could you check if the following page downloads fast or sluggish?

http://forums.xisto.com/no_longer_exists/

You should see a Bess (Smartfilter Bess Edition) blockpage blocking the address "gmail.google.com". For a while, my school was blocking Gmail so I saved the page to show the technology department and to have some fun! :P

Anyway, whenever I visit it, it feels like I have dial-up again because it downloads so freaking slow!

If you want, m^e, I'll post my hosts file and hosts.allow file for you to take a look at and modify. For reference, my network's internal IPs are 192.161.1.100 through 199. The fedora server is 192.168.1.100 and my Windows machine is 192.168.1.101. The server's IP is static, mine isn't because I normally keep my computer always running so when the IP expires after 24 hours, it gets renewed again.

Thanks for the help!!

[N]F

Share this post


Link to post
Share on other sites

Cool.. Your page downloaded pretty fast for me. And yeah I saw the funny looking Gmail blocking page :P Posts your hosts file and lets see what we can do about it

lol, I thought it would download fast. Anyway, I hated seeing that page. It was stopping me from getting my email at school and I was ticked off when they installed the new filter!

Also, FTP works blazing fast like it should because I just use the internal IP to connect. Otherwise, it's going to be just like trying to download.

Ok, here's the hosts file:

# Do not remove the following line, or various programs# that require network functionality will fail.
192.168.1.100 xerge.dynamic10.com xerge xerge.dynamic10.com
127.0.0.1 xerge.dynamic10.com xerge xerge.dynamic10.com
192.168.1.101 MBST001.moonburst1.gotdns.org MBST001 MBST001.moonburst1.gotdns.org

192.168.1.101 is my Windows laptop, 192.168.1.100 is my server (Xerge)

Here's hosts.allow file:

## hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL: LOCAL, localhost, 192.168.1.

I'm assuming that is how you wildcard in these files? I'd like to have it wildcarded so that way I can get on another computer and *poof!* have it appear same speed.

Thanks, m^e!

[N]F

Share this post


Link to post
Share on other sites

Update on the problem:

Ok, I was checking the Linksys website to see if my router had a new firmware version. Yep it did! The last firmware, 1.00.6 was released in January if I remember correctly and the latest version, 1.00.9, was released May 16. I was browsing the change log like I normally do, just to see what (if anything) has been added and what has been fixed.

 

The second to last thing at the bottom of the change log:

- Resolves issue with slow internal loopback, i.e., accessing a local server through the WAN IP address

 

So apparently this wasn't a host file issue, but rather a router issue. I've upgraded & tested. Works PERFECTLY and appears just as fast as if I was getting to it from 100 miles away! :(

 

[N]F

Share this post


Link to post
Share on other sites

is your server listening on your lan's local ip address as well as your public ip address, or is it set to a static ip? if your just port forewarding port 80 and port 22 requests from the internet to a private ip address on your lan, then make sure your server is also listening on your lan ip address that it is assigned too, apache can have some real speed issues with requests to an ip it hasn't been told to listen too.... i hope this helps

Share this post


Link to post
Share on other sites

I'm having a similar problem with an entirely different setup. I'm running Filezilla server on a cable connection with just a linksys between the modem and the computer. When I access my files locally via File and Printer Sharing, they load quickly. When I try to FTP into that system locally, it's very slow. When I access the FTP remotely, however, it's fast. It's very strange.-kevinthenerd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.