CCNP路由实验(1) -- EIGRP

时间:2024-09-29 13:37:20

EIGRP(Enhanced Interior Gateway Routing Protocol,增强型内部网关路由协议)是Cisco公司开发的一个平衡混合型路由协议,它融合了距离向量和链路状态两种路由协议的优点,支持IP、IPX、AppleTalk等多种网络层协议。这里仅关注IP网络环境中的EIGRP.

协议名称 协议类型 封装方式 多播地址 单播方式
RIP 距离矢量 UDP/520 224.0.0.9 passive接口
EIGRP 高级距离矢量 IP/88 224.0.0.10 指neighbor
OSPF 链路状态 IP/89 224.0.0.5/6 NBMA/点到多点NBMA
BGP   TCP/179    

邻居的发现和恢复
1.AS号
2.认证
3.K值
4.过滤(ACL)
5.FR是否加了broadcast
6.是否仅一方指了neighbor

备选后继成为可行后继的条件: 备选后继通告的AD<当前后继FD值
A->B->D (当前后继为B)
A->C->D (当B不可用时,C要成为可行后继的条件是C->D小于A->B->D)

EIGRP特点如下:
1.通过发送和接收Hello包来建立和维持邻居关系,并交换路由信息
2.采用组播(224.0.0.10)或单播进行路由更新
3.EIGRP的管理距离为90或170
4.采用触发更新,减少带宽占用
5.支持VLSM,默认开启自动汇总功能。
6.支持IP、IPX、AppleTalk等多种网络层协议
7.对每一种网络协议,EIGRP都维持独立的邻居表、拓扑表和路由表
8.EIGRP使用Diffusing Update算法(DUAL)来实现快速收敛,并确保没有路由环路
9.存储整个网络拓扑结构的信息,以便快速适应网络变化
10.支持等价和非等价的负载均衡
11.使用可靠传输协议(RTP)保证路由信息传输的可靠性
12.无缝连接数据链路层协议和拓扑结构,EIGRP不要求对OSI参考模型的2层协议做特别的配置

1.EIGRP的基本配置
2.EIGRP的单播更新
3.在接口禁用EIGRP
4.EIGRP MD5认证
5.EIGRP自动汇总
6.EIGRP手动汇总
7.EIGRP注入默认路由
8.EIGRP负载均衡
9.EIGRP非等价负载均衡
10.EIGRP过滤路由
11.EIGRP在帧中继环境下的水平分割
12.EIGRP配置管理流量占用带宽
13.EIGRP stup路由器

enable
conf t
no ip do lo
enable pass cisco
line con 0
logg sync
exec-t 0 0
line vty 0 4
pass cisco
logg sync
exit
host

1. EIGRP的基本配置:
---------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRP

R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
no shut
exit

R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
exit

R1:
end
show ip eigrp neighbors
show ip eigrp topology
show ip eigrp interfaces
show ip eigrp traffic
show ip protocals
conf t

2. EIGRP单播更新
----------------------------------------------
R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
exit

R1:
router eigrp 1
neighbor 12.1.1.2 f0/0
exit

R2:
router eigrp 1
neighbor 12.1.1.1 f0/0
exit

3. 在接口禁用EIGRP
--------------------------------------------------
R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
exit

R1:
end
debug eigrp packets
conf t

router eigrp 1
passive-int l0
exit

4. EIGRP MD5 认证
------------------------------------------------------
R1:
key chain yeslab
key 1
key-string cisco
end
conf t

int f0/0
ip authen mode eigrp 1 md5
ip authen key-chain eigrp 1 yeslab
exit

R2:
key chain yeslab
key 1
key-string cisco
end
conf t

int f0/0
ip authen mode eigrp 1 md5
ip authen key-chain eigrp 1 yeslab
exit

5. EIGRP自动汇总
--------------------------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRP

R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.0.1 255.255.255.0
no shut
exit
int l1
ip add 22.1.1.1 255.255.255.0
no shut
exit
int l2
ip add 22.1.2.1 255.255.255.0
no shut
exit
int l3
ip add 22.1.3.1 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.0.1 255.255.255.0
no shut
exit
int l1
ip add 33.1.1.1 255.255.255.0
no shut
exit
int l2
ip add 33.1.2.1 255.255.255.0
no shut
exit
int l3
ip add 33.1.3.1 255.255.255.0
no shut
exit

