Skip to content

RJ-DP/Networking-keyword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Networking-keyword

1. TUN (Network TUNnel)

Type:

Virtual network interface (Layer 3)

Works on:

IP packets (Layer 3)

Purpose:

Used for routing packets between user space and kernel space.

Example use:

VPNs (like OpenVPN or WireGuard) use TUN interfaces to route IP traffic from user applications through encrypted tunnels.

How it works:

A TUN device appears like a network interface.

When an app writes to the TUN device, the data goes into the kernel as if it came from a real network card.

When the kernel writes to TUN, the data goes back to the user-space app.

2. TAP

Type:

Virtual network interface (Layer 2)

Works on:

Ethernet frames (Layer 2)

Purpose:

Used for virtual Ethernet bridging.

Example use:

Virtual machines or containers that need full Ethernet access use TAP devices.

Difference between TUN and TAP:

Feature TUN TAP

Layer 3 (IP) 2 (Ethernet) Data IP packets Ethernet frames Use Routing (VPNs) Bridging (VMs, containers)

3. OBS (Open vSwitch Bridge)

Full form:

Open vSwitch (OVS)

Type:

Virtual switch

Purpose:

Connects multiple virtual interfaces (like TAPs, containers, or VMs) together, allowing advanced network control (bridging, VLANs, tunneling).

Used in:

Data centers, Kubernetes (as part of OVN, SDN setups), cloud environments.

Key features:

Supports VXLAN, GRE, Geneve tunnels.

Has flow rules for routing/filtering traffic (like a programmable switch).

Can operate in kernel or user space for performance.

3. OBS (Open vSwitch Bridge)

Full form:

Open vSwitch (OVS)

Type:

Virtual switch

Purpose:

Connects multiple virtual interfaces (like TAPs, containers, or VMs) together, allowing advanced network control (bridging, VLANs, tunneling).

Used in:

Data centers, Kubernetes (as part of OVN, SDN setups), cloud environments.

Key features:

Supports VXLAN, GRE, Geneve tunnels.

Has flow rules for routing/filtering traffic (like a programmable switch).

Can operate in kernel or user space for performance.

5. CNI (Container Network Interface) + Flannel

CNI: A standard interface for container networking plugins in Kubernetes.

Defines how containers should get IPs, connect to other containers, etc.

Flannel:

One of the CNI plugins developed by CoreOS.

It provides an overlay network for Kubernetes pods.

It can use VXLAN or other backends (like host-gw, UDP).

How Flannel works:

Each Kubernetes node gets a subnet (like 10.244.1.0/24).

Flannel uses VXLAN tunnels to connect these subnets across nodes.

So pod traffic can flow between nodes over an overlay network. 6. Zero Copy

Meaning: Avoiding unnecessary copying of data between user space and kernel space.

Goal: Improve performance by reducing CPU and memory usage.

Used in: High-performance networking, file transfers, databases.

Example: Normally, when an app sends data, it’s copied:

user buffer → kernel buffer → network card

With zero-copy techniques (e.g., sendfile()), data moves directly from disk to NIC:

disk → network card

No copying to user-space → faster and more efficient.

6. Zero Copy

Meaning:

Avoiding unnecessary copying of data between user space and kernel space.

Goal:

Improve performance by reducing CPU and memory usage.

Used in:

High-performance networking, file transfers, databases.

Example:

Normally, when an app sends data, it’s copied:

user buffer → kernel buffer → network card

With zero-copy techniques (e.g., sendfile()), data moves directly from disk to NIC:

disk → network card

No copying to user-space → faster and more efficient.

7. User Space to Kernel Space

User Space:

Where normal apps run (like browsers, Docker daemon).

Kernel Space:

Core part of OS (drivers, scheduler, networking stack).

Why this matters:

Every time data moves from user → kernel or back, it takes time (context switch + copy).

Networking systems (like DPDK, eBPF, or zero-copy sockets) try to minimize these transitions to speed up communication.

8. Overlay Networks

Definition:

A virtual network built on top of another physical network.

Purpose:

To connect distributed systems (like containers or VMs) seamlessly across hosts.

Common technologies:

VXLAN, GRE, Geneve.

Example in Kubernetes:

Pods on Node A and Node B have private IPs, but they communicate using VXLAN (an overlay) over the physical network. To them, it feels like they’re on the same LAN.

Summary — How All These Connect

Concept Role in System

TUN/TAP Virtual interfaces that move traffic between user and kernel space. OVS (OBS) Virtual switch connecting VMs or containers and handling advanced

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published