上篇文章写了EIGRP的基本概念,消息数据包和三张表等,本篇写EIGRP的特性


文章目录

  • 一、hello time 和 hold time
  • <1> 修改hello time
  • <2> 修改hold time
  • <3> 结论
  • 二、路由认证
  • 三、AD值(控制选路)
  • 四、K值
  • 五、带宽和延时(影响选路)
  • <1> 修改延时
  • <2> 修改带宽
  • 六、偏移列表
  • 七、被动接口,单播邻居
  • 八、汇总
  • 九、缺省路由
  • 十、末节路由器
  • 十一、非等开销负载均衡



bgp keepalive时间 bgp的holdtime作用_EIGRP


R1的s1/0连接R2的s1/1,R2的s1/0连接R3的s1/1

一、hello time 和 hold time

<1> 修改hello time

1.查看eigrp的hello time(基于接口)

R1#sho ip eigrp interfaces detail s1/0
IP-EIGRP interfaces for process 100

                        Xmit Queue   Mean   Pacing Time   Multicast    Pending
Interface        Peers  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Se1/0              1        0/0        18       0/15          87           0
  Hello interval is 5 sec	//hello时间5s,省略多于信息

2.修改R1的s1/0口hello time为10s

R1(config)#int s1/0
R1(config-if)#ip hello-interval eigrp 100 10
R1(config-if)#do sho ip ei int de s1/0
IP-EIGRP interfaces for process 100

                        Xmit Queue   Mean   Pacing Time   Multicast    Pending
Interface        Peers  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Se1/0              1        0/0        18       0/15          87           0
  Hello interval is 10 sec	//hello时间变成10s,省略多于信息

此时在R2上查看邻居关系

R2#sho ip eigrp neighbors 
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.2                Se1/0             12 01:03:56   16   200  0  3
0   12.1.1.1                Se1/1              5 01:04:21   20   200  0  3
R2#sho ip eigrp neighbors 
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.2                Se1/0             11 01:03:57   16   200  0  3
0   12.1.1.1                Se1/1             14 01:04:21   20   200  0  3

发现hold time从15降到5又返回了15,说明R1给R2每10s发送一次hello包
结论:修改hello time
-并没有影响邻居关系的建立
-并没有影响hold time的改变(还是15秒),因为hello包中只有hold time的值,并没有hello time的值
-只影响了自己发送hello包的频率(由5秒一发变为10秒一发)
3.将R1路由器的S1/0口hello time重新改回默认值5s

R1(config-if)#ip hello-interval eigrp 100 5

<2> 修改hold time

1.修改R1的s1/0口的hold time 为20s

R1(config)#int s1/0
R1(config-if)#ip hold-time eigrp 100 20

此时查看R2的邻居关系

R2#sho ip eigrp neighbors 
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.2                Se1/0             13 01:17:42   16   200  0  3
0   12.1.1.1                Se1/1             15 01:18:07   20   200  0  3
R2#sho ip eigrp neighbors 
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.1.1.2                Se1/0             12 01:17:43   16   200  0  3
0   12.1.1.1                Se1/1             19 01:18:07   20   200  0  3

发现hold time从20降到15,又重新回到20
结论:修改hold time
-不影响邻居关系的建立
-影响对方,告诉对方我要是20s都没发送hello包就和我down掉邻居关系
2.将R1路由器的S1/0口hold time重新改回默认值15s

R1(config-if)#ip hold-time eigrp 100 15

<3> 结论

1.修改hello time和hold time 都不影响邻居关系的建立
2.修改hello time只影响自己发送hello包的频率
3.修改hlod time影响对方,告诉对方要是过了hold time 的时间,就和我down掉邻居关系。因为hello包中携带了hold time的字段,是给对方看的

二、路由认证

eigrp中路由认证只支持md5,因此key id和key string要全部保持一致
在R1和R2之间启用认证
在R1上

R1(config)#key chain ccna
R1(config-keychain)#key 1 //key id
R1(config-keychain-key)#key-string cisco
R1(config-keychain-key)#int s1/0
R1(config-if)#ip authentication mode eigrp 100 md5 
*Dec 12 17:55:08.471: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.2 (Serial1/0) is down: authentication mode changed
R1(config-if)#ip authentication key-chain eigrp 100 ccna

注意,启用md5认证之后邻居关系立即down
在R2上

