# 20201118 cisco EIGRP (二)

## 課堂資料

#### Enhanced Interior Gateway Routing Protocol  ( EIGRP ) 增強型內部網關路由協定：

{% embed url="https://www.jannet.hk/en/post/enhanced-interior-gateway-routing-protocol-eigrp/" %}

#### ACL 封包過濾表：

{% embed url="http://www.tsnien.idv.tw/Manager_WebBook/chap9/9-5%20%E5%B0%81%E5%8C%85%E9%81%8E%E6%BF%BE%E8%A1%A8%20%E2%80%93%20ACL.html" %}

### EIGRP Metric Caculation

**Metric = bandwidth ( slowest link ) - delay ( sum of delays ) - Delay ( in tens of microseconds , multiplied by 256 ) - Bandwidth = \[ (  10^7 / minimum bandwidth link along the path in kbps ) ] \* 256**

{% hint style="info" %}
Metric = k1 \* BW + \[ ( k2 \* BW / ( 256 - load ) ) + k3 \* delay ]

* k1 = 1
* k2 = 0
* k3 = 1
* k4 = k5 = 0
{% endhint %}

####

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MMO06cGgea27zvnrOLd%2F-MMO3OuLlemI6VNzfB1J%2FComputer%20Network%20-%20EIGRP.jpg?alt=media\&token=10397421-80c9-48d1-b010-82ba86ac049e)

| 路徑                        |                                  |                     |
| ------------------------- | -------------------------------- | ------------------- |
| A --> B --> C --> D       | least bw：64 kbps                 | total delay 6000 μs |
|                           | ( 10^7 / 64 + 6000 / 10 ) \* 256 |                     |
| A --> X --> Y --> Z --> D | least bw：256 kbps                | total delay 8000 μs |
|                           | ( 10^7 / 64 + 8000 / 10 ) \* 256 |                     |

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MMO06cGgea27zvnrOLd%2F-MMOBymB-LX2mwZyna9m%2FComputer%20Network%20-%20EIGRP%20\(2\).jpg?alt=media\&token=cac58212-c410-4b9e-b769-6abccfe7bf0b)

**不等價 負載均衡**

|   Network  | Neighbor |  FD |  AD |
| :--------: | :------: | :-: | :-: |
| 172.16.0.0 |     B    |  30 |  10 |
|            |     C    |  20 |  10 |
|            |     D    |  45 |  25 |

* Successor
* Feasible Successor：ADCFD

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MMO06cGgea27zvnrOLd%2F-MMOEjT1We65B94fmcwP%2FComputer%20Network%20-%20EIGRP%20\(3\).jpg?alt=media\&token=5b6f4141-c674-435a-8885-1343dd8d880a)

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MMO06cGgea27zvnrOLd%2F-MMOGb70R7sCqUftoFyj%2FComputer%20Network%20-%20EIGRP%20\(4\).jpg?alt=media\&token=a48c99ba-7e40-4f3e-82c3-baeab23bd807)

{% tabs %}
{% tab title="C" %}
| via |  FD |  AD |
| :-: | :-: | :-: |
|  B  |  3  |  1  |
|  D  |  4  |  2  |
|  E  |  4  |  3  |
{% endtab %}

{% tab title="D" %}
| via |  FD |  AD |
| :-: | :-: | :-: |
|  B  |  2  |  1  |
|  C  |  5  |  3  |
{% endtab %}
{% endtabs %}

### ACL

**Cisco 路由器 ACL 種類**

Cisco 路由器的存取控制清單有三種：

**(1)** **『標準存取控制清單』( Standard ACL)**：僅檢視 IP 封包中的來源位址(source address) ，來決定封包是否允許通過，編號由 1\~99, 1300\~1999。

**(2)** **『延伸式存取清單』(Extended ACL)**：可比對 IP 封包中的 IP 標頭與上一層(TCP、UDP、、)標頭內的多個欄位，屬於比較進階細膩的過濾條件。編號由 100 \~ 199、2000 \~ 2699。

**(3) 『名稱式存取清單』(Named ACL)**：是屬於前面兩種存取清單，但僅以名稱命名，也許這樣比較能了解該清單目的與功能。

## 課堂練習

### Metric

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwvuj5u7EHphVzFvNU%2Fimage.png?alt=media\&token=1694adfa-5655-42e1-9414-87d128f96b68)

{% tabs %}
{% tab title="R1" %}
```
int e0/0
```

```
ip add 192.168.12.1 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 192.168.12.0
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOx1RUzRsAqunUhvADt%2Fimage.png?alt=media\&token=9236bfcb-c1e8-4d77-9903-297d27a13724)

```
do sh ip eigrp topology
```

```
router eigrp 1
```

```
metric weights 0 5 2 1 10 1
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOx2EQop_KZrfkUivUZ%2Fimage.png?alt=media\&token=e59a5730-b71c-4c4e-85de-973996dfa8a6)
{% endtab %}

{% tab title="R2" %}
```
int e0/0
```

```
ip add 192.168.12.2 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip add 192.168.23.2 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 192.168.13.0
```

```
network 192.168.23.0
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwzhQ0Xz-NbqHjgGkz%2Fimage.png?alt=media\&token=9b7fb554-1583-4c61-8db8-48304f29cf01)

```
do sh ip eigrp topology
```

```
do sh int e0/0 | include BW
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOx2_U4nq6j53G0NyOS%2Fimage.png?alt=media\&token=83df2dcf-0b99-4e8a-b3ba-f4e005948f6f)
{% endtab %}

{% tab title="R3" %}
```
int e0/0
```

