2018/08/19

Every thing you every wanted to know about Linux networking.

Think about your home router, it's able to have a connection to the internet, manage translating addresses and ports. It has the ability to map services for gaming, telephony, and streaming video. Also support for different providers and things like pppoe and other insane upstream connections types is in there. Yeah that's not "router code" that Linksys, DLink or the others wrote, your seeing Linux in action

All that capability to run routing protocols, packet translation, Port mapping and almost everything you can thing of it's just part of the Linux kernel and companion utilities like DnsMasQ. Companies such as Linksys created the market but their software simply configures the kernel with the what to do as config files. The ability to translate ports on video streams in real time can't afford to suffer packet duplication so it has to stay in the kennel or risk the time delay in packet handling restricting bandwidth

So what can the Linux kernel do. Take a look around cause these guys are doing this with 20$ hardware. It's not speciality hardware is doing all the heavy lifting like a $2,000 Cisco router. A Raspberry pi has disadvantage of Ethernet attached via usb vs. the router vendors making the nic bound tighter to the chip with some minor hardware acceleration. But I use Pi's for many reasons including routers. I have a PineBook as my personal laptop.

The "router" web pages configures the files for the underlying kernel filters and other network tools which are also part of Linux just running in user space (like the routeD process), they don't need throughout/performance like kernel modules they need OS support as an app like memory management

So the kernel has got all that and the hardware side of the kernel trys to support every feature vendors throw at them and work together to support features like AWS VPC Enhanced Networking which configures the hardware to build a tighter data path from itself to your VM kernel space. All this is on the path to zero copy networking. That's the best we can hope for in routing

So realize there is a lot underneath a VPC network interface in your kernel, under that is where it gets fun

No comments: