> For the complete documentation index, see [llms.txt](https://yeasy.gitbook.io/mininet_book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeasy.gitbook.io/mininet_book/basic_usage/network.md).

# 创建网络

Mininet 的操作十分简单，启动一个小型测试网络只需要下面几个步骤。 登录到虚拟机命令行界面，打开 wireshark，使其后台运行, 命令为 `sudo wireshark &`。

启动 Mininet，命令为`sudo mn`，则默认创建如下图所示的网络拓扑。

![默认网络拓扑](/files/-M5xU5LqIZP3-hBUC9xb)

经过短暂的等待即可进入以 `mininet>` 引导的命令行界面。 好了，从现在开始，我们就拥有了一个 1 台控制节点(controller)、一台交换(switch)、两台主机(host)的网络，并且用 wireshark 进行观测。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://yeasy.gitbook.io/mininet_book/basic_usage/network.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
