Cisco網(wǎng)絡(luò)協(xié)議:EIGRP向本區(qū)域下放默認路由的設(shè)置方法

EIGRP的定義
EIGRP:Enhanced Interior Gateway Routing Protocol 即 增強內(nèi)部網(wǎng)關(guān)路由線路協(xié)議。也翻譯為 加強型內(nèi)部網(wǎng)關(guān)路由協(xié)議。 EIGRP是Cisco公司的私有協(xié)議。Cisco公司是該協(xié)議的發(fā)明者和唯一具備該協(xié)議解釋和修改權(quán)的廠商。 EIGRP結(jié)合了鏈路狀態(tài)和距離矢量型路由選擇協(xié)議的Cisco專用協(xié)議,采用彌散修正算法(DUAL)來實現(xiàn)快速收斂,可以不發(fā)送定期的路由更新信息以減少帶寬的占用,支持Appletalk、IP、Novell和NetWare等多種網(wǎng)絡(luò)層協(xié)議。
默認路由
默認路由是一種特殊的靜態(tài)路由,指的是當(dāng)路由表中與包的目的地址之間沒有匹配的表項時路由器能夠做出的選擇·如果沒有默認路由,那么目的地址在路由表中沒有匹配表項的包將被丟棄· 默認路由在某些時候非常有效,當(dāng)存在末梢網(wǎng)絡(luò)時,默認路由會大大簡化路由器的配置,減輕管理員的工作負擔(dān),提高網(wǎng)絡(luò)性能。
實驗拓撲如下,路由器R1、R2、R3為內(nèi)部路由器,而R4為外部路由,實驗?zāi)康臑锳S內(nèi)部路由器發(fā)放默認路由,那么如何實現(xiàn)呢,請看下面步驟。
基礎(chǔ)配置如下:
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上重分發(fā)靜態(tài)的方式引入默認路由
在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:通過手工宣告默認靜態(tài)路由,只是該路由不能指定下一跳
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,注意在使用該方法時邊界路由器上要滿足三個條件,條件一:路由表中必須要有該主類路由條目(該主類的子網(wǎng)路由不算),條件二:宣告時要同RIP一樣宣告該主類網(wǎng)絡(luò),條件三:ip default-netwok 后的網(wǎng)絡(luò)也必須是主類網(wǎng)絡(luò)
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并沒有該主類網(wǎng)絡(luò)路由
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
其實我們不一定非要指定外網(wǎng)出接口作為默認網(wǎng)絡(luò),可以使用環(huán)回接口作默認網(wǎng)絡(luò)可可控性也很強,只寫出簡單配置:
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
和上面做出比較,環(huán)回接口更加穩(wěn)定,此外可以減小一個路由條目,內(nèi)網(wǎng)不需要公網(wǎng)的參與,編址也有所優(yōu)化,在網(wǎng)絡(luò)中只有使用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網(wǎng)絡(luò)協(xié)議EIGRP向本區(qū)域下放默認路由的設(shè)置方法,謝謝閱讀,希望能幫到大家,請繼續(xù)關(guān)注腳本之家,我們會努力分享更多優(yōu)秀的文章。
相關(guān)文章
- 這篇文章主要是為探索一下這個校驗和算法具體怎么實現(xiàn)的,需要的朋友可以參考下2013-10-26
- NTP:Network Time Protocol,網(wǎng)絡(luò)時間協(xié)議,用于時間同步,它可以提供高精準(zhǔn)度的時間校正(LAN上與標(biāo)準(zhǔn)時間差小于1毫秒,WAN上幾十毫秒),且可通過加密確認的方式來防止2013-03-28
OSPF協(xié)議在通信網(wǎng)絡(luò)中的應(yīng)用分析及算法優(yōu)化
這篇文章主要為大家介紹了開放最短路徑優(yōu)先(osPF)協(xié)議和通信一絡(luò)的相關(guān)概念,對osPF協(xié)議的應(yīng)用機制和算法優(yōu)化行分析。 需要的朋友可以和腳本之家的小編一起學(xué)習(xí)一下2014-09-23Cisco網(wǎng)絡(luò)協(xié)議:EIGRP中生成默認路由的4種方法
這篇文章主要為大家介紹了在Cisco網(wǎng)絡(luò)協(xié)議EIGRP中生成默認路由的4種方法,第一種寫一條默認路由,network到EIGRP進程,第二種寫一條默認路由,重分布靜態(tài)到EIGRP進程,第三2014-09-29- 今天我們給大家介紹的是路由器的一些基礎(chǔ)知道,路由表和路由選擇算法,這是每一個網(wǎng)管在設(shè)置網(wǎng)絡(luò)時必須掌握的內(nèi)容,否則就無法設(shè)置好路由器,從而造成整個網(wǎng)絡(luò)不穩(wěn)定,更多2012-11-13
敏捷交換機的特色:iPCA網(wǎng)絡(luò)包守恒算法
華為新推出S 12700 敏捷交換機,利用其靈活可編程的特點,開創(chuàng)性地實現(xiàn)了iPCA 功能,全面提升網(wǎng)絡(luò)質(zhì)量檢測和故障精確定位能力,降低網(wǎng)絡(luò)運維成本,iPCA網(wǎng)絡(luò)包守恒算法是怎2014-09-24- 我們都知道HTTPS能夠加密信息,以免敏感信息被第三方獲取。所以很多銀行網(wǎng)站或電子郵箱等等安全級別較高的服務(wù)都會采用HTTPS協(xié)議2021-11-27
網(wǎng)絡(luò)基礎(chǔ)知識:了解網(wǎng)絡(luò)協(xié)議的組成和常見的網(wǎng)絡(luò)協(xié)議
協(xié)議是網(wǎng)絡(luò)中計算機或設(shè)備之間進行通信的一系列規(guī)則的集合。常用協(xié)議有IP、TCP、HTTP、POP3、SMTP等2014-09-16網(wǎng)絡(luò)協(xié)議概述:物理層、連接層、網(wǎng)絡(luò)層、傳輸層、應(yīng)用層詳解
這篇文章主要介紹了網(wǎng)絡(luò)協(xié)議概述:物理層、連接層、網(wǎng)絡(luò)層、傳輸層、應(yīng)用層詳解,本文用生活中的郵差與郵局來幫助理解復(fù)雜的網(wǎng)絡(luò)協(xié)議,通俗易懂,文風(fēng)幽默,是少見的好文章,需2014-09-01例解EIGRP DUAL算法網(wǎng)絡(luò)收斂原理圖文教程
EIGRP(增強內(nèi)部網(wǎng)關(guān)路由協(xié)議)可以不用定期的發(fā)送路由更新信息以減少帶寬的占用,Appletalk、IP、Novell和NetWare多種網(wǎng)絡(luò)層協(xié)議可以支持2016-07-04