# 名字空间

默认情况下，主机节点有用独立的名字空间（namespace），而控制节点跟交换节点都在根名字空间（root namespace）中。

如果想要让所有节点拥有各自的名字空间，需要添加 `--innamespace` 参数，即启动方式为 `sudo mn --innamespace`。

注意：为了方便测试，在默认情况下，所有节点使用同一进程空间，因此，在 h2 跟 h3 或者 s1 上使用 `ps` 查看进程得到的结果是一致的，都是根名字空间中的进程信息。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/mininet_book/operation/namespace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