R2(config)#key chain ccnp
R2(config-keychain)#key 1
R2(config-keychain-key)#key-string cisco
R2(config-keychain-key)#int s1/1
R2(config-if)#ip authentication mode eigrp 100 md5 
R2(config-if)#ip authentication key-chain eigrp 100 ccnp
*Dec 12 17:58:36.103: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial1/1) is up: new adjacency

两边都做了路由认证之后邻居关系恢复

三、AD值(控制选路)

eigrp有三个AD值,eigrp协议中学习到的路由AD值为90,重发布进来的其他路由AD值为170,本台路由器自己汇总的eigrp路由AD值为5
1.将内部路由AD值改为100,将重发布进来的路由AD值修改为200
在R3上重发布直连,使用lo1的100.1.1.0/24

R3(config)#int lo1
R3(config-if)#ip address 100.1.1.1 255.255.255.0
R3(config-if)#exi
R3(config)#router eigrp 100
R3(config-router)#redistribute connected

此时R2的路由表

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 01:12:26, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [170/2297856] via 23.1.1.2, 00:00:09, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 23.1.1.2, 02:51:49, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:57:05, Serial1/1

D 表示内部路由,D EX表示重发布的路由
在R2上修改AD值

R2(config)#router eigrp 100
R2(config-router)#distance eigrp 100 200

再次查看R2路由表

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [100/2297856] via 12.1.1.1, 00:00:52, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [200/2297856] via 23.1.1.2, 00:00:52, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [100/2297856] via 23.1.1.2, 00:00:52, Serial1/0
D    200.1.0.0/22 [100/2297856] via 12.1.1.1, 00:00:52, Serial1/1

看到,内部路由AD值被修改为100,重发布的路由AD值被修改为200,修改此AD值仅影响自己,即本地生效,不会传播给其他路由器。
2.只将R3发来的路由AD值改为99

R2(config)#router eigrp 100
R2(config-router)#distance 99 23.1.1.2 0.0.0.0

再次查看R2的路由表

R2#sho ip route ei  
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [100/2297856] via 12.1.1.1, 00:00:28, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [200/2297856] via 23.1.1.2, 00:00:26, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [99/2297856] via 23.1.1.2, 00:00:26, Serial1/0
D    200.1.0.0/22 [100/2297856] via 12.1.1.1, 00:00:28, Serial1/1

注意:
1.可以看到R3传递过来的3.3.3.0/24这条路由AD值被修改为99
2.但注意,100.1.1.0/24也是R3传递过来的,AD值却没有被修改,这是因为,这种针对某一更新源修改其路由AD值的方法,仅对内部路由生效,对重发布的路由不生效。
3.以上在R2上,同时做了针对所有内部路由AD值改为100,以及只针对R3传递来的路由AD只改为99,这时以更精细的控制为准,也就是说,针对3.3.3.0/24这条路由,AD值改为99是更精确的操作,因此他的AD值为99

四、K值

建立邻居时双方k值必须相等,默认k值为10100

R2#sho ip protocols 
Routing Protocol is "eigrp 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Incoming routes in Serial1/0 will have 1056000 added to metric if on list 10
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

修改k值

R2(config)#router eigrp 100
R2(config-router)#metric weights ? //第一个值为TOS
  <0-8>  Type Of Service (Only TOS 0 supported)

R2(config-router)#metric weights 0 ? 
  <0-255>  K1

R2(config-router)#metric weights 0 1 0 1 0 1  //修改k值为10101
R2(config-router)#
*Dec 12 20:10:44.139: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial1/1) is down: metric changed
*Dec 12 20:10:44.139: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.2 (Serial1/0) is down: metric changed
R2(config-router)#metric weights 0 1 0 1 0 1
*Dec 12 20:10:45.983: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial1/1) is down: K-value mismatch
R2(config-router)#metric weights 0 1 0 1 0  
*Dec 12 20:10:47.507: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.2 (Serial1/0) is down: K-value mismatch
R2(config-router)#metric weights 0 1 0 1 0 0
R2(config-router)#
*Dec 12 20:10:50.287: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial1/1) is down: Interface Goodbye received
R2(config-router)#
*Dec 12 20:10:52.267: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.1.1.2 (Serial1/0) is up: new adjacency
R2(config-router)#
*Dec 12 20:10:54.891: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.1.1.1 (Serial1/1) is up: new adjacency

