Ask HN: Good book to learn modern networking?
I'm looking for a book to get up to speed on networking in 2024
Including classical topics from sockets, to the TCP/IP stack, to DNS, to AnyCast, and similar layers and technologys, but also modern networking setups that might include cloud providers, or other 2024-ish considerations
138 comments
[ 3.3 ms ] story [ 197 ms ] threadPersonally, I think if you understand the fundamentals, you will quickly realize things like software defined networks and CDN technologies are just abstractions on top of other stuff.
[1] - https://www.amazon.com/TCP-Illustrated-Protocols-Addison-Wes...
[2] - https://nostarch.com/tcpip.htm
You need to know some factoid, you look it up, you actually find it because it’s 1600 pages long.
These days, most people would Google it. This book was written back in 2005 and some of us still prefer paper for reference.
> The term was coined in 1973 by American writer Norman Mailer to mean a piece of information that becomes accepted as a fact even though it is not actually true, or an invented fact believed to be true because it appears in print.
* https://en.wikipedia.org/wiki/Factoid
And then just read RFC for more modern stuff like QUIC, WebSockets, WebRTC, etc.
Don't be afraid to dive into RFCs. They're the primary source, and once you've got the basics (from eg. TCP Illustrated) understood, they're easy to read and understand.
In many cases, I find them to be better than the majority of books/articles/videos.
For example, trying to learn the TCP fields from the RFCs alone is hard because of how many there are. Starting with the Wikipedia page on TCP and then following the linked RFCs is easier.
Agreed.
I find it difficult to gratuitously study a broad topic and instead prefer to learn by building and doing.
However, that book was one of the most readable, well paced and well presented books and it really did give me a good broad understanding that I rely on even now, 25 years later.
Even if you think a book just about TCP/IP is pigeonholing you and you'd like a broader picture of "computer networking" I would still start with this - the design decisions and solutions described can be applied very broadly.
A good example of this is the discussion of exponential backoff algorithms ... that's useful everywhere.
Given that IPv4 Evolved a lot over the last 20 years to manage the complexity of address assignment and shortages, everyone should be aware that IPV6 has changed too.
The chapter on IPv6 just barely hint and the development of IPv6 in real world cases.
Don't take an almost 20 year old book for gospel for IPv4 or IPv6.
Policy and implementation practice has changed enormously. Look at documentation from the last few years and from good sources. EG Apnic is the Regional Internet Registry for Asia. https://blog.apnic.net/2023/04/04/ipv6-architecture-and-subn...
Also a good source of info and opinions is the Packet Pusher set of podcasts. https://packetpushers.net/
I find that they tend to have a very real world explanation of topics covered and they avoid the "I've doing networking for 20 years. Don't tell I have to change" attitude.
There might be best practices which have changed around NAT, software defined networking and load balancing, but it's all on top of existing protocols.
If you are talking about subnetting practices, it has always been an operational thing... that's not what these books are talking about.
Two things strike me as odd about networking compared to many other IT/software fields:
First, it evolves much, much slower than anything else. Everything I learned 2 or even 3 decades ago is still relevant. Ethernet, DNS, DHCP, TCP/IP. New things got bolted on but everything old is still relevant. Yes, even in the modern cloud.
Second, I've met so few in the fields that actually understand anything about networking. Even as basic as an ip address and subnet. As long as the web page loads and the data is flowing, people stop caring fast. When the network breaks, most software devs are stomped and can't even do the most basic troubleshooting.
My only recommendation is to start with the absolute basic and learn from first principles. Ethernet, IPv4 (packets, IP addresses, subnets, routes), UDP, DHCP, DNS, TCP, HTTP, tunnels and VPNs, in that order. Use wireshark along the way and research everything that is unclear before going up the stack.
Try to run your own router/firewall using openwrt or pfsense/opnsense.
So yes he's entertaining, but I only look at it as entertainment. The learning materials are barely more advanced than you can get from skimming an introductory blog post on networking.
Nonetheless, he is quite popular with the early learners, such as OP.
Not that I'm an expert myself, but I've seen the same patterns and concluded that to be a symptom of a set of technologies whose abstractions are leaking much less than others. It e.g. rarely happens that you have to run Wireshark and the likes to debug why an image doesn't show up in your app.
https://gaia.cs.umass.edu/kurose_ross/index.php
Starting with the 6th edition, it has separated control and forwarding planes for the network layer to reflect the increasing popularity of software-defined networking (SDN) i.e. evolution of hardware centric to software centric networking. The fact that even before 6th edition when the chapter on networking is still monolithic (combined chapter on control and forwarding), it has already mentioned about the separation concerns between the control and forwarding planes while other popular textbooks still not highlighting this important matter. In addition, unlike many textbooks you can download all the supporting materials slides, exercises, animation, etc, of the from the authors' public website and Prof. Kurose video lectures are also available in Youtube.
My main wish lists for the next edition (9th) hopefully include Smart-NIC for modern approach to in-network computation and also the newly standardized segment routing for network layer QoS.
If there's The Nobel Prize in Literature for textbook authors, the authors of this book should be more than deserving.
Modern PHY is like bit twiddling in programming, 99% programmer don't do it and don't care unless you are doing HPC or device driver. In networking those who're doing PHY belong to communication engineering field. For modern networking the relevant PHY mostly dealing with digital I/Q signal for wired/wireless and there are many excellent books on the subject such as this [2].
[1]The Art of Electronics (2015):
https://news.ycombinator.com/item?id=38748370
[2] Digital Signal Processing in Modern Communication Systems
https://www.amazon.com/Digital-Signal-Processing-Communicati...
> "with an early emphasis on application-layer paradigms and application programming interfaces"
I don't agree. For those onboarding onto the subject, their mental model will be focused around the higher level details implemented around the application layer. The physical layer only starts to become remotely relevant once you start to delve onto very specialized topics.
I highly doubt even 1% of engineers could describe how WiFi works on the radio / physical level let alone anything about the variosu ways we make wires and light works.
Lectures by Jim Kurose: https://www.youtube.com/watch?v=74sEFYBBRAY&list=PL1ya5dD_M8...
Lectures by Epic Networks Lab: https://www.youtube.com/watch?v=BBzqX08GPo8&list=PLo80JwUm6h...
My wish would be for the section/mention of NAT to be expanded on and discuss NAT traversal mechanisms.
I'm unable to buy it ?
$700? lol.
But yeah all those seem like good learning opportunities. If you don’t actually need email that much, running your own mail servers and DNS servers is also good, altho in the modern day some large providers will probably regard your outgoing mail as spam. (E.g. I can’t email my wife on ATT.net, and from time to time I have been blocked by gmail and office 365).
For me everything is named after things from Dune :)
Maybe even add GitOps - e.g. install a GitHub Actions agent locally and have it run the Terraform etc. against your lab servers automatically when you commit it.
That's what all the training materials are missing. I want to fast track this section with practical practice problems.
The reason why learning something likely calculus is so straight forward is because you can just do tons of problem sets and eventually you develop the instinct for it which by default comes with understanding. I want the same thing for networking. Problem sets is the key. I guess this is a start up idea.
What do you do to resolve?
Can you say it a different way?
That's literally my only route. For example, if I asked you, how do you fix a refrigerator without a broken refrigerator in front of you... what would you do? Likely google it too.
It's hard to frame the question in a way that's actually educational in the sense that it triggers problem solving. Right now the question is framed in a way where I can only look up the answer. You see what am saying? I can't actually help you here either because I don't know how to frame it correctly.
You could possibly ChatGPT it, sure.
Or you could just answer it, and let someone correct you if it's incomplete or off-base.
We probably won't be able to help with compulsions to "cheat yourself out of learning". That's a "you" thing. =]
The question was framed in a way where the question is total shit. I was being nice but the minute you say it's a "you" thing I'll just spill it. The question is garbage. You shouldn't ever do this it's not your thing. You can't teach and you don't know how to respect the person your teaching.
First off I can google it. First result: https://answers.microsoft.com/en-us/windows/forum/all/ethern... But I wasn't saying that. I'm saying that google is the ONLY option based off the way you framed it. You don't want to present a problem where the only way they can solve it is to google it.
The question needs to be framed in a way where the user has the tools he needs to solve the problem. If the task is how do you build a lego house, you need to provide the person with legos so he can design a house and learn what legos are. If you ask such a question to a person who doesn't know what legos are, doesn't know how legos work, then your question is complete fucking garbage. Get it?
Here's a suggestion. List a set of common networking tools in which a subset would be appropriate to solve the problem. That's one way of how it could work. You don't say hey, that's a "you" thing. No man. It's you. Yeah if you didn't catch the hint we're done.
In my case, about a decade ago, it was the cable being partially broken, not something else, as 95% of the Google results have as a resolution.
Check into game theory when you're bored with networking.
Even if my question was the stupidest, least helpful question in the world, becoming aggressive won't accomplish your goals.
Happy to be "done".
wireshark, ifconfig, route, ping, netstat, etc are your REAL friends on Linux! :)
The environment would have to be interactive though. Not a written problem set but some network of containers that exhibits the problem. That's how one gets the experience.
Think: leetcode for networking. I would pay for that.
1. https://github.com/mininet/mininet
https://beej.us/guide/bgnet/
In retrospect, should've been called "Networking for programmers". Short. Concise. Examples for all operating systems including Windows. That will get you started. After that, to level-up, any book with good ratings would do. And you will also know which part of the networking stack you want to learn more about, thus, you'd pick the correct book for yourself. But this one is a must have if you're feeling very uncertain about your understanding of networking concepts and how everything glues together.
https://bookshop.org/search?keywords=michael+w.+lucas
My next favorite is the Top-Down book everyone above mentions. I like that it starts with loading a web page, instead of bits on a wire. And they have pcap files so you don't even need a lab.
The Stevens book is the standard text for programmers writing network code.
Beej's Guide (https://beej.us/guide/bgnet/) Is how I learned.
By the time you get here, you'll know enough to know which book to read next.
To illustrate why I say this, let me give you some back story. In the late 1990's (98 or thereabouts) I was working in IT, but not as a programmer. I still had not finished my C.S. degree, and I wasn't applying for any programming jobs because at that time I thought no one would hire me without a degree. (as an aside, I quickly found out how wrong I was when I actually started applying for programming jobs in late 1999 / early 2000, but that's a story for another day). Anyway, I was doing a combination of network administration (Novell Netware 4 t3h win!), desktop support, and AS/400 operations. Since networking was part of my job, and networks fundamentally fascinated me, I spend a decent amount of time reading books on TCP/IP, Ethernet, socket programming, etc. Including the classics like TCP/IP Illustrated and Internetworking with TCP/IP (there's some book recommendation after all, hah!) and eventually studied for, and passed, the Network+ certification test in late 1999.
Shortly after that I got my first programming job and left all that networking engineering stuff behind. And I don't miss it, especially getting fiberglass crap all over my hands and arms while pulling ethernet cable through drop ceilings, etc. But anyway, the point is.. over the past 23 some odd years, the networking knowledge I acquired has been ridiculously valuable to me, and that value just seems to keep growing. I mean, the joke is "every system is a distributed system now" and that's actually close to true and not a joke in many cases. Nearly everything we build now involves a networking element. And when the network is broken, the system is broken. And guess what? The network breaks. A lot[1]. And knowing just enough to debug things like DNS resolution problems and what-not goes a long way.
My current day-job has me doing a lot of work with AKS and Istio on Azure, and one of my "specialities" if you want to call it that, is ingress. I spend a lot of time helping teams get things set up so that traffic comes in and hits their Istio ingress gateway, whether that be by integrating with Azure App Gateway, API-M, IBM API-C, or whatever. And it's once every couple of weeks or so that I just blow somebody away with my genius (hah, haha) by doing something like editing my hosts file to selectively override a DNS value so I can test by short-cutting straight to the ingress load balancer and bypass some upstream component, or something similar. Whipping out "dig" just has them rolling in the floor. And using netstat, netcat, etc? It's like I'm doing black magic or something.
The moral of this little story is that having even a fairly rudimentary knowledge of networking can go a long way. And as networks have become more and more fundamental to everything in computing, that's only become more true in my experience. So yeah, I highly recommend spending some time on this topic, regardless of which resources you choose to study.
[1]: https://en.wikipedia.org/wiki/Fallacies_of_distributed_compu...
But yeah tcpdump, netcat, dig invaluable. Just the knowledge of the TCP handshake and what various timings for “connect failed” might mean about a firewall in the way vs. app not running etc is super useful, cloud or not.
Any proper L2/L3 switch has mirroring so using a hub isn't mandatory.
So I'd advise don't waste money on a hub. As the sibling comment points out, port mirroring is a thing.
Through reading and understanding the fundamentals, just like we all had. The concept of port mirroring is super simple, I don’t remember any difficulties with that back then when I was a junior neteng. Nor did I need a hub to learn basics.
Back in the times of IPX and NetBEUI that was indeed a useful activity - connecting two Windows 3.11 computers with NetBEUI was a nice way to learn Ethernet LLC-2 (yes, the connection-oriented Ethernet layer protocol :-) as it allowed to nicely trigger the DLSW to learn it.
What?? You don’t have to buy a hub to learn networking. Switch with port mirroring works fine; a couple of VMs with packet sniffing on the interfaces work even better. I am not even sure if you still can buy a hub in 2024 - I’ve not seen any since like 2005? This advice is weird.
[1] https://github.com/emmericp/ixy
Potentially have a look at Infiniband and Clos/fat tree networks?
My more generic recommendation would be to explore semantic scholar for impactful/cited papers, look for some meta analyses, and just dig through multiple layers of references till you hit the fundamentals (typically things published in the 80s for a lot of CS topics).
That is generally considered the gold standard for professional network education.
Yes, it’s networking according to Cisco and in some cases they do try to push some of their products as commercial solutions. However, the proprietary stuff is clearly identified by Cisco intentionally in the educational materials because the goal is education first even if you favor a competitor’s products. Cisco makes money on their educational materials and certifications so they can afford to separate their tiny bits of proprietary stuff from the education as necessary to build a strong professional labor force ready to consume their products years in the future.
For future reference, direct download links can be found here: https://ieeexplore.ieee.org/browse/standards/get-program/pag...
Found the direct link here: https://ieee802.org/
Though layer 8 seems to be missing :p
Is there some gamified course? Perhaps literally a game? I remember playing a game where you build your CPU with NANDs, is there something like that for networking maybe?