LinuxQuestions.org
Visit Jeremy's Blog.
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 11-23-2011, 10:53 AM   #1
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Rep: Reputation: Disabled
Question Our expensive WAN Ethernet doesn't play well with Linux / UNIX


I am IT manager at my workplace. We a have an expensive internet connection (Fibre optic Ethernet line), its 20Mbps (both up and down). It works well with Windows, but not with Linux or other UNIX OSes.

My problems started when I changed the WAN switch from a cheap linksys to a HP Procurve 8 port layer 2 only switch. Being an ethernet line with a 16 IP block, this shouldn't be a problem. Then we noticed that we couldn't send emails to yahoo.com accounts any bigger than 100/200KB. But if I put back my linksys switch, it would successfully send to Yahoo. There is nothing wrong with the HP switch BTW. But the linksys switch has very slow downloads from certain sites (like 10kBps slow). In fact, if I plug the ethernet connection directly from the fibre optic modem into either Linux, FreeBSD or Solaris 10, a download from a specific site is going at 10-20kBps. If I plug a Windows XP laptop directly into the modem it get a whopping 7MBps download from the same URL.

I am not using any non standard software / settings. All that is required, from my knowledge, is 1) IP address 2) Network mask 3) Gateway. The same settings were put into Windows laptop and Linux laptop, with very different results.

The ISP engineer came to do a line test (from his crumby WinXP laptop, which was slow and **** and he had to logout and login again before it worked) and it passed with flying colours. The guy on the phone at the ISP office was trying to tell me that if the line test is OK, they can do no more, they don't get involved in the clients network setup. I said "you show me the document that I signed that states this line only works with Windows, otherwise it is your problem". Seriously though, unbelievable attitudes they have here in Singapore (if it not Windows, it no good lah).

Can anybody shed any light on this. Is there some setting I need to put for a fibre optic 100Mb FX->100Mb TX ethernet line that Windows doesn't? My guess is that there is some strange MTU/MRU issue. And they only test with Windows. This is the biggest most respected ISP in Singapore, surely somebody else is running Linux on a similar line. BTW, I have tried all sorts of different MTU sizes, makes no difference.
 
Old 11-23-2011, 11:41 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Um, one or two things -- how are you getting from the modem to the Linux or Solaris boxes? Meaning what sort of cable and what specification? Also, what's the speed of the Ethernet card in the box? What's the specification of the H-P switch; i.e., throughput per channel? What's the speed specification of the Linksys?

You LAN setup, IP address, mask and gateway address should be all you need (you get connected to the switch, router, modem, life is good). Are you using fixed-IP for your servers or DHCP (most Windows stuff defaults to DHCP)? Have you tried fixed-IP addressing (at an address lower than the minimum DHCP lease address -- they usually start at xxx.xxx.xx.100 and go up from there)? Have you tried a router instead of a switch (Linksys good for that and, you know, pretty inexpensive)?

The stuff I'd look at would be the cables and the network cards, particularly the network cards (newer ones are much, much faster than older ones). It really has nothing much to do with the operating system.

Are you running Cat-5 or Cat-5e cables? Category 6 cables are the cable standard for Gigabit Ethernet -- got those? Got gigabit Ethernet cards? Got gigabit switch(es)?

Thoughts at random; stuff to look at.

Hope this helps some.
 
Old 11-23-2011, 12:29 PM   #3
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Using Cat 5e cable, modern network card. It's the same problem on at least 3 modern NICs. One is a SunFire x4140, so it's not cheap hardware. No routers in the equation, Windows = 7MBps, Linux/Solaris/FreeBSD = 10KBps. Tried a few cables. It must be software related because the Windows laptop worked at full speed. The internet coonection is supposed to be 20Mbps so even an old 10Mbps NIC would be faster than 10KBps.

I have a 16 block static IP, pick any of those IPs, same behiour. Nothing to do with DHCP

I do not need or want a router, the Solaris server does that, my problem is the connection coming out of the modem doesn't sem to like UNIX like OSes (networking thereof).
 
