EIGRP-浮动静态路由
EIGRP与静态路由重分布

EIGRP与静态路由重分布EIGRP与静态路由重分布一、网络拓扑图二、设备配置R1:Router>Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R1R1(config)#INT F 0/0R1(config-if)#ip address 192.168.1.254 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exit%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on InterfaceFastEthernet0/0, changed state to up R1(config)#R1(config)#int s 2/0R1(config-if)#ip address 192.168.2.1 255.255.255.0R1(config-if)#clo ra 64000R1(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial2/0, changed state to downR1(config-if)#exiR1(config)#router eigrp 1R1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R1(config-router)#exiR1(config)#do wrBuilding configuration...[OK]R2:Router>Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R2R2(config)#int s 2/0R2(config-if)#ip address 192.168.2.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to up R2(config)#int s 3/0%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2(config-if)#ip address 192.168.3.1 255.255.255.0R2(config-if)#clo ra 64000R2(config-if)#no shuR2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial3/0, changed state to downR2(config-if)#exiR2(config)#router eigrp 1R2(config-router)#network 192.168.2.0%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.2.1 (Serial2/0) is up: new adjacencyR2(config-router)#redistribute static metric 1000 100 1 250 150R2(config-router)#exiR2(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.2R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2R2(config)#do wrBuilding configuration...[OK]R3:Router>Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R3R3(config)#int f 0/0R3(config-if)#ip address 192.168.4.254 255.255.255.0R3(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changedstate to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR3(config-if)#exiR3(config)#int s 2/0R3(config-if)#ip address 192.168.3.2 255.255.255.0R3(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial2/0, changed state to up R3(config-if)#exiR3(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1R3(config)#do wrBuilding configuration...[OK]测试结果:从PC0 ping PC1:。
华为路由器浮动静态路由及负载均衡

实验目的:浮动静态路由、负载均衡1、拓扑2、配置地址R1配置interface GigabitEthernet0/0/0ip address 200.1.1.1 255.255.255.0#interface GigabitEthernet0/0/1ip address 200.1.3.1 255.255.255.0#interface GigabitEthernet0/0/2ip address 192.168.1.254 255.255.255.0查看接口地址配置[AR1]display ip interface brief*down: administratively down^down: standby(l): loopback(s): spoofingThe number of interface that is UP in Physical is 4 The number of interface that is DOWN in Physical is 0 The number of interface that is UP in Protocol is 4 The number of interface that is DOWN in Protocol is 0Interface IP Address/Mask PhysicalProtocolGigabitEthernet0/0/0 200.1.1.1/24 up up GigabitEthernet0/0/1 200.1.3.1/24 up up GigabitEthernet0/0/2 192.168.1.254/24 up up NULL0 unassigned up up(s)R2#interface GigabitEthernet0/0/1ip address 200.1.2.2 255.255.255.0#interface GigabitEthernet0/0/0ip address 200.1.1.2 255.255.255.0R3interface GigabitEthernet0/0/1ip address 200.1.2.3 255.255.255.0interface GigabitEthernet0/0/0ip address 200.1.3.3 255.255.255.0interface GigabitEthernet0/0/ip address 192.168.2.254 255.255.255.03、配置路由[AR1]ip route-static 192.168.2.0 24 200.1.3.3[AR3]ip route-static 192.168.1.0 24 200.1.3.1[AR2]ip route-static 192.168.1.0 24 200.1.1.1 去A[AR2]ip route-static 192.168.2.0 24 200.1.2.3 去B跟踪路由4、配置浮动静态路由实现路由备份[AR1]ip route-static 192.168.1.0 24 200.1.2.2 preference 100[AR1]ip route-static 192.168.2.0 24 200.1.1.2 preference 100查看路由表没有上面的路由条目,原因优先级高才写入路由表192.168.2.0/24 Static 60 0 RD 200.1.3.3[AR1]display ip routing-table protocol staticRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : StaticDestinations : 1 Routes : 2 Configured Routes : 2Static routing table status : <Active>Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 600 RD 200.1.3.3 GigabitEthernet0/0/1Static routing table status : <Inactive>Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 1000 R 200.1.1.2 GigabitEthernet0/0/05、手动制造故障[AR1]interface g0/0/1[AR1-GigabitEthernet0/0/1]shutdown浮动路由写入路由表192.168.2.0/24 Stati c 100 0 200.1.1.2---------------------------------------------------------------------------------------------------------------------二、通过负载均衡实现网络优化创建等价路由:优先级、cost、目标地址、掩码相同[AR3]ip route-static 192.168.1.0 24 200.1.2.2[AR1]ip route-static 192.168.2.024 200.1.1.2[AR1]display ip routing-table protocol staticRoute Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : StaticDestinations : 1 Routes : 2 Configured Routes : 2Static routing table status : <Active>Destinations : 1 Routes : 2Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.2.0/24 Static 60 0 RD 200.1.3.3 GigabitEthernet0/0/1 Static 600 RD 200.1.1.2 GigabitEthernet0/0/0验证:在两条链路上抓包看有流量经过两条链路!。
eigrp协议配置及路由重发布静态路由

