H3C路由学习笔记-静态路由_第1页
H3C路由学习笔记-静态路由_第2页
H3C路由学习笔记-静态路由_第3页
H3C路由学习笔记-静态路由_第4页
H3C路由学习笔记-静态路由_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

..H3C路由〔MSR26-301、进入系统视图Startupconfigurationfiledoesnotexist.Performingautomaticconfiguration...PressCTRL_Dtobreak.------------------------按Ctrl+D键终止设备查找自动配置Automaticconfigurationattempt:1.Notreadyforautomaticconfiguration:nointerfaceavailable.Waitingforthenext...Automaticconfigurationisaborted.-------按Ctrl+D键后放弃自动配置的尝试Lineaux0isavailable.PressENTERtogetstarted.---------------到这里系统启动完毕,按回车键<H3C>%Aug2209:19:53:3182014H3CSHELL/5/SHELL_LOGIN:TTYloggedinfromaux0.--------------再按一次回车键<H3C><H3C>system-view[H3C]2、修改路由器名称<H3C>sys[H3C]sysname名称如将默认的路由器名称改为RoNetwork_Dept,Ro表示设备类型为路由器,Network_Dept表示部门名称,以后看到这个名称就知道这是什么设备、在什么位置。建议以后都采用这种方式来给设备命名,以方便管理。[H3C]sysnameRoNetwork_Dept[RoNetwork_Dept]如果要恢复默认名称,使用undosysname命令:[RoNetwork_Dept]undosysname[H3C]3、显示路由表〔1IPv4显示路由表概要信息:[RoNetwork_Dept]displayiprouting-table显示路由表详细信息:[RoNetwork_Dept]displayiprouting-tableverbose显示某种路由协议的信息:[RoNetwork_Dept]displayiprouting-tableprotocol{bgp|direct|guard|isis|ospf|rip|static}还有其他信息,可使用?显示帮助以便选择:[RoNetwork_Dept]displayiprouting-table?〔2IPv6只需将IPv4的命令中ip替换成ipv6即可。4、配置接口<H3C>sys<H3C>system-view[H3C]int接口名称如配置G0/0接口:[RoNetwork_Dept]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]---------进入接口配置视图配置IP地址:[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.1?-----后面跟掩码长度也行,跟掩码也行INTEGER<1-31>IPmasklengthX.X.X.XIPmask[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.124----24表示掩码长度为24位,和等效[RoNetwork_Dept-GigabitEthernet0/0]undoshutdown-----激活接口[RoNetwork_Dept-GigabitEthernet0/0]disintg0/0-----查看接口信息5、信息回显及tracert为了防止命令被系统输出的消息打断,可以配置信息回显:[RoNetwork_Dept]info-centersynchronous为防止tracert超时,链路两端的设备都要开启以下功能:[RoNetwork_Dept]ipredirectsenable开启设备的ICMP重定向报文的发送功能[RoNetwork_Dept]ipttl-expiresenable

开启设备的ICMP超时报文的发送功能[RoNetwork_Dept]ipunreachableenable开启设备的ICMP目的不可达报文的发送功能6、配置静态路由拓扑图:RoNetwork_Dept端:<H3C>sysSystemView:returntoUserViewwithCtrl+Z.[H3C]sysRoNetwork_Dept[RoNetwork_Dept]infosyncInfo-centersynchronousoutputison.[RoNetwork_Dept]intlo0[RoNetwork_Dept-LoopBack0]ipadd192.168.1.124[RoNetwork_Dept-LoopBack0]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.124[RoNetwork_Dept-GigabitEthernet0/0]undosh[RoNetwork_Dept]%Aug2211:45:32:4152014RoNetwork_DeptIFNET/3/PHY_UPDOWN:PhysicalstateontheinterfaceGigabitEthernet0/0changedtoup.%Aug2211:45:32:4162014RoNetwork_DeptIFNET/5/LINK_UPDOWN:LineprotocolstateontheinterfaceGigabitEthernet0/0changedtoup.-------系统发出的消息,g0/0接口已经up了[RoNetwork_Dept]disiproDestinations:17Routes:17Destination/MaskProtoPreCostNextHopInterface---------使用ping命令测试路由是否配置正确Ping192.168.2.2<192.168.2.2>:56databytes,pressCTRL_Ctobreak56bytesfrom192.168.2.2:icmp_seq=0ttl=255time=1.457ms56bytesfrom192.168.2.2:icmp_seq=1ttl=255time=1.113ms56bytesfrom192.168.2.2:icmp_seq=2ttl=255time=1.168ms56bytesfrom192.168.2.2:icmp_seq=3ttl=255time=1.189ms56bytesfrom192.168.2.2:icmp_seq=4ttl=255time=1.049ms---Pingstatisticsfor192.168.2.2---5packetstransmitted,5packetsreceived,0.0%packetlossround-tripmin/avg/max/std-dev=1.049/1.195/1.457/0.140ms[RoNetwork_Dept]%Aug2211:49:29:3042014RoNetwork_DeptPING/6/PING_STATISTICS:Pingstatisticsfor192.168.2.2:5packetstransmitted,5packetsreceived,0.0%packetloss,round-tripmin/avg/max/std-dev=1.049/1.195/1.457/0.140ms.[RoNetwork_Dept]RoNetCenter端:<H3C>sysSystemView:returntoUserViewwithCtrl+Z.[H3C]sysRoNetCenter[RoNetCenter]infosyncInfo-centersynchronousoutputison.[RoNetCenter]intlo0[RoNetCenter-LoopBack0]ipadd192.168.2.232[RoNetCenter-LoopBack0]intg0/0[RoNetCenter-GigabitEthernet0/0]ipadd12.0.0.224[RoNetCenter-GigabitEthernet0/0]undosh[RoNetCenter-GigabitEthernet0/0]quit[RoNetCenter]disiproDestinations:14Routes:14Destination/MaskProtoPreCostNextHopInterface[RoNetCenter]配置等价静态路由RoNetwork_Dept端:[RoNetwork_Dept]intg0/1[RoNetwork_Dept-GigabitEthernet0/1]ipadd21.0.0.124[RoNetwork_Dept-GigabitEthernet0/1]undosh[RoNetwork_Dept-GigabitEthernet0/1]quit[RoNetwork_Dept]disiproDestinations:21Routes:22Destination/MaskProtoPreCostNextHopInterface21.0.0.2GE0/1RoNetCenter端:[RoNetCenter]intg0/1[RoNetCenter-GigabitEthernet0/1]ipadd21.0.0.224[RoNetCenter-GigabitEthernet0/1]undosh[RoNetCenter-GigabitEthernet0/1]quit[RoNetCenter]disiproDestinations:18Routes:19Destination/MaskProtoPreCostNextHopInterface21.0.0.1GE0/1测试:[RoNetwork_Dept]Ping192.168.2.2<192.168.2.2>:56databytes,pressCTRL_Ctobreak56bytesfrom192.168.2.2:icmp_seq=0ttl=255time=0.935ms56bytesfrom192.168.2.2:icmp_seq=1ttl=255time=1.156ms56bytesfrom192.168.2.2:icmp_seq=2ttl=255time=0.732ms56bytesfrom192.168.2.2:icmp_seq=3ttl=255time=1.301ms56bytesfrom192.168.2.2:icmp_seq=4ttl=255time=0.733ms---Pingstatisticsfor192.168.2.2---5packetstransmitted,5packetsreceived,0.0%packetlossround-tripmin/avg/max/std-dev=0.732/0.971/1.301/0.227ms[RoNetCenter]ping-r-------"-r"表示"Recordroute",记录路由Ping192.168.1.1<192.168.1.1>:56databytes,pressCTRL_Ctobreak56bytesfrom192.168.1.1:icmp_seq=0ttl=255time=0.827msRR:56bytesfrom192.168.1.1:icmp_seq=1ttl=255time=0.964msRR:56bytesfrom192.168.1.1:icmp_seq=2ttl=255time=1.895msRR:56bytesfrom192.168.1.1:icmp_seq=3ttl=255time=0.673msRR:56bytesfrom192.168.1.1:icmp_seq=4ttl=255time=0.905msRR:---Pingstatisticsfor192.168.1.1---5packetstransmitted,5packetsreceived,0.0%packetlossround-tripmin/avg/max/std-dev=0.673/1.053/1.895/0.432ms---数据包被轮流在两条链路上发送,但是奇怪的是,只从一条链路返回,这与GNS3的Cisco路由器不一样,Cisco的是从哪条链路出去就从哪条链路返回:参考:R1#pingProtocol[ip]:Repeatcount[5]:Datagramsize[100]:Timeoutinseconds[2]:Extendedcommands[n]:ySourceaddressorinterface:Typeofservice[0]:SetDFbitinIPheader?[no]:Validatereplydata?[no]:Datapattern[0xABCD]:Loose,Strict,Record,Timestamp,Verbose[none]:rNumberofhops[9]:Loose,Strict,Record,Timestamp,Verbose[RV]:r%NoroomforthatoptionLoose,Strict,Record,Timestamp,Verbose[RV]:Record%NoroomforthatoptionLoose,Strict,Record,Timestamp,Verbose[RV]:Sweeprangeofsizes[n]:Typeescapesequencetoabort.Sending5,100-byteICMPEchosto192.168.2.2,timeoutis2seconds:PackethasIPoptions:Totaloptionbytes=39,paddedlength=40Recordroute:<*><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0>Request0timedoutRequest1timedoutReplytorequest2<32ms>.ReceivedpackethasoptionsTotaloptionbytes=40,paddedlength=40Recordroute:<12.0.0.1>—出去<192.168.2.2><12.0.0.2><12.0.0.1><*>回来<0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0>EndoflistReplytorequest3<48ms>.ReceivedpackethasoptionsTotaloptionbytes=40,paddedlength=40Recordroute:<21.0.0.1><192.168.2.2><21.0.0.2><21.0.0.1><*><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0>EndoflistReplytorequest4<24ms>.ReceivedpackethasoptionsTotaloptionbytes=40,paddedlength=40Recordroute:<12.0.0.1><192.168.2.2><12.0.0.2><12.0.0.1><*><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0><0.0.0.0>EndoflistSuccessrateis60percent<3/5>,round-tripmin/avg/max=24/34/48ms[RoNetwork_Dept]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]sh-------关闭G0/0接口,看看还能不能ping通[RoNetwork_Dept-GigabitEthernet0/0]%Aug2212:11:22:9122014RoNetwork_DeptIFNET/3/PHY_UPDOWN:PhysicalstateontheinterfaceGigabitEthernet0/0changedtodown.%Aug2212:11:22:9132014RoNetwork_DeptIFNET/5/LINK_UPDOWN:LineprotocolstateontheinterfaceGigabitEthernet0/0changedtodown.quit[RoNetwork_Dept]Ping192.168.2.2<192.168.2.2>:56databytes,pressCTRL_Ctobreak56bytesfrom192.168.2.2:icmp_seq=0ttl=255time=0.676ms56bytesfrom192.168.2.2:icmp_seq=1ttl=255time=0.626ms56bytesfrom192.168.2.2:icmp_seq=2ttl=255time=0.756ms56bytesfrom192.168.2.2:icmp_seq=3ttl=255time=0.952ms56bytesfrom192.168.2.2:icmp_seq=4ttl=255time=0.740ms---Pingstatisticsfor192.168.2.2---5packetstransmitted,5packetsreceived,0.0%packetlossround-tripmin/avg/max/std-dev=0.626/0.750/0.952/0.111ms[RoNetwork_Dept]%Aug2212:11:33:3572014RoNetwork_DeptPING/6/PING_STATISTICS:Pingstatisticsfor192.168.2.2:5packetstransmitted,5packetsreceived,0.0%packetloss,round-tripmin/avg/max/std-dev=0.626/0.750/0.952/0.111ms.可见,当其中一条链路down了之后,数据包可以通过另一条链路发往目的地。配置非等价静态路由:[RoNetwork_Dept]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]undosh----重新激活G0/0接口[RoNetwork_Dept-GigabitEthernet0/0]quit---删除前面配置的路由---删除前面配置的路由[RoNetwork_Dept]ipro192.168.2.2255.255.255.25512.0.0.2preference1–配置非等价静态路由,指定优先级为1----采用默认的优先级60,比上一条的优先级低[RoNetwork_Dept]disiproDestinations:21Routes:21Destination/MaskProtoPreCostNextHopInterface---只显示高优先级的路由,出口G0/0SummaryCount:1Destination/MaskProtoPreCostNextHopInterface[RoNetwork_Dept]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]sh–再次关闭G0/0接口,看看路由表的变化[RoNetwork_Dept-GigabitEthernet0/0]%Aug2212:24:56:1742014RoNetwork_DeptIFNET/3/PHY_UPDOWN:PhysicalstateontheinterfaceGigabitEthernet0/0changedtodown.%Aug2212:24:56:1772014RoNetwork_DeptIFNET/5/LINK_UPDOWN:LineprotocolstateontheinterfaceGigabitEthernet0/0changedtodown.[RoNetwork_Dept-GigabitEthernet0/0]disiproDestinations:17Routes:17Destination/MaskProtoPreCostNextHopInterface----高优先级的路由不可用后,自动使用低优先级的SummaryCount:1Destination/MaskProtoPreCostNextHopInterface小结:等价静态路由和非等价静态路由都能提供冗余,确保在一条链路出现故障后仍能保持网络的连通性,但是两者存在差别,等价静态路由除了提供冗余外,还能提供负载均衡,数据包会被平均在两条链路上传输,而非等价静态路由中只有高优先级〔低代价的路由是活动的,只有这条路由因为链路故障或接口关闭等原因导致不可用时,低优先级〔高代价的路由才会被启用。等价静态路由适用于存在多条带宽相同的链路的情况,而非等价静态路由适用于存在多条带宽不同的链路的情况——尤其是存在主链路和备份链路的情况。7、配置默认路由拓扑图:RoNetwork_Dept端:<H3C>sysSystemView:returntoUserViewwithCtrl+Z.[H3C]sysnRoNetwork_Dept[RoNetwork_Dept]intlo0[RoNetwork_Dept-LoopBack0]intg0/0[RoNetwork_Dept-GigabitEthernet0/0]undosh[RoNetwork_Dept-GigabitEthernet0/0]quit[RoNetwork_Dept]disiproDestinations:14Routes:14Destination/MaskProtoPreCostNextHopInterfaceRoSoftware_Dept端:<H3C>sysSystemView:returntoUserViewwithCtrl+Z.[H3C]sysnRoSoftware_Dept[RoSoftware_Dept]intl0[RoSoftware_Dept-LoopBack0]intg0/0[RoSoftware_Dept-GigabitEthernet0/0]undosh[RoSoftware_Dept-GigabitEthernet0/0]quit[RoSoftware_Dept]disiproDestinations:14Routes:14Destination/MaskProtoPreCostNextHopInterfaceRoNetCenter端:<H3C>%Aug2213:53:14:3582014H3CSHELL/5/SHELL_LOGIN:TTYloggedinfromaux0.sysSystemView:returntoUserViewwithCtrl+Z.[H3C]sysnRoNetCenter[RoNetCenter]intg0/0[RoNetCenter-GigabitEthernet0/0]undosh[RoNetCenter-GigabitEthernet0/0]intg0/1[RoNetCenter-GigabitEthernet0/1]undosh[RoNetCenter-GigabitEthernet0/1]intl0[RoNetCenter-LoopBack0]quit[RoNetCenter]disiproDestinations:19Routes:19Destination/MaskProtoPreCostNextHopInterface测试:Ping192.168.3.3<192.168.3.3>:56databytes,pressCTRL_Ctobreak56bytesfrom192.168.3.3:icmp_seq=0ttl=254time=2.658ms56bytesfrom192.168.3.3:icmp_seq=1ttl=254time=1.115ms56bytesfrom192.168.3.3:icmp_seq=2ttl=254time

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论