Found in 2 comments on Hacker News
I once did some research on networking and related stuff - it was not my primary topic, but I remember a few things.

During my reading, I found one of the best (as in readable) books was Doug Comer's "Internetworking With TCP/IP vol. 1" - an excellent theoretical reference. [1] However, skip the other volumes from Doug Comer (I think there are 3 volumes).

For writing practical applications, Richard Stevens' "Unix Network Programming" [2] is usually recommended, I didn't find it an easy read though. Perhaps others can pitch in.

For both the books suggested, getting a used old copy for cheap is a good idea because the core information was already there even in the first editions.

Finally, read up on PlanetLab [3]. Its a fascinating project - a small scale internet built on top of a subset of nodes contributed by universities and research organizations across the globe - that people can contribute to, and if you actually manage to get into the developer's list and make a contribution, you can quite honestly claim to have pushed the state of the art forward.

And lastly, be prepared to spend a good amount of time - I don't think it will be a fast or easy process. For whatever reason, I have found that the community around this work to be a little small, especially in comparison to how much it permeates pretty much everyone's life.

[1] https://www.amazon.com/Internetworking-TCP-Vol-1-Principles-...

[2] https://www.amazon.com/Unix-Network-Programming-Sockets-Netw...

[3] http://svn.planet-lab.org/

rmk · 2010-02-24 · Original thread
Computer Networking, A systems approach.

A great book. Highly recommended.

http://www.amazon.com/Computer-Networks-Third-Approach-Netwo...

Of course, one of the classics is this one:

Internetworking with TCP/IP vol. 1.

http://www.amazon.com/Internetworking-TCP-Vol-1-Principles-A...

Edit: If you are considering Linux, then the implementation is discussed here. I would not suggest this, unless you are actually hacking. In that case, this is okay:

http://www.amazon.com/Understanding-Network-Internals-Christ...

Fresh book recommendations delivered straight to your inbox every Thursday.