5 ms·
Ask HN: Networking primer for programmers
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?
- cottonseed 9y agoThis might be higher level than what you're looking for, but you might find the first few chapters useful: https://hpbn.co/ https://hpbn.co/. Also, anything that starts with "performance is a feature" is going to be good.
- janwillemb 9y agoLooks 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.
- cottonseed 9y agoI'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-board-for-makers-and-hobbyists/ 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.
- lsiebert 9y agoI'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 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.
- janwillemb 9y agoThanks
- jaredsohn 9y agoThis is roughly how I understand it (relating it to the OSI network model): hub = OSI layer 1 (physical) switch = OSI layer 2 (data link); but layer 3 switches exist router = OSI layer 3 (network) More details for each here: http://web4.uwindsor.ca/units/its/insight/insight.nsf/e273c4953677f35c852567d700713e04/01c912740433787285256c25006c137c!OpenDocument http://web4.uwindsor.ca/units/its/insight/insight.nsf/e273c4...
- csnewb 9y agoIn college we used the Kurose textbook: https://www.amazon.com/Computer-Networking-Top-Down-Approach-7th/dp/0133594149/ref=pd_lpo_sbs_14_t_1/144-7058691-9847634?_encoding=UTF8&psc=1&refRID=F5HYF7KYH5SP96KQ41EN 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_Dnlrnkd6f3mtJgmoBk2ugbRsf3ZxkH https://www.youtube.com/playlist?list=PLx_Dnlrnkd6f3mtJgmoBk... 2) New Boston: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBpuvPW0aHa7mKdn_k9SPKO https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBpuvPW0aHa... 3) Gate Lectures by Ravindrababu Ravula: https://www.youtube.com/playlist?list=PLEbnTDJUr_IegfoqO4iPnPYQui46QqT0j https://www.youtube.com/playlist?list=PLEbnTDJUr_IegfoqO4iPn...
- janwillemb 9y agoThanks, I will check it out
- fosco 9y agoI'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
- itamarst 9y ago"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.
- janwillemb 9y agoThanks. I'll put it on my list!
- telebone_man 9y agoI 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.
- janwillemb 9y agoThanks a lot. I think you're right and I should just dive in.
- JayMatthews 9y agoHere is a good resource that has served me pretty well. It's mostly geared towards IT professionals. https://www.cybrary.it/ https://www.cybrary.it/
- janwillemb 9y agoThanks
- hacknat 9y agoIMO, TCP/IP Primer is really good.
- neilsimp1 9y agoLinux Journey has a few short lessons on networking that I thought were well done: https://linuxjourney.com/ https://linuxjourney.com/