Cisco网络协议:EIGRP向本区域下放默认路由的设置方法

所属分类: 网络 / 网络协议 阅读数: 1863
收藏 0 赞 0 分享

  EIGRP的定义

  EIGRP:Enhanced Interior Gateway Routing Protocol 即 增强内部网关路由线路协议。也翻译为 加强型内部网关路由协议。 EIGRP是Cisco公司的私有协议。Cisco公司是该协议的发明者和唯一具备该协议解释和修改权的厂商。 EIGRP结合了链路状态和距离矢量型路由选择协议的Cisco专用协议,采用弥散修正算法(DUAL)来实现快速收敛,可以不发送定期的路由更新信息以减少带宽的占用,支持Appletalk、IP、Novell和NetWare等多种网络层协议。

  默认路由

  默认路由是一种特殊的静态路由,指的是当路由表中与包的目的地址之间没有匹配的表项时路由器能够做出的选择·如果没有默认路由,那么目的地址在路由表中没有匹配表项的包将被丢弃· 默认路由在某些时候非常有效,当存在末梢网络时,默认路由会大大简化路由器的配置,减轻管理员的工作负担,提高网络性能。

 实验拓扑如下,路由器R1、R2、R3为内部路由器,而R4为外部路由,实验目的为AS内部路由器发放默认路由,那么如何实现呢,请看下面步骤。


  基础配置如下:

  R1:

  interface Loopback0

  ip address 1.1.1.1 255.255.255.0

  !

  interface FastEthernet0/0

  ip address 12.1.1.1 255.255.255.0

  !

  router eigrp 90

  network 0.0.0.0

  no auto-summary

  !

  ========================================================

  R2:

  interface Loopback0

  ip address 2.2.2.2 255.255.255.0

  !

  interface FastEthernet0/0

  ip address 23.1.1.2 255.255.255.0

  !

  interface FastEthernet0/1

  ip address 12.1.1.2 255.255.255.0

  !

  router eigrp 90

  network 0.0.0.0

  no auto-summary

  ========================================================

  R3:

  interface Loopback0

  ip address 3.3.3.3 255.255.255.0

  !

  interface FastEthernet0/1

  ip address 23.1.1.3 255.255.255.0

  !

  interface Serial1/0

  ip address 34.1.1.3 255.255.255.0

  !

  router eigrp 90

  network 23.1.1.3 0.0.0.0

  no auto-summary

  =========================================================

  R4:

  interface Loopback0

  ip address 4.4.4.4 255.255.255.0

  !

  interface Serial1/1

  ip address 34.1.1.4 255.255.255.0

  !

  ip route 0.0.0.0 0.0.0.0 Serial1/1 34.1.1.3

  方法1:通过在AS边界路由器R3上重分发静态的方式引入默认路由

  在R3配置如下:

  R3:

  ip route 0.0.0.0 0.0.0.0 Serial1/0 34.1.1.4

  Router eigrp 90

  Redistribute static

  R1:

  R1#show ip rou

  Gateway of last resort is 12.1.1.2 to network 0.0.0.0

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  2.0.0.0/24 is subnetted, 1 subnets

  D 2.2.2.0 [90/409600] via 12.1.1.2, 00:15:47, FastEthernet0/0

  23.0.0.0/24 is subnetted, 1 subnets

  D 23.1.1.0 [90/307200] via 12.1.1.2, 00:14:57, FastEthernet0/0

  12.0.0.0/24 is subnetted, 1 subnets

  C 12.1.1.0 is directly connected, FastEthernet0/0

  D*EX 0.0.0.0/0 [170/2221056] via 12.1.1.2, 00:03:44, FastEthernet0/0

  方法2:通过手工宣告默认静态路由,只是该路由不能指定下一跳

  R3:

  Ip route 0.0.0.0 0.0.0.0 serial 1/0

  Router eigrp 90

  Network 0.0.0.0

  R1:

  R1#show ip rou

  Gateway of last resort is 12.1.1.2 to network 0.0.0.0

  34.0.0.0/24 is subnetted, 1 subnets

  D 34.1.1.0 [90/2221056] via 12.1.1.2, 00:02:57, FastEthernet0/0

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  2.0.0.0/24 is subnetted, 1 subnets

  D 2.2.2.0 [90/409600] via 12.1.1.2, 00:23:44, FastEthernet0/0

  3.0.0.0/24 is subnetted, 1 subnets

  D 3.3.3.0 [90/435200] via 12.1.1.2, 00:02:57, FastEthernet0/0

  23.0.0.0/24 is subnetted, 1 subnets

  D 23.1.1.0 [90/307200] via 12.1.1.2, 00:22:55, FastEthernet0/0

  12.0.0.0/24 is subnetted, 1 subnets

  C 12.1.1.0 is directly connected, FastEthernet0/0

  D* 0.0.0.0/0 [90/2221056] via 12.1.1.2, 00:00:03, FastEthernet0/0

  方法3:使用ip default-network x.x.x.x,注意在使用该方法时边界路由器上要满足三个条件,条件一:路由表中必须要有该主类路由条目(该主类的子网路由不算),条件二:宣告时要同RIP一样宣告该主类网络,条件三:ip default-netwok 后的网络也必须是主类网络

  D* 0.0.0.0/0 [90/2221056] via 12.1.1.2, 00:00:03, FastEthernet0/0

  R3:

  Ip default-network 34.0.0.0

  Ip route 34.0.0.0 255.0.0.0 serial 1/0 34.1.1.4 //R3并没有该主类网络路由

  Router eigrp 90

  Network 34.0.0.0

  R1:

  R1#show ip route

  Gateway of last resort is 12.1.1.2 to network 34.0.0.0

  34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

  D 34.1.1.0/24 [90/2221056] via 12.1.1.2, 00:02:11, FastEthernet0/0

  D* 34.0.0.0/8 [90/2221056] via 12.1.1.2, 00:00:14, FastEthernet0/0

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  2.0.0.0/24 is subnetted, 1 subnets

  D 2.2.2.0 [90/409600] via 12.1.1.2, 00:02:11, FastEthernet0/0

  23.0.0.0/24 is subnetted, 1 subnets

  D 23.1.1.0 [90/307200] via 12.1.1.2, 00:02:11, FastEthernet0/0

  12.0.0.0/24 is subnetted, 1 subnets

  C 12.1.1.0 is directly connected, FastEthernet0/0

  其实我们不一定非要指定外网出接口作为默认网络,可以使用环回接口作默认网络可可控性也很强,只写出简单配置:

  C 12.1.1.0 is directly connected, FastEthernet0/0

