Ask HN: Networking primer for programmers

19 points by janwillemb ↗ HN
I'm a programmer. Although I want to, I don't "get" networking. I don't know the difference between a router and a switch. Is there a good primer on these things from which the "getting" could start?

17 comments

[ 3.0 ms ] story [ 27.3 ms ] thread
I'm a programmer. Although I want to, I don't "get" networking. I don't know the difference between a mixer and a meetup. Is there a good primer on these things from which the "getting" could start?

But seriously, you want to look into the OSI network model. This may be helpful http://www.routeralley.com/completed/ccna_studyguide.pdf

As for your question, I believe (and someone better informed then me is bound to come along) that a switch basically connects computers to make a network, and may or may not be very smart about how it does that, as it may broadcast everything to every computer in the network initially.

A router routes communications from an outside network like the internet to another network's computers, using address translation to determine what to send where. Routers assign a ip address to computers within the network and does network address translation, so that externally you can use one ip address to the internet that represents multiple computers. It can track which internal ip address is associated with a request, but computers outside your intranet can't, which is why you often use routers to assign specific ports to specific computers in your network so that you can play video games or use bittorrent, as that lets the external networks initiate a connection by using a specified port.

In college we used the Kurose textbook: https://www.amazon.com/Computer-Networking-Top-Down-Approach...

It explains just about every networking concept in grueling detail. However I don't remember anything I learned in that class, and now as a working developer don't have the time to work through a 900 page textbook.

These Youtube playlists covered the important networking parts. Search Wikipedia for the topics you don't understand.

1) Stanford Networking: https://www.youtube.com/playlist?list=PLx_Dnlrnkd6f3mtJgmoBk...

2) New Boston: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBpuvPW0aHa...

3) Gate Lectures by Ravindrababu Ravula: https://www.youtube.com/playlist?list=PLEbnTDJUr_IegfoqO4iPn...

I'm a Networker. Although I want to, I do not "get" programming. I do not know the difference between pyhon 2.x and python 3.x.

happy to join a chat and answer questions if I can

This might be higher level than what you're looking for, but you might find the first few chapters useful: https://hpbn.co/. Also, anything that starts with "performance is a feature" is going to be good.
Looks like a very thorough resource to me, thanks! At the moment I'm more interested in in the hardware-y side of things, but this is definitively worth checking out.
I've been trying to learn about hardware-y side of networking lately, too. Three things I found useful:

- Ethernet The Definitive Guide. Part 1 (Introduction) was a good orientation. Part 4 (Switches and Network Design) talks about switches vs routers, for example.

- I've reading Network Algorithms. This book is broad investigation into "network application performance" and considers protocols, hardware, network device and network architecture, operating systems and applications.

- I've been trying to understand the low-level hardware by building a networking stack from scratch on a FPGA board. I'm using the Digilent Arty Artix-7 board ($99):

http://store.digilentinc.com/arty-artix-7-fpga-development-b...

I'm now able to send and receive Ethernet packets and I'm now thinking about how to implement higher-level protocols like ARP.

Good luck! This is fun stuff.

"Silence on the Wire" is a strange and wonderful book: an intro to networking as well as an intro to passive surveillance techniques. Well worth your time.
I think one of the barriers to 'networking' is there is just so much to cover... Worse still, some of what is considered 'networking' is proprietary technology catered to an environment that uses a particular vendor.

That makes the resources that aren't proprietary extremely detailed and muddy, to cover things the proprietary tech shines up at a high level.

Therefore, my suggestion for 'learning networking' is to just do it. Set up a LAN at home. Solve the problems as you come across them.

Someone at my place of work took this approach, and I thought it made me smile when he said he had this great idea about how he could automatically distribute IP addresses to terminals instead of manually setting them up. I told him about DHCP! Learning by going through the motions.

Incidentally, I picked up a copy of a CCNA study guide and the concept of DHCP wasn't covered until 1/3 through the book, after OSI was covered and other low-level topics.

Thanks a lot. I think you're right and I should just dive in.
IMO, TCP/IP Primer is really good.