PingingLab传世经典系列《CCNA完全配置宝典》-2.8 EIGRP路由汇总

2.8 EIGRP路由汇总

实验目的:

1、掌握EIGRP的路由汇总。

2、理解EIGRP汇总时的null路由。

实验拓扑:


实验步骤:

1、依据图中拓扑配置各设备的IP地址,并保证直连连通性;

在R1上做如下配置:

R1(config)#int f0/0

R1(config-if)#no shutdown

R1(config-if)#ip address 12.1.1.1 255.255.255.0

R1(config-if)#exit

R1(config)#int f1/0

R1(config-if)#no shutdown

R1(config-if)#ip address 13.1.1.1 255.255.255.0

R1(config-if)#exit

R1(config)#int loopback 1

R1(config-if)#ip address 1.1.1.1 255.255.255.255

R1(config-if)#exit

在R2上做如下配置:

R2(config)#int f0/0

R2(config-if)#no shutdown

R2(config-if)#ip address 12.1.1.2 255.255.255.0

R2(config-if)#exit

R2(config)#int f1/0

R2(config-if)#no shutdown

R2(config-if)#ip address 23.1.1.2 255.255.255.0

R2(config-if)#exit

R2(config)#int loopback 1

R2(config-if)#ip address 2.2.2.2 255.255.255.255

R2(config-if)#exit

在R3上做如下配置

R3(config)#int f0/0

R3(config-if)#no shutdown

R3(config-if)#ip address 13.1.1.3 255.255.255.0

R3(config-if)#exit

R3(config-if)#int f1/0

R3(config-if)#no shutdown

R3(config-if)#ip address 23.1.1.3 255.255.255.0

R3(config-if)#exit

R3(config)#int loopback 1

R3(config-if)#ip address 3.3.3.3 255.255.255.255

R3(config-if)#exit

R3(config)#int loopback 2

R3(config-if)#ip address 172.16.0.1 255.255.255.0

R3(config-if)#ip address 172.16.1.1 255.255.255.0 secondary

R3(config-if)#ip address 172.16.2.1 255.255.255.0 secondary

R3(config-if)#ip address 172.16.3.1 255.255.255.0 secondary

R3(config-if)#exit

在其中一台路由器上进行连通性测试:

R1#ping 12.1.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 20/34/48 ms

R1#ping 13.1.1.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 13.1.1.3, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 16/31/48 ms

此时说明直连连接没有问题。

2.在每台路由器开始进行EIGRP的配置,R1的配置如下:

R1(config)#router eigrp 100

R1(config-router)#no auto-summary

R1(config-router)#network 12.1.1.0 0.0.0.255

R1(config-router)#network 13.1.1.0 0.0.0.255

R1(config-router)#network 1.1.1.1 0.0.0.0

R1(config-router)#exit

R2的配置如下:

R2(config)#router eigrp 100

R2(config-router)#no auto-summary

R2(config-router)#network 12.1.1.0 0.0.0.255

R2(config-router)#network 23.1.1.0 0.0.0.255

R2(config-router)#network 2.2.2.2 0.0.0.0

R2(config-router)#exit

R3的配置如下:

R3(config)#router eigrp 100

R3(config-router)#no auto-summary

R3(config-router)#network 13.1.1.0 0.0.0.255

R3(config-router)#network 23.1.1.0 0.0.0.255

R3(config-router)#network 3.3.3.3 0.0.0.0

R3(config-router)#network 172.16.0.0 0.0.255.255

R3(config-router)#exit

3、查看R1和R2的路由表,如下:

R1#show ip route eigrp

2.0.0.0/32 is subnetted, 1 subnets

D 2.2.2.2 [90/156160] via 12.1.1.2, 00:41:17, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

D 3.3.3.3 [90/156160] via 13.1.1.3, 00:41:16, FastEthernet1/0

23.0.0.0/24 is subnetted, 1 subnets

D 23.1.1.0 [90/30720] via 13.1.1.3, 00:41:19, FastEthernet1/0

[90/30720] via 12.1.1.2, 00:41:19, FastEthernet0/0

172.16.0.0/24 is subnetted, 4 subnets

D 172.16.0.0 [90/156160] via 13.1.1.3, 00:00:06, FastEthernet1/0

D 172.16.1.0 [90/156160] via 13.1.1.3, 00:00:06, FastEthernet1/0