Eigrp的配置以及路由的重发布目的:掌握路由Eigrp的配置以及路由重发布准备:先配置一条以eigrp协议运行的链路PC1——R1——R2——R3——PC2设备基础配置:PC1的配置如下:路由器R1的配置如下:Router1>enRouter1#conf tEnter configuration commands, one per line. End with CNTL/Z.Router1(config)#int f0/0Router1(config-if)#ip address 192.168.1.2 255.255.255.0Router1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router1(config-if)#int f0/1Router1(config-if)#ip add 172.168.1.1 255.255.255.0Router1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up路由器R2的配置如下:Router2>enRouter2#conf tEnter configuration commands, one per line. End with CNTL/Z.Router2(config)#int f0/0Router2(config-if)#ip add 172.168.1.2 255.255.255.0Router2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter2(config-if)#int f0/1Router2(config-if)#ip add 172.168.2.1 255.255.255.0Router2(config-if)#no shRouter2(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up路由器R3的配置如下:Router3>enRouter3#conf tEnter configuration commands, one per line. End with CNTL/Z.Router3(config)#int f0/1Router3(config-if)#ip add 172.168.2.2 255.255.255.0Router3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter3(config-if)#int f0/0Router3(config-if)#ip add 192.168.2.2 255.255.255.0Router3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up PC2的配置如下:下面先验证下相邻设备之间是否可以通行经检验以上设置可以使PC1——R1——R2——R3——PC2链路中的相邻设备间互相通信接下来在R1,R2,R3 三台路由器中配置eigrp路由协议配置EIGRP语法:在全局模式下输入route eigrp 【as-number】R1配置如下:Router1(config-if)#exitRouter1(config)#route eigrp 100Router1(config-router)#net 192.168.1.0 0.0.0.255Router1(config-router)#net 172.168.1.0 0.0.0.255配置完R1看下配置是否生效:Router1(config-router)#end%SYS-5-CONFIG_I: Configured from console by consoleRouter1#show runBuilding configuration...Current configuration : 519 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Router1!!!!!!!!!!!!!!!!!!interface FastEthernet0/0ip address 192.168.1.2 255.255.255.0 duplex autospeed auto!interface FastEthernet0/1ip address 172.168.1.1 255.255.255.0 duplex autospeed auto!router eigrp 100network 192.168.1.0network 172.168.1.0 0.0.0.255auto-summary!ip classless!!!!!!!line con 0line vty 0 4login!!!End看见运行配置中以上配置eigrp协议生效同理在R2,R3中配置eigrp协议R2的配置如下:Router2#conf tEnter configuration commands, one per line. End with CNTL/Z.Router2(config)#route eig 100Router2(config-router)#net 172.168.1.0 0.0.0.255%DUAL-5-NBRCHANGE: IP-EIGRP 100:Neighbor 172.168.1.1 (FastEthernet0/0) is up: new adjacencyRouter2(config-router)#net 172.168.2.0 0.0.0.255R3的配置如下:Router3(config)#rout eigrp 100Router3(config-router)#net 192.168.2.0 0.0.0.255Router3(config-router)#net 172.168.2.0 0.0.0.255Router3(config-router)#%DUAL-5-NBRCHANGE: IP-EIGRP 100:Neighbor 172.168.2.1 (FastEthernet0/1) is up: new adjacencyeigrp协议配置好后。
华为路由交换由浅入深系列(二)静态路由、浮动路由、默认路由配置以及华为路由协议优先级总结

