企业网数通方案实战之EIGRP

网络 路由交换
这是一个专门考察EIGRP应用的实战案例,希望能对大家有所帮助,共同探讨学习。

实战目标:

通过实战应用,掌握EIGRP的工作原理和实际操作能力。

案例需求说明及业务部署规划:

公司建有两个办公点,分别为总部和分支;

决定全网使用EIGRP作为动态路由协议,自治系统号码为 666;

其中总部和分支的R1和R3两台设备通过运营商提供的二层×××互联,实现总部和分支的通信,使用单播建立EIGRP邻居并部署HMAC认证,密钥自定义;

R2和R5为末节路由器,通过一条低速链路互联作为二层×××的备份,使用单播建立EIGRP邻居并部署MD5认证,密钥自定义;

总部和分支之间的业务流量经过二层×××转发,但是当二层×××故障时,备份链路则必须承担起全部转发责任,通过路由汇总实现主备链路的数据转发控制;

其中Server1和Server2之间每天有少量特殊业务流量需要通过低速备份链路互通,在两台Server所在子网设置辅助地址,专门为特殊业务流量服务;

R3和R4为整个企业的互联网网关,负责企业所有的接入互联网流量,其中以R3为高速链路,R4为低速链路;部署端口NAT,以为企业内部提供互联网服务;

在避免链路资源浪费的同时保障链路转发负载合理,R3和R4在将去往互联网的默认路由引入EIGRP时设置不同的度量值,在R5上实现去往互联网的业务流量非等价负载均衡;

考虑到业务可扩展性等因素,全网设备部署命名的EIGRP配置方式;定义命名的EIGRP实例名称为 QYT;

为保证协议稳定运行,为每台设备配置router-id 例:R1 router-id 为 10.0.0.1、R2 router-id 为 10.0.0.2;

本案例在模拟器上的练习拓扑,可按照如下结构搭建:

下面为大家展示案例配置方案:

一、配置IP地址 (展示省略)

设备接口地址为 网络地址.Y,其中Y为设备编号,例如R1的E0/3接口IP地址为:10.12.13.1/24

PC和Server由路由器的环回口模拟

  1. R2#show run interface loopback 0 
  2. interface Loopback0 
  3.   ip address 10.2.201.100 255.255.255.0 secondary 
  4.   ip address 10.2.100.100 255.255.255.0 secondary 
  5.   ip address 10.2.200.100 255.255.255.0 
  6.  
  7.  
  8. R5#show run interface loopback 0 
  9. interface Loopback0 
  10.   ip address 10.1.201.100 255.255.255.0 secondary 
  11.   ip address 10.1.100.100 255.255.255.0 secondary 
  12.   ip address 10.1.200.100 255.255.255.0 

IP地址配置完毕,一定要测试直连是否OK。

二、全网部署EIGRP

  1. R1#show run | s r e 
  2. router eigrp QYT 
  3.   ! 
  4.   address-family ipv4 unicast autonomous-system 666 
  5.    ! 
  6.    topology base 
  7.    exit-af-topology 
  8.    network 10.0.0.0 
  9.    eigrp router-id 10.0.0.1    //这一部分每台设备除此处不一样之外,其它配置都一样// 
  10.   exit-address-family 

配置完毕,请检查EIGRP邻居状态及路由条目,确保配置无误;

检查命令:

  1. show ip eigrp neighbors  
  2. show ip route eigrp | begin Gateway 

三、总部和分支互联设备上配置单播邻居及认证

R1:

  1. router eigrp QYT 
  2. address-family ipv4 unicast autonomous-system 666 
  3.  
  4. neighbor 10.12.13.3 Ethernet0/3 
  5. af-interface e0/3 
  6. authentication mode hmac-sha-256 CCNP 

R3:

  1. router eigrp QYT 
  2. address-family ipv4 unicast autonomous-system 666 
  3.  
  4. neighbor 10.12.13.1 Ethernet0/3 
  5. af-interface e0/3 
  6. authentication mode hmac-sha-256 CCNP 

R2:

  1. key chain CISCO 
  2.   key 1 
  3.    key-string CCNP 
  4.  
  5. router eigrp QYT 
  6.   address-family ipv4 unicast autonomous-system 666 
  7.  
  8.   neighbor 10.12.25.5 Serial1/1 
  9.    af-interface Serial1/1 
  10.     authentication mode md5 
  11.     authentication key-chain CISCO 

R5:

  1. key chain CISCO 
  2. key 1 
  3.   key-string CCNP 
  4.  
  5. router eigrp QYT 
  6.   address-family ipv4 unicast autonomous-system 666 
  7.  
  8.   neighbor 10.12.25.2 Serial1/1 
  9.    af-interface Serial1/1 
  10.     authentication mode md5 
  11.     authentication key-chain CISCO 

四、部署末节路由器

R2和R5:

  1. router eigrp QYT 
  2.   address-family ipv4 unicast autonomous-system 666 
  3.    eigrp stub 

