CCNA--LAB-3:配置EIGRP路由协议 _EIGRP
 
拓补如上:
 
R1:
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int f0/1
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router eigrp 100     --进入并启用EIGRP配置,自治系统号100(两台自治系统号需一样,不然不能建立邻居关系)
R1(config-router)#no auto-summary      --不要自动汇总
R1(config-router)#network 12.1.1.0 0.0.0.255     --宣告直连网段,反掩码
R1(config-router)#network 192.168.1.0 0.0.0.255
R1(config-router)#end
R1#
 
查看路由表:
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 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 12.1.1.2, 00:01:36, FastEthernet0/1
 
注:D    192.168.2.0/24  [90/30720]  via 12.1.1.2, 00:01:36, FastEthernet0/1
D表示通过EIGRP学习到的, [90/30720]表示管理距离/度量值
 
 
 
R2:
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.2.254 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f0/1
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
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 192.168.2.0 0.0.0.255
R2(config-router)#end
R2#
 

查看路由表:
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0/1
D    192.168.1.0/24 [90/30720] via 12.1.1.1, 00:02:20, FastEthernet0/1
C    192.168.2.0/24 is directly connected, FastEthernet0/0
R2#
 
 
验证在PC0上拼PC1:
PC>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=40ms TTL=126
Reply from 192.168.2.1: bytes=32 time=33ms TTL=126
Reply from 192.168.2.1: bytes=32 time=27ms TTL=126
Reply from 192.168.2.1: bytes=32 time=23ms TTL=126
Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 23ms, Maximum = 40ms, Average = 30ms
PC>
 
总结:
Eigrp 的弥散更新算法
1:记录从邻居处收到的路由。
2:100%无环路。
3:如果最好路由不可用且存在次好路由,它将会把次好路由变成最好路由。
4:如果最好路由不可用且不存在次好路由,它将会向邻居发送查询信息。
       保证路由100%无环路的机理:AD<FD
EIGRP优点:它的收敛速度极快,而且支持非等价负载均衡,支持认证。
缺点:没有区域的概念,不适于大型网络,眀是CISCO私有协议。