Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
06-05-2013, 08:44 AM
|
#1
|
LQ Newbie
Registered: Jun 2013
Posts: 3
Rep:
|
Linux TCP TCB
Hello, I am hoping that this forum, that I visit quite a lot, can help me answer a question that I cannot get Google to produce.
Is there a way to view the TCP transmission control block for a particular session?
Background:
I need to find out what sequence number is being used by the remote end (FTP server) of a hung session. I need this information to craft a TCP reset packet and close a connection that is stuck in CLOSE_WAIT on the client machine.
I could run a loop to increment the sequence number by the receive window but I do not want to run the chance of doing something that may trigger a bigger issue.
The client that has this stuck connection is a Linux box that is very limited, no root privileges, and the process behind this CLOSE_WAIT is taking the CPU to 100%. In this scenario I also do not have any access to the server, so restarting the process there to try and force a TCP reset is a no go.
In the end, this is a problem with the vendors FTP client program and I am sure it will be fixed in an upcoming firmware release.... doesn't help me now though.
Thanks!
|
|
|
06-05-2013, 10:04 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,337
|
Quote:
Originally Posted by matak
Hello, I am hoping that this forum, that I visit quite a lot, can help me answer a question that I cannot get Google to produce.
Is there a way to view the TCP transmission control block for a particular session?
Background:
I need to find out what sequence number is being used by the remote end (FTP server) of a hung session. I need this information to craft a TCP reset packet and close a connection that is stuck in CLOSE_WAIT on the client machine. I could run a loop to increment the sequence number by the receive window but I do not want to run the chance of doing something that may trigger a bigger issue.
The client that has this stuck connection is a Linux box that is very limited, no root privileges, and the process behind this CLOSE_WAIT is taking the CPU to 100%. In this scenario I also do not have any access to the server, so restarting the process there to try and force a TCP reset is a no go.
|
You don't give many details to work with. What kind of machine is initiating the FTP send, and what kind of machine is it connecting to? Depending on the resources you have at either end, that will make the answer different. You could run wireshark and capture those packets to examine them, or you could put a script on the server to check the FTP process and if it hits 100% usage, restart it (which would kill the errant connection).
[/QUOTE]In the end, this is a problem with the vendors FTP client program and I am sure it will be fixed in an upcoming firmware release.... doesn't help me now though.[/QUOTE]
If your vendor is as responsive as most I've dealt with, you may be waiting a good while.
|
|
|
06-05-2013, 11:32 AM
|
#3
|
LQ Newbie
Registered: Jun 2013
Posts: 3
Original Poster
Rep:
|
Hey thanks for the response. I think the FTP server is Debian or RedHat based, I am not sure because I do not have access to it. The client, the host that has the orphaned connection, is I believe a Debian based embedded distribution. I am not to sure. I can navigate the filesystem and run some very basic BusyBox commands but that is it.
I have used tcpdump on an intermediate router but there is nothing coming from either side for this session.
I know there is some info in the /proc/net/tcp file but that does not have the SEQ/ACK numbers in use and I am hoping that there is another file in the procfs that could be of help.
Thanks!
|
|
|
06-05-2013, 02:10 PM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,337
|
Quote:
Originally Posted by matak
Hey thanks for the response. I think the FTP server is Debian or RedHat based, I am not sure because I do not have access to it. The client, the host that has the orphaned connection, is I believe a Debian based embedded distribution. I am not to sure. I can navigate the filesystem and run some very basic BusyBox commands but that is it.
I have used tcpdump on an intermediate router but there is nothing coming from either side for this session.
|
Well, if you don't have access to the server, and only a very limited command-set on the client, you don't have many options. Given that you have only busybox on the embedded device, you may not be able to load ANYTHING on it at all, especially if you need root level access to write to devices or perform other tasks. Is the server a device you/your company owns? If so, there has to be an administrator for it, who could work with you to figure something out. Otherwise, you're at the mercy of the client/embedded vendor...because anything you load on that box may void the warranty (guessing, read your EULA).
Also, how confident are you that the problem lies in the client/embedded device? You could try a simple test by bringing up an FTP server on a machine on the same subnet, and try a connection to it, and see if the problem follows the client or not, and at least have root access to a linux box you can run tests/programs on to diagnose things further.
Quote:
I know there is some info in the /proc/net/tcp file but that does not have the SEQ/ACK numbers in use and I am hoping that there is another file in the procfs that could be of help.
|
Not sure about that, but honestly, I've never looked.
|
|
|
06-07-2013, 12:24 AM
|
#5
|
LQ Newbie
Registered: Jun 2013
Posts: 3
Original Poster
Rep:
|
Thanks for your time on this one! I am just going to reset the device/s and not put any more effort into this... besides pushing the vendor to get this issue resolved. Thanks again.
|
|
|
08-11-2013, 05:55 PM
|
#6
|
LQ Newbie
Registered: Aug 2013
Posts: 1
Rep:
|
matak you are HF? contact me twitter.com/spellnax
|
|
|
All times are GMT -5. The time now is 09:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|