负载均衡-浮动静态路由

合集下载

路由负载均衡和浮动路由

路由负载均衡和浮动路由

路由负载均衡和浮动路由
浮动静态路由:一种特殊的静态路由,通过配置去往相同的目的网段,但是优先级不同的静态路由,为了保证在网络中优先级较高的路由,即主路由失效的情况下,提供备份路由。

正常情况下,备份路由时不会出现在路由表中的。

负载均衡:当数据有多条可选路径前往同一目的网络,可以通过配置相同优先级和开销的静态路由来实现负载均衡,使得数据的传输均衡的分配到多条路径上,从而可以实现数据分流、减少单条路径负载过重的情况。

然而当其中某一条路径失效时,其他的路径仍然是可以正常的传输数据的,同时也起到了冗余的作用。

网络工程与系统集成期末复习题

网络工程与系统集成期末复习题

简答题:1.何时适合使用静态路由中小型的网络,网络拓扑比较简单,不存在线路冗余等因素,通常采用静态路由的方式来配置2.动态路由协议的功能是用于建立和维护路由表和按照达到数据包的目的地的最佳路径转发数据数据包的动态路由协议3.等价负载均衡当到达目的地有多条路径时,而有多条路径的metric值一样,这时就可以做等价负载均衡,让数据包通过多条链路均衡转发4.非对称路由非对称路由是指往返某一节点的路径不一致,两个方向的延时不同。

5.如何定义网络系统质量因素6.如何进行网络项目成本测算7.简述Alex Zinin的路由表三原则每台路由器根据其自身路由表中的信息独立作出决策。

一台路由器的路由表中包含某些信息并不表示其他路由器也包含相同的信息。

有关两个网络之间路径的路由信息并不能提供反向路径(即返回路径)的路由信息。

8.简述网络集成的生命周期和实施步骤1.启动阶段:1识别需求2可行性研究3立项4初步集成方案5项目章程确立2.计划阶段:1人员确立2系统设计效果确立3资源费用分析4风险再评估5工作分解6项目建议和合同洽谈3.实施阶段:1项目团队建立2实施计划确立3资源、成本、采购、沟通4项目实施5项目监理和控制6质量、资金控制4.收尾阶段:1项目验收准备2文档整理3项目初验4项目后评审5资源再分配9.简述网络集成三个基本目标、内容和方法目标:1:用户目标:用户在投入人力,物力,财力简历网络系统后,能达到用户需求2:系统集成目标:先进的技术,适当的产品,精湛的技术,优质的服务方法:1:独立集成2:联合集成3:委托集成商内容:1:需求分析2:网络规划3:产品选择4:网络设计5:系统集成实施6:应用软件开发和调试7:系统测试8:用户培训9:竣工文档编制10:项目验收11:售后技术支持12:系统维护和质保10.简述生成树协议的原理生成树协议运行生成树算法的网桥/交换机在规定的间隔内通过网桥协议数据单元(BPDU)的组播帧与其他交换机交换配置信息11.简述链路聚合技术链路聚合技术亦称主干技术(Trunking)或捆绑技术(Bonding),其实质是将两台设备间的数条物理链路"组合"成逻辑上的一条数据通路,称为一条聚合链路12.简述RAID技术以及特点13.简述防火墙技术防火墙指的是一个有软件和硬件设备组合而成、在内部网和外部网之间、专用网与公共网之间的界面上构造的保护屏障。

H3C网络技术课程学习笔记讲解

H3C网络技术课程学习笔记讲解