华为路由交换由浅入深系列(二)静态路由、浮动路由、默认路由配置以及华为路由协议优先级总结掌握目标一、配置设备名称与IP地址:二、配置静态路由三、配置浮动路由用于备份四、配置默认路由五、了解华为不同路由协议的优先级一、配置设备名称与IP地址:R1:<Huawei>system-viewEnter system view,return user view with Ctrl+Z.[Huawei]sysname R1[R1]interface g0/0/1[R1-GigabitEthernet0/0/1]ip address202.100.1.1255.255.255.0 quit[R1]interface g0/0/2[R1-GigabitEthernet0/0/2]ip add202.100.2.1255.255.255.0quit[R1-GigabitEthernet0/0/1]int lo0 =====创建环回接口[R1-LoopBack0]ip add1.1.1.1255.255.255.255[R1-LoopBack0]quit[R1]display current-configuration interface =====显示接口信息#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1ip address202.100.1.1255.255.255.0#interface GigabitEthernet0/0/2ip address202.100.2.1255.255.255.0#interface NULL0#interface LoopBack0ip address1.1.1.1255.255.255.255R2:[R2]interface g0/0/1[R2-GigabitEthernet0/0/1]ip add202.100.1.2255.255.255.0 [R2-GigabitEthernet0/0/1]int g0/0/0[R2-GigabitEthernet0/0/0]ip add202.100.3.2255.255.255.0 [R2-GigabitEthernet0/0/0]int lo0[R2-LoopBack0]ip ad2.2.2.2255.255.255.255[R2-LoopBack0]quitR3:[R3]int g0/0/2[R3-GigabitEthernet0/0/2]ip add202.100.2.3255.255.255.0 [R3-GigabitEthernet0/0/2]int g0/0/0[R3-GigabitEthernet0/0/0]ip add202.100.3.3255.255.255.0 [R3-GigabitEthernet0/0/0]int lo0[R3-LoopBack0]ip add3.3.3.3255.255.255.255<R1>ping-c2202.100.1.2=====ping两个数据包PING202.100.1.2:56data bytes,press CTRL_C to breakReply from202.100.1.2:bytes=56Sequence=1ttl=255time=10ms Reply from202.100.1.2:bytes=56Sequence=2ttl=255time=1ms---202.100.1.2ping statistics---2packet(s)transmitted2packet(s)received0.00%packet lossround-trip min/avg/max=1/5/10ms<R1>ping-c2202.100.2.3PING202.100.2.3:56data bytes,press CTRL_C to breakReply from202.100.2.3:bytes=56Sequence=1ttl=255time=20ms Reply from202.100.2.3:bytes=56Sequence=2ttl=255time=10ms---202.100.2.3ping statistics---2packet(s)transmitted2packet(s)received0.00%packet lossround-trip min/avg/max=10/15/20ms<R1>display ip routing-table ====查看路由表Route Flags:R-relay,D-download to fib------------------------------------------------------------------------------Routing Tables:PublicDestinations:11 Routes:11Destination/Mask Proto Pre Cost Flags NextHop Interface1.1.1.1/32Direct0 127.0.0.0/8Direct0 0 D 127.0.0.1127.0.0.1127.0.0.1LoopBack00 D InLoopBack0InLoopBack0InLoopBack0GigabitEthernet0127.0.0.1/32Direct0 127.255.255.255/32Direct0 202.100.1.0/24Direct0 0 D0 D 127.0.0.1 0 D 202.100.1.1二、配置静态路由[R1]ip route-static 3.3.3.3 255.255.255.255 202.100.2.3 ===添加静态路由[R1]ip route-static 202.100.3.0 255.255.255.0 202.100.2.3[R1]display ip routing-table =====Static 代表静态路由,60 代表静态路由优先级Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: PublicDestinations : 13 Routes : 13Destination/Mask Proto Pre Cost Flags NextHop Interface1.1.1.1/32 Direct 03.3.3.3/32 Static 60<R1>ping -c 1 3.3.3.3 PING 3.3.3.3: 56 data bytes, press CTRL_C to breakReply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=10 ms0 D 127.0.0.1 LoopBack0 0 RD 202.100.2.3 GigabitEthernet0<R1>ping -c 1 202.100.3.3PING202.100.3.3:56data bytes,press CTRL_C to breakReply from202.100.3.3:bytes=56Sequence=1ttl=255time=10ms三、配置浮动路由用于备份配置备份静态路由,当R1与R3之间链路出现故障时,可走R2。
浮动静态路(路由备份)由及负载均衡