D 172.16.2.0 [90/156160] via 13.1.1.3, 00:00:06, FastEthernet1/0

D 172.16.3.0 [90/156160] via 13.1.1.3, 00:00:06, FastEthernet1/0

R2#show ip route eigrp

1.0.0.0/32 is subnetted, 1 subnets

D 1.1.1.1 [90/156160] via 12.1.1.1, 00:41:29, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

D 3.3.3.3 [90/156160] via 23.1.1.3, 00:41:28, FastEthernet1/0

172.16.0.0/24 is subnetted, 4 subnets

D 172.16.0.0 [90/156160] via 23.1.1.3, 00:00:18, FastEthernet1/0

D 172.16.1.0 [90/156160] via 23.1.1.3, 00:00:18, FastEthernet1/0

D 172.16.2.0 [90/156160] via 23.1.1.3, 00:00:18, FastEthernet1/0

D 172.16.3.0 [90/156160] via 23.1.1.3, 00:00:18, FastEthernet1/0

13.0.0.0/24 is subnetted, 1 subnets

D 13.1.1.0 [90/30720] via 23.1.1.3, 00:41:29, FastEthernet1/0

[90/30720] via 12.1.1.1, 00:41:29, FastEthernet0/0

可以看到,此时R1和R2从R3学到4条精细路由,为缩减路由表并提高路由器转发效率,将此4条精细子网进行汇总。

4.在R3上执行路由汇总,如下:

R3(config)#int f0/0

R3(config-if)#ip summary-address eigrp 100 172.16.0.0 255.255.252.0

R3(config-if)#exit

R3(config)#int f1/0

R3(config-if)#ip summary-address eigrp 100 172.16.0.0 255.255.252.0

R3(config-if)#exit

在R1和R2上再次查看路由表,如下:

R1#show ip route eigrp

2.0.0.0/32 is subnetted, 1 subnets

D 2.2.2.2 [90/156160] via 12.1.1.2, 00:54:23, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

D 3.3.3.3 [90/156160] via 13.1.1.3, 00:54:23, FastEthernet1/0

23.0.0.0/24 is subnetted, 1 subnets

D 23.1.1.0 [90/30720] via 13.1.1.3, 00:54:26, FastEthernet1/0

[90/30720] via 12.1.1.2, 00:54:26, FastEthernet0/0

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/156160] via 13.1.1.3, 00:00:06, FastEthernet1/0

R2#show ip route eigrp

1.0.0.0/32 is subnetted, 1 subnets

D 1.1.1.1 [90/156160] via 12.1.1.1, 00:54:29, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

D 3.3.3.3 [90/156160] via 23.1.1.3, 00:54:28, FastEthernet1/0

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/156160] via 23.1.1.3, 00:00:13, FastEthernet1/0

13.0.0.0/24 is subnetted, 1 subnets

D 13.1.1.0 [90/30720] via 23.1.1.3, 00:54:29, FastEthernet1/0

[90/30720] via 12.1.1.1, 00:54:29, FastEthernet0/0

此时可以看到,原本的4条精细路由汇总成一条路由,说明汇总成功。在R3上查看路由表,如下:

R3#show ip route eigrp

1.0.0.0/32 is subnetted, 1 subnets

D 1.1.1.1 [90/156160] via 13.1.1.1, 00:58:02, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

D 2.2.2.2 [90/156160] via 23.1.1.2, 00:58:02, FastEthernet1/0

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

D 172.16.0.0/22 is a summary, 00:03:47, Null0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/30720] via 23.1.1.2, 00:58:02, FastEthernet1/0

[90/30720] via 13.1.1.1, 00:58:02, FastEthernet0/0

上面的NULL路由是EIGRP汇总时自动生成的,是用于解决不精确汇总可能引发的路由环路。<在PingingLab后续高级路由章节有详细描述>此实验完成。

==========================================

PingingLab・高品质IT教育提供商

CCIE 实验室・IT项目实战・高端人才定制

深圳拼客信息科技有限公司・广州大学城外环西路站

新浪微博:@拼客科技PingingLab  @PingingLab-陈鑫杰

PingingLab微信公众号:pinginglab

PingingLab技术交流群:240920680


你可能感兴趣的:(Cisco,CCNA,ccnp,CCIE,思科认证)