Old 11-23-2011, 03:24 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
There should be no difference between TCP/IP based on OS so I doubt has anything to do with that. Crummy windows or not if they can prove ISP is OK then it is.

If a supported hardware has any of the more mainstream OS's it will work just as fast as windows.

For grins, try a few live cd's. Try even an OpenIndiana live cd also.

Before I went to jumbo frames, be sure everything can support that. I doubt you need to use it over any modem.

Last edited by jefro; 11-23-2011 at 03:25 PM.
 
Old 11-23-2011, 09:59 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,681
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by ethoms View Post
Using Cat 5e cable, modern network card. It's the same problem on at least 3 modern NICs. One is a SunFire x4140, so it's not cheap hardware. No routers in the equation, Windows = 7MBps, Linux/Solaris/FreeBSD = 10KBps. Tried a few cables. It must be software related because the Windows laptop worked at full speed. The internet coonection is supposed to be 20Mbps so even an old 10Mbps NIC would be faster than 10KBps.

I have a 16 block static IP, pick any of those IPs, same behiour. Nothing to do with DHCP

I do not need or want a router, the Solaris server does that, my problem is the connection coming out of the modem doesn't sem to like UNIX like OSes (networking thereof).
Is the gateway IP address INSIDE that block of 16 addresses, or OUTSIDE of it? What is your netmask?

MTU size should not matter much at these speeds. It might be expensive to you, but the non-jumbo legacy MTU of 1500 lets gigabit ethernet work at nearly full speed, anyway. So leave it at 1500 or lower (try 576 and 1076 to be sure ... they should not be much slower at this kind of speed).
 
Old 11-24-2011, 03:26 AM   #6
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
There should be no difference between TCP/IP based on OS so I doubt has anything to do with that. Crummy windows or not if they can prove ISP is OK then it is.

If a supported hardware has any of the more mainstream OS's it will work just as fast as windows.

For grins, try a few live cd's. Try even an OpenIndiana live cd also.

Before I went to jumbo frames, be sure everything can support that. I doubt you need to use it over any modem.
Yes, there should be no difference, but there is. I've tried several different pieces of hardware. Solaris 10 on supported Sun hardware, with no changes to networking, other than IP address, Netmask and Gateway should not have any problems with TCP/IP, but it does. The ISPs here generally use transparent proxy servers to filter out blocked websites (mostly porn) and perhaps spy on us. It can cause differences in network behavior, and they probably only do testing on Windows machines. I would have thought that these expensive business lines would be free from the national proxy servers, but maybe not.
 
Old 11-24-2011, 03:34 AM   #7
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Skaperen View Post
Is the gateway IP address INSIDE that block of 16 addresses, or OUTSIDE of it? What is your netmask?

MTU size should not matter much at these speeds. It might be expensive to you, but the non-jumbo legacy MTU of 1500 lets gigabit ethernet work at nearly full speed, anyway. So leave it at 1500 or lower (try 576 and 1076 to be sure ... they should not be much slower at this kind of speed).
Yes, the gateway is inside the 16 block, it's the IP of the ISPs router their end of the line. It's the first usable IP in the block. Netmask is 255.255.255.240. Anyway, with the same settings put on a Windows laptop as on a Linux laptop, it can't be these settings.

Strange thing is, in general everything works, I'm hosting websites, 3 email domains, the LAN behind the Solaris box is all surfing etc with no real problems. It's just that certain sites; basically every site that FreeBSD wants to download source code from (using ports) is really, really slow. Even from Linux, Solaris, these downloads are slow, but not on Windows. The worst paert is, that my "HP Procurve 1400-8G" layer 2 network switch can't send mail to Yahoo accounts, as well as a few small private domains.
 
Old 11-24-2011, 03:48 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
No one has mentioned duplex settings yet. what does ethtool say about the negotiated link speeds to the switch? What if you manually force both ends to 100 full?
 
Old 11-24-2011, 05:00 AM   #9
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
No one has mentioned duplex settings yet. what does ethtool say about the negotiated link speeds to the switch? What if you manually force both ends to 100 full?
The ISP engineer that came to do line test mentioned that he sometimes has problems with duplex set to auto. His laptop had it forced to "100Mb Full Duplex". We changed his interface settings to Auto (Duplex) and the download was still full speed (7MBps).

