1、CCNP第五讲-EIGRP R1(config)#int fa0/0 R1(config-if)#ip address 12.1.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int loopback 1 R1(config-if)#ip address 1.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#router eigrp 90 R1(config-router)#no auto R1(config-route
2、r)#network 1.1.1.1 0.0.0.0 R1(config-router)#network 12.1.1.1 0.0.0.0 R2(config)#int fa0/0 R2(config-if)#ip address 12.1.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int fa1/0 R2(config-if)#ip address 23.1.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-
3、if)#exit R2(config)#int loopback 1 R2(config-if)#ip address 2.2.2.2 255.255.255.0 R2(config-if)#exit R2(config)#router eigrp 90 R2(config-router)#no auto R2(config-router)#network 12.1.1.2 0.0.0.0 R2(config-router)#network 2.2.2.2 0.0.0.0 R2(config-router)#network 23.1.1.2 0.0.0.0 R2(config
4、router)#exit R1(config)#key chain R1 R1(config-keychain)#key 1 R1(config-keychain-key)#key-string cisco R1(config-keychain-key)#exit R1(config-keychain)#exit R1(config)#int fa0/0 R1(config-if)#ip authentication key-chain eigrp 90 R1 R1(config-if)#ip authentication mode eigrp 90 md5 R1(co
5、nfig-if)#exit 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback1 12.0.0.0/24 is subnetted, 1 subnets C 12.1.1.0 is directly connected, FastEthernet0/0 R1(config)# 在R2上做相同的配置 R2(config)#key chain R2 R2(config-keychain)#key 1 R2(config-keychain
6、key)#key-string cisco R2(config-keychain-key)#exit R2(config-keychain)#exit R2(config)#int fa0/0 R2(config-if)#ip authentication key-chain eigrp 90 R2 R2(config-if)#ip authentication mode eigrp 90 md5 注意:R1和R2上的密钥ID和密钥类型一致才能通信。 密钥的高级特性: R1(config-keychain-key)#accept-lifetime start-time { i
7、nfinite |end-time |duration seconds} 认证审核的起止时间 R2(config-keychain-key)#send-lifetime start { infinite |end-time |duration seconds} //认证发送的起止时间 EIGRP的高级特性: 1. 修改EIGRP的度量值 使用偏移列表只能将度量值改大 R(config-router)#offset-list [access-list-number | access-list-name] { in|out} offset [ interface-type interf
8、ace-number] //偏移列表可以出向调用也可以入向调用,具体情况根据需求。 修改R1到3.3.3.0的度量值,修改之前的度量值如下 R2(config)#access-list 10 permit 3.3.3.0 0.0.0.255 R2(config)#router eigrp 90 R2(config-router)#offset-list 10 out 600 fa0/0 //在R2的出站接口将度量值增加600 2. 被动接口 一般把直连PC的接口和环回口设为被动接口。禁止该类接口发送组播流量,占用链路带宽。 R1(config)#router eig
9、rp 90 R1(config-router)#passive-interface fa0/0 注意:当把一个借口置为被动接口,那么该接口既不能接收也不能发送任何形式的EIGRP报文。 3. 单播发送报文 R1(config)#router eigrp 90 R1(config-router)#neighbor 12.1.1.2 fa0/0 R2(config)#router eigrp 90 R2(config-router)#neighbor 12.1.1.1 fa0/0 注意单播发送要保证邻居双方都是用单播特性,才能建立邻居。既要在链路两端均配置单播特性。 4. 关闭水
10、平分割 R2(config-if)#no split-horizon eigrp AS 要关闭水平分割既要关闭物理水平分割又要关闭协议水平分割。适用于帧中继环境。 R2(config-if)#no split-horizon //关闭物理水平分割 R2(config-if)#no split-horizon eigrp 90 //关闭协议水平分割 5. 修改度量值 由于度量值是由K值确定的,应此修改K值,即可修改度量值。默认K值如下图所示: 现在进行修改: R1(config)#router eigrp 90 R1(config-router)#metric weights 0 2 2 10 1 10 查看修改: 注意;一般不建议修改K值,如果要修改必须在所有路由器上都进行修改。只在一个路由器上的修改,会导致邻居关系破坏。 EIGRP建立邻居关系的条件: 1. AS号相同;2. 度量计算的K值相同;3. 认证相同(EIGRP只支持密文认证);4. 对端通告的Neighbor ID必须在本端的直连网段中存在;5. 不同的Router-ID 6. 如何修改EIGRP的Hello时间; R1(config)#int fa0/0 R1(config-if)#ip hello-interval eigrp 90 8






