码迷,mamicode.com
首页 > 其他好文 > 详细

EIGRP汇总路由配置和默认路由下发

时间:2015-06-16 01:26:31      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:路由汇总   eigrp路由汇总   eigrp默认路由   默认路由下发   

配置汇总路由

  • EIGRP的自动汇总功能在有些高版本的IOS中默认是关闭的;在某些低版本的ios中默认是打开的,可以用show running-config|inc rotue查看是否打开。


  • EIGRP自动汇总只针对自己产生的(直连路由)路由,对于转发的(从别的路由器学习来的)路由条目不会自动汇总;而手动汇总既可以针对自己产生的路由做,也可以针对学到的路由做。


  • 自动汇总有可能会带来问题,例如两个下连路由器把各自的同一主类路由器条目(如A类)自动汇总给同一上连路由器,则上连路由器针对同一汇总路由条目会有两个下一跳出口,从而导致通信混乱(路由转发在默认ief打开的情况下,是逐流(源IP、目的IP、源端口、目的端口和协议5元组相同则是同一数据流)转发)而不是进程转发。


  • 如果同时配置了自动汇总和手动汇总的话,则手动汇总和自动汇总同时生效。


  • EIGRP的stub是针对路由器而言;而OSPF是针对区域而言的。


  • EIGRP有3个管理距离:1、EIGRP内部为90;2、EIGRP外部为170;3、EIGRP汇总黑洞路由为5(可以通过带上子网掩码show这条路由条目查看)。

汇总路由特点:

  1. 本地必须有明细路由,才会从做汇总的接口发出汇总路由;

  2. 直到明细的最后一条路由消失,汇总条目才会消失;

  3. 汇总路由的metri值会取明细路由中最小的metric值;

  4. 会在做汇总的路由器上产生一条特殊的指向空接口(null)的路由,这条特殊EIGRP汇总路由的AD值是5是用来防环的(如果这台设备有默认路由);

  5. 只发汇总,不发明细。但是用ip summary eigrp后可以跟leak-map,配合ACL,泄露出某些明细路由(12.4版本以上的IOS才有)。


下发默认路由
有4种方式可以下发默认路由:
1、network 0.0.0.0:

ip route 0.0.0.0 0.0.0.0 出接口 (只能接出接口不能用下一跳,想象成该路由是本地的一个接口)
router eigrp 100
  network 0.0.0.0(宣告了所有接口,就把上面想象成本地接口的路由也宣告到EIGRP进程里了,所以其他路由器引入的是D路由)


2、redistribute static:

ip route 0.0.0.0 0.0.0.0 接出接口或下一跳
router eigrp 100
  redistribute static
其他路由器引入的是DEX

3、ip summary eigrp AS号 0.0.0.0 0.0.0.0;
因为EIGRP支持CIDR,与RIP不同,可以直接汇总到0.0.0.0,然后传播该路由给其他路由器,不用再取一个静态默认路由做/0到/0的汇总。

4、全局模式下ip default-network 默认路由(出口所在网络)//不推荐使用
与RIP相比,在EIGRP中使用本命令要满足一下条件:
  1、接口IP地址必须要是主类,不能是子网(或者利用auto summary)
  2、接口必须宣告进EIGRP
  3、使用命令下发时也必须写上这个接口的主类网络号

    实例:

   


技术分享

R1#sh ip route
Codes: 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

Gateway of last resort is 172.16.1.2 to network 192.168.10.0

D*   192.168.10.0/24 [90/2681856] via 172.16.1.2, 00:48:14, Serial0/2
     172.16.0.0/30 is subnetted, 2 subnets
D       172.16.1.4 [90/2681856] via 172.16.1.2, 00:59:26, Serial0/2
C       172.16.1.0 is directly connected, Serial0/2
D*   0.0.0.0/0 [90/2681856] via 172.16.1.2, 00:34:42, Serial0/2


R2#sh run | sec eigrp
router eigrp 50
 network 172.16.1.0 0.0.0.3
 network 172.16.1.4 0.0.0.3
 network 192.168.10.0
 network 0.0.0.0
 auto-summary

!
ip default-network 192.168.10.0
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Serial0/3
!

R2#sh ip route
Codes: 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

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

 *   192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.10.0/30 is directly connected, Serial0/3
D*      192.168.10.0/24 is a summary, 00:15:49, Null0
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.1.4/30 is directly connected, Serial0/0
D       172.16.0.0/16 is a summary, 00:15:49, Null0
C       172.16.1.0/30 is directly connected, Serial0/1
S*   0.0.0.0/0 is directly connected, Serial0/3


R3(config)#end
R3#sh ip
*Mar  1 02:13:49.395: %SYS-5-CONFIG_I: Configured from console by console
R3#sh ip route
Codes: 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

Gateway of last resort is 192.168.10.1 to network 0.0.0.0

C    192.168.10.0/24 is directly connected, Serial0/2
C    192.168.0.0/24 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, Loopback1
C    192.168.2.0/24 is directly connected, Loopback2
C    192.168.3.0/24 is directly connected, Loopback3
S*   0.0.0.0/0 [1/0] via 192.168.10.1



本文出自 “E网情深” 博客,请务必保留此出处http://jettcai.blog.51cto.com/1447637/1662152

EIGRP汇总路由配置和默认路由下发

标签:路由汇总   eigrp路由汇总   eigrp默认路由   默认路由下发   

原文地址:http://jettcai.blog.51cto.com/1447637/1662152

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!