
Ask HN: What is a good book to learn about the network stack? - piinbinary
I&#x27;m primarily interested in the network stack on linux, with a focus on TCP (but it would still be good to understand the lower layers)
======
techjuice
I recommend reading the following books/presentations, I have read all of them
several times and it has given me a very lucrative, wonderful deep
understanding of TCP/IP (including UDP), programming network connected
applications, creating complex network diagrams, and being able to perfectly
talk with all individuals in networking from the non-technical to telco
engineers, work as an embedded engineer, network engineer and more.

    
    
      TCP/IP Illustrated Volume 1: The Protocols
    
      TCP/IP Illustrated Volume 2: The Implementation
    
      Network Flow Analysis
    
      Computer Networking: A Top-Down Approach
    
      Introduction to Sockets Programming in C using TCP/IP
      
      Beej's Guide to Network Programming
    
      Programming and Automating Cisco Networks
    
      CCNA Routing and Switching Official Cert Guide
    
      CCNA Datacenter Official Cert Guide
    
      CCNP ROUTE, SWITCH, and TSHOOT Lab Manuals
    
      CCIE and CCDE Evolving Technologies Study Guide
    

I would highly recommend getting a cheap certification rack from Amazon once
you get better book knowledge (CCNA/CCNP Collab, Wireless and Routing and
Switching) to increase your knowledge 20x. When I did not have my own hardware
there were just so many questions and things I wanted to do that were very
complex or not possible to do with training simulators, books, etc.

With the high quality managed switches you can see how your apps can affect
the network, integrate your work with network connected devices, automate
network devices and many more things that wouldn't give you as deep as an
understanding when using an unmanaged network (e.g. create your own software
that runs on routers, switches, VOIP phones and linux servers).

~~~
IOT_Apprentice
Any parts list recommendation to build out a cheap network gear from Amazon,
newegg etc?

~~~
techjuice
3x Cisco Catalyst 3750G-48PS Port switch, a few GBICs if you want to play with
the fiber connectivity. 3x Cisco 2901 Routers, insure you get at least the T1
modules and cables. Make sure you buy the gear with mounting kits so you can
rack them, along with purchasing the proper cables. If you want to learn more
about VOIP you would need to purchase Cisco CUCM or something similar to
Asterisk and possibly the processing modules for the switch/router or buy a
switch that already has it licensed.

You may also want to get a rack to rack all the equipment as it can get pretty
heavy and looks nice and professional when racked. The benefit of getting the
older gear is that you can do all this for a few hundred dollars. If you want
to learn the new stuff later on it will cost more, but you will know all of
the hands on stuff by then and can truly benefit from virtual labs (remotely
connected to physical hardware console port).

------
ArtWomb
Ilya Grigorik"s High Performance Browser Networking is a great open-access
backgrounder. Very up to date on modern topics such as WebRTC and WebSockets

[https://hpbn.co/](https://hpbn.co/)

Another comprehensive overall reference is Michael Kerrisk"s Linux Programming
Interface handbook

[https://nostarch.com/tlpi](https://nostarch.com/tlpi)

And to see some of the latest developments. Check out talks from Linux NetDev
Conference archives

[https://www.youtube.com/channel/UCribHdOMgiD5R3OUDgx2qTg/vid...](https://www.youtube.com/channel/UCribHdOMgiD5R3OUDgx2qTg/videos)

Finally, this was recently posted, and I believe the author is working on
another one for QUIC...

"The Illustrated TLS Connection: Every byte of a TLS connection explained and
reproduced"

[https://tls.ulfheim.net/](https://tls.ulfheim.net/)

Best of luck, and you are on the right path. Master the fundamentals and the
rest will follow ;)

------
deanmoriarty
Understanding the Linux Kernel, 3rd Edition,
[https://www.amazon.com/Understanding-Linux-Kernel-Third-
Dani...](https://www.amazon.com/Understanding-Linux-Kernel-Third-
Daniel/dp/0596005652)

It's very hard and dense to read, but I don't think there's a better book out
there about a networking stack implementation.

It might be too much implementation-focused for your taste though (it was for
mine), in which case one of the other books more focused on protocols (already
suggested in other comments) might be a better choice.

------
dlo83
I'd recommend Patterns in Network Architecture by John Day. I had him as a
professor at Boston University and loved hearing his war stories from his days
working on ARPANET. [https://www.amazon.com/DAY-PATTS-NET-ARCHITECTURE-
_p1/dp/013...](https://www.amazon.com/DAY-PATTS-NET-ARCHITECTURE-
_p1/dp/0137063385)

------
RamanathanR
In addition to the TCP/IP books commonly mentioned, i highly recommend the
following two, both by Srinivasan Keshav;

* An Engineering Approach to Computer Networking: ATM Networks, the Internet, and the Telephone Network.

* Mathematical Foundations of Computer Networking

------
lingz
Networking: A Top Down Approach is a great and clear read.

~~~
arduinomancer
Yup.

Only textbook in undergrad I've actually read a large amount of, ended up
reading a good 3/4 of the book.

------
epynonymous
tcp/ip illustrated 1&2, by richard stevens, this is the bible of networking,
it covers all the different osi layers, address spaces, protocols, packet
layout, etc. if you want to understand how netwokring really works, this guves
you all the details.

------
weishigoname
Linux kernel is very good source to dig network stack, it has L1 - L4
implementation, and there are some books about Linux network stack design
online. it is very helpful to read book and dig network stack code together.

------
snissn
Beej on sockets is a must read

[http://beej.us/guide/bgnet/html/multi/index.html](http://beej.us/guide/bgnet/html/multi/index.html)

------
badrabbit
You specifically want Linux so I would skip all the generic or cisco focused
books. Have you read LDD3?
[http://www.makelinux.net/ldd3/](http://www.makelinux.net/ldd3/) ,chapter 17
specifically. It's difficult to learn the Linux network stack without knowing
C as well.

------
terrycody
[https://www.afternerd.com/blog/learn-computer-
science](https://www.afternerd.com/blog/learn-computer-science)

there is a book recommended in this article, it definitely helps!

------
dpeck
Start with NoStarch TCP/IP Guide and then move onto TCP/IP Illustrated.

If you get through both of those and understand it you’lol have a far better
grasp of networking than nearly everyone else in the business.

------
stargrazer
from a programming perspective or a configuration perspective or ?

