EIGRP-1
一、EIGRP
的核心DUAL
扩散修正算法(弥散)
AD
:下一跳路由器到达目标的距离。
FD
:本地路由器到达目标的距离。
FD(min)
:是本地路由器到达目标的最短距离。
最佳路由。
Successor
:最佳路由的下一跳。(后继者)
FS
(
Feasible Successor
):用来对
S
进行备份。
注:如果要成为
FS
是需要满足
FC
(可行条件)。
FC = AD
(次佳路由)
< FD
(
min
)
1.
如果针对某个路由发起查询,那么此条路由会变成为
Active
状态。
2.
必须所有的查询均得到回复,才能够重新计算
Successor
,并且路由转变成
Passive
状态。
二、实验
一、
EIGRP
的路由汇总
1.
实验目的:
EIGRP
的基本配置
EIGRP
的汇总配置
2.
网络拓朴:
3.
环境搭建:
!---R1
enable
conf t
host R1
inter lo 0
ip add 10.1.0 .1 255.255.255.0
ip add 10.1.1 .1 255.255.255.0 secondary
ip add 10.1.2 .1 255.255.255.0 sec
ip add 10.1.3 .1 255.255.255.0 sec
inter s 1/1
ip add 172.16.1.1 255.255.255.252
no sh
exit
no ip do lo
line con 0
exec-t 0
logg s
exit
!---R2
enable
conf t
host R2
inter s 1/0
ip add 172.16.1.2 255.255.255.252
no sh
exit
inter s 1/1
ip add 172.16.1.5 255.255.255.252
no sh
exit
no ip do lo
line con 0
exec-t 0
logg s
exit
!---R3
enable
conf t
host R3
inter s 1/0
ip add 172.16.1.6 255.255.255.252
no sh
exit
inter lo 0
ip add 192.168.0.1 255.255.255.0
ip add 192.168.1.1 255.255.255.0 sec
ip add 192.168.2.1 255.255.255.0 sec
ip add 192.168.3.1 255.255.255.0 sec
inter s1/1
ip add 172.16.1.9 255.255.255.252
no sh
exit
no ip do lo
line con 0
exec-t 0
logg s
exit
!----R4
enable
conf t
host R4
inter s 1/0
ip add 172.16.1.10 255.255.255.252
no sh
exit
inter lo 0
ip add 10.1.16 .1 255.255.255.0
ip add 10.1.17 .1 255.255.255.0 sec
ip add 10.1.18 .1 255.255.255.0 sec
ip add 10.1.19 .1 255.255.255.0 sec
no ip do lo
line con 0
exec-t 0
logg s
exit
4.
进阶配置,
EIGRP
的路由汇总:
!---R1
conf t
router eigrp 50
network 172.16.1.1 0.0.0 .3
network 10.1.0 .0 0.0.0.255
network 10.1.1 .0 0.0.0.255
network 10.1.2 .0 0.0.0.255
network 10.1.3 .0 0.0.0.255
!---R2
conf t
router eigrp 50
network 172.16.1.2 0.0.0 .3
network 172.16.1.5 0.0.0 .3
!---R3
conf t
router eigrp 50
network 172.16.1.6 0.0.0 .3
network 172.16.1.9 0.0.0 .3
network 192.168.0.0 0.0.0 .255
network 192.168.1.0 0.0.0 .255
network 192.168.2.0 0.0.0 .255
network 192.168.3.0 0.0.0 .255
!---R4
conf t
router eigrp 50
network 172.16.1.10 0.0.0 .3
network 10.1.16 .0 0.0.0.255
network 10.1.17 .0 0.0.0.255
network 10.1.18 .0 0.0.0.255
network 10.1.19 .0 0.0.0.255
此时在
R2
上
show ip route
R2#show ip route
Gateway of last resort is not set
172.16.0.0/30 is subnetted, 3 subnets
D 172.16.1.8 [90/2681856] via 172.16.1.6, 00:13:04, Serial1/1
C 172.16.1.4 is directly connected, Serial1/1
C 172.16.1.0 is directly connected, Serial1/0
D 10.0.0 .0/8 [90/2297856] via 172.16.1.1, 00:09:27, Serial1/0
D 192.168.0.0/24 [90/2297856] via 172.16.1.6, 00:13:04, Serial1/1
D 192.168.1.0/24 [90/2297856] via 172.16.1.6, 00:13:04, Serial1/1
D 192.168.2.0/24 [90/2297856] via 172.16.1.6, 00:13:04, Serial1/1
D 192.168.3.0/24 [90/2297856] via 172.16.1.6, 00:13:04, Serial1/1
由此可以看出
EIGRP
对
10.0.0
.0
的网段进行了汇总,在
R2
上
ping 10.1.0 .1
能
ping
的通,而
ping 10.1.16.1
不通。因为此时当
EIGRP
收
10.1.0.1
和
10.1.16.1
的包时会查路由表匹配
10.0.0.0/8 [90/2297856] via 172.16.1.1, 00:09:27, Serial1/0,
选择最优路径下一跳到
R1
而不走
R3
,因此
10.1.0
.1
能
ping
通,而
10.1.16.1 ping
不通。
而当我们在
R4
上设置
router eigrp 10 no auto-summary
取消
R4
的
EIGRP
的自动汇总
之后,再看
R2
的路由表则变为:
R2#show ip route
Gateway of last resort is not set
172.16.0.0/30 is subnetted, 3 subnets
D 172.16.1.8 [90/2681856] via 172.16.1.6, 00:20:31, Serial1/1
C 172.16.1.4 is directly connected, Serial1/1
C 172.16.1.0 is directly connected, Serial1/0
10.0.0 .0/8 is variably subnetted, 5 subnets, 2 masks
D 10.0.0 .0/8 [90/2297856] via 172.16.1.1, 00:16:54, Serial1/0
D 10.1.19 .0/24 [90/2809856] via 172.16.1.6, 00:00:03, Serial1/1
D 10.1.18 .0/24 [90/2809856] via 172.16.1.6, 00:00:03, Serial1/1
D 10.1.17 .0/24 [90/2809856] via 172.16.1.6, 00:00:03, Serial1/1
D 10.1.16 .0/24 [90/2809856] via 172.16.1.6, 00:00:03, Serial1/1
D 192.168.0.0/24 [90/2297856] via 172.16.1.6, 00:20:31, Serial1/1
D 192.168.1.0/24 [90/2297856] via 172.16.1.6, 00:20:31, Serial1/1
D 192.168.2.0/24 [90/2297856] via 172.16.1.6, 00:20:31, Serial1/1
D 192.168.3.0/24 [90/2297856] via 172.16.1.6, 00:20:32, Serial1/1
这时候我们在
R2
上分别
ping 10.1.0 .1
和
ping 10.1.16.1
则都能通,如下:
R2#ping 10.1.0 .1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0 .1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/75/96 ms
R2#ping 10.1.16 .1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.16 .1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/166/240 ms
因为此时
EIGRP
不再对
R4
上的路由进行汇总,此时当
10.1.16
.1
的包到达
R2
后按照路由最长匹配的原则会选择
R3
作为下一跳,所以
10.1.16.1
也能通。
5.
在
R3
上手动对路由进行汇总,命令如下,此时产生的效果和
EIGRP
的自动汇动相同:
Interface serial 1/0
(注意:要在接口上配置)
ip summary-address eigrp 10 10.1.16 .0 255.255.252.0
R2#show ip route
Gateway of last resort is not set
172.16.0.0/30 is subnetted, 3 subnets
D 172.16.1.8 [90/2681856] via 172.16.1.6, 00:29:59, Serial1/1
C 172.16.1.4 is directly connected, Serial1/1
C 172.16.1.0 is directly connected, Serial1/0
10.0.0 .0/8 is subnetted, 1 subnets
D 10.0.0 .0 [90/2297856] via 172.16.1.1, 00:00:15, Serial1/0
D 192.168.0.0/24 [90/2297856] via 172.16.1.6, 00:29:59, Serial1/1
D 192.168.1.0/24 [90/2297856] via 172.16.1.6, 00:29:59, Serial1/1
D 192.168.2.0/24 [90/2297856] via 172.16.1.6, 00:29:59, Serial1/1
D 192.168.3.0/24 [90/2297856] via 172.16.1.6, 00:29:59, Serial1/1
三、实验总结:
1
.命令行
router eigrp 10
no auto-summary
show ip route
show ip eigrp neighbor
show ip eigrp topology [all-links]
2
.在
r3
上实施手工总结为
10.1.16
.0/22
子网
interface serial 1/0
ip summary-address eigrp 10 10.1.16 .0 255.255.252.0