> For the complete documentation index, see [llms.txt](https://anida-huang.gitbook.io/computer-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anida-huang.gitbook.io/computer-network/qi-zhong/20201111-qi-zhong-zhou.md).

# 20201111 期中週

## 第一題

&#x20;**Static Routing**

![](/files/-MLoyXqAEQVd4JC98i6P)

{% tabs %}
{% tab title="R1" %}

```
int e0/0
```

```
ip add 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 45.1.1.1 255.255.255.0
```

```
no shut
```

```
int e0/2
```

```
ip add 192.168.1.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip route 192.168.2.0 255.255.255.0 e0/0 12.1.1.2
```

```
ip route 192.168.2.0 255.255.255.0 e0/1 45.1.1.3 10
```

![](/files/-MLp5mubH7nKM5xELPv-)
{% endtab %}

{% tab title="R2" %}

```
int e0/0
```

```
ip add 12.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/2
```

```
ip add 192.168.2.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip route 192.168.1.0 255.255.255.0 e0/0 12.1.1.1 10
```

```
ip route 192.168.1.0 255.255.255.0 e0/1 23.1.1.4
```

![](/files/-MLp506Bqr1ikckfxeai)
{% endtab %}

{% tab title="R3" %}

```
int e0/0
```

```
ip add 34.1.1.3 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 45.1.1.3 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip route 192.168.1.0 255.255.255.0 e0/1 45.1.1.1
```

![](/files/-MLp6dnAvzrwJQZ51OqP)
{% endtab %}

{% tab title="R4" %}

```
int e0/0
```

```
ip add 34.1.1.4 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.4 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip route 192.168.1.0 255.255.255.0 e0/0 34.1.1.3
```

![](/files/-MLp7HJ0IZoxiJeGDbHF)
{% endtab %}

{% tab title="VPC1" %}

```
ip 192.168.1.2 255.255.0.0
```

```
ping 192.168.2.2
```

![](/files/-MLp7nJTSMAww0I6N2c8)
{% endtab %}

{% tab title="VPC2" %}

```
ip 192.168.2.2 255.255.0.0
```

```
ping 192.168.1.2
```

![](/files/-MLp7tFHrRU9l37kK7JS)
{% endtab %}
{% endtabs %}

### 結果

![](/files/-MLp85YBuJdqj33HNYNE)

* H1-->H2

![](/files/-MLpB0Chzs7e8VgksB9w)

* H2-->H1

![](/files/-MLpAS2IscJe4VxaATH5)

## 第二題

**讓 h1、h2 透過 DHCP Server取得 IP 和相關資訊，h1 可 Ping h2**

![](/files/-MLoyjxijgTh-UuxNmhP)

{% tabs %}
{% tab title="R1" %}

```
int e0/0
```

```
ip addr 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip addr 192.168.1.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip dhcp pool DHCP
```

```
network 192.168.1.0 /24
```

```
default-router 192.168.1.1
```

```
dns-server 8.8.8.8
```

![](/files/-MLpCGSSKl1IyT_5BJcH)
{% endtab %}

{% tab title="R2" %}

```
int e0/0
```

```
ip addr 12.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip addr 192.168.2.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip dhcp pool DHCP2
```

```
network 192.168.2.0 /24
```

```
default-router 192.168.2.1
```

```
dns-server 8.8.8.8
```

![](/files/-MLpD1TXwxG6Xkx56bEd)
{% endtab %}

{% tab title="VPC1" %}

```
ip dhcp
```

```
ping 192.168.2.2
```

![](/files/-MLpEFAEgc7Ufq5CyEe1)
{% endtab %}

{% tab title="VPC2" %}

```
ip dhcp
```

```
ping 192.168.1.2
```

![](/files/-MLpENbyXUbMMZ1yrQ52)
{% endtab %}
{% endtabs %}

### 結果

![](/files/-MLpD8cUnwsb7IZ36E1M)

![](/files/-MLpEFAEgc7Ufq5CyEe1)

![](/files/-MLpEQ8Xsurp_Id9Bxx6)

## 第三題

**分別使用 RIP 和 EIGRP 讓 192.168.1.1 可 Ping 192.168.2.1**

![](/files/-MLoytt6mQDzYw1Dpb35)

> ### RIP

{% tabs %}
{% tab title="R1" %}

```
int e0/0
```

```
ip add 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int lo 0
```

```
ip add 192.168.1.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
router rip
```

```
ver 2
```

```
no auto-summary
```

```
network 12.1.1.0
```

```
network 23.1.1.0
```

```
network 192.168.1.0
```

```
do sh run
```

![](/files/-MLpJ5XG0yd0H9DDcvgg)

```
do ping 192.168.2.1
```

{% endtab %}

{% tab title="R2" %}

```
int e0/0
```

```
ip add 12.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.2 255.255.255.0
```

```
no shut
```

```
exit
```

```
router rip
```

```
ver 2
```

```
no auto-summary
```

```
network 12.1.1.0
```

```
network 23.1.1.0
```

```
do sh run
```

![](/files/-MLpKnKy-CCqFXpnzph8)
{% endtab %}

{% tab title="R3" %}

```
int e0/0
```

```
ip add 23.1.1.3 255.255.255.0
```

```
no shut
```

```
int lo 0
```

```
ip add 192.168.2.1 255.255.255.0
```

```
no shut
```

```
exit
```

```
router rip
```

```
ver 2
```

```
no auto-summary
```

```
network 12.1.1.0
```

```
network 23.1.1.0
```

```
network 192.168.2.0
```

```
do sh run
```

![](/files/-MLpLryYFmbIqXmeMuMc)
{% endtab %}
{% endtabs %}

> ### EIGRP

{% tabs %}
{% tab title="R1" %}

> #### IP

```
int e0/0
```

```
ip addr 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int lo 0
```

```
ip add 192.168.1.1 255.255.255.0
```

```
no shut
```

```
exit
```

> #### router

```
router eigrp 1
```

```
auto-summary
```

```
network 12.1.1.0 0.0.0.255
```

```
network 192.168.1.0 0.0.0.255
```

```
do sh ip ro eigrp
```

![](/files/-MLpYFcyP-1ZezkK6ata)
{% endtab %}

{% tab title="R2" %}

> #### IP

```
int e0/0
```

```
ip add 12.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.2 255.255.255.0
```

```
no shut
```

```
exit
```

> #### router

```
router eigrp 1
```

```
auto-summary
```

```
network 12.1.1.0 0.0.0.255
```

```
network 23.1.1.0 0.0.0.255
```

```
do sh ip ro eigrp
```

![](/files/-MLpZi-LExAd4ywbDIVi)
{% endtab %}

{% tab title="R3" %}

> #### IP

```
int e0/0
```

```
ip add 23.1.1.3 255.255.255.0
```

```
no shut
```

```
int lo 0
```

```
ip add 192.168.2.1 255.255.255.0
```

```
no shut
```

```
exit
```

> #### router

```
router eigrp 1
```

```
auto-summary
```

```
network 23.1.1.0 0.0.0.255
```

```
network 192.168.2.0 0.0.0.255
```

```
do sh ip ro eigrp
```

![](/files/-MLp_Wl_GxY4F3wkj3gl)
{% endtab %}
{% endtabs %}

### 結果

![](/files/-MLpTUeCOKf7Y9fiGwRv)

{% tabs %}
{% tab title="RIP" %}
![](/files/-MLpaif_n6YX3zlE3Izi)
{% endtab %}

{% tab title="EIGRP" %}
![](/files/-MLp_x2K88W2AYzCY4Hl)
{% endtab %}
{% endtabs %}

## 第四題

#### &#xD;**使用浮動路由，讓 R1 和 R2 斷線後：h1 --> R1 --> R3 --> R2 --> h2**

![](/files/-MLoz75JkNCLdgvvSD6N)

{% tabs %}
{% tab title="R1" %}

```
int e0/0
```

```
ip add 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 34.1.1.1 255.255.255.0
```

```
no shut
```

```
int e0/2
```

```
ip add 192.168.1.1 255.255.255.0
```

```
no shut
```

```
exit
```

![](/files/-MLph5EMluPPMStLlU9f)

```
ip route 192.168.2.0 255.255.255.0 e0/0 12.1.1.2
```

```
ip route 192.168.2.0 255.255.255.0 e0/1 34.1.1.3 10
```

![](/files/-MLqVcxW1COHHfCF1l-l)
{% endtab %}

{% tab title="R2" %}

```
int e0/0
```

```
ip add 12.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.2 255.255.255.0
```

```
no shut
```

```
int e0/2
```

```
ip add 192.168.2.1 255.255.255.0
```

```
no shut
```

```
exit
```

![](/files/-MLpibk9Z5xmAsm4v7B8)

```
ip route 192.168.1.0 255.255.255.0 e0/0 12.1.1.1
```

```
ip route 192.168.1.0 255.255.255.0 e0/1 23.1.1.2 10
```

![](/files/-MLqVweDSAMwJXgWikGD)
{% endtab %}

{% tab title="R3" %}

```
int e0/0
```

```
ip add 34.1.1.3 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 23.1.1.3 255.255.255.0
```

```
no shut
```

```
exit
```

![](/files/-MLpjUtnEZZwsVXJ7LMd)

```
ip route 192.168.1.0 255.255.255.0 e0/1 34.1.1.1
```

```
ip route 192.168.2.0 255.255.255.0 e0/1 23.1.1.2
```

![](/files/-MLqWyaWvABHJOScvAKO)
{% endtab %}

{% tab title="VPC1" %}

```
ip 192.168.1.2 255.255.0.0
```

```
ip 192.168.1.2 255.255.255.0 192.168.1.1
```

```
ping 192.168.2.2
```

{% endtab %}

{% tab title="VPC2" %}

```
ip 192.168.2.2 255.255.0.0
```

```
ip 192.168.2.2 255.255.255.0 192.168.2.1
```

```
ping 192.168.1.2
```

{% endtab %}
{% endtabs %}

### 結果

![](/files/-MLpfa0XomzCWbQKrUcE)

![](/files/-MLqnZvAAnapSzpo3jv-)

![](/files/-MLqnckBnV_QTTL4KPbe)


---

# 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://anida-huang.gitbook.io/computer-network/qi-zhong/20201111-qi-zhong-zhou.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.