```
ip add 192.168.23.3 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 192.168.23.0
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwysTdXFj0Wj5Rqxda%2Fimage.png?alt=media\&token=fa37c783-cc66-4bdc-b858-091ac02a62b5)

```
int lo 0
```

```
ip add 192.168.34.3 255.255.255.0
```

```
no shut
```

```
do sh ip eigrp 1 topology
```

```
do sh int l0 | include BW
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOx3_kbU5jBrHgCYHUV%2Fimage.png?alt=media\&token=4cb21350-6a64-45b7-af96-18bf4b55ae9f)
{% endtab %}
{% endtabs %}

### Summarization

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwboA-Y_jNrBVO0lUm%2Fimage.png?alt=media\&token=c4820de9-b3e0-4d4c-ac23-6f2b87c15c6a)

{% tabs %}
{% tab title="R1" %}
```
int e0/0
```

```
ip addr 172.16.13.1 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 172.16.13.0 0.0.0.255
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwlwFzSN7W44iN_MPH%2Fimage.png?alt=media\&token=bc9d3096-fe0f-45bd-9cbd-dc3a063ebd6f)

```
do ping 172.16.34.4
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwsb4nBzfmrokQaFj1%2Fimage.png?alt=media\&token=711e1c7f-06fe-4760-893a-1cce63450d25)
{% endtab %}

{% tab title="R2" %}
```
int e0/0
```

```
ip addr 172.16.23.2 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 172.16.23.0 0.0.0.255
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwqPVq5iXIzqBuw8S8%2Fimage.png?alt=media\&token=e6243044-b858-4013-a0eb-e6a4a54329b2)
{% endtab %}

{% tab title="R3" %}
```
int e0/0
```

```
ip addr 172.16.13.3 255.255.255.0
```

```
no shut
```

```
int e0/1
```

```
ip addr 172.16.23.3 255.255.255.0
```

```
no shut
```

```
int e0/2
```

```
ip addr 172.16.34.3 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 172.16.13.0 0.0.0.255
```

```
network 172.16.23.0 0.0.0.255
```

```
network 172.16.34.0
```

```
no auto-summary
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwr8_geK4Z4lEL3hCB%2Fimage.png?alt=media\&token=df0679f7-5798-420d-abe1-d9a36ca2318a)

```
do sh ip ro | begin Gateway
```

```
int e0/2
```

```
ip summary-address eigrp 1 172.16.0.0 255.255.224.0
```

```
do sh ip ro | begin Gateway
```

```
no ip summary-address eigrp 1 172.16.0.0 255.255.224.0
```

```
router eigrp 1
```

```
auto-summary
```

```
do sh ip ro | begin Gateway
```

```
router eigrp 1
```

```
summary-metric 172.16.0.0 255.255.224.0 100 100 1 1 1 distance 50
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwrgBbfJVWGLoQDvL9%2Fimage.png?alt=media\&token=99390d99-806e-4d9d-b606-42b146b51438)
{% endtab %}

{% tab title="R4" %}
```
int e0/0
```

```
ip addr 172.16.34.4 255.255.255.0
```

```
no shut
```

```
router eigrp 1
```

```
network 172.16.34.0
```

```
no auto-summary
```

```
do sh ip ro
```

```
do sh ip ro | begin Gateway
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOtg6eKk9hVBDtOr26M%2F-MOwsLP-rEFKFxYWwDCG%2Fimage.png?alt=media\&token=8092a45e-7efe-497e-b433-abfe699dcdac)

```
do sh ip ro | begin Gateway
```
{% endtab %}
{% endtabs %}

### ACL ( Access Control )

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOx4eNBGkOa48ihIAoQ%2F-MOxIY0ha9o7YhIVrFnY%2Fimage.png?alt=media\&token=e5838fa3-1a4e-40f3-8d7d-7ae097585256)

{% tabs %}
{% tab title="R1" %}
```
int e0/0
```

```
ip add 12.1.1.1 255.255.255.0
```

```
no shut
```

```
int lo 0
```

```
ip add 1.1.1.1 255.255.255.0
```

```
no shut
```

```
do sh ip int brief
```

```
do ping 12.1.1.2 source 1.1.1.1
```

```
do ping 12.1.1.2 source 12.1.1.1
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOx4eNBGkOa48ihIAoQ%2F-MOxGK9c8LOI0QHArRYi%2Fimage.png?alt=media\&token=5a4c5400-cf3d-4e67-8808-eb79d8cdbeca)
{% endtab %}

{% tab title="R2" %}
```
int e0/0
```

```
ip add 12.1.1.2 255.255.255.0
```

```
no shut
```

```
exit
```

```
ip route 1.1.1.0 255.255.255.0 12.1.1.2
```

```
access-list 1 deny host 1.1.1.1
```

```
access-list 1 permit any
```

```
int e0/0
```

```
ip access-group 1 in
```

```
exit
```

```
no access-list 1
```

```
int e0/0
```

```
no ip access-group 1 in
```

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MOx4eNBGkOa48ihIAoQ%2F-MOxFaYO1bFWiGlqyioE%2Fimage.png?alt=media\&token=56eee673-7c34-4687-bab4-e8a740a4545e)
{% endtab %}
{% endtabs %}

### 實戰練習

![](https://1182807199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHJUVmIukmM2g9Ai7CY%2F-MMOW7dQmzQ1Wx1RT8Lf%2F-MMOWHzO5VjhmYiSAhpe%2FComputer%20Network%20-%20%E8%AA%B2%E5%A0%82%E7%B7%B4%E7%BF%92.jpg?alt=media\&token=9bb5171a-89ae-40a9-9ec6-f9dfd0ce6a8c)