浮动静态路(路由备份)由及负载均衡浮动静态路由(Floating Static Route)是一种特殊的静态路由,通过配置去往相同的目的网段,但优先级不同的静态路由,以保证在网络中优先级较高的路由,即主路由失效的情况下,提供备份路由。
正常情况下,备份路由不会出现在路由表中。
负载均衡(Load sharing),当数据有多条可选路径前往同一目的网络,可以通过配置相同优先级和开销的静态路由实现负载均衡,使得数据的传输均衡地分配到多条路径上,从而实现数据分流、减轻单条路径负载过重的效果。
而当其中某一条路径失效时,其他路径仍然能够正常传输数据,也起到了冗余作用。
本案例网络拓扑如图。
1、配置浮动路由实现路由备份[R1]ip route-static 192.168.16.0 23 192.168.255.2 //配置通过R2处两个网络的静态路由,路由优先级值默认为60[R1]ip route-static 192.168.16.0 23 192.168.4.2 preference 100 //通过R2两网络的静态路由,路由优先级值为100[R2]ip route-static 192.168.0.0 23 192.168.255.1 //配置通过R1处两个网络的静态路由,路由优先级值默认为60[R2]ip route-static 192.168.0.0 23 192.168.4.1 preference 100//通过R1两网络的静态路由,路由优先级值为100[R1]display ip routing-table //查看R1的活动路由表信息Route Flags: R - relay, D - download to fibRouting Tables: PublicDestinations : 17 Routes : 17Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.16.0/23 Static 60 0 RD 192.168.255.2 GigabitEthernet0/0/1在R1中,到达R2处两网络的静态路由信息共配置了两个,下一跳为192.168.255.2的路由信息使用默认的优先权值60,另外一条修改优先权值为100,值越小优先权越高,故在活动路由表中只出现下一跳为192.168.255.2的路由信息(主用路由,状态为active),而下一跳为192.168.4.2的路由信息目前处于不活动状态(Inactive),其作为备份路由存在,当主用路由线路出问题时,备份路由立即成为活动路由以保证网络的正常通信。
浮动静态路由的实现原理