R1:
router eigrp 1
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
network 22.1.0.0 0.0.255.255
exit

R3:
router eigrp 1
network 23.1.1.0 0.0.0.255
network 33.1.0.0 0.0.255.255
exit

R2:
end
show ip eigrp neighbors
conf t

R1:
end
show ip route eigrp
conf t

R3:
router eigrp 1
no auto-summary
exit

R1:
end
show ip route eigrp
conf t

R2:
int l10
ip add 100.1.0.1 255.255.255.0
no shut
exit
int l11
ip add 100.1.1.1 255.255.255.0
no shut
exit
int l12
ip add 100.1.2.1 255.255.255.0
no shut
exit
int l13
ip add 100.1.3.1 255.255.255.0
no shut
exit

router eigrp 1
redistr conn

R1:
end
show ip route eigrp
conf t

6. EIGRP手动汇总
-------------------------------------------
R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.0.1 255.255.255.0
no shut
exit
int l1
ip add 22.1.1.1 255.255.255.0
no shut
exit
int l2
ip add 22.1.2.1 255.255.255.0
no shut
exit
int l3
ip add 22.1.3.1 255.255.255.0
no shut
exit
int l10
ip add 100.1.0.1 255.255.255.0
no shut
exit
int l11
ip add 100.1.1.1 255.255.255.0
no shut
exit
int l12
ip add 100.1.2.1 255.255.255.0
no shut
exit
int l13
ip add 100.1.3.1 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.0.1 255.255.255.0
no shut
exit
int l1
ip add 33.1.1.1 255.255.255.0
no shut
exit
int l2
ip add 33.1.2.1 255.255.255.0
no shut
exit
int l3
ip add 33.1.3.1 255.255.255.0
no shut
exit

R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
network 22.1.0.0 0.0.255.255
redistribute connected
exit

R3:
router eigrp 1
no auto-summary
network 23.1.1.0 0.0.0.255
network 33.1.0.0 0.0.255.255
exit

R1:
end
show ip route eigrp
conf t

R2:
int f0/0
ip summary-add eigrp 1 22.1.0.0 255.255.252.0
ip summary-add eigrp 1 33.1.0.0 255.255.0.0
ip summary-add eigrp 1 100.1.0.0 255.255.0.0

end
show ip route eigrp
conf t

R1:
end
show ip route eigrp
conf t

7. EIGRP 注入默认路由
-------------------------------------------
R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
no shut
exit

R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
exit

R3:
router eigrp 1
no auto-summary
network 23.1.1.0 0.0.0.255
network 33.1.1.0 0.0.0.255
exit

--产生默认路由1
R2:
ip route 0.0.0.0 0.0.0.0 null 0
router eigrp 1
redistribute static
exit

R1:
end
show ip route eigrp
conf t

--产生默认路由2
R2:
ip route 0.0.0.0 0.0.0.0 null 0
router eigrp 1
network 0.0.0.0
exit

R1:
end
show ip route eigrp
conf t

--产生默认路由3
R2:
int l1
ip add 10.1.1.1 255.0.0.0
exit
router eigrp 1
network 10.1.1.0 0.0.0.255
exit
ip default-network 10.0.0.0

R1:
end
show ip route eigrp
conf t

--产生默认路由4
R2:
int l1
ip add 10.1.1.1 255.0.0.0
exit
router eigrp 1
network 10.1.1.0 0.0.0.255
exit

int f0/0
ip summary-address eigrp 1 0.0.0.0 0.0.0.0

R1:
end
show ip route eigrp
conf t

8. EIGRP等价负载均衡
---------------------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRP

--------------------------------------------------------------------------------------------
R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int f1/0
ip add 14.1.1.1 255.255.255.0
no shut
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
no shut
exit
int f1/0
ip add 34.1.1.3 255.255.255.0
no shut
exit

R4:
int f0/0
ip add 14.1.1.4 255.255.255.0
no shut
exit
int f1/0
ip add 34.1.1.4 255.255.255.0
no shut
exit

R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 14.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
exit

R3:
router eigrp 1
no auto-summary
network 23.1.1.0 0.0.0.255
network 33.1.1.0 0.0.0.255
network 34.1.1.0 0.0.0.255
exit