H3C⽹络技术课程学习笔记讲解H3CNE⽹络技术课程学习笔记第1章计算机⽹络概述⼀、计算机⽹络的演化计算机⽹络⾄今共经历4个时期:第⼀代:以单个计算机为中⼼的远程联机系统(FED前端机)第⼆代:以多个主机通过通信线路互联(IMP接⼝报⽂处理机)第三代:在OSI标准的基础上,具有统⼀⽹络体系结构(OSI)第四代:将多个具有独⽴⼯作能⼒的计算机系统通过通信设备、线路、路由功能完善的⽹络软件实现⽹络资源共享和数据通信的系统(Internet)下⼀代:因特⽹、移动⽹、固话⽹的融合(IPv6)⼆、计算机⽹络的类型按地理覆盖范围:lan、man、wan、Intenet按⽹络拓扑结构:星状、环状、总线、混合状、⽹状按管理模式:对等、C/S三、衡量计算机⽹络的性能指标1、带宽:数字信道上能够传送的最⾼数据传输速率2、时延:传播时延+发送时延+处理时延3、传播时延带宽积:传播时延*带宽四、⽹络标准化组织1、美国国际标准化组织(ANSI)2、电⽓电⼦⼯程师协会(IEEE)3、国际通信联盟(ITU)4、国际标准化组织(ISO)5、电⼦⼯业联合会(EIA)6、通信⼯业联合会(TIA)7、Internet⼯程任务组(IETF)第2章OSI参考模型与TCP IP模型分层的有点:1、促进标准化⼯作,允许供应商开发2、各层间独⽴,把⽹络操作划分成复杂性低的单元3、灵活好⽤,某⼀层变化不会影响到其他层,设计者可专⼼开发模块功能4、各层间通过⼀个接⼝在上下层间通信⼀、了解OSI参考模型和TCP/IP模型的产⽣背景1、OSI(开放式系统互连参考模型)是ISO(国际标准化组织)于1978年所定义的开放式系统模型,它描述了⽹络层次结构,保证了各种类型⽹络技术的兼容性、互操作性。

各⽹络设备⼚商按照此模型的标准来开发⽹络产品,实现彼此的兼容。

2、TCP/IP协议起源于20世纪60年代,由IEEE提出,是⽬前应⽤最⼴、功能最强⼤的⼀个协议,已成为计算机相互通信的标准。

13_静态路由

13_静态路由
©2009,蓝狐网络版权所有,未经授权不得使用与传播. 3
路由的发现
路由的发现: – 路由器默认情况下只能发现自己直连网段的路由。当直连链路配 置了IP,并且状态UP,路由器会自动将该网段放入路由表。
协议 目标网段/掩码 出接口
192.168.10.1/24 F0/0
下一跳
-------------
©2009,蓝狐网络版权所有,未经授权不得使用与传播.
10
简化型静态路由配置命令
简化型静态路由配置命令
• ip route x.x.x.x x.x.x.x xxxx • ip route 目标网段 掩码 出接口
Router(config)# ip route 172.16.10.0 255.255.255.0 S0/0 简化型静态路由配置命令只能用于出接口是PPP或HDLC点到点链 路;该配置方法用于出接口是Ethernet等多路访问介质时,会出 现下一跳二层封装失败问题。 常在拨号(模拟拨号、ISDN、PPPoE等)环境下应用。
分部一172.16.32.0/24---172.16.39.0/24
S0/0 192.168.1.1/30 PPP 192.168.1.2/30 S0/0
RA
S0/1 192.168.1.5/30 HDLC
192.168.1.6/30 S0/0
RB
RC
F0/0 F0/0 192.168.18.1/24 192.168.22.1/24 192.168.22.10/24 192.168.18.10/24
C C C
192.168.1.0/30 192.168.4.0/30 192.168.10.0/24
S0/0 S0/1 F0/0
S0/0 RA 192.168.1.1/30 PPP 192.168.1.2/30 S0/0

华为路由器浮动静态路由及负载均衡

华为路由器浮动静态路由及负载均衡

实验目的:浮动静态路由、负载均衡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验证:在两条链路上抓包看有流量经过两条链路!。

Static_Route

Static_Route

静态路由表示:(1)Router(config)#ip route 目标地址子网掩码下一跳IP地址解析两次,第一次找目的地的下一跳IP,第二次找下一跳IP地址的送出接口,采用递归算法(2)带送出接口的静态路由Router(config)#ip route 目标地址子网掩码送出接口解析一次,目的地址,直接送出接口(3)联合使用出站接口和下一跳地址的静态路由Router(config)#ip route 目标地址子网掩码送出接口下一跳IP地址如果直接把静态路由指向一个广播型出站接口,而不使用下一跳IP地址,可能会导致广播网络上出现过多的流量,而且还可能耗尽路由器的内存。

因为只带送出接口时,路由器认为目标地址是直连网络,每次转发数据包时会发送ARP请求,如果广网络上有一台路由器回复ARP相应,那么每次到达都会触发一个ARP请求和响应,如果附加下一跳地址,那么路由器不再认为目标网络是直连,ARP请求只能是下一跳,而且仅第一个包才会触发ARP请求。

