-
First, we use the ip netns add command to create two new network namespaces named netns1 and netns2. This creates two isolated network environments that you are then able to attach interfaces, routes, and so on to, that are separate from the host. The command itself binds a handle (basically a reference) to a new network namespace. This creates a namespace file in /var/run/netns/ so that you can reference that namespace later.
-
Next, we use a command to verify that we've indeed created these namespaces. This command probably just inspects the /var/run/netns/ directory and displays the names of the namespaces.