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 05-15-2012, 07:24 AM   #1
downer
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
Network breakdowns involving TCP RST messages


Hello everyone.

While this is not technically a Linux-specific issue, all the clients involved, and the server are running CentOS6 (Kernel 2.6.32-220), so I hope I am justified in posting this here.

Here is the setup:
A server handling dhcp, dns, nfs, nis and proxy services for a network of 15 clients, all running CentOS6. The clients access the internet through a squid proxy on port 3128. They also access an http server in our network through the proxy. The server has two network interfaces, one connecting to the web and our own http server, and one connecting to the clients.

Here's what's happening:
At irregular intervals, the clients' internet connection breaks down for a short period (30 seconds give or take). All clients are affected simultaneously, and connections to the http server in our network also break down.

Here's what I did:
I ran Wireshark on the server, both interfaces, to see what, if anything, was happening during the breakdowns, and I noticed that, during this time, a high number of TCP RST messages of this form (from servers on the internet):
Code:
26234	51.937961	80.239.230.169	192.168.2.35	TCP	http > 39637 [RST] Seq=1 Win=0 Len=0
or from our own proxy:
Code:
24879	44.966533	192.168.168.16	192.168.2.22	TCP	ndl-aas > 57333 [RST] Seq=5280 Win=0 Len=0
occur.

I did some googling, and, from sources too numerous to list, constructed the following scenario:
Sometimes, when a client terminates a connection to a server, including our own proxy, that message never makes it to the server, either because somewhere on the way, a network device does not pass it on, or because it is already malformed coming from the client. So, from the information available to each of them, the server assumes that there is a connection, while the client assumes that there is not. After a while, the server determines that there is no traffic on the connection and ends it with a TCP reset message to the client. The client, assuming that the connection was already terminated, resets its current connection instead, resulting in an error for the user. Since servers flush inactive connections periodically, or perhaps because the improperly terminated connections happen around the same time, the entire network is affected at the same time.

Now, to my questions:
1. Is this scenario possible? Maybe a modified form of it? I pretty much turned my network upside down to find the problem, since it annoys the heck out of my users, so I'm grasping at straws to find an explanation.
2. If not, what else could cause this behaviour? From what I gather, servers don't send TCP reset messages without good reason, and IIRC older wireshark logs (which I fail to find right now) have displayed no such messages (or at least not so many), nor are they prominent in current logs when the network is running fine.
3. What tools could I use to pinpoint the error? How do I determine what prompts the resets, and whether the resets cause the errors that keep pestering my users? I already borrowed an HP ProCurve switch with built-in monitoring to replace my Linksys switches, but I have yet to find a nullmodem cable to program it, and since those cables seem to have gone out of style with disco, I'd like an opinion on whether to bother looking for one any more. The idea was to monitor traffic at the switch rather than the server, to see if the switch loses any packets.

Sorry, that was a lot of text, especially for a first post on this forum. I hope it made sense, but as you may imagine, I'm a little frustrated and confused right now and have a lot of upset users knocking on my door asking when the network will be back to normal.

Hoping for some help,
André
 
Old 05-15-2012, 07:40 AM   #2
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
I think it is more likely that the resets are symptomatic rather than causing the problem. For a RST packet to reset the connection, the source/destination IP and port have to match, as well as the sequence number. A 'forgotten' RST packet will not have the correct sequence number.

The resets could be caused by timeouts, which in turn can be caused in various ways
Dump the traffic for a single host to a file over a prolonged period of time, so you can capture the entire blackout.
tcpdump host 1.2.3.4 and tcp and port 80 > /somedir/somefile
 
Old 05-15-2012, 02:20 PM   #3
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
How about your traffic when the issue come out, heavy or light? If your server can't handle heavy traffic, a lot of RST packet will be generated on client and server.
 
  


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
Tcp rst ssenthilkumar Linux - Networking 1 03-30-2012 02:15 AM
TCP Crawler network not working after many TCP requests inftechpros Linux - Networking 1 06-12-2011 01:22 PM
TCP packet with RST flag not carrying DSCP Solace Linux - Networking 0 10-08-2009 12:02 PM
TCP stack imediately sends RST after it receives SYN-ACK berkon Linux - Networking 2 05-03-2009 01:56 PM
How linux TCP handle (RST,SYN) at initial connection establishment syseeker Linux - Security 1 01-14-2005 04:20 PM

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

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