Router#show ip route 显示出IPv4路由表IPv6静态路由IPv6静态路由配置方法与IPv4基本相同,而IPv6使用目标网络的前缀长度,而且IPv6路由选择缺省情况下是关闭的,需要在特权模式下试用命令ipv6uncasting-routing启动IPv6路由选择。

IPv6地址是EUI-64格式。

配置:Router(config)#ipv6 route 目标网络前缀长度下一跳地址或送出接口查看相关接口的IPv6信息:Router#show ipv6 interface与IPv4一样,IPv6静态路由也可以使用出站接口代替下一跳地址,一种是在接口后面输入地址,也可以输入链路本地地址,或者一个配置的地址。

当出站接口是广播接口(以太网)时,应用下一跳地址。

Router#show ipv6 route 显示出IPv6路由表,其中包括前缀长度、下一跳地址或出站接口、管理距离和度量注意:虽然使用出站接口后静态路由的管理距离仍为1,但与IPv4不同,因为路由显示目标网络不是直连。

BSCI文档

BSCI文档

CCNP BSCI Lab 1实验拓扑实验要求1.配置浮动静态路由,实现负载均衡和冗余,具体要求如下:a)R1转发到101.1.0.0/24网段和101.1.2.0/24的数据包时首选出口是E0/0.2,次选出口是E0/0.3b)R1转发到101.1.1.0/24网段和101.1.3.0/24的数据包时首选出口是E0/0.3,次选出口是E0/0.2c)R2转发到100.1.0.0/24网段和100.1.2.0/24的数据包时首选出口是E0/0.2,次选出口是E0/0.3d)R2转发到100.1.1.0/24网段和100.1.3.0/24的数据包时首选出口是E0/0.3,次选出口是E0/0.22.去掉要求1的静态路由配置,配置RIPv1,查看两台路由器的路由表,总结RIPv1的特点3.配置RIPv2,实现两台路由器能学到对方的所有子网4.将两台路由器的E0/0.2口配置为被动端口,这个接口只接收而不发送路由协议。