当修改k值后,邻居关系down掉并提示k值不匹配,当修改回来后,邻居关系重新建立。

五、带宽和延时(影响选路)

<1> 修改延时

查看R2路由表

R2#sho ip route eigrp          
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:13:22, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [170/2297856] via 23.1.1.2, 00:13:21, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 23.1.1.2, 00:13:21, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:13:22, Serial1/1

R3传递过来的路由,整条路径为R2的s1/0口到R3的环回接口
则metric=(10^7/1544+(20000+5000)/10)*256=2297856
将R2的s1/0口延时修改为10000

R2(config)#int s1/0
R2(config-if)#delay ?
  <1-16777215>  Throughput delay (tens of microseconds) //单位为10us
R2(config-if)#delay 1000

此时R2路由表

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:18:31, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [170/2041856] via 23.1.1.2, 00:00:37, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2041856] via 23.1.1.2, 00:00:38, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:18:31, Serial1/1

metric=(10^7/1544+(10000+5000)/10)*256=2041856
即修改延时会改变metric值,会影响选路。

<2> 修改带宽

将R2的s1/0口带宽修改为1M,原来为1.544M

R2(config)#int s1/0
R2(config-if)#bandwidth 1000

查看R2的路由表

R2#sho ip route ei
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:22:17, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [170/2944000] via 23.1.1.2, 00:00:03, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2944000] via 23.1.1.2, 00:00:03, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:22:17, Serial1/1

metric=(10^7/1000+(10000+5000)/10)*256=2944000
即修改带宽会改变metric值,会影响选路。
注:
修改带宽和延时影响选路的方法并不合适
1.在串行链路中,修改带宽不会影响接口的实际带宽,在以太网链路中,修改带宽即修改实际带宽。
2.ospf中cost值的计算也参考了带宽,若修改带宽来控制eigrp的选路,那么还影响了ospf的选路,造成混乱。
所以我们引入了偏移列表来增加metric值影响选路

六、偏移列表

所以我们引入了偏移列表来增加metric值影响选路,metric只能增加,不能减小
若要将上述3.3.3.0这条路由的metric值从2944000增加到4000000,则
1.先计算需要增加的metric=4000000-2944000=1056000
2.使用acl抓取这条路由

R2(config)#access-list 10 permit 3.3.3.0

3.在R2路由器的in方向设置偏移列表

R2(config)#router eigrp 100
R2(config-router)#offset-list 10 in 1056000 s1/0

再次查看R2的路由表

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:36:42, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D EX    100.1.1.0 [170/2944000] via 23.1.1.2, 00:00:13, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/4000000] via 23.1.1.2, 00:00:03, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:36:42, Serial1/1

可以看到针对3.3.3.0/24者条路由metric值被修改为4000000

七、被动接口,单播邻居

注:被动接口不能部署在建立邻居的接口上
rip中做了被动接口,抑制组播消息的发送,不影响单播消息的发送,可以接收
eigrp中做了被动接口,则不能以任何方式向外发送消息,可以接收
rip中做单播邻居,不影响组播消息的发送
eigrp中做单播邻居,会抑制组播消息的发送
可以在环回接口和接入主机的接口做被动接口

R2(config-router)#passive-interface loopback 0

八、汇总

距离矢量型路由协议中,默认开启自动汇总,但我们希望手工汇总,因此要关闭自动汇总no au 在rip中,仅支持子网汇总(有类别),在eigrp,ospf等其他路由协议中,支持超网汇总(无类别)。
这里演示超网汇总。
在R1上配置三个loopback,地址为200.1.1.0-3.0,汇总后应为200.1.0.0/22
1.配置三个地址

R1(config-if)#int lo1
R1(config-if)#ip address 200.1.1.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip address 200.1.2.1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)#ip address 200.1.3.1 255.255.255.0

2.宣告到eigrp中

R1(config)#router eigrp 100
R1(config-router)#network 200.1.0.0 0.0.255.255

此时R2的路由表

R2#sho ip route ei
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:11:05, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 23.1.1.2, 01:50:29, Serial1/0
D    200.1.1.0/24 [90/2297856] via 12.1.1.1, 00:00:10, Serial1/1
D    200.1.2.0/24 [90/2297856] via 12.1.1.1, 00:00:10, Serial1/1
D    200.1.3.0/24 [90/2297856] via 12.1.1.1, 00:00:10, Serial1/1

