1. 程式人生 > >11-高級路由:四種方法向EIGRP區域註入默認路由

11-高級路由:四種方法向EIGRP區域註入默認路由

vpd 並不是 sca 拓撲 images roc 通過 4.0 默認路由

一、實驗拓撲:
技術分享圖片
二、命令部署:
1、第一種:重分發靜態路由方式:
R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1 //為了回包

R1(config)#router eigrp 90
R1(config-router)#redistribute static

2、第二種:宣告默認路由方式:
R1(config)#ip route 0.0.0.0 0.0.0.0 f1/0
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#router eigrp 90
R1(config-router)#network 0.0.0.0

3、第三種:宣告主類網絡方式:
R1(config)#ip route 14.0.0.0 255.0.0.0 f1/0
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#ip default-network 14.0.0.0 這裏必須寫為主類網絡:14.0.0.0
R1(config)#ip route 14.0.0.0 255.0.0.0 f1/0 靜態路由必須是主類

R1(config)#router eigrp 90
R1(config-router)#network 14.0.0.0 0.0.0.255 必須宣告14.0.0.0

4、第四種:路由聚合(路由匯總)方式:匯總到 0.0.0.0 0.0.0.0

R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4
R4(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.1

R1(config)#int f0/0
R1(config-if)#ip summary-address eigrp 90 0.0.0.0 0.0.0.0

三、驗證:
1、第一種:重分發靜態
R2#show ip route //可以看到1條170的默認外部路由,因為是通過重分發引進來的,並不是EIGRP本身的路由條目
D*EX 0.0.0.0/0 [170/30720] via 12.1.1.1, 00:00:34, FastEthernet0/0
同理:R3和R2一樣的效果。

2、第二種:宣告默認路由方式:
R2#show ip route

D* 0.0.0.0/0 [90/30720] via 12.1.1.1, 00:00:26, FastEthernet0/0

3、第三種:宣告主類網絡方式:
R2#show ip route
D* 14.0.0.0/8 [90/30720] via 12.1.1.1, 00:00:33, FastEthernet0/0 此為默認路由

R2#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
UUUUU
結論:因為默認網關R1:沒有到4.4.4.4的路由條目,如無默認路由效果是:…..

R2#ping 14.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.1.1.4, timeout is 2 seconds:
.!!!!
結論:有14.1.1.1的默認路由
4、第四種:路由聚合(路由匯總)方式:匯總到 0.0.0.0 0.0.0.0
R2#show ip route
D* 0.0.0.0/0 [90/30720] via 12.1.1.1, 00:00:45, FastEthernet0/0
技術分享圖片

11-高級路由:四種方法向EIGRP區域註入默認路由