5.配置Offset-list,是两台路由器的loopback口在对方的路由表中变成5跳6.配置RIPv2的md5验证,实现两台路由器之间安全地传递路由信息7.配置RIPv2的汇总,在保证网络能正常通信的情况下尽量减小路由器的路由表实验步骤以下演示中的X以“0”为例,您在实验的X要使用自己的组号1. 配置置浮动静态路由,实现R1转发到101.1.0.0/24网段的数据包时首选出口是E0/0.2,次选出口是E0/0.3;R2转发到100.1.0.0/24网段的数据包时首选出口是E0/0.2,次选出口是E0/0.3;R1(config)#interface ethernet 0/0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface ethernet 0/0.2R1(config-subif)#encapsulation dot1Q 2R1(config-subif)#ip address 1.1.0.1 255.255.255.0R1(config-subif)#exitR1(config)#interface ethernet 0/0.3R1(config-subif)#encapsulation dot1Q 3R1(config-subif)#ip address 1.2.0.1 255.255.255.0R1(config-subif)#exitR1(config)#interface loopback 0R1(config-if)#ip address 100.1.0.1 255.255.255.0R1(config-if)#exitR1(config)#interface loopback 1R1(config-if)#ip address 100.1.1.1 255.255.255.0R1(config-if)#exitR1(config)#interface loopback 2R1(config-if)#ip address 100.1.2.1 255.255.255.0R1(config-if)#exitR1(config)#interface loopback 3R1(config-if)#ip address 100.1.3.1 255.255.255.0R1(config-if)#exitR2(config)#interface ethernet 0/0R2(config-if)#no shutdownR2(config-if)#exitR2(config)#interface ethernet 0/0.2R2(config-subif)#encapsulation dot1Q 2R2(config-subif)#ip address 1.1.0.2 255.255.255.0R2(config-subif)#exitR2(config)#interface ethernet 0/0.3R2(config-subif)#encapsulation dot1Q 3R2(config-subif)#ip address 1.2.0.2 255.255.255.0R2(config-subif)#exitR2(config)#interface loopback 0R2(config-if)#ip address 101.1.0.1 255.255.255.0R2(config-if)#exitR2(config)#interface loopback 1R2(config-if)#ip address 101.1.1.1 255.255.255.0R2(config-if)#exitR2(config)#interface loopback 2R2(config-if)#ip address 101.1.2.1 255.255.255.0R2(config-if)#exitR2(config)#interface loopback 3R2(config-if)#ip address 101.1.3.1 255.255.255.0R2(config-if)#exitR2(config)#检查R1和R2的接口状态R1#show protocolsGlobal values:Internet Protocol routing is enabledEthernet0/0 is up, line protocol is upEthernet0/0.2 is up, line protocol is upInternet address is 1.1.0.1/24Ethernet0/0.3 is up, line protocol is upInternet address is 1.2.0.1/24Ethernet0/1 is administratively down, line protocol is down Loopback0 is up, line protocol is upInternet address is 100.1.0.1/24Loopback1 is up, line protocol is upInternet address is 100.1.1.1/24Loopback2 is up, line protocol is upInternet address is 100.1.2.1/24Loopback3 is up, line protocol is upInternet address is 100.1.3.1/24R2#show protocolsGlobal values:Internet Protocol routing is enabledEthernet0/0 is up, line protocol is upEthernet0/0.2 is up, line protocol is upInternet address is 1.1.0.2/24Ethernet0/0.3 is up, line protocol is upInternet address is 1.2.0.2/24Ethernet0/1 is administratively down, line protocol is down Loopback0 is up, line protocol is upInternet address is 101.1.0.1/24Loopback1 is up, line protocol is upInternet address is 101.1.1.1/24Loopback2 is up, line protocol is upInternet address is 101.1.2.1/24Loopback3 is up, line protocol is upInternet address is 101.1.3.1/24检查R1和R2的路由表R1#show ip route ------一共有6个条目Gateway of last resort is not set1.0.0.0/24 is subnetted, 2 subnetsC 1.1.0.0 is directly connected, Ethernet0/0.2C 1.2.0.0 is directly connected, Ethernet0/0.3100.0.0.0/24 is subnetted, 4 subnetsC 100.1.1.0 is directly connected, Loopback1C 100.1.0.0 is directly connected, Loopback0 C 100.1.3.0 is directly connected, Loopback3 C 100.1.2.0 is directly connected, Loopback2R2#show ip routeGateway of last resort is not set1.0.0.0/24 is subnetted, 2 subnetsC 1.1.0.0 is directly connected, Ethernet0/0.2 C 1.2.0.0 is directly connected, Ethernet0/0.3101.0.0.0/24 is subnetted, 4 subnetsC 101.1.0.0 is directly connected, Loopback0 C 101.1.1.0 is directly connected, Loopback1 C 101.1.2.0 is directly connected, Loopback2 C 101.1.3.0 is directly connected, Loopback3配置浮动静态路由:R1(config)#ip route 101.1.0.0 255.255.255.0 1.1.0.2 R1(config)#ip route 101.1.0.0 255.255.255.0 1.2.0.2 5 R1(config)#ip route 101.1.2.0 255.255.255.0 1.1.0.2 R1(config)#ip route 101.1.2.0 255.255.255.0 1.2.0.2 5 R1(config)#ip route 101.1.1.0 255.255.255.0 1.2.0.2 R1(config)#ip route 101.1.1.0 255.255.255.0 1.1.0.2 5 R1(config)#ip route 101.1.3.0 255.255.255.0 1.2.0.2 R1(config)#ip route 101.1.3.0 255.255.255.0 1.1.0.2 5R2(config)#ip route 100.1.0.0 255.255.255.0 1.1.0.1 R2(config)#ip route 100.1.0.0 255.255.255.0 1.2.0.1 5 R2(config)#ip route 100.1.2.0 255.255.255.0 1.1.0.1 R2(config)#ip route 100.1.2.0 255.255.255.0 1.2.0.1 5 R2(config)#ip route 100.1.1.0 255.255.255.0 1.2.0.1 R2(config)#ip route 100.1.1.0 255.255.255.0 1.1.0.1 5 R2(config)#ip route 100.1.3.0 255.255.255.0 1.2.0.1 R2(config)#ip route 100.1.3.0 255.255.255.0 1.1.0.1 5检查(以R1为例)R1#show ip routeGateway of last resort is not set1.0.0.0/24 is subnetted, 2 subnetsC 1.1.0.0 is directly connected, Ethernet0/0.2 C 1.2.0.0 is directly connected, Ethernet0/0.3100.0.0.0/24 is subnetted, 4 subnetsC 100.1.1.0 is directly connected, Loopback1 C 100.1.0.0 is directly connected, Loopback0 C 100.1.3.0 is directly connected, Loopback3 C 100.1.2.0 is directly connected, Loopback2101.0.0.0/24 is subnetted, 4 subnetsS 101.1.0.0 [1/0] via 1.1.0.2S 101.1.1.0 [1/0] via 1.2.0.2S 101.1.2.0 [1/0] via 1.1.0.2S 101.1.3.0 [1/0] via 1.2.0.2R1(config)#interface ethernet 0/0.2R1(config-subif)#shutdownR1#show ip route1.0.0.0/24 is subnetted, 1 subnetsC 1.2.0.0 is directly connected, Ethernet0/0.3100.0.0.0/24 is subnetted, 4 subnetsC 100.1.1.0 is directly connected, Loopback1 C 100.1.0.0 is directly connected, Loopback0 C 100.1.3.0 is directly connected, Loopback3 C 100.1.2.0 is directly connected, Loopback2101.0.0.0/24 is subnetted, 4 subnetsS 101.1.0.0 [5/0] via 1.2.0.2S 101.1.1.0 [1/0] via 1.2.0.2S 101.1.2.0 [5/0] via 1.2.0.2S 101.1.3.0 [1/0] via 1.2.0.2测试完要把被关闭的接口打开,以免影响后面的实验2.去掉要求1的静态路由配置,配置RIPv1,查看两台路由器的路由表,总结RIPv1的特点R1(config)#no ip routingR1(config)#ip routingR1(config)#router ripR1(config-router)#network 1.0.0.0R1(config-router)#network 100.0.0.0R2(config)#no ip routingR2(config)#ip routingR2(config)#router ripR2(config-router)#network 1.0.0.0R2(config-router)#network 101.0.0.0R1#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 26 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not set Redistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain Ethernet0/0.2 1 1 2Ethernet0/0.3 1 1 2Loopback0 1 1 2Loopback1 1 1 2Loopback2 1 1 2Loopback3 1 1 2Automatic network summarization is in effectMaximum path: 4Routing for Networks:1.0.0.0100.0.0.0Routing Information Sources:Gateway Distance Last Update1.2.0.2 120 00:00:071.1.0.2 120 00:00:07Distance: (default is 120)R1# show ip route1.0.0.0/24 is subnetted, 2 subnetsC 1.1.0.0 is directly connected, Ethernet0/0.2C 1.2.0.0 is directly connected, Ethernet0/0.3100.0.0.0/24 is subnetted, 4 subnetsC 100.1.1.0 is directly connected, Loopback1C 100.1.0.0 is directly connected, Loopback0C 100.1.3.0 is directly connected, Loopback3C 100.1.2.0 is directly connected, Loopback2R 101.0.0.0/8 [120/1] via 1.1.0.2, 00:00:23, Ethernet0/0.2[120/1] via 1.2.0.2, 00:00:20, Ethernet0/0.3通过查看RIPv1的工作状态和路由表回答以下问题:a.RIP每________秒发送一次更新b.默认情况下,RIP发送版本_____,接收版本_____.c.RIP默认管理距离是_______d.RIP最大支持_____条等价路径e.RIPv1是_____类路由协议(有/无)3.配置RIPv2,实现两台路由器能学到对方的所有子网R1(config)#router ripR1(config-router)#version 2R1(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#version 2R2(config-router)#no auto-summaryR1#clear ip rout *R1#shR1#show ip routR1#show ip routeGateway of last resort is not set1.0.0.0/24 is subnetted, 2 subnetsC 1.1.0.0 is directly connected, Ethernet0/0.2C 1.2.0.0 is directly connected, Ethernet0/0.3100.0.0.0/24 is subnetted, 4 subnetsC 100.1.1.0 is directly connected, Loopback1C 100.1.0.0 is directly connected, Loopback0C 100.1.3.0 is directly connected, Loopback3C 100.1.2.0 is directly connected, Loopback2101.0.0.0/24 is subnetted, 4 subnetsR 101.1.0.0 [120/1] via 1.1.0.2, 00:00:01, Ethernet0/0.2[120/1] via 1.2.0.2, 00:00:02, Ethernet0/0.3 R 101.1.1.0 [120/1] via 1.1.0.2, 00:00:02, Ethernet0/0.2[120/1] via 1.2.0.2, 00:00:02, Ethernet0/0.3 R 101.1.2.0 [120/1] via 1.1.0.2, 00:00:03, Ethernet0/0.2[120/1] via 1.2.0.2, 00:00:03, Ethernet0/0.3 R 101.1.3.0 [120/1] via 1.1.0.2, 00:00:03, Ethernet0/0.2[120/1] via 1.2.0.2, 00:00:03, Ethernet0/0.34. 将两台路由器的E0/0.2口配置为被动端口R1(config)#router ripR1(config-router)#passive-interface ethernet 0/0.2R2(config)#router ripR2(config-router)#passive-interface ethernet 0/0.2由于R2将E0/0.2口配置成了被动端口,故R1无法通过1.1.0.2获得RIP路由了。