I did try to change the linux laptops' interface (eth0) to full duplex 100baseTx using this command: #mii-tool -F 100baseTx-HD
But the output from "#ethtool eth0" did not seem to change, it still said "Auto-negotiation: on" and "Speed: 1000Mb/s". I was using PCLinuxOS, a great desktop distro but I wouldn't use it as a server. Some of these commands may not work as they are supposed to. Perhaps I will setup a laptop with dual boot WinXP and Debian 6. Then I can do a truly accurate comparison and I will be confident the network tools like ethtool and mii-tool are working.

I didn't mention the full/auto duplex because I thought it might steer the answers I got. The fact that acid_kewpie brought it up gives me some new focus. Does incorrect duplex settings have this sort of effect. Can you suggest a way to guarantee that a network interface is forced to 100baseTx full duplex. I'll use any free distro that you recommend. In the meantime, I'll see if FreeBSD has command to do likewise, only FreeBSD and Solaris are plugged in at the moment. Production environment and I can only test on laptop in the middle of the night.

Please note that the comparison between the Windows laptop and Linux laptop was not involving the switch, directly plugging a copper Cat5e from laptops to the fibre optic modem. So the root problem has nothing to do with the switch. Anyway, both switches I try have different behaviour, both are unmanaged (no toggles either).
 
Old 11-24-2011, 05:07 AM   #10
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ethoms View Post
The ISP engineer that came to do line test mentioned that he sometimes has problems with duplex set to auto. His laptop had it forced to "100Mb Full Duplex". We changed his interface settings to Auto (Duplex) and the download was still full speed (7MBps).

I did try to change the linux laptops' interface (eth0) to full duplex 100baseTx using this command: #mii-tool -F 100baseTx-HD
But the output from "#ethtool eth0" did not seem to change, it still said "Auto-negotiation: on" and "Speed: 1000Mb/s". I was using PCLinuxOS, a great desktop distro but I wouldn't use it as a server. Some of these commands may not work as they are supposed to. Perhaps I will setup a laptop with dual boot WinXP and Debian 6. Then I can do a truly accurate comparison and I will be confident the network tools like ethtool and mii-tool are working.

I didn't mention the full/auto duplex because I thought it might steer the answers I got. The fact that acid_kewpie brought it up gives me some new focus. Does incorrect duplex settings have this sort of effect. Can you suggest a way to guarantee that a network interface is forced to 100baseTx full duplex. I'll use any free distro that you recommend. In the meantime, I'll see if FreeBSD has command to do likewise, only FreeBSD and Solaris are plugged in at the moment. Production environment and I can only test on laptop in the middle of the night.

Please note that the comparison between the Windows laptop and Linux laptop was not involving the switch, directly plugging a copper Cat5e from laptops to the fibre optic modem. So the root problem has nothing to do with the switch. Anyway, both switches I try have different behaviour, both are unmanaged (no toggles either).
Doh! On closer examination of the guide I followed http://www.cyberciti.biz/faq/linux-c...ethernet-card/ I used command #mii-tool -F 100baseTx-HD not noticing the HD. I should have used #mii-tool -F 100baseTx-FD. But the ethool output didn't reflect a change anyway. Got something to try tonight then!
 
Old 11-24-2011, 06:10 AM   #11
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
OK from the FreeBSD server that is currently connected, I tried some MTU and duplex changes. I forced interface to 100baseTx full duplex, no difference in download speed. Then I changed MTU fcrom default 1500 to 576 and then 1076, no difference. Then I tried MTU at 3000 and 5000, no difference.

So I think it's safe to rule out MTU and duplex. Unless the switch (unmanaged 10/100/1000 regular linksys switch, no settings at all) will render those changes useless. Should I perform the same tests without the switch in the way?
 
Old 11-24-2011, 06:13 AM   #12
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
One more thing to note: from prior testing, if I put the HP Procurve 1400-8G between the modem and the server, download speed goes up to 160KBps (from 10KBps). But still no-where near the Windows laptop at 7MBps.
 