3.做手工汇总,R1的s1/0口(出)

R1(config)#int s1/0
R1(config-if)#ip summary-address eigrp 100 200.1.0.0 255.255.252.0

此时R2路由表

R2#sho ip route ei
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:15:48, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 23.1.1.2, 01:55:11, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:00:27, Serial1/1

1.汇总路由的metric值使用明细路由中最小的。
2.当明细路由全部消失时,汇总路由消失。
3.eigrp,ospf等路由协议,在哪台路由器做手工汇总,就会在这台路由器上自动生成一条指向null 0 的防环路由

R1#sho ip rou ei
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/2297856] via 12.1.1.2, 00:23:44, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2809856] via 12.1.1.2, 00:23:44, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
D       23.1.1.0 [90/2681856] via 12.1.1.2, 00:23:44, Serial1/0
D    200.1.0.0/22 is a summary, 00:08:23, Null0

因为:200.1.0.0/22划分为/24网段实际上包含了
200.1.0.0/24
200.1.1.0/24
200.1.2.0/24
200.1.3.0/24
若R1有一条缺省路由指向R2
如果R2要去200.1.0.0/24网段,会通过汇总路由指向R1,R1又会通过缺省路由指向R2,R2又通过汇总指向R1,由此形成环路。
如果R1有这条指向null 0 的防环路由,那么
如果R2要去200.1.0.0/24网段,会通过汇总路由指向R1,R1虽然没有到达200.1.0.0/24的路由,但是通过递归查找有去往200.1.0.0/22的路由,将会通过此条路由转发数据,又因为此条路由是指向null 0,因此便会丢弃数据。就没有了环路。

eigrp有三个AD值,eigrp协议中学习到的路由AD值为90,重发布进来的其他路由AD值为170,本台路由器自己汇总的eigrp路由AD值为5

九、缺省路由

RIP的缺省共有5种产生方式
1.边界路由器使用default-information下发缺省
2.使用手工汇总产生缺省路由
3.network通告产生缺省
4.重发布产生缺省
5.default network 缺省网络
EIGRP的缺省共有4种产生方式
先干掉之前重发布的直连路由

R3(config)#router eigrp 100 
R3(config-router)#no redistribute connected

1.使用手工汇总产生,在R3的S1/1口

R3(config)#int s1/1
R3(config-if)#ip summary-address eigrp 100 0.0.0.0 0.0.0.0

查看R2路由表,已经有一条缺省路由,但R3的明细路由被抑制

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:49:53, Serial1/1
D*   0.0.0.0/0 [90/2944000] via 23.1.1.2, 00:00:12, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:49:53, Serial1/1
R2#ping 100.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/19/24 ms

2.network通告产生缺省

R3(config)#ip route 0.0.0.0 0.0.0.0 null 0
R3(config)#router eigrp 100
R3(config-router)#network 0.0.0.0

查看R2路由表,将R3所有接口都激活并通告了所以100.1.1.0/24也过来了

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:55:20, Serial1/1
     100.0.0.0/24 is subnetted, 1 subnets
D       100.1.1.0 [90/2944000] via 23.1.1.2, 00:00:03, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/4000000] via 23.1.1.2, 00:00:30, Serial1/0
D*   0.0.0.0/0 [90/2816000] via 23.1.1.2, 00:00:03, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:55:20, Serial1/1

3.重发布静态产生缺省

R3(config-router)#no network 0.0.0.0
R3(config-router)#do clear ip rou *
R3(config-router)#redistribute static

查看R2路由表

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:02:48, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/4000000] via 23.1.1.2, 00:02:48, Serial1/0
D*EX 0.0.0.0/0 [170/2816000] via 23.1.1.2, 00:00:02, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:02:48, Serial1/1

4.default network 缺省网络
将一个主类网络设置为默认网络并通告到eigrp当中

R3(config)#int lo 100
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#exi
R3(config)#ip default-network 192.168.1.0
R3(config)#router eigrp 100
R3(config-router)#network 192.168.1.0

