# 手動建立veth pair

```
dpid="`docker inspect -f '{{.State.Pid}}' hello`"
echo $dpid

mkdir -p /var/run/netns
sudo ln -snf /proc/${dpid}/ns/net /var/run/netns/${dpid}
sudo ip link add q${dpid} type veth peer name r${dpid}
sudo ip link set q${dpid} master br0
sudo ip link set q${dpid} up
sudo ip link set r${dpid} netns ${dpid}
sudo ip netns exec ${dpid} ip link set dev r${dpid} name eth0
sudo ip netns exec ${dpid} ip link set eth0 up
sudo ip netns exec ${dpid} ip addr add 192.168.43.10/24 brd 192.168.43.255 dev eth0
sudo ip netns exec ${dpid} ip route add default via 192.168.43.1

```


---

# 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://kawsing.gitbook.io/opensystem/docker-cong-an-zhuang-dao-ying-yong-ru-men-pian/untitled-3.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.
