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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I need to know how the Linux implementation of TCP performs it's session management.
I would like to see some documentation, or perhaps the source code for scenarios like this:
An application Listens on: Local IP = A, Local Port = P, Remote IP = *, Remote Port = *. Effectively the local server scenario where you know nothing about whom will attempt to connect.
What would happen if another application (or the same one with more information about its peers) Listens on: Local IP = A, Local Port = P, Remote IP = B, Remote Port = *. Basically, expecting a connection from B, but do not know the remote ephemeral port.
I can imagine a scenario where it would be desirable to have multiple listens like this, but I don't know how Linux would behave in this scenario.
It would be very easy to actual code up an example of this particular scenario to validate behavior, but I'm really interested in how tcp session management in general works under Linux, the above is just an example.
Not quite what I'm looking for, but thanks for trying.
Thanks for the response, but that's not quite what I'm looking for I'm afraid.
I found the man page for Listen, which implies that TCP will only be able to listen on a single port a single time. I'm not convinced that is a necessary restriction, since a system can have many local addresses - but I think it answers my question.
In my case, I am using an implementation of TCP that is still a work in progress (not the Linux TCP service), and cannot use linux services to hack my way around this.
I'm considering implementing an alternative session manager that sits between TCP and the application that will allow it to manage multiple listens on the same port using different mixtures of local and remote addresses. It might be overkill, but provides an interesting abstraction that I can exploit in my application.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.