How can I learn _really_ low-level network programming?

20,100

Solution 1

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

Solution 2

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

Solution 3

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

Solution 4

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.

Solution 5

You should equip yourself 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 ;-)

Share:
20,100
Alex Gartrell
Author by

Alex Gartrell

Updated on June 10, 2020

Comments

  • Alex Gartrell
    Alex Gartrell about 4 years

    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?

  • Reginaldo
    Reginaldo about 15 years
  • Alex Gartrell
    Alex Gartrell about 15 years
    Just out of curiosity, where does this fall under Princeton's undergrad course sequence?
  • weiyin
    weiyin about 15 years
    It's generally taken by CS majors in the 3rd or 4th year, but some people just take them because they are interested.
  • Mauricio Pasquier Juan
    Mauricio Pasquier Juan about 9 years
    This book is awesome, funny and makes you write "low level" C++ code!