五、实现二层×××和低速备份链路之间的主备

在R2和R5上针对本区域的路由进行汇总,实现通过最长匹配原则进行主备链路的流量转发控制;

R2:

  1. router eigrp QYT 
  2.   address-family ipv4 unicast autonomous-system 666 
  3.    af-interface Serial1/1 
  4.     summary-address 10.2.0.0 255.255.0.0 

R5:

  1. router eigrp QYT 
  2. address-family ipv4 unicast autonomous-system 666 
  3.    af-interface Serial1/1 
  4.     summary-address 10.1.0.0 255.255.0.0 

验证:

  1. R2#traceroute 10.1.100.100 source 10.2.100.100 numeric 
  2. Type escape sequence to abort. 
  3. Tracing the route to 10.1.100.100 
  4. VRF info: (vrf in name/id, vrf out name/id) 
  5.    1 10.2.12.1 9 msec 9 msec 9 msec 
  6.    2 10.12.13.3 9 msec 9 msec 10 msec 
  7.    3 10.1.35.5 9 msec *  6 msec 
  8.  
  9.  
  10. R5#traceroute 10.2.100.100 source 10.1.100.100 numeric 
  11. Type escape sequence to abort. 
  12. Tracing the route to 10.2.100.100 
  13. VRF info: (vrf in name/id, vrf out name/id) 
  14.    1 10.1.35.3 1 msec 0 msec 1 msec 
  15.    2 10.12.13.1 1 msec 0 msec 1 msec 
  16.    3 10.2.12.2 9 msec *  10 msec 

断开R1和R3之间的链路,验证备份链路是否能够正常转发流量;

  1. R1#configure terminal 
  2.  
  3. R1(config)#interface e0/3 
  4. R1(config-if)#shutdown 
  5.  
  6.  
  7. R2#traceroute 10.1.100.100 source 10.2.100.100 numeric 
  8. Type escape sequence to abort. 
  9. Tracing the route to 10.1.100.100 
  10. VRF info: (vrf in name/id, vrf out name/id) 
  11.    1 10.12.25.5 9 msec *  9 msec 
  12.  
  13.  
  14. R5#traceroute 10.2.100.100 source 10.1.100.100 numeric 
  15. Type escape sequence to abort. 
  16. Tracing the route to 10.2.100.100 
  17. VRF info: (vrf in name/id, vrf out name/id) 
  18.    1 10.12.25.2 8 msec *  9 msec 

测试完毕,请不要忘记恢复链路。

六、实现特殊业务走低速链路的需求

leak-map在EIGRP中并不止一种应用方案哦,下面介绍结合汇总命令的用法;

上面开启了末节路由器特性,默认仅仅通告本地产生的直连路由和汇总路由出去;

然后又做了汇总,汇总则抑制掉了明细;

现在,通过leak-map在汇总之后,允许特定的直连路由被通告给汇总方向的邻居;

配置:

R2:

  1. access-list 2 permit 10.2.201.0 0.0.0.255 
  2.  
  3. route-map LEAK permit 10 
  4.   match ip address 2 
  5.  
  6. router eigrp QYT 
  7.   address-family ipv4 unicast autonomous-system 666 
  8.    af-interface Serial1/1 
  9.     summary-address 10.2.0.0 255.255.0.0 leak-map LEAK 

R5:

  1. access-list 2 permit 10.1.201.0 0.0.0.255 
  2.  
  3. route-map LEAK permit 10 
  4.   match ip address 1 
  5.  
  6. router eigrp QYT 
  7.   address-family ipv4 unicast autonomous-system 666 
  8.    af-interface Serial1/1 
  9.     summary-address 10.2.0.0 255.255.0.0 leak-map LEAK 

验证:

  1. R2#show ip eigrp topology 10.1.201.0/24 | include from 
  2.    10.12.25.5 (Serial1/1), from 10.12.25.5, Send flag is 0x0 
  3.    10.2.12.1 (Serial1/0), from 10.2.12.1, Send flag is 0x0 
  4.  
  5.  
  6. R5#show ip eigrp topology 10.2.201.0/24 | include from 
  7.    10.12.25.2 (Serial1/1), from 10.12.25.2, Send flag is 0x0 

测试:

  1. R2#traceroute 10.1.201.100 source 10.2.201.100 numeric 
  2. Type escape sequence to abort. 
  3. Tracing the route to 10.1.201.100 
  4. VRF info: (vrf in name/id, vrf out name/id) 
  5.    1 10.12.25.5 9 msec *  9 msec 
  6.  
  7.  
  8. R5#traceroute 10.2.201.100 source 10.1.201.100 numeric 
  9. Type escape sequence to abort. 
  10. Tracing the route to 10.2.201.100 
  11. VRF info: (vrf in name/id, vrf out name/id) 
  12.    1 10.12.25.2 9 msec *  9 msec 

