<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kernel on BrainBit Latest Articles</title><link>https://brainbit.uk/tags/kernel/</link><description>Recent content in Kernel on BrainBit Latest Articles</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 10 Jun 2017 13:04:39 +0000</lastBuildDate><atom:link href="https://brainbit.uk/tags/kernel/index.xml" rel="self" type="application/rss+xml"/><item><title>Let’s look inside the LoopBack</title><link>https://brainbit.uk/posts/lets-look-inside-the-loopback/</link><pubDate>Sat, 10 Jun 2017 13:04:39 +0000</pubDate><guid>https://brainbit.uk/posts/lets-look-inside-the-loopback/</guid><description>Hi guys , i just wanted to take a look inside special devices in the linux kernel , especially the loopback .
It’s a virtual device that comes with the network stack, as we talked in previous articles (https://medium.com/@garciaj.uk/the-network-stack-153c92e35b26) the network stack refers to “struct net” . To recap every time we create a new network namespace we are instantiating a struct net .
(include/net/net_namespace.h)
So that’s the first step , the second step is that the loopback device is implemented as a driver as far as i can see , so most of its methods are implemented in https://github.</description></item><item><title>From user-land up to the stack</title><link>https://brainbit.uk/posts/from-userland-up-to-the-stack/</link><pubDate>Thu, 08 Jun 2017 15:13:54 +0000</pubDate><guid>https://brainbit.uk/posts/from-userland-up-to-the-stack/</guid><description>In the previous story we seen what the network stack really represent and how is built up in the kernel , the interesting question would be to see how does this work from user-land.
The real question would be: How is it that i see only the namespace’s interfaces when i do ifconfig from within a namespace???
Let me illustrate it
Root Namespace
(We get the loopback to eths and a veth pair)</description></item><item><title>The Network Stack</title><link>https://brainbit.uk/posts/network-stack/</link><pubDate>Wed, 07 Jun 2017 09:27:43 +0000</pubDate><guid>https://brainbit.uk/posts/network-stack/</guid><description>If you’ve been reading articles/books about Linux namespaces you might have come across with variances of this statement “each network namespace has it’s own network stack” .
If you seen this before you might have wondered what does it really mean? it seems something very abstract , like one would guess that then a namespace would have it’s own and isolated “methods/functions” to manage network connections coming in and out ?</description></item><item><title>Routing to namespaces</title><link>https://brainbit.uk/posts/routing-to-namespaces/</link><pubDate>Tue, 06 Jun 2017 09:35:26 +0000</pubDate><guid>https://brainbit.uk/posts/routing-to-namespaces/</guid><description>I was interested to know how a buffer (skb) is “routed” to a specific namespace or process .
Simple as that , i want to know the mechanism in which userland tells the kernel to send data to a specific namespace /interface.
So what i’ve found is that the kernel has a specific interface created around 2.4 that is specific for this use . AF_NETLINK , you might find it familiar to AF_UNIX or AF_INET , and it is cause it is built on top of bsd sockets architecture , so it uses methods such as bind() listen() accept() etc.</description></item><item><title>Tcpdump inner works #1</title><link>https://brainbit.uk/posts/tcpdump-inner-works-sharp/</link><pubDate>Thu, 24 Nov 2016 09:27:49 +0000</pubDate><guid>https://brainbit.uk/posts/tcpdump-inner-works-sharp/</guid><description>I use tcpdump a lot , we all do , but if someone tells you to explain how it works what would you say?
Well we know that tcpdump applies a number of rules (if told) to filter traffic before the kernel(iptables or similar) drops it , that’s why if you do something like
tcpdump -i any dst port 21 and you start some connections against port 21 you will see traffic even tho you might not have port 21 bound by any process (some ftp server or what not).</description></item><item><title>Containers but not Docker</title><link>https://brainbit.uk/posts/containers-but-not-docker/</link><pubDate>Mon, 21 Nov 2016 20:47:08 +0000</pubDate><guid>https://brainbit.uk/posts/containers-but-not-docker/</guid><description>I’m not docker’s biggest fan , but i do see its benefits , although i think somehow it has managed to sort of hide what docker really is and what it really does, but this post isn’t about docker , but about namespaces.
Docker/lxc use a kernel feature that , in simplest terms , allows a process to have isolation a multiple levels (pids / fs / hostnames / etc)</description></item></channel></rss>