R4:
router eigrp 1
no auto-summary
network 14.1.1.0 0.0.0.255
network 34.1.1.0 0.0.0.255
exit

9. EIGRP非等价负载均衡
-------------------------------------------
R2:
end
show int f1/0
conf t

int f1/0
delay 15
exit

R1:
end
show ip eigrp topology
conf t

router eigrp 1
variance 2
exit

10. EIGRP过滤路由
------------------------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRP

R1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int l1
ip add 10.1.1.1 255.255.255.0
exit
int l2
ip add 100.1.1.1 255.255.255.0
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
no shut
exit

R1:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 10.1.1.0 0.0.0.255
network 100.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
exit

R3:
router eigrp 1
no auto-summary
network 23.1.1.0 0.0.0.255
network 33.1.1.0 0.0.0.255
exit

R3:
access-list 10 deny 11.1.1.0
access-list 10 deny 10.1.1.0
access-list 10 permit any
router eigrp 1
distribute-list 10 in
exit

11. EIGRP帧中继环境下的水平分割
---------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRP

----------------------------------------------------------------------------------
R4:

frame-relay switch

int s0/1
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 102 int s0/2 201
frame-relay route 103 int s0/3 301
no shut
exit

int s0/2
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 201 int s0/1 102
no shut
exit

int s0/3
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 301 int s0/1 103
no shut
exit

end
show frame-relay route
conf t

R1:
int s0/0
ip add 123.1.1.1 255.255.255.0
encap frame-relay
frame-relay lmi-type cisco
no frame-relay inverse-arp
frame-relay map ip 123.1.1.2 102 broadcast
frame-relay map ip 123.1.1.3 103 broadcast
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit

R2:
int s0/0
ip add 123.1.1.2 255.255.255.0
encap frame-relay
frame-relay lmi-type cisco
no frame-relay inverse-arp
frame-relay map ip 123.1.1.1 201 broadcast
frame-relay map ip 123.1.1.3 201 broadcast
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit

R3:
int s0/0
ip add 123.1.1.3 255.255.255.0
encap frame-relay
frame-relay lmi-type cisco
no frame-relay inverse-arp
frame-relay map ip 123.1.1.1 301 broadcast
frame-relay map ip 123.1.1.2 301 broadcast
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit

R1:
router eigrp 1
no auto-summary
network 11.1.1.0 0.0.0.255
network 123.1.1.0 0.0.0.255
exit

R2:
router eigrp 1
no auto-summary
network 22.1.1.0 0.0.0.255
network 123.1.1.0 0.0.0.255
exit

R3:
router eigrp 1
no auto-summary
network 33.1.1.0 0.0.0.255
network 123.1.1.0 0.0.0.255
exit

R1:
int s0/0
no ip split-horizon eigrp 1
exit

12. EIGRP配置管理流量占用带宽
------------------------------------------
R2:
int s0/0
bandwidth 256
exit

R3:
int s0/0
bandwidth 64
ip bandwidth-percent eigrp 1 1000
exit

13. EIGRP stub路由器:
------------------------------------------------------------------------------------------

CCNP路由实验(1) -- EIGRPR1:
int f0/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
no shut
exit

router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
exit

R2:
int f0/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int f1/0
ip add 23.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
no shut
exit

router eigrp 1
no auto-summary
network 12.1.1.0 0.0.0.255
network 22.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
exit

R3:
int f0/0
ip add 23.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
no shut
exit

router eigrp 1
no auto-summary
network 23.1.1.0 0.0.0.255
network 33.1.1.0 0.0.0.255
exit

--------------------------------------
R1:
end
show ip route
debug eigrp packets query
conf t
int l0
shut
exit

R2:
router eigrp 1
eigrp stub
exit

R1:
int l0
no shut
shut
exit

end
show ip route
conf t

R3:
end
show ip route
conf t

R2:
int f0/0
ip summary-add eigrp 1 33.1.0.0 255.255.0.0
exit

R1:
end
show ip route
conf t

R2:
ip route 100.1.1.0 255.255.255.0 null 0
router eigrp 1
redistribute static
eigrp stub stati
exit

R1:
end
show ip route
conf t

R2:
router eigrp 1
eigrp stub receive-only
exit

R1:
end
show ip route
conf t