# eBPF - The Future of Networking & Security

URL:: https://cilium.io/blog/2020/11/10/ebpf-future-of-networking
Author:: cilium.io
## Highlights
> To really understand the shift, let's briefly look back at the history of networking. In the 90s, networking was almost entirely physical. Cables, perimeters, dial-up modems and a lot of Layer 2. Around the same time, in 1999, iptables was created for Linux and just shortly after, PF was released for BSD. Both projects focused on software-based firewalling. Early signs of a much larger movement later on: software-defined networking. This was the time I personally got involved in Linux networking.
> In the years 2003-2008, VLANs were first described, the first release of the Xen hypervisor happened, EMC acquired VMware, and KVM was merged into the Linux kernel. This was the start of the virtualization era but from a networking perspective, not much had changed. Networking of virtual machines was delegated to the underlying physical network by bridging VMs directly to the network. Almost no networking logic existed in software. During this early virtualization era, most of the Linux kernel networking focus was on the TCP/IP stack and optimizing the kernel as a system to run applications.
> It was the year 2009 when things got exciting from a software networking perspective. The first version of [Open vSwitch](https://www.openvswitch.org/) was released which brought us software-defined networking (SDN). It brought massive network programmability to the Linux kernel.
> This programmability aspect can still be found in eBPF-based networking today and is one of the corner stones. eBPF-based networking has its roots in SDN and evolves it by removing the device-centric model from the equation. ([View Highlight](https://read.readwise.io/read/01fsy20y48akcp36qscxfk8nb8))
> The Rise of Containers and Kubernetes ([View Highlight](https://read.readwise.io/read/01fsy211j2gxrfeftxx9b5zsy4))
> The year 2013 brought Docker. Docker primarily inherited the networking from the virtualization layers and containers were treated like miniature VMs from a networking perspective. The fundamental shift that Docker brought focused on application packaging with container images and not on the infrastructure side. Therefore, almost all of the early networking solutions for containers were inherited from OpenStack days. ([View Highlight](https://read.readwise.io/read/01fsy214k3mh6vkd343w5q7nz7))
> In 2014, the first commit to Kubernetes happened. Kubernetes was obviously not the first project to attempt translating high-level user intent into infrastructure automation, but Kubernetes made a deliberate decision to make a lot fewer assumptions in networking and security. For example, there is no concept of a network or subnet in Kubernetes. This led to an impressive cycle of innovations. ([View Highlight](https://read.readwise.io/read/01fsy21cs9f8ndw349ttr8hczq))
> The same year that Kubernetes started, eBPF was first merged into the Linux kernel as a successor to the long-standing packet filter BPF. Hence the name extended BPF or short: eBPF. One year later, the eBPF backend was merged into the LLVM compiler suite, allowing for LLVM to emit eBPF bytecode. In parallel, integration into the kernel's traffic control layer made Linux networking programmable with eBPF. ([View Highlight](https://read.readwise.io/read/01fsy21yf5hha16asqxes82whk))
> 2016, XDP was merged into the Linux kernel enabling a high-performance datapath by allowing eBPF programs to run directly in the driver of a network device. This is what later unlocked the development of eBPF-based high-performance load balancers driving some of the largest data centers today. ([View Highlight](https://read.readwise.io/read/01fsy223f3yfd4s1z0v9h1drtp))
> > As more and more enterprises adopt Kubernetes, the gamut of use cases is widening with new requirements around multi-cloud, security, visibility and scalability. In addition, new technologies such as service mesh and serverless demand more customization from the underlying Kubernetes layer. These new requirements all have something in common: they need a more programmable dataplane that can perform Kubernetes-aware packet manipulations without sacrificing performance.
> >
> > Enter Extended Berkeley Packet Filter (eBPF), a new Linux networking paradigm that exposes programmable hooks to the network stack inside the Linux kernel.
> >
> > -- Gobind Johar, Product Manager, Google Kubernetes Engine ([View Highlight](https://read.readwise.io/read/01fsy22hjccyf61r6jjdsbm561))
> Even more important, eBPF is not networking specific or tied to a particular domain. The generic nature of eBPF not only attracts a much bigger community to innovate, it also avoids making premature assumptions about what building blocks are required to solve future problems. This is a massive advantage over any networking specific programmability solution such as iptables, Open vSwitch, or nftables. ([View Highlight](https://read.readwise.io/read/01fsy230whykchmk5d1k5j0v64))
> Some of you may correctly state that programmability already existed in the form of user-space networking. The unique new aspect of eBPF's programmability is being embedded in the Linux kernel. Applications use system calls to interact via the network and the Linux kernel is responsible to handle these system calls. In order for a user-space networking framework to remain transparent to the application, it still has to traverse the socket layer of the Linux kernel. eBPF avoids this by remaining in the kernel altogether. ([View Highlight](https://read.readwise.io/read/01fsy23k71phbx2mgp3kdxc41j))
> The reason why this was not more important before is because with virtual machines, the hypervisor created a natural boundary between the network device of the metal machine and the sockets of the operator system inside the VM. With containers, this all happens in the same kernel. ([View Highlight](https://read.readwise.io/read/01fsy2405cw7tkkgwnsnjgg3qe))
> Cilium is an open source project that has been designed on top of eBPF to address the networking, security, and visibility requirements of container workloads. It provides a high-level abstraction on top of eBPF. Cilium is to eBPF what Kubernetes and container runtimes are to Linux kernel namespaces, cgroups, and seccomp. The right abstraction layer on top. ([View Highlight](https://read.readwise.io/read/01fsy24n03vwzdakfv76y0mv5x))
> **Network connectivity:** In its most basic form, Cilium is a CNI to provide network connectivity to Kubernetes workloads. The eBPF-based datapath features both IPv4 and IPv6 with the ability to support direct-routing, encapsulation/overlay topologies, as well as integration with cloud provider specific networking layers. ([View Highlight](https://read.readwise.io/read/01fsy24z99azr8wnyxvdqfcjsf))
---
Title: eBPF - The Future of Networking & Security
Author: cilium.io
Tags: readwise, articles
date: 2024-01-30
---
# eBPF - The Future of Networking & Security

URL:: https://cilium.io/blog/2020/11/10/ebpf-future-of-networking
Author:: cilium.io
## AI-Generated Summary
Today is an exciting day for the Cilium community: Isovalent, the company behind Cilium, is announcing its $29M Series A financing ro...
## Highlights
> To really understand the shift, let's briefly look back at the history of networking. In the 90s, networking was almost entirely physical. Cables, perimeters, dial-up modems and a lot of Layer 2. Around the same time, in 1999, iptables was created for Linux and just shortly after, PF was released for BSD. Both projects focused on software-based firewalling. Early signs of a much larger movement later on: software-defined networking. This was the time I personally got involved in Linux networking.
> In the years 2003-2008, VLANs were first described, the first release of the Xen hypervisor happened, EMC acquired VMware, and KVM was merged into the Linux kernel. This was the start of the virtualization era but from a networking perspective, not much had changed. Networking of virtual machines was delegated to the underlying physical network by bridging VMs directly to the network. Almost no networking logic existed in software. During this early virtualization era, most of the Linux kernel networking focus was on the TCP/IP stack and optimizing the kernel as a system to run applications.
> It was the year 2009 when things got exciting from a software networking perspective. The first version of [Open vSwitch](https://www.openvswitch.org/) was released which brought us software-defined networking (SDN). It brought massive network programmability to the Linux kernel.
> This programmability aspect can still be found in eBPF-based networking today and is one of the corner stones. eBPF-based networking has its roots in SDN and evolves it by removing the device-centric model from the equation. ([View Highlight](https://read.readwise.io/read/01fsy20y48akcp36qscxfk8nb8))
> The Rise of Containers and Kubernetes ([View Highlight](https://read.readwise.io/read/01fsy211j2gxrfeftxx9b5zsy4))
> The year 2013 brought Docker. Docker primarily inherited the networking from the virtualization layers and containers were treated like miniature VMs from a networking perspective. The fundamental shift that Docker brought focused on application packaging with container images and not on the infrastructure side. Therefore, almost all of the early networking solutions for containers were inherited from OpenStack days. ([View Highlight](https://read.readwise.io/read/01fsy214k3mh6vkd343w5q7nz7))
> In 2014, the first commit to Kubernetes happened. Kubernetes was obviously not the first project to attempt translating high-level user intent into infrastructure automation, but Kubernetes made a deliberate decision to make a lot fewer assumptions in networking and security. For example, there is no concept of a network or subnet in Kubernetes. This led to an impressive cycle of innovations. ([View Highlight](https://read.readwise.io/read/01fsy21cs9f8ndw349ttr8hczq))
> The same year that Kubernetes started, eBPF was first merged into the Linux kernel as a successor to the long-standing packet filter BPF. Hence the name extended BPF or short: eBPF. One year later, the eBPF backend was merged into the LLVM compiler suite, allowing for LLVM to emit eBPF bytecode. In parallel, integration into the kernel's traffic control layer made Linux networking programmable with eBPF. ([View Highlight](https://read.readwise.io/read/01fsy21yf5hha16asqxes82whk))
> 2016, XDP was merged into the Linux kernel enabling a high-performance datapath by allowing eBPF programs to run directly in the driver of a network device. This is what later unlocked the development of eBPF-based high-performance load balancers driving some of the largest data centers today. ([View Highlight](https://read.readwise.io/read/01fsy223f3yfd4s1z0v9h1drtp))
> > As more and more enterprises adopt Kubernetes, the gamut of use cases is widening with new requirements around multi-cloud, security, visibility and scalability. In addition, new technologies such as service mesh and serverless demand more customization from the underlying Kubernetes layer. These new requirements all have something in common: they need a more programmable dataplane that can perform Kubernetes-aware packet manipulations without sacrificing performance.
> >
> > Enter Extended Berkeley Packet Filter (eBPF), a new Linux networking paradigm that exposes programmable hooks to the network stack inside the Linux kernel.
> >
> > -- Gobind Johar, Product Manager, Google Kubernetes Engine ([View Highlight](https://read.readwise.io/read/01fsy22hjccyf61r6jjdsbm561))
> Even more important, eBPF is not networking specific or tied to a particular domain. The generic nature of eBPF not only attracts a much bigger community to innovate, it also avoids making premature assumptions about what building blocks are required to solve future problems. This is a massive advantage over any networking specific programmability solution such as iptables, Open vSwitch, or nftables. ([View Highlight](https://read.readwise.io/read/01fsy230whykchmk5d1k5j0v64))
> Some of you may correctly state that programmability already existed in the form of user-space networking. The unique new aspect of eBPF's programmability is being embedded in the Linux kernel. Applications use system calls to interact via the network and the Linux kernel is responsible to handle these system calls. In order for a user-space networking framework to remain transparent to the application, it still has to traverse the socket layer of the Linux kernel. eBPF avoids this by remaining in the kernel altogether. ([View Highlight](https://read.readwise.io/read/01fsy23k71phbx2mgp3kdxc41j))
> The reason why this was not more important before is because with virtual machines, the hypervisor created a natural boundary between the network device of the metal machine and the sockets of the operator system inside the VM. With containers, this all happens in the same kernel. ([View Highlight](https://read.readwise.io/read/01fsy2405cw7tkkgwnsnjgg3qe))
> Cilium is an open source project that has been designed on top of eBPF to address the networking, security, and visibility requirements of container workloads. It provides a high-level abstraction on top of eBPF. Cilium is to eBPF what Kubernetes and container runtimes are to Linux kernel namespaces, cgroups, and seccomp. The right abstraction layer on top. ([View Highlight](https://read.readwise.io/read/01fsy24n03vwzdakfv76y0mv5x))
> **Network connectivity:** In its most basic form, Cilium is a CNI to provide network connectivity to Kubernetes workloads. The eBPF-based datapath features both IPv4 and IPv6 with the ability to support direct-routing, encapsulation/overlay topologies, as well as integration with cloud provider specific networking layers. ([View Highlight](https://read.readwise.io/read/01fsy24z99azr8wnyxvdqfcjsf))