# 建立HOST主機橋接網路

brctl addbr br0\
brctl addif br0 enp0s3\
ifconfig enp0s3 0.0.0.0\
dhclient br0

設定固定IP的 Bridge 網路

sudo cp /etc/netplan/50-cloud-init.yaml /etc/netplan/50-cloud-init.yamlbak

sudo vi /etc/netplan/50-cloud-init.yaml

```
network:
  version: 2
  renderer: networkd

  ethernets:
    enp0s3:
      dhcp4: false 
      dhcp6: false 
      #addresses: [192.168.1.239/24]
      #gateway4: 192.168.1.1
      #mtu: 1500
      #nameservers:
      #  addresses: [8.8.8.8]

  bridges:
    br0:
      interfaces: [enp0s3]
      addresses: [192.168.43.65/24]
      gateway4: 192.168.43.1
      mtu: 1500
      nameservers:
        addresses: [8.8.8.8]
      parameters:
        stp: true
        forward-delay: 4
      dhcp4: no
      dhcp6: no
```

接著我們可以把HOST機同往段的網路設定，使用pipework 加入 container


---

# 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/jian-li-zhu-ji-qiao-jie-wang-lu.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.