Old 11-24-2011, 06:31 AM   #13
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Some diagnosis using route command:

My interface settings:
#ifconfig re1
re1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 94:0c:6d:80:ab:61
inet xxx.xxx.xxx.119 netmask 0xfffffff0 broadcast xxx.xxx.xxx.127
inet xxx.xxx.xxx.120 netmask 0xfffffff0 broadcast xxx.xxx.xxx.127
inet xxx.xxx.xxx.121 netmask 0xfffffff0 broadcast xxx.xxx.xxx.127
inet xxx.xxx.xxx.122 netmask 0xfffffff0 broadcast xxx.xxx.xxx.127
media: Ethernet 100baseTX <full-duplex>
status: active


This looks normal, the route to my gateway:

#route get <my ISP gateways IP address>
route to: xxx.xxx.xxx.113
destination: xxx.xxx.xxx.112
mask: 255.255.255.240
interface: re1
flags: <UP,DONE>
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 1500 1 0



But this looks strange; when I examine route to www.google.com and heanet.dl.sourceforge.net (host of my slow download)

# route get www.google.com
route to: sin01s04-in-f17.1e100.net
destination: default
mask: default
gateway: xxx.xxx.xxx.113
interface: re1
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 576 1 0


# route get heanet.dl.sourceforge.net
route to: heanet.dl.sourceforge.net
destination: default
mask: default
gateway: xxx.xxx.xxx.113
interface: re1
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 576 1 0


Why is the MTU so low once I go past the ISP gateway?
 
Old 11-24-2011, 09:43 AM   #14
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,681
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
I agree at this point that link speed (you aren't even getting near 10 mbps, much less 100 or 1000), MTU, or duplex, is not the issue.

Use tcpdump and watch the traffic. Is it smoothly slow, or does it come in bursts and pause? Are there too many or too few ARP queries/answers? Do they all get answered? If there are anomalies in ARP, are they happening for upstream sending queries to find MACs of your hosts, or are they happening for your hosts finding the MAC of the upstream gateway. Are the MACs for the gateway consistent or do they change?

Can you configure the HP Procurve 1400-8G switch to do VLANs (all ports untagged), with two VLANs, where VLAN #1 connects to the upstream modem, and VLAN #2 is all other ports. Enable routing between these two VLANs (hopefully this feature is present in this switch). If there is an ARP issue, maybe this will change things around.

Why would the tech's Windows laptop work? Maybe it has the upstream gateway statically configured in the ARP table. Maybe it's using a different gateway IP address (yes, this can work when the fibre connection is really bridged instead of routed ... our remote office happens to be connected this way, although they give us a gateway outside of our block of 8, so we can use all 8).

If this still doesn't figure it out, a tool that can insert transparently in an ethernet cable and show the traffic would be useful. I built a small Slackware box with 3 ethernet ports to do this, where the first is a normal networked port, and the two added ports (conveniently on a dual NIC card) are bridged. Then I do tcpdump on the bridge and see what's happening. It has helped diagnose a few problems in the network.

Last edited by Skaperen; 11-24-2011 at 09:46 AM.
 
Old 11-24-2011, 09:49 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why could duplex not be an issue? mismatched settings can cripple network connections.

one things here is that as i understand it, you're still association switches, cabling, wan and internet in one this. what are your transfer rates like between linux boxes on the same switch etc?
 
  


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
Tripped over ethernet cord, ethernet doesn't work anymore 1veedo Linux - General 2 10-20-2007 11:02 PM
Linux doesn't exist. Everyone knows Linux is an unlicensed version of Unix Megamieuwsel General 29 07-31-2005 09:40 PM
FreeS/Wan Vs. OpenS/Wan Vs. StrongS/Wan bkankur Linux - Security 1 03-01-2005 09:27 AM
Linux doesn't play will with KVM pldobs Linux - Hardware 11 10-12-2003 04:19 PM
LAN works, WAN doesn't ? BrianK Linux - Networking 2 06-16-2003 07:11 PM

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

All times are GMT -5. The time now is 05:50 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