eigrp 的汇总跟 ospf 不同.ospf 是在进程中进行汇总.而在eigrp中是以端口为单位进行汇总.
比起ospf 要更加的灵活

r1>en
Password:
r1#show run
Building configuration...

Current configuration : 905 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$5OHU$XzmYl8EI034k2E70yDIkz.
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r2 10.1.4.2
ip host r3 10.1.5.1
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.2.1.1 255.255.255.0
!
interface Loopback1
 ip address 10.2.2.1 255.255.255.0
!
interface Loopback2
 ip address 10.2.3.1 255.255.255.0
!
interface Loopback3
 ip address 10.2.4.1 255.255.255.0
!
interface FastEthernet0/0
 description link to r2
 ip address 10.1.4.1 255.255.255.252
 duplex half
!
router eigrp 1
 network 10.0.0.0
 auto-summary    //这个自动汇总并没有启效,应该是因为这种汇总是对自治系统外部的汇总.内部并不在汇总的范围.
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r1^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 8 subnets, 3 masks   // variably subentted  不定子网掩码, 表示这个主网地址使用了多个不同的掩码. /24 /22 /30
C       10.2.1.0/24 is directly connected, Loopback0
C       10.2.2.0/24 is directly connected, Loopback1
D       10.1.1.0/24 [90/156160] via 10.1.4.2, 00:24:10, FastEthernet0/0
C       10.2.3.0/24 is directly connected, Loopback2
C       10.2.4.0/24 is directly connected, Loopback3
D       10.3.4.0/22 [90/158720] via 10.1.4.2, 00:24:10, FastEthernet0/0  // 从 r3汇总过来的地址
D       10.1.5.0/30 [90/30720] via 10.1.4.2, 00:24:10, FastEthernet0/0
C       10.1.4.0/30 is directly connected, FastEthernet0/0
r1#r2
Translating "r2"
Trying r2 (10.1.4.2)... Open
Welcome to r2
r2>en
Password:
r2#show run
Building configuration...

Current configuration : 836 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$/FOQ$b348456XxUce/Jk3JCJ7u.
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r1 10.1.4.1
ip host r3 10.1.5.1
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 description link to r1
 ip address 10.1.4.2 255.255.255.252
 duplex half
!
interface FastEthernet1/0
 description link to r3
 ip address 10.1.5.2 255.255.255.252
 duplex half
!
router eigrp 1
 network 10.0.0.0
 auto-summary
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r2^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 8 subnets, 3 masks
D       10.2.1.0/24 [90/156160] via 10.1.4.1, 00:31:43, FastEthernet0/0  // r1 并没由在接口上设置汇总,学到的是子网信息
D       10.2.2.0/24 [90/156160] via 10.1.4.1, 00:31:43, FastEthernet0/0
C       10.1.1.0/24 is directly connected, Loopback0
D       10.2.3.0/24 [90/156160] via 10.1.4.1, 00:31:43, FastEthernet0/0
D       10.2.4.0/24 [90/156160] via 10.1.4.1, 00:31:43, FastEthernet0/0
D       10.3.4.0/22 [90/156160] via 10.1.5.1, 00:40:15, FastEthernet1/0  // r3 在接口上设置了汇总, 学到的是汇总信息
C       10.1.5.0/30 is directly connected, FastEthernet1/0
C       10.1.4.0/30 is directly connected, FastEthernet0/0
r2#r3
Translating "r3"
Trying r3 (10.1.5.1)... Open
Welcome to r3
r3>en
Password:
r3#show run
Building configuration...

Current configuration : 958 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$9gwd$DI/adpj9XCLwjHFollOpy1
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip host r1 10.1.4.1
ip host r2 10.1.5.2
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.3.4.1 255.255.255.0
!
interface Loopback1
 ip address 10.3.5.1 255.255.255.0
!
interface Loopback2
 ip address 10.3.6.1 255.255.255.0
!
interface Loopback3
 ip address 10.3.7.1 255.255.255.0
!
interface FastEthernet0/0
 description link to r2
 ip address 10.1.5.1 255.255.255.252
 ip summary-address eigrp 1 10.3.4.0 255.255.252.0 5 // eigrp 在接口上进行汇总,这里汇的是最精确的.
 duplex half
!
router eigrp 1
 network 10.0.0.0
 auto-summary
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r3^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 12 subnets, 3 masks
D       10.2.1.0/24 [90/158720] via 10.1.5.2, 00:32:03, FastEthernet0/0
D       10.2.2.0/24 [90/158720] via 10.1.5.2, 00:32:03, FastEthernet0/0
D       10.1.1.0/24 [90/156160] via 10.1.5.2, 00:40:36, FastEthernet0/0
D       10.2.3.0/24 [90/158720] via 10.1.5.2, 00:32:03, FastEthernet0/0
C       10.3.5.0/24 is directly connected, Loopback1
D       10.2.4.0/24 [90/158720] via 10.1.5.2, 00:32:03, FastEthernet0/0
C       10.3.4.0/24 is directly connected, Loopback0
      10.3.4.0/22 is a summary, 00:40:41, Null0 // 这条是在设置了汇总后,自动生成的.表示所有到10.3.4.0/22 的数据包如果在路由表中无法找到路由条目就自动匹配null.(进入一个无底洞) 不过这个实例中汇总的是最精确的.如果是不精确的汇总还是很有用的.在OSPF里面我们是手写了一条.
C       10.3.7.0/24 is directly connected, Loopback3
C       10.1.5.0/30 is directly connected, FastEthernet0/0
C       10.3.6.0/24 is directly connected, Loopback2
D       10.1.4.0/30 [90/30720] via 10.1.5.2, 00:40:36, FastEthernet0/0
r3#