浮动静态路由的实现原理一、引言在计算机网络中,路由是实现不同网络之间通信的关键技术之一。
浮动静态路由是一种常见的路由选择协议,它通过路由器之间的信息交换和计算,确定数据包在网络中的传输路径。
本文将介绍浮动静态路由的实现原理。
二、浮动静态路由的概念浮动静态路由是一种基于静态路由表的路由选择协议。
静态路由表是由网络管理员手动配置的,其中包含了网络中各个子网的路由信息。
而浮动静态路由则是在静态路由表的基础上,通过动态修改路由表中的某些项,实现网络中路径的动态调整。
三、实现原理浮动静态路由的实现原理主要包括以下几个方面:1. 路由表更新浮动静态路由的核心思想是通过监测网络中的链路状态来实现路径的动态调整。
当网络中某条链路发生故障或拥堵时,路由器会收到相应的消息,并根据这些消息更新自己的路由表。
路由表的更新可以通过两种方式实现:一种是完全替换整个路由表,另一种是只修改受影响的部分。
2. 路由计算路由计算是浮动静态路由的关键步骤。
在路由计算过程中,路由器根据收集到的链路状态信息,使用一定的算法计算出最佳路径,并将其更新到路由表中。
常用的路由计算算法有距离矢量算法和链路状态算法。
距离矢量算法通过比较不同路径的距离来选择最佳路径,而链路状态算法则是通过收集全网的链路状态信息,并计算最短路径树来选择最佳路径。
3. 路由选择路由选择是根据路由表中的信息,确定数据包的传输路径。
当路由器收到一个数据包时,它会查找路由表中与目标IP地址匹配的条目,并选择最佳路径进行转发。
在浮动静态路由中,路由选择是根据路由表中的动态更新来进行的,因此可以根据实际情况选择最佳路径。
4. 路由器间的信息交换实现浮动静态路由需要路由器之间进行链路状态的交换和路由表的更新。
路由器之间通过某种协议(如RIP、OSPF等)交换链路状态信息,并根据接收到的信息更新自己的路由表。
这种信息交换可以通过广播、多播或单播等方式进行。
四、优缺点分析浮动静态路由作为一种简单有效的路由选择协议,具有以下优点:1. 简单易用:浮动静态路由的配置和管理相对简单,不需要复杂的算法和消息交换机制。
《网络系统集成》浮动静态路由
《网络系统集成》浮动静态路由2011-05-16 23:33:22| 分类:系统集成阅读91 评论0 字号:大中小订阅一、实验目的1、学习管理距离的配置;2、理解冗余线路中路由的控制与管理,学习配置浮动静态路由表。
二、实验环境规划和网络拓扑结构1、实验环境规划两个路由器两端有两个网络192.168.1.0/24和172.16.1.0/24,在两个路由器之间设置两条链路。
2、实验拓扑图三、实验步骤1、使用PT放置两台2621XM;分别关闭电源,安装WIC-1T模块,打开电源;连接串行线路。
2、配置两台路由器的端口地址和环回端口。
R1上的配置Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#int lo0 配置环回端口%LINK-5-CHANGED: Interface Loopback0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state toupR1(config-if)#ip addr 192.168.1.1 255.255.255.0 环回端口地址R1(config-if)#exitR1(config)#int s0/0 配置线路1R1(config-if)#ip addr 172.16.16.5 255.255.255.252 线路1端口地址R1(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/0, changed state to downR1(config-if)#exitR1(config)#int f0/0 配置线路2R1(config-if)#ip addr 172.16.16.1 255.255.255.252 线路2端口地址R1(config-if)#exitR1(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upR1(config-if)#R2上的配置Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#int lo0%LINK-5-CHANGED: Interface Loopback0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state toupR2(config-if)#ip addr 172.16.1.1 255.255.255.0R2(config-if)#exitR2(config)#int s0/0R2(config-if)#clock ra 64000R2(config-if)#ip addr 172.16.16.6 255.255.255.252R2(config-if)#no sh%LINK-5-CHANGED: Interface Serial0/0, changed state to upR2(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state toupR2(config-if)#int f0/0R2(config-if)#ip addr 172.16.16.2 255.255.255.252R2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upR2(config-if)#3、在两个路由器上分别配置两条链路的路由,但是不改变管理距离R1上的配置R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.16.2R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.16.6R1(config)#R2上的配置R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.16.1R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.16.5R2(config)#4、查看此时的路由表R1#show ip route………………172.16.0.0/24 is subnetted, 1 subnetsS 172.16.1.0 [1/0] via 192.168.16.2[1/0] via 192.168.16.6 这里同时存在两条静态路由同时工作,默认的管理距离都为1C 192.168.1.0/24 is directly connected, Loopback0192.168.16.0/30 is subnetted, 2 subnetsC 192.168.16.0 is directly connected, FastEthernet0/0C 192.168.16.4 is directly connected, Serial0/0R2#show ip route………………172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Loopback0S 192.168.1.0/24 [1/0] via 192.168.16.1[1/0] via 192.168.16.5192.168.16.0/30 is subnetted, 2 subnetsC 192.168.16.0 is directly connected, FastEthernet0/0C 192.168.16.4 is directly connected, Serial0/05、将链路1的管理距离改为100R1(config)#ip route 172.16.1.0 255.255.255.0 192.168.16.2 100R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.16.1 1006、查看此时的路由表,可以看到只有链路2的路由可以使用。
负载均衡-浮动静态路由
CA扩展实验:路由链路负载均衡,浮动静态路由发布时间:2008-05-23路由路由,保证在一条链路shut down后启用另一条链路。
实验目的:学会应用静态路由,动态路由,了解管理距离。
实验环境:cisco7200路由器3台〔模拟〕一、名词概念静态路由静态路由是指由网络管理员手工配置的路由信息。
当网络的拓扑结构或链路的状态发生变化时,网络管理员需要手工去修改路由表中相关的静态路由信息。
静态路由信息在缺省情况下是私有的,不会传递给其他的路由器。
当然,网管员也可以通过对路由器进展设置使之成为共享的。
静态路由一般适用于比拟简单的网络环境,在这样的环境中,网络管理员易于清楚地了解网络的拓扑结构,便于设置正确的路由信息。
在一个支持DDR〔dial-on-demand routing〕的网络中,拨号链路只在需要时才拨通,因此不能为动态路由信息表提供路由信息的变更情况。
在这种情况下,网络也适合使用静态路由。
使用静态路由的另一个好处是网络安全某某性高。
动态路由因为需要路由器之间频繁地交换各自的路由表,而对路由表的分析可以揭示网络的拓扑结构和网络地址等信息。
因此,网络出于安全方面的考虑也可以采用静态路由。
大型和复杂的网络环境通常不宜采用静态路由。
一方面,网络管理员难以全面地了解整个网络的拓扑结构;另一方面,当网络的拓扑结构和链路状态发生变化时,路由器中的静态路由信息需要大X围地调整,这一工作的难度和复杂程度非常高。
管理距离管理距离是指一种路由协议的路由可信度。
每一种路由协议按可靠性从高到低,依次分配一个信任等级,这个信任等级就叫管理距离。
对于两种不同的路由协议到一个目的地的路由信息,路由器首先根据管理距离决定相信哪一个协议。
一些常见路由协议的管理距离Route Source --Default Distance ValuesConnected interface --0Static route* --1Enhanced Interior Gateway Routing Protocol (EIGRP) summary route--5External Border Gateway Protocol(BGP)--20Internal EIGRP-- 90IGRP --100OSPF --110Intermediate System-to-Intermediate System (IS-IS)--115Routing Information Protocol (RIP) --120Exterior Gateway Protocol (EGP) --140On Demand Routing (ODR) --160External EIGRP --170Internal BGP --200Unknown** --255/管理距离是可以更改的。
任务3.3 静态路由汇总及浮动路由配置
动路由配置Ø路由汇总Ø路由负载分担Ø路由备份•如果网络中的业务网段较多,那么针对每个网段都配置静态路由,会造成路由表项太多,增加了匹配延时。
•静态路由不能适应网络拓扑变化,一旦设备或链路出现故障,相关联的通信必然中断。
•本次任务使用路由汇总和浮动路由两项优化技术,分别解决业务网段数量多和静态路由动态适应网络拓扑变化的问题。
Ø基本概念:将若干条明细路由汇总成一条路由,这条路由称为汇总路由。
•汇总路由的网络范围一定要包含各明细路由的网络范围,否则会造成部分网段无法通信。
•通过路由汇总可以减少路由条目,降低路由查询对设备的消耗。
•路由汇总计算的方法是CIDR,即无类域间路由。
•路由汇总有效实施依赖IP地址的合理规划。
•静态路由、动态路由均可进行路由汇总。
示例中R2连接8个连续子网172.16.0.0/24-172.16.7.0/24 ,配置静态路由,使R1能够访问这8个子网。
可以添加下列8条明细路由来实现:[R1]ip route-static 172.16.0.0 24 10.1.0.2[R1]ip route-static 172.16.1.0 24 10.1.0.2[R1]ip route-static 172.16.2.0 24 10.1.0.2[R1]ip route-static 172.16.3.0 24 10.1.0.2[R1]ip route-static 172.16.4.0 24 10.1.0.2[R1]ip route-static 172.16.5.0 24 10.1.0.2[R1]ip route-static 172.16.6.0 24 10.1.0.2[R1]ip route-static 172.16.7.0 24 10.1.0.2也可以添加1条汇总路由来实现:[R1]ip route-static 172.16.0.0 21 10.1.0.2Ø路由汇总计算:基于CIDR思想,采用可变子网掩码,屏蔽A、B、C主类网络的限定。
浮动静态路由配置
通过浮动静态路由实现链路备份编者:daiwell 绍兴职业技术学院7.5工作任务公司内部有一个非常重要的数据库服务器,所在网段为192.168.1.0/24,平常访问通过Router1和Router2两个路由器构成的通信链路,路由协议采用静态路由协议。
最近由于链路故障造成数据库存取中断,造成了经济损失。
为了保证该网段能够不间断访问,要求实现一个备份冗余的通信链路,因此决定在该网段增加一条浮动静态路由,为PC2所在网络与PC1所在网络增加冗余通信链路。
7.6相关知识浮动静态路由是一种特殊的静态路由。
由于浮动静态路由的优先级很低,在路由表中,它属于候补人员,它仅仅在首选路由失败时才发生作用,即在一条首选路由发生失败的时候,浮动静态路由才起作用,因此浮动静态路由主要考虑链路的冗余性能。
浮动静态路由通过配置一个比主路由的管理距离更大的静态路由,保证网络中主路由失效的情况下,提供备份路由。
但在主路由存在的情况下它不会出现在路由表中。
浮动静态路由主要用于拔号备份。
浮动静态路由的配置方法与静态路由相同,要注意preference-value为该路由的优先级别,即管理距离,可以根据实际情况指定,范围0~255。
其配置格式如下:[no] ip route ip-address { mask | mask-length } { interfacce-name | gateway-address } [preference-value ] [ reject | blackhole ]管理距离是指一种路由协议的路由可信度。
每一种路由协议按可靠性从高到低,依次分配一个信任等级,这个信任等级就叫管理距离。
对于两种不同的路由协议到一个目的地的路由信息,路由器首先根据管理距离决定相信哪一个协议。
一般管理距离是一个0-255的数字,值越大,则优先级越小。
一般优先级顺序为:直连路由> 静态路由> 动态路由协议,不同协议的管理距离不一样,同一协议生成的路由管理距离也可能不一样,例如几种ospf协议的管理距离就不同,区域内路由> 区域间路由> 区域外路由。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
拓扑:
目的:将后门链路作为备份路由,用静态路由配置。
过程:
(1)配置IP地址。
R1>en
R1#conf
R1(config)#int s0/0
R1(config-if)#ip add 10.10.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int f1/0
R1(config-if)#int f1/0
R1(config-if)#ip add 10.10.14.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R2#conf t
R2(config)#int s0/0
R2(config-if)#ip add 10.10.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s0/1
R2(config-if)#ip add 10.10.23.2 255.255.255.0
R2(config-if)#no shut
R3>en
R3#conf t
R3(config-if)#int s0/0
R3(config-if)#ip add 10.10.23.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int f1/0
R3(config-if)#ip add 10.10.34.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
(2)主干通道配置EIGRP,注意不要宣告备份路由的网段。
R1#conf t
R1(config)#router eigrp 90
R1(config-router)#network 10.10.12.1 0.0.0.0
R1(config-router)#network 1.1.1.1 0.0.0.0
R1(config-router)#no auto
R2(config)#router eigrp 90
R2(config-router)#network 10.10.12.2 0.0.0.0
R2(config-router)#network 10.10.23.2 0.0.0.0
R2(config-router)#no auto
R3#conf t
R3(config)#router eigrp 90
R3(config-router)#network 10.10.23.3 0.0.0.0
R3(config-router)#network 3.3.3.3 0.0.0.0
R3(config-router)#no auto
(3)备份路由配置静态路由。
R1(config)#ip route 3.3.3.3 255.255.255.255 10.10.14.4 91 R3(config)#ip route 1.1.1.1 255.255.255.255 10.10.34.4 91 配置完之后的路由表:
将R1的S0/0关闭之后的路由表:。