Monday, February 2, 2009

about my book Linux TCP/IP - ISBN 0470147733

Hi, This is the first time I'm blogging on the site so would need some introduction. I introduce my self as Sameer Seth who has been associated with the software industry for around a decade. I worked with Sun Microsystems as a internet engineer, where I worked on NFS, TCP/IP stack and streams framework. Currently working with Juniper as a senior engineer in the junos kernel team. My activities revolve mostly around opensource comminuty mostly to serve it in whatever way I can. I've worked for opensolaris and Linux is anytime favourite as I've known the industry by this name since I entered into it. As far as opensolaris is concerned, my contribution are presentation on OpenSolaris internet technology and blogging goes here - http://blogs.sun.com/sameers I've recently written a book along with my co-author Ajay with a different approach that explains "TCP/IP Architecture, Design and Implementation in Linux" - 0470147733. Amazon link to the title "TCP/IP Architecture, Design and Implementation in Linux" is - http://www.amazon.com/exec/obidos/ASIN/0470147733/ref=nosim/porfessionalp4-20 conceptualization of "TCP/IP Architecture, Design and Implementation in Linux" The book was started long back when kernel 2.4 was most stable and acceptable with point of view of just ducomenting TCP/IP internals in Linux but never thought it would take the shape of the book. When the title was accepted by the publisher(IEEE Computer-society - Wiley), kernel 2.6 had already appeared and was being accepted slowly. That was the time when decision was to be made whether to make it for kernel 2.6. The time was little to do all this because the format of the book and descriptions was such that huge amount of work was required to convert the existing work. The reason was that code snippets included line numbers and explanations also had the line numbers in the description. So, we planned to keep it for kernel 2.4 and to revise the contents for kernel 2.6 in the next edition. what is different in "TCP/IP Architecture, Design and Implementation in Linux" This was all about the 2.4 and 2.6 fight. The intent of writing a book was not show the latest but to bridge the gap. There are good books that explain Linux network internals and one of those is "Lnux networking Internals" by Christian Benvenuti. It explains IP and related protocols to a great extent. But when I am a new comer to Linux networking stack, I'd like to know very systematically what is happening when - we do recv/send over the TCP socket ? - connection is established? - what does socket, bind, listen, accept, connect system calls do internally - how is route look up done, - how is packet transmitted and received end to end in the linux kernel - how is TCP timers, memory managed. - how is TCP state machine implemented and congestion handled.
- QOS implementation and how does it fit in to the stack with implementation details illustrating CBQ.
- how are various layers in the stack linked and the boundaries for each layer.
- how is the net filter hooks implemented and their relevance in the stack.
- Implementation details for ipchain and iptables.
- NET softIRQ implementation and it's relevance with respect to packet processing on SMP architecture. I did not find any book tying up these ends together and linking each part of the kernel responsible for making the stack. I did not find exact explanation and working of net softIRQ and even if someone explains, it's relevance with respect to packet reception and transmission and scalability issues on SMP architecture is not very well explained. Moreover, no book explains TCP and it's implementaiton for Linux. All together with net-filters(network hooks in the Linux stack framework) and QOS implementaion is not provided by any existing book in one place. For example, net-filter framework will give a very clear picture of what needs to be done when you want to implement your own extensions to the TCP/IP stack like implementing NAT, masquerading but it will not explain details of NAT and masquerading. So, I though of bridging these gaps along with the explanations for all those topics which have already been covered in details by other authors in my own way. The intent was not to compete with the good existing titles, it was to bring something which doesn't exist. Why not to bother about 2.4 and 2.6 with "TCP/IP Architecture, Design and Implementation in Linux" Many question me - why not for kernel 2.6? So I'd like to say that if you are a learner, kernel version should not matter much(2.4<->2.6). These are subsequent versions and differences will surely be there but basic skeleton will never change. Most of the important changes as far as networking stack and supporting framework is concerned, was done from 2.2->2.4(soft IRQ). Rest what we see is new features being added on top of the existing skeleton, data-structure layout changes to accomodate those changes or for some code optimization or for performance enhancements. Some of the changes will be clubbing of two or more functions to create a new function. These changes will matter for those who are contributing to kernel 2.6 directly. For those who are starting their journey into Linux networking stack(even for those new comers who are directly touching kernel 2.6), 2.4 or 2.6 will not matter as far as networking stack is concerned. If you are a starter and you don't have any idea, getting knowledge of kernel 2.4 implementation will surely help diving into kernel 2.6. All you need to know is - what to look where - which part is responsible for what in the TCP/IP stack - what all frameworks are supporting it - how are these various parts linked. If you know most of the things, still this book can work as reference point for most of the things. debugging related chapter in "TCP/IP Architecture, Design and Implementation in Linux" As far as debugging chapter is concerned, lcrash may be outdated for kernel 2.6 but I'd say it is still supported by kernel 2.6. The intent here was not to show what lcrash or other debuggers can do, but to let the readers visualise what all kernel data-structures are involved and to intersect the stack when different operations are performed. There will be equivalent commands supported by different debuggers as offered by lcrash that can be used to do the same stuff as shown in the debugging chapter. So, this shoulld not matter. Expectations from "TCP/IP Architecture, Design and Implementation in Linux" So, the main attraction of the book is the systematic approach to understanding Linux TCP/IP stack implemantation and other supporting kernel framework. The intent is to bridge gaps from the existing titles and not to re-work what others have done beautifully. This will not only help new enthusiasts to have better understandng about the subject but also act as reference point for the contributers to linux community with experience. I've started planning about the next edition that explains latest kernel 2.6. But that is a long way to go and I make sure that it should appear before next kernel version is out, surely. I hope this information will be helpful. If anyone is interested in reviewing the book, please let me know along with brief biodata about youself(required by the publisher). In case some one is interested and qualifies too, a copy will be sent on the mentioned address.

