Cisco配置EIGRP

133 阅读4分钟

特点与介绍

  • CISCO私有的高级距离矢量协议;
  • 无类路由协议,支持VLSM;
  • DUAL算法,EIGRP的核心,形成无环路由;
  • 快速收敛,后继及可行后继;
  • 低路由更新开销,支持组播及单播的方式发送协议数据;
  • 支持自动及手工路由汇总;
  • 支持等价及非等价负载均衡;
  • 支持多种网络层协议(IP、IPX、Appletalk,etc.)。

EIGRP的三张表

image.png

初始路由发现

image.png

EIGRP度量值计算

image.png

EIGRP中FD与AD的概念

image.png

image.png

EIGRP查看及排错常用命令

image.png

image.png

实验拓扑

image.png

初始配置

配置R1各个接口IP

Router>enable 
Router#configure terminal 
Router(config)#hostname R1

R1(config)#interface e0/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown 

R1(config-if)#interface e0/1
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown 

配置R2各个接口IP

Router>enable 
Router#configure terminal 
Router(config)#hostname R2
R2(config)#

R2(config)#interface e0/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown 

R2(config-if)#interface e0/1
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#no shutdown 

配置R3各个接口IP

Router>enable 
Router#configure terminal 
Router(config)#hostname R3
R3(config)#

R3(config)#interface e0/0
R3(config-if)#ip address 192.168.23.3 255.255.255.0
R3(config-if)#no shutdown 

R3(config-if)#interface e0/1
R3(config-if)#ip address 192.168.3.254 255.255.255.0
R3(config-if)#no shutdown

配置Vpc4和vpc5的ip

VPCS> ip 192.168.1.2/24 192.168.1.254
Checking for duplicate address...
VPCS : 192.168.1.2 255.255.255.0 gateway 192.168.1.254
VPCS> ip 192.168.3.2/24 192.168.3.254
Checking for duplicate address...
VPCS : 192.168.3.2 255.255.255.0 gateway 192.168.3.254

配置EIGRP

配置R1

R1(config)#router eigrp 100
R1(config-router)#network 192.168.1.0 0.0.0.255
R1(config-router)#network 192.168.12.0 0.0.0.255

router eigrp 100: 命令表示启动一个eigrp进程,100表示as号

配置R2

R2#configure terminal 
R2(config)#router eigrp 100
R2(config-router)#network 192.168.12.0 0.0.0.255
R2(config-router)#network 192.168.23.0 0.0.0.255

配置R3

R3#configure terminal 
R3(config)#router eigrp 100
R3(config-router)#network 192.168.23.0 0.0.0.255
R3(config-router)#network 192.168.3.0 0.0.0.255

查看路由表

在R1查看

R1#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/24 is directly connected, Ethernet0/1
L        192.168.1.254/32 is directly connected, Ethernet0/1
D     192.168.3.0/24 [90/332800] via 192.168.12.2, 00:00:58, Ethernet0/0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.1/32 is directly connected, Ethernet0/0
D     192.168.23.0/24 [90/307200] via 192.168.12.2, 00:02:12, Ethernet0/0

D开头的表示是EIGRP的路由

在R2中查看

R2#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

D     192.168.1.0/24 [90/307200] via 192.168.12.1, 00:17:29, Ethernet0/0
D     192.168.3.0/24 [90/307200] via 192.168.23.3, 00:16:03, Ethernet0/1
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.2/32 is directly connected, Ethernet0/0
      192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.23.0/24 is directly connected, Ethernet0/1
L        192.168.23.2/32 is directly connected, Ethernet0/1

在R3中查看

R3#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

D     192.168.1.0/24 [90/332800] via 192.168.23.2, 00:17:05, Ethernet0/0
      192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.3.0/24 is directly connected, Ethernet0/1
L        192.168.3.254/32 is directly connected, Ethernet0/1
D     192.168.12.0/24 [90/307200] via 192.168.23.2, 00:17:05, Ethernet0/0
      192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.23.0/24 is directly connected, Ethernet0/0
L        192.168.23.3/32 is directly connected, Ethernet0/0

在vpc5中ping vpc4


VPCS> ping 192.168.1.2

84 bytes from 192.168.1.2 icmp_seq=1 ttl=61 time=1.997 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=61 time=0.957 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=61 time=0.807 ms
84 bytes from 192.168.1.2 icmp_seq=4 ttl=61 time=0.891 ms
84 bytes from 192.168.1.2 icmp_seq=5 ttl=61 time=1.146 ms