In this post, I will explain the use of Linux network namespace to implement basic networking constructs like a L2 switching network and Routed network.
Lets start by looking at the basic commands to create, delete and list network namespaces on Linux.
The next step is to create a LAN, we will use namespaces to simulate two nodes connected to a bridge and simulate a LAN inside the Linux host. We will implement a topology like the one shown below
Finally, let see how to simulate a router to connect two LAN segments. We will implement the simplest of the topology with just two nodes connected to a router on different LAN segments