10 comments:

  1. Hi,

    Do you have a rough estimate on when the next revision will be published? I was planning to buy the book, but if the newer revision is coming soon enough, I would rather wait for it.

    Thanks.

    ReplyDelete
  2. It will not be sooner than mar - Jun 2011 :)

    ReplyDelete
  3. Great achievement Sameer. Its not an easy job to put together your learning / expertise in a book. Hope to get to read your book soon.
    Thanks.

    ReplyDelete
  4. Hi,

    Do you any plan for the next revision of this book? I am very much looking forward to the next revision.

    Thanks.

    ReplyDelete
  5. I'm infact. But the book would be focusing on lesser of TCP/socket and more on networking part of the Linux kernel. I've already submitted the proposal with the publisher.

    ReplyDelete
  6. I'm a linux sysadmin and like your book. Would there be any chance that a supplement could be written geared towards a sysadmin and the practical operations of the Linux TCP/IP stack. I would like to have a bridge/linkage between this excellent work and say the kernel parameters that can be tuned for each component in the stack and what they would each accomplish. Also, explanations of what tools to best use for monitoring and troubleshooting each point in the stack (netstat, strace, systemtap, etc...) - along with examples how to use and when to use appropriately.

    ReplyDelete
    Replies
    1. thanks. That is a good suggestion. I'm already kicking off my new title and have taken care of the most of the things that you mentioned. I'll cover up for the ones suggested by you.

      Delete
  7. Hi Sameer sir,

    My name is Ajay i am a Big fan of linux i am very much interested to learn the kernel programming but i don,t know where to start what are the basics thing should i need to learn first. i Seen ur book it's good sir.Thank u so much for placing the book in online for free download thank u very very very very very much.

    ReplyDelete
  8. Ajay, you love Linux is your choice. But have some common sense that no author would place his/her book online. It could be some piracy. Kindly join some online libraries to avoid buying heavily priced books instead of looking for pirated books online. I hope you understand the ethics here sir.

    ReplyDelete
  9. Hi Sameer,

    Can you provide educational material to use your book in a communication softare course ?
    I mean slides, figures, source code, etc.

    ReplyDelete