EIGRP支持无类路由协议,在默认情况下,EIGRP开启自动汇总功能,在不连续子网的情况下与有类路由协议行为相似。当你的网络中有不连续子网时,那么就要关闭自动汇总功能以支持无类路由协议
等一下,也许你会问什么是连续子网和不连续子网?
连续子网:主类网络号相同,子网掩码相同
不连续子网=把连续子网隔开
如下图,172.17.2.0/24,172.17.1.0/24网段被192.168.0.0/16网段隔开,成为不连续子网

下面用这个图来详细说明启用与关闭汇总功能出现的情况。
1、如果被隔开网段所在的路由器开启了汇总功能auto-summary ,那么路由器会自动将路由条目汇总为主类网络发送出去。例如,Router1配置了network 172.17.2.0 0.0.0.255,但是进行网络宣告时,发现送出端口f0/0的网段是192.168.1.0/24,与172.17.2.0/24不处于同一连续子网就把172.17.2.0/24总结为主类网络172.17.0.0/16.
Router1的路由条目
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.17.0.0/16 is a summary, 00:06:47, Null0
C 172.17.2.0/24 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
D 192.168.2.0/24 [90/30720] via 192.168.1.1, 00:07:06, FastEthernet0/0
进行自动汇总时,Router1收到来着Router2宣告的网络号172.17.0.0/16(Router3已经将172.17.1.0/24进行自动总结),发现自己已经有了该网段,就忽略该宣告信息。因此Router1无法了解到Router3的172.17.1.0/24网段,只能ping通主类网段172.17.1.0/16中的子网络172.17.2.0/24
Router2的路由条目
D 172.17.0.0/16 [90/30720] via 192.168.2.2, 00:00:29, FastEthernet0/1
[90/30720] via 192.168.1.2, 00:00:29, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
Router2收到Router1和Router3关于主类网络172.17.0.0/16的宣告信息,简单认为存在两条路径能同时达到该网络,并进行负载均衡。事实上Router2从F0/0口发送的数据包只能到达172.17.1.0/24网段,从F0/1口发送的数据包只能到达172.17.2.0/24网段,当Router2有数据包发往172.17.2.0/24以及172.17.1.0/24网段时都会出现丢包情况。
Router3的路由条目
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.17.0.0/16 is a summary, 00:02:19, Null0
C 172.17.1.0/24 is directly connected, FastEthernet0/0
D 192.168.1.0/24 [90/30720] via 192.168.2.1, 00:01:41, FastEthernet0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/1
Router3跟Router1同理。
2、如果被隔开网段所在的路由器关闭了汇总功能no auto-summary ,那么路由器会如实地将配置的网络信息进行宣告。例如,Router1配置了network 172.17.2.0 255.255.255.0,进行网络宣告时将172.17.2.0/24网络从F0/0口发送出去。
Router1的路由条目
172.17.0.0/16 is variably subnetted, 3 subnets, 2 masks
D 172.17.0.0/16 [90/33280] via 192.168.1.1, 00:26:20, FastEthernet0/0
D 172.17.1.0/24 [90/33280] via 192.168.1.1, 00:17:14, FastEthernet0/0
C 172.17.2.0/24 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
D 192.168.2.0/24 [90/30720] via 192.168.1.1, 00:26:20, FastEthernet0/0
Router2的路由条目
172.17.0.0/16 is variably subnetted, 3 subnets, 2 masks
D 172.17.0.0/16 is a summary, 00:27:01, Null0
D 172.17.1.0/24 [90/30720] via 192.168.2.2, 00:17:55, FastEthernet0/1
D 172.17.2.0/24 [90/30720] via 192.168.1.2, 00:27:01, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
Router3的路由条目
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.17.0.0/16 [90/33280] via 192.168.2.1, 00:18:26, FastEthernet0/1
C 172.17.1.0/24 is directly connected, FastEthernet0/0
D 192.168.1.0/24 [90/30720] via 192.168.2.1, 00:18:26, FastEthernet0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/1
从上面三个Router条目可看到路由表条目都对应这具体的网络号。只要存在该网络,路由器都将正确发送到目的地址。
细心的你可能会发现,路由条目多了
D 172.17.0.0/16 is a summary, 00:27:01, Null0
这样一条转发端口为Null0的伪接口,是为了避免产生路由环路,当匹配这条路由的数据包会被路由器丢弃。
假如Router1上有一个数据包,其目的地址为172.17.3.1/24,则router1会将数据包从f0/0口发送出去,到了Router2时,数据包目的地址与Router2的172.17.0.0/16匹配,则将数据包发往Null0口,即丢弃。
如果没有NUll0这一条路由条目,那么数据包会在三个路由器中来回地不停传送。
最新评论