查看R2路由表,只要有*就是缺省路由

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:06:06, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/4000000] via 23.1.1.2, 00:06:06, Serial1/0
D*   192.168.1.0/24 [90/2944000] via 23.1.1.2, 00:00:03, Serial1/0
D    200.1.0.0/22 [90/2297856] via 12.1.1.1, 00:06:06, Serial1/1
R2#ping 100.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/22/32 ms

十、末节路由器

优化DUAL算法

先来说卡在活动状态,这里有4台路由器,其中R4为性能较弱的最后一级路由器,链路速率也较慢

bgp keepalive时间 bgp的holdtime作用_EIGRP_02


假设R1的一个环回down掉,只有最佳路径,没有备份路径,那么R1会向外发送Query报文查询有没有到达此网段的路由,R1->R2->R3->R4,此时由于R4的原因,没有给R3回复Reply,那么R3就不会给R2回复,R2就不会给R1回复,若超过3分钟,R1仍然没有收到R2的回复,R1会down掉与R2的邻居关系重新建立,实际上问题出在R4,不在R2。

所以我们默认做了一个SIA的增强,即在3分钟的一半,90s的时候,R1会主动向R2发送一个SIA的Query报文,因为R2实际上是没有问题的,因此R2会立即回复一个SIA的Reply报文,告诉R1自己正常,此时R1将会把查询的这条路由标记为卡在活动状态。

因此我们优化这个问题,将R4设置为末节路由器,那么R4就会告诉R3我是末节路由器,别来问我。那么R1发送Query报文,一直到R3的时候,R3就会立即回复Reply,我也不知道,一直回复到R1,R1就会将此路由删除。

末节路由器只会将自己的直连和汇总的路由发送给上一级。

R3(config)#router eigrp 100
R3(config-router)#eigrp stub

十一、非等开销负载均衡

到达目标网段有多条路径,AD值相等,metric不相等,eigrp可以让metric最小的metric较小的同时转发数据。寻找一条满足可行性条件的路由(AD<FD)

bgp keepalive时间 bgp的holdtime作用_R3_03


在此图中,R2到达R1的环回0口,以太网链路肯定是最佳路径,R2的邻居R1到达环回0口的AD肯定小于R2到达R1的环回0口的FD,因此串行链路可以作为备份路径

配地址并通告

R1(config)#int f0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shu
R1(config)#router eigrp 100
R1(config-router)#network 10.1.1.0
R2(config)#int f0/0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shu
R2(config)#router eigrp 100
R2(config-router)#network 10.1.1.0

此时R2的路由表,到达1.1.1.0/24网段走的是以太网

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/156160] via 10.1.1.1, 00:01:16, FastEthernet0/0//多余的省略

查看R2的eigrp拓扑表

R2#sho ip ei to
IP-EIGRP Topology Table for AS(100)/ID(2.2.2.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 1.1.1.0/24, 1 successors, FD is 156160
        via 10.1.1.1 (156160/128256), FastEthernet0/0
        via 12.1.1.1 (2297856/128256), Serial1/1

AD=128256<FD=156160
即 此时使用最佳路径以太网链路转发数据,使用串行链路作为备份路径。
我们要做的是让这两条链路同时转发数据,我们可以使最佳路径的FD放大一定的倍数,只要使备份路径的FD小于放大后的最佳路径的FD,那么备份路径也可以转发数据。
直接在R2上使方差值放大128倍,即可使串行链路的FD小于最佳路径的FD

R2(config)#router eigrp 100
R2(config-router)#variance ?
  <1-128>  Metric variance multiplier
R2(config-router)#variance 128

再次查看R2路由表,此时已经看到两条链路转发数据了

R2#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:00:06, Serial1/1
                [90/156160] via 10.1.1.1, 00:00:06, FastEthernet0/0

但是高速链路以太网和低速链路串行不能按1:1转发数据
查看分配比例

R2#sho ip route 1.1.1.0
Routing entry for 1.1.1.0/24
  Known via "eigrp 100", distance 90, metric 156160, type internal
  Redistributing via eigrp 100
  Last update from 12.1.1.1 on Serial1/1, 00:04:40 ago
  Routing Descriptor Blocks:
    12.1.1.1, from 12.1.1.1, 00:04:40 ago, via Serial1/1
      `Route metric is 2297856, traffic share count is 1`
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
  * 10.1.1.1, from 10.1.1.1, 00:04:40 ago, via FastEthernet0/0
     ` Route metric is 156160, traffic share count is 15`
      Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1