七、配置NAT

此部分不作为本案例研究重点,配置部分仅作示例

  1. R3(config)#int e0/2 
  2. R3(config-if)#ip nat outside 
  3.  
  4. R3(config)#int e0/3 
  5. R3(config-if)#ip nat inside 
  6.  
  7. access-list 1 permit 10.0.0.0 0.0.0.255 
  8.  
  9. ip nat inside source list 1 interface 【XXX】 overload 

八、合理分配R3和R4的上行链路资源

在R3和R4上配置静态默认路由,并以不同度量值引入EIGRP,尽量体现网络上行链路实际情况

  1. R3(config)#ip route 0.0.0.0 0.0.0.0 36.1.1.6  
  2. R4(config)#ip route 0.0.0.0 0.0.0.0 s1/0 

R3:

  1. router eigrp QYT 
  2.   address-family ipv4 unicast autonomous-system 666 
  3.    topology base 
  4.     redistribute static metric 10000 100 255 1 1500 

R4:

  1. router eigrp QYT 
  2.   address-family ipv4 unicast autonomous-system 666 
  3.    topology base 
  4.     redistribute static metric 1544 2000 255 1 1500 

九、在R5上实现去往互联网的业务流量非等价负载均衡

查看拓扑表,仅有一个后继,没有发现可行后继,说明要么只收到一个路径,要么就是有其它路径,但并不符合可行条件;

  1. R5#show ip eigrp topology 
  2.  
  3. P 0.0.0.0/0, 1 successors, FD is 196608000 
  4.          via 10.1.35.3 (196608000/131072000), Ethernet0/1 

查看拓扑表详细信息:

  1. R5#show ip eigrp topology detail-links 
  2.  
  3. P 0.0.0.0/0, 1 successors, FD is 196608000, serno 83 
  4.          via 10.1.35.3 (196608000/131072000), Ethernet0/1 
  5.          via 10.1.45.4 (1800711958/1735175958), Ethernet0/2 

从R4方向收到的关于默认路由的通告度量值为 1735175958 ,远远大于当前的可行距离 196608000;

要做非等价负载均衡,可行后继是必不可少的,通过偏移列表为从R5收到的相关前缀增加度量值,使得R4方向收进来的默认前缀能够满足可行条件,从而使R4成为可行后继;

1735175958 - 196608000 = 1538567958 我们为从R3收到的前缀增加的度量值 稍微 1538567958 整个数字即可

R5:

  1. access-list 5 permit 0.0.0.0 
  2.  
  3. router eigrp QYT 
  4.   address-family ipv4 unicast autonomous-system 666 
  5.    topology base 
  6.     offset-list 5 in 1538570000 Ethernet0/1 

验证:

  1. R5#show ip eigrp topology 
  2.  
  3. P 0.0.0.0/0, 1 successors, FD is 1735178000 
  4.          via 10.1.35.3 (1735178000/1669642000), Ethernet0/1 
  5.          via 10.1.45.4 (1800711958/1735175958), Ethernet0/2 

现在,我们根据通告距离和当前可行距离计算非等价负载均衡变量:

可行后继路径上的可行距离 / 当前可行距离 并向上取整

  1. 1800711958 / 1735178000 = 2 

R5:

  1. router eigrp QYT 
  2.   address-family ipv4 unicast autonomous-system 666 
  3.    topology base 
  4.     variance 2 

验证:

  1. R5#show ip route eigrp | begin Gateway 
  2. Gateway of last resort is 10.1.45.4 to network 0.0.0.0 
  3.  
  4. D*EX  0.0.0.0/0 [170/14068062] via 10.1.45.4, 00:00:54, Ethernet0/2 
  5.                               [170/13556078] via 10.1.35.3, 00:00:54, Ethernet0/1 

总结:这是一个专门考察EIGRP应用的实战案例,希望能对大家有所帮助,共同探讨学习。

责任编辑:赵宁宁 来源: 思科CCIE俱乐部
相关推荐

2013-05-30 10:42:53

路由技术路由表网络管理

2015-07-31 16:33:32

联想

2009-12-04 12:26:13

2015-07-31 16:14:24

联想

2010-04-23 16:30:41

广域网优化负载均衡华夏创新

2009-05-25 08:56:37

Westcon产品北电

2013-03-01 13:25:14

2009-01-11 10:30:00

负载均衡网络故障

2010-03-01 15:32:39

2013-10-17 15:50:03

移动

2017-05-22 11:16:35

2016-10-11 17:29:56

2012-03-13 09:48:55

调研

2016-12-23 18:32:55

网盘

2015-09-07 09:18:43

企业安全安全维度网络安全

2015-07-14 10:46:20

网盘

2016-02-17 14:01:24

中国软件网

2009-09-15 09:44:00

北电企业网

2016-01-15 16:06:44

奇瑞汽车

2016-10-09 15:15:29

网盘
点赞
收藏

51CTO技术栈公众号