思科Cisco路由器配置——浮动静态路由配置实验详解

思科Cisco路由器配置——浮动静态路由配置实验详解

思科Cisco路由器配置——浮动静态路由配置实验详解本⽂实例讲述了思科Cisco浮动静态路由配置实验。

分享给⼤家供⼤家参考,具体如下:⼀、实验⽬的:利⽤⼀条静态路由作为两条负载均衡的浮动静态路由⼆、拓扑图如下:三、具体步骤配置(1)R1路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1 --修改路由器名为R1R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.12.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR1(config-if)#interface s0/0/1 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.23.2 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/1, changed state to downR1(config-if)#exit --返回上⼀级R1(config)#interface l0 --进⼊回环端⼝R1(config-if)#ip address 10.1.1.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#interface f0/0 --进⼊端⼝R1(config-if)#ip address 192.168.13.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#exit --返回上⼀级R1(config)#route rip --开启rip协议R1(config-router)#version 2 --版本2R1(config-router)#no auto-summary --关闭⾃动汇总R1(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR1(config-router)#network 192.168.23.0R1(config-router)#network 10.1.1.0R1(config-router)#exit --返回上⼀级R1(config)#ip route 20.1.1.0 255.255.255.0 192.168.13.2 121 --配置浮动静态路由,级别为121R1(config)#end --返回特权模式(2)R2路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2 --修改路由器名为R2R2(config)#interface s0/0/1 --进⼊端⼝R2(config-if)#clock rate 64000 --配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.12.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface s0/0/0 --进⼊端⼝R2(config-if)#clock rate 64000 --为端⼝配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.23.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#interface l0 --进⼊回环端⼝R2(config-if)#ip address 20.1.1.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface f0/1 --进⼊端⼝R2(config-if)#ip address 192.168.13.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#route rip --开启rip协议R2(config-router)#version 2 --版本2R2(config-router)#no auto-summary --关闭⾃动汇总R2(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR2(config-router)#network 192.168.23.0R2(config-router)#network 20.1.1.0R2(config-router)#exit --返回上⼀级R2(config)#ip route 10.1.1.0 255.255.255.0 192.168.13.1 121 --配置浮动静态路由,级别为121 R2(config)#end --返回特权模式四、验证1、分别查看R1与R2路由表信息(1)R1路由表信息(2)R2路由表信息2、断开两条负载均衡路径(12.0与23.0⽹段)并查看路由表信息(1)R1路由表信息(2)R2路由表信息解释:当两条负载均衡路径断掉,这条浮动的静态路由就会出现。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

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/管理距离是可以更改的。

