Ask HN: What is a good book to learn about the network stack?

81 points by piinbinary ↗ HN
I'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)

22 comments

[ 2.4 ms ] story [ 62.7 ms ] thread
from a programming perspective or a configuration perspective or ?
Networking: A Top Down Approach is a great and clear read.
Yup.

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

(comment deleted)
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.
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/

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

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...

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/

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

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.

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).

Any parts list recommendation to build out a cheap network gear from Amazon, newegg etc?
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).

I'm sorry, what do you mean by "a cheap certification rack from amazon" ?
https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3...

Pick a rack that is in line with your budget and goals. The vendors are selling older networking gear that will allow you to get hands on knowledge with real hardware to supplement book knowledge.

This way when you are on the job you know exactly what you are doing and if there is something you don't know or understand you can purchase real hardware to rapidly increase your skills. There are some sites that will allow you to remotely connect to networking equipment, but it just is not the same as having the real hardware and it will show when faced with the real deal on the job.

FWIW The CCNA books are pretty interesting, since they cover how the networking equipment decides to route packets, and not just what the host side does.
That is true, plus you normally get internals documentation on the entire process even through the ASIC, CPU, and other chips along with how to troubleshoot issues that may occur when trying to speed things up in high packet, volume and throughput environments fully utilizing the equipment.
(comment deleted)
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.
You specifically want Linux so I would skip all the generic or cisco focused books. Have you read LDD3? http://www.makelinux.net/ldd3/ ,chapter 17 specifically. It's difficult to learn the Linux network stack without knowing C as well.
Understanding the Linux Kernel, 3rd Edition, https://www.amazon.com/Understanding-Linux-Kernel-Third-Dani...

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.

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