views:

961

answers:

10

So I want to learn all about networks. Well below the socket, down to raw sockets and stuff. And I want to understand hubs, routers, access points, etc. For example, I'd like to be able to write my own software to do this kind of stuff.* Is there a great source for this kind of information?

I know that I'm asking a LOT here, and that to fully explain it all requires from high level down to low level. I guess I'm looking for a source similar in scope and depth to Applied Cryptography, but about networks.

Thanks to anyone who can help to point me (and others like me?) in the right direction.

* Yes, I realize using any of my hand-crafted network stack code would be a huge security issue, and am only looking to do it to learn :)

Similar Question: here. However I'm looking for more than just 'what's below TCP/UDP sockets?'.

Edited for Clarification: The depth I'm talking about is above the driver level. So assuming that the bits can make it to and from the other end of the wire, what next?

+6  A: 

This may not help you learn it, but a packet sniffer like Wireshark will give you some insight into what the data looks like at a pretty low-level protocol (TCP/IP).

Andy White
+6  A: 

I learned IP networking from TCP/IP Illustrated. Highly recommended.

Greg Hewgill
Reginaldo
A: 

The TCP/IP Guide

raspi
+1  A: 

You should equip with a c compiler and the necessary libs and headers for your OS and play around. You may want to read for example:

http://snap.nlc.dcccd.edu/learn/fuller3/chap13/chap13.html

I had some more links in my delicious account, but they all went down the digital drain ;-)

Patrick Cornelissen
+4  A: 

As you have obviously recognised, the universe does not start and end with the IP Protocol. Take a look at the OSI 7 Layer Model where IP is a Layer 3 (Network) protocol. Common IP Routers will operate at this level, but there is more complexity you probably should understand in the Data Link and Physical layers before you start coding your own network stacks.

Start with the fundamentals of data communications in all its myriad forms and work your way up the stack until you get to where you need to stop. Data Communications, Computer Networking and Open Systems is a good foundation text, and then look for more detail on each area you need to focus on. Previous answers include good links for IP and TCP/IP, and as mentioned Wireshark will let you look down through some of the layers

Kevin
+1  A: 

CISCO CCNA materials contain a great network fundamentals, but does not affect programming aspect. I'm not sure that there is an official free link, but you can try to find them.

Eugene
+1  A: 

Have you any embedded programming experience ? If so I recommend you buy one of these development boards. They are cheap and allow you work on every part of the networking stack plus all the software tools required are free.

Note that getting going on it isn't easy and I ended up reading the CS8900 IC datasheet to learn how to make it communicate with the ARM7 based processor. But if you enjoy that sort of thing (as I do) then they are great fun.

IanW
+1  A: 

Hmmm ... have you looked into Computer Networks by Tanenbaum ?

Billy
+1  A: 

I have found the networking chapter in "understanding the linux kernel" and "understanding linux network internals" from oreilly to be very helpful.

The TCP/IP stack is a very good start but there is a lot more and a good understanding of how ethernet works and how ethernet != IP != the-interweb will go a long way.

books on network security often do a decent if not goos job explaining how networks work in a concise context.

what really did the trick for me was taking a job implementing NAT :)

Arthur Ulfeldt
A: 

This course worked for me: COS 461 at Princeton. Note that it assumes system-level programming experience with C.

Pretty much all the readings and lectures are available online under "Syllabus". And you can try the assignments too (unfortunately, you won't have access to the Virtual Network System).

weiyin
Just out of curiosity, where does this fall under Princeton's undergrad course sequence?
Alex Gartrell
It's generally taken by CS majors in the 3rd or 4th year, but some people just take them because they are interested.
weiyin