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

# 20191022

{% embed url="<https://www.jannet.hk/zh-Hant/post/generic-routing-encapsulation-gre/>" %}

![](/files/-LrmU7Y_czXTz63hgAaq)

```
R1 ip設定:
int lo 1
ip addr 192.168.1.1 255.255.255.0
no shut
int e0/0
ip addr 10.0.14.1 255.255.255.0
no shut
R2 ip設定:
int lo 1
ip addr 192.168.2.2 255.255.255.0
no shut
int e0/0
ip addr 10.0.24.2 255.255.255.0
no shut
R4 ip設定:
int e0/0
ip addr 10.0.14.4 255.255.255.0
no shut
int e0/1
ip addr 10.0.24.4 255.255.255.0
no shut
R1 ping R4-R1的bridge確認是否有成功，可以發現成功。
do ping 10.0.14.4
而R1在去 ping R4-R2的bridge發現無法ping 的情況。
do ping 10.0.24.4
會發現R1沒有新增路由表往R4-R2的bridge ip，所以我們增加:
ip route 0.0.0.0 0.0.0.0 10.0.14.4
do ping 10.0.24.4
這時就會成功了。
R1在去ping 10.0.24.2會發現無法ping，原因是因為R2的路由表沒有R1的ip，所以在R2去做:
ip route 0.0.0.0 0.0.0.0 10.0.24.4
do ping 10.0.14.4
成功。
```

```
R1 ping R2的部分
R1:
do ping 192.168.2.2 source 192.168.1.1
此時發現ping不過去，請做:
R1:
int tunnel 12 
ip addr 172.16.12.1 255.255.255.0
tunnel source 10.0.14.1
tunnel destination 10.0.24.2
R2:
int tunnel 12
ip addr 172.16.12.2 255.255.255.0
tunnel source 10.0.24.2
tunnel destination 10.0.14.1
R1:
do ping 192.168.2.2 source 192.168.1.1 (不成功)
do ping 172.16.12.2 source 172.16.12.1 (成功)
上面ping不成功的部分是因為R1路由表沒有對方的ip，因此:
ip route 192.168.2.0 255.255.255.0 172.16.12.2
R2也要增設:
ip route 192.168.1.0 255.255.255.0 172.16.12.1
再去做do ping 就可以成功。(R1-R2)
```

![](/files/-LrmTfSD6P5UJfFo1PW-)

![](/files/-LrmUkrvlXs484ff8cZl)

```
增設R1-R3與上述R1-R2作法相同。
R2-R3
```


---

# 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:

```
GET https://cf337188.gitbook.io/01/20191022.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.
