# 20190417

參考資料:

{% embed url="<http://blog.maxkit.com.tw/2016/05/lvs-lvs-natlvs-tunlvs-dr.html>" %}

{% embed url="<https://blog.51cto.com/lansgg/1229421>" %}

原理:

![](/files/-LdDRmuAs72GHcvLMI5G)

首先需要架設三台虛擬機

ip分別為56.101;56.102;56.103

選擇一台為監控端(56.101)

剩下兩台作為控制端

控制端的部分:

```
# yum install -y httpd
```

```
# cd /var/www/html
```

```
# echo "web1" > index.html
# echo "web2" > index.html
```

完成這邊後檢查httpd有沒有正常啟動

```
# service httpd start
```

檢查防火牆是否關閉

```
# systemctl stop firewalld
```

監控端的部分:

```
# yum install -y ipvsadm
```


---

# 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://cf337188.gitbook.io/01/20190417.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.
