Create Your Own Network Namespace

Create Your Own Network Namespace

This post will show you how to use the ip command to create and connect two network namespaces on different subnets, over veth interfaces.

If you have been working with container virtualization and orchestration software like Docker and Kubernetes, then you probably have heard of network namespace.

Recently, I started exploring the Linux [ip](https://linux.die.net/man/8/ip) command. In this post, I will show you how to use the command to connect processes in two different network namespaces, on different subnets, over a pair of [veth](https://man7.org/linux/man-pages/man4/veth.4.html) interfaces.

About Network Namespace

Container runtime uses the namespace kernel feature to partition system resources to achieve a form of process isolation, such that changes to the resources in one namespace do not affect that in other namespaces. Example of such resources include process IDs, hostnames, user IDs, file names, and network interfaces.

Network namespace, in particular, virtualizes the network stack. Each network namespace has its own set of resources like network interfaces, IP addresses, routing tables, tunnels, firewalls etc. For example, iptables rules added to a network namespace will only affect traffic entering and leaving that namespace.

namespaces network containers linux ip

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Create Your Own Network Namespace

This post will show you how to use the ip command to create and connect two network namespaces on different subnets, over veth interfaces.

Linux IP Command with Examples

The ip command is used to assign an address to a network interface and/or configure network interface parameters on Linux operating systems. This command replaces old good and now deprecated ifconfig command on modern Linux distributions. It is used for the following purposes

Hire Dedicated Linux Developer

Looking to develop real-time applications? **[Hire Dedicated Linux Developer](https://hourlydeveloper.io/hire-dedicated-linux-developer/ "Hire Dedicated Linux Developer")** from **[HourlyDeveloper.io](https://hourlydeveloper.io/...

How I Switched from Windows 10 to Linux Mint

This article is all about my journey on switching from Windows 10 to Linux Mint 20, how I got easily adapted to the Linux environment, and some resources that helped me to set up a perfect Desktop environment.

User Administration in Linux - Linux Tutorial - Linux Training

User Administration in Linux - Linux Tutorial - Linux Training