链路负载均衡解决电信与网通之间、不同链路之间互联互通的问题,除此之外,双线路可以互为备份,如一条链路出现故障时,可以自动切换到其它链路;并在一条链路流量大时自动分配其余流量到其他的链路上等等。

浮动静态路由不同于其他的静态路由,浮动静态路由不能永久的保存于路由表中。

它仅仅只会在主链路DOWN时,才回UP起来。

它是被做为主链路的备份链路来使用的。

实验拓扑:如下1.分别登陆三台路由器,进展预配置Router>enRouter#conf tRouter(config)#host R1/其它路由器分别为R2、R3R1(config)#enable password ciscoR1(config)#no ip domain-lookup 打错命令·禁止查找2、配置普通用户登录密码R1(config)#line con 0R1(config-line)#password ciscoR1(config-line)#login - -- 激活密码3、配置普通用户连接时间R1(config-line)#logging synchronousR1(config-line)#exec-timeout 0 04、配置管理员远程登录密码R1(config-line)#line vty 0 4R1(config-line)#password ciscoR1(config-line)#login5、远程连接时间R1(config-line)#logging synchronousR1(config-line)#exec-timeout 0 02.配置三台路由器的链路,接口与地址参见拓扑图一3.配置静态路由R1上R1(config)#ip routeR1(config)#ip route .20 255.255.255.255 199.99.1.2R1(config)#ip routeR1(config)#ip route在R1上show ip route,出现负载均衡链路,红色标记.0/32 is subnetted, 1 subnetsSC199.99.1.0/24 is directly connected, FastEthernet0/0 C.0/8 is directly connected, Loopback0C192.168.1.0/24 is directly connected, Serial1/0 192.168.2.0/32 is subnetted, 1 subnetsSS*R2上R2(config)#ip routeR2(config)#ip routeR3上R3(config)#ip routeR3(config)#ip route 192.168.1.1 255.255.255.255 199.99.1.1 R3(config)#ip routeR3(config)#ip routeR3(config)#ip route在R3上show ip route,出现负载均衡链路,红色标记C.0/8 is directly connected, Loopback0C199.99.1.0/24 is directly connected, FastEthernet0/0.0/32 is subnetted, 1 subnetsS192.168.1.0/32 is subnetted, 1 subnetsC192.168.2.0/24 is directly connected, Serial1/1S*从R1上使用扩展ping命令来查看R1#pingProtocol [ip]:Target IP address: .20Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended mands [n]: ySource address or interface: .10Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]: rNumber of hops [ 9 ]:Loose, Strict, Record, Timestamp, Verbose[RV]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to .20, timeout is 2 seconds: Packet sent with a source address of .10Packet has IP options:Total option bytes= 39, padded length=40 Record route: <*>(.0)(.0)(.0)(.0)(.0)(.0)(.0)(.0)(.0)Reply to request 0 (724 ms).Received packet has optionsTotal option bytes= 40, padded length=40/第一条链路Record route:(192.168.1.1)/出发(192.168.2.1)/经过(.20)/到达(192.168.2.2)/回来路过(192.168.1.2)/回来路过(.10) <*> /回来(.0)(.0)(.0)End of listReply to request 1 (280 ms).Received packet has options Total option bytes= 40, padded length=40/第二条链路Record route:(199.99.1.1) /出发(.20) /到达(199.99.1.2)/返回路过(.10) <*> /回来(.0)(.0)(.0)(.0)(.0)End of listReply to request 2 (712 ms).Received packet has options Total option bytes= 40, padded length=40Record route:(192.168.1.1)(192.168.2.1)(.20)(192.168.2.2)(192.168.1.2)(.10) <*>(.0)(.0)(.0)End of listReply to request 3 (280 ms).Received packet has options Total option bytes= 40, padded length=40Record route:(199.99.1.1)(.20)(199.99.1.2)(.10) <*>(.0)(.0)(.0)(.0)(.0)End of listReply to request 4 (568 ms).Received packet has options Total option bytes= 40, padded length=40Record route:(192.168.1.1)(192.168.2.1)(.20)(192.168.2.2)(192.168.1.2)(.10) <*>(.0)(.0)(.0)End of listSuccess rate is 100 percent (5/5), round-trip min/avg/max = 280/512/724 ms三、浮动静态路由实验过程1.先no掉R1上的3条静态路由R1(config)# no ip routeR1(config)# no ip route2.利用路由协议的管理距离〔distance〕重新在R1上写3条静态路由,并将管理距离增大到120R1(config)# ip route .20 255.255.255.255 199.99.1.2 120R1(config)# ip route 192.168.2.2 255.255.255.255 199.99.1.2 120R1(config)# ip route .0 0.0.0.0 199.99.1.2 120/R1(config)# ip route .20 255.255.255.255 199.99.1.2 ?<1-255>Distance metric for this routenameSpecify name of the next hoppermanentpermanent routetagSet tag for this route<cr>3.用show ip route命令查看路由表,发现所写的上面3条静态路由在路由表里不可见.0/32 is subnetted, 1 subnetsSC199.99.1.0/24 is directly connected, FastEthernet0/0C.0/8 is directly connected, Loopback0C192.168.1.0/24 is directly connected, Serial1/0192.168.2.0/32 is subnetted, 1 subnetsS*4.测试链路是否正常进入R1的S1/0口做shut down 操作,然后在R1上ping R3的回环地址.20 发现是通的,用扩展ping发现路由的路线是(199.99.1.1)(.20)(199.99.1.2)(.10) <*>说明上面输入的3条静态路由由于把管理距离改大,在s1/0接口没有shut down 时。

相关文档
最新文档