R3:

  Ip default-network 192.168.10.0

  Interface loopback 1

  Ip address 192.168.10.1 255.255.255.0

  Router eigrp 90

  Network 192.168.10.0

  R1:

  R1#show ip rou

  Gateway of last resort is 12.1.1.2 to network 192.168.10.0

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  2.0.0.0/24 is subnetted, 1 subnets

  D 2.2.2.0 [90/409600] via 12.1.1.2, 00:08:12, FastEthernet0/0

  D* 192.168.10.0/24 [90/435200] via 12.1.1.2, 00:00:08, FastEthernet0/0

  23.0.0.0/24 is subnetted, 1 subnets

  D 23.1.1.0 [90/307200] via 12.1.1.2, 00:08:12, FastEthernet0/0

  12.0.0.0/24 is subnetted, 1 subnets

  C 12.1.1.0 is directly connected, FastEthernet0/0

  和上面做出比较,环回接口更加稳定,此外可以减小一个路由条目,内网不需要公网的参与,编址也有所优化,在网络中只有使用ip defaul-netwok下放的不是全0的默认路由

  方法4:由于EIGRP支持CIDR,而CIDR的极限就是0.0.0.0/0

  C 12.1.1.0 is directly connected, FastEthernet0/0

  R3:

  Interface fastethernet 0/1

  Ip summary-address eigrp 90 0.0.0.0 0.0.0.0

  R1:

  R1#show ip rou

  Gateway of last resort is 12.1.1.2 to network 0.0.0.0

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  2.0.0.0/24 is subnetted, 1 subnets

  D 2.2.2.0 [90/409600] via 12.1.1.2, 00:16:44, FastEthernet0/0

  23.0.0.0/24 is subnetted, 1 subnets

  D 23.1.1.0 [90/307200] via 12.1.1.2, 00:16:44, FastEthernet0/0

  12.0.0.0/24 is subnetted, 1 subnets

  C 12.1.1.0 is directly connected, FastEthernet0/0

  D* 0.0.0.0/0 [90/332800] via 12.1.1.2, 00:00:02, FastEthernet0/0

  以上就是Cisco网络协议EIGRP向本区域下放默认路由的设置方法,谢谢阅读,希望能帮到大家,请继续关注脚本之家,我们会努力分享更多优秀的文章。

更多精彩内容其他人还在看

网络协议是什么?网络协议三要素是什么?

本文向大家详细介绍网络协议是什么以及网络协议三要素是什么的基础知识,不懂的朋友可以通过本文了解学习
收藏 0 赞 0 分享

如何定义网络协议?网络协议有哪些意义?

本文将向大家详细介绍如何定义网络协议以及网络协议有哪些意义的基础知识,不明白的朋友可以过来学习一下
收藏 0 赞 0 分享

网络协议概述:物理层、连接层、网络层、传输层、应用层详解

这篇文章主要介绍了网络协议概述:物理层、连接层、网络层、传输层、应用层详解,本文用生活中的邮差与邮局来帮助理解复杂的网络协议,通俗易懂,文风幽默,是少见的好文章,需要的朋友可以参考下
收藏 0 赞 0 分享

TCP协议的概念以及与UDP的区别

这篇文章主要为大家介绍了什么是tcp?tcp协议的基础知识有哪些?与udp的区别在哪里?以下将详细介绍tcp的基础知识,需要的朋友可以参考下
收藏 0 赞 0 分享

PPP链路操作过程解析

 PPP协议中提供了一整套方案来解决链路建立、维护、拆除、上层协议协商、认证等问题。本片文章将具体讲述PPP链路的操作过程,需要的朋友可以参考下
收藏 0 赞 0 分享

局域网是什么 局域网的介绍

局域网(Local Area Network,LAN)是指在某一区域内由多台计算机互联成的计算机组
收藏 0 赞 0 分享

无盘网络是什么意思 无盘网络常识介绍

无盘网络是什么意思呢.我们来介绍一下
收藏 0 赞 0 分享

网络延长器是什么东西 网络延长器的简介

网络延长器就是能够把网络传输距离有效延长的设备
收藏 0 赞 0 分享

常见的无线网络协议介绍 全面认识无线网络协议的作用

本文介绍了一些常见的无线网络协议
收藏 0 赞 0 分享

如何在局域网内抢带宽的图文方法介绍

事情的起因是最近家里买了一台60寸的智能电视,支持点播(VOD)功能,家里的网络带宽理论上只有4M,在播放的时候,就会占用大量网络带宽,导致我同时上网浏览网页都很困难。
收藏 0 赞 0 分享
查看更多