Found in 2 comments on Hacker News
Written three TCP/IP stacks and the first was pretty bad as wrote off of RFCs before the Comer books.

But then purchased the Comer books and made it so much easier. Highly recommend buying the Comer books if really interested in writing a TCP/IP stack.

Also if you really want to learning something you write an implementation. To this day makes it so much easier to deal with IP problems, configuration, buying products, etc.

https://www.amazon.com/Internetworking-TCP-IP-One-6th/dp/013...

https://www.amazon.com/Internetworking-TCP-Vol-Implementatio...

https://www.amazon.com/Internetworking-TCP-Vol-III-Client-Se...

Fresh book recommendations delivered straight to your inbox every Thursday.