H3C路由学习笔记-静态路由

合集下载

h3c路由器配置命令 (2)

h3c路由器配置命令 (2)

H3C路由器配置命令概述本文将介绍H3C路由器的配置命令,包括基本设置、接口配置、路由配置、安全配置等方面。

通过了解和掌握这些命令,您可以轻松地对H3C路由器进行相关的配置。

基本设置主机名设置命令配置H3C路由器的主机名,可使用以下命令:[H3C] sysname Router上面的命令将主机名设置为“Router”。

Telnet远程登录设置命令配置允许通过Telnet协议远程登录路由器,可使用以下命令:[H3C] telnet server enable上面的命令将启用Telnet远程登录功能。

用户权限配置命令配置用户权限,可使用以下命令:[H3C] local-user admin password simple admin[H3C] local-user admin service-type telnet[H3C] local-user admin service-type ssh上面的命令将创建一个用户名为admin,密码为admin的用户,该用户允许Telnet和SSH登录。

接口配置入口接口配置命令配置入口接口,可使用以下命令:[H3C] interface gigabitethernet 0/0/1[H3C-GigabitEthernet0/0/1] ip address 192.168.1.1 255.255.255.0[H3C-GigabitEthernet0/0/1] undo shutdown上面的命令将配置接口GigabitEthernet 0/0/1的IP地址为192.168.1.1,子网掩码为255.255.255.0,并启用该接口。

出口接口配置命令配置出口接口,可使用以下命令:[H3C] interface gigabitethernet 0/0/2[H3C-GigabitEthernet0/0/2] ip address 192.168.2.1 255.255.255.0[H3C-GigabitEthernet0/0/2] undo shutdown上面的命令将配置接口GigabitEthernet 0/0/2的IP地址为192.168.2.1,子网掩码为255.255.255.0,并启用该接口。

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提出,是⽬前应⽤最⼴、功能最强⼤的⼀个协议,已成为计算机相互通信的标准。

H3COSPF配置1-基本功能引入外部静态路由StubNSSA配置举例

H3COSPF配置1-基本功能引入外部静态路由StubNSSA配置举例

H3COSPF配置1-基本功能引⼊外部静态路由StubNSSA配置举例1.组⽹需求· 所有的交换机都运⾏OSPF,并将整个⾃治系统划分为3个区域。

· 其中Switch A和Switch B作为ABR来转发区域之间的路由。

· 配置完成后,每台交换机都应学到AS内的到所有⽹段的路由。

2.配置步骤1)switch A[SwitchA] router id10.2.1.1[SwitchA] ospf[SwitchA-ospf-1] area 0[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.00.0.0.255[SwitchA-ospf-1-area-0.0.0.0] quit[SwitchA-ospf-1] area 1[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.00.0.0.2552)switch B[SwitchB] router id10.3.1.1[SwitchB] ospf[SwitchB-ospf-1] area 0[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.00.0.0.255[SwitchB-ospf-1-area-0.0.0.0] quit[SwitchB-ospf-1] area 2[SwitchB-ospf-1-area-0.0.0.2] network 10.3.1.00.0.0.2553)switch C[SwitchC] router id10.4.1.1[SwitchC] ospf[SwitchC-ospf-1] area 1[SwitchC-ospf-1-area-0.0.0.1] network 10.2.1.00.0.0.255[SwitchC-ospf-1-area-0.0.0.1] network 10.4.1.00.0.0.2554)switch D[SwitchD] router id10.5.1.1[SwitchD] ospf[SwitchD-ospf-1] area 2[SwitchD-ospf-1-area-0.0.0.2] network 10.3.1.00.0.0.255[SwitchD-ospf-1-area-0.0.0.2] network 10.5.1.00.0.0.2553.配置switch C为ASBR引⼊外部路由(静态路由),且路由信息可正确的在AS内传播。

H3C的静态路由、Track与NQA联动配置举例

H3C的静态路由、Track与NQA联动配置举例

H3C的静态路由、Track与NQA联动配置举例标签:nqa静态路由track1. 组网需求Device A、Device B、Device C和Device D连接了20.1.1.0/24和30.1.1.0/24两个网段,在设备上配置静态路由以实现两个网段的互通,并配置路由备份以提高网络的可靠性。

Device A作为20.1.1.0/24网段内主机的缺省网关,在Device A上存在两条到达30.1.1.0/24网段的静态路由,下一跳分别为Device B和Device C。

这两条静态路由形成备份,其中:●下一跳为Device B的静态路由优先级高,作为主路由。

该路由可达时,Device A通过Device B将报文转发到30.1.1.0/24网段。

●下一跳为Device C的静态路作为备份路由。

●在Device A上通过静态路由、Track与NQA联动,实时判断主路由是否可达。

当主路由不可达时,备份路由生效,Device A通过Device C将报文转发到30.1.1.0/24网段。

同样地,Device D作为30.1.1.0/24网段内主机的缺省网关,在Device D上存在两条到达20.1.1.0/24网段的静态路由,下一跳分别为Device B和Device C。

这两条静态路由形成备份,其中:●下一跳为Device B的静态路由优先级高,作为主路由。

该路由可达时,Device D通过Device B将报文转发到20.1.1.0/24网段。

●下一跳为Device C的静态路作为备份路由。

●在Device D上通过静态路由、Track与NQA联动,实时判断主路由是否可达。

当主路由不可达时,备份路由生效,Device D通过Device C将报文转发到20.1.1.0/24网段。

2. 组网图图1-2 静态路由、Track与NQA联动配置组网图3. 配置步骤(1)按照图1-2创建VLAN,在VLAN中加入对应的端口,并配置各VLAN接口的IP地址,具体配置过程略。

实验11 静态路由

实验11 静态路由

实验十一 静态路由配置(一)任务内容通过配置路由器的广域网接口(串口)的相关参数,让路由器之间实现通信。

(二)网络拓扑及配置说明H3C MSR30-20路由器二台, PC 机三台,双绞线三根,时钟线一根,配置专用电缆一根。

(三)任务配置步骤1、对路由器A 进行配置<H3C>system-view[H3C]sysname RA[RA]interface Gigabitethernet0/0[RA- Gigabitethernet0/0]ip add 192.168.1.1 255.255.255.0[RA- Gigabitethernet0/0]undo shutdown[RA- Gigabitethernet0/0]quit[RA]interface Gigabitethernet0/1[RA- Gigabitethernet0/1]ip add 192.168.2.1 255.255.255.0[RA- Gigabitethernet0/1]undo shutdown[RA- Gigabitethernet0/1]quit[RA]interface s1/0/1[RA-Serial1/0/1]ip add 192.168.4.1 255.255.255.0G0/0 192.168.1.1/24G0/1 192.168.2.1/24 S1/0/1 192.168.4.1/24S1/0/1 192.168.4.2/24G0/1 192.168.3.1/24[RA-Serial1/0/1]baudrate 64000[RA-Serial1/0/1]undo shutdown[RA-Serial1/0/1]quit[RA]ip route 192.168.3.0 255.255.255.0 192.168.4.2 [RA]2、对路由器B进行配置<H3C>system-view[H3C]sysname RB[RB]int Gigabitethernet0/1[RB- Gigabitethernet0/1]ip add 192.168.3.1 255.255.255.0 [RB- Gigabitethernet0/1]undo shutdown[RB- Gigabitethernet0/1]quit[RB]int Serial 1/0/0[RB-Serial1/0/0]ip add 192.168.4.2 255.255.255.0[RB-Serial1/0/0]undo shutdown[RB-Serial1/0/0]quit[RB]ip route 192.168.1.0 255.255.255.0 192.168.4.1 [RB]ip route 192.168.2.0 255.255.255.0 192.168.4.1 [RB]ip routing3、对PC机进行基本配置HOSTA的IP为192.168.1.10,网关192.168.1.1; HOSTB的IP为192.168.2.10,网关192.168.2.1; HOSTC的IP为192.168.3.10,网关192.168.3.1;4、测试连通性。

H3C路由学习笔记-静态路由

H3C路由学习笔记-静态路由

H3C路由(MSR26-30)1、进入系统视图Startup configuration file does not exist.Performing automatic configuration... Press CTRL_D to break.------------------------按Ctrl + D键终止设备查找自动配置Automatic configuration attempt: 1.Not ready for automatic configuration: no interface available.Waiting for the next...Automatic configuration is aborted.-------按Ctrl + D键后放弃自动配置的尝试Line aux0 is available.Press ENTER to get started.---------------到这里系统启动完毕,按回车键<H3C>%Aug 22 09:19:53:318 2014 H3C SHELL/5/SHELL_LOGIN: TTY logged in from aux0.--------------再按一次回车键<H3C><H3C> system-view[H3C]2、修改路由器名称<H3C>sys[H3C]sysname 名称如将默认的路由器名称改为RoNetwork_Dept,Ro表示设备类型为路由器,Network_Dept表示部门名称,以后看到这个名称就知道这是什么设备、在什么位置。

建议以后都采用这种方式来给设备命名,以方便管理。

[H3C]sysname RoNetwork_Dept[RoNetwork_Dept]如果要恢复默认名称,使用undo sysname命令:[RoNetwork_Dept]undo sysname[H3C]3、显示路由表(1)IPv4显示路由表概要信息:[RoNetwork_Dept]display ip routing-table显示路由表详细信息:[RoNetwork_Dept]display ip routing-table verbose显示某种路由协议的信息:[RoNetwork_Dept]display ip routing-table protocol {bgp|direct|guard|isis|ospf|rip|static}还有其他信息,可使用?显示帮助以便选择:[RoNetwork_Dept]display ip routing-table ?(2)IPv6只需将IPv4的命令中ip替换成ipv6即可。

h3c路由器配置命令 (2)

h3c路由器配置命令 (2)

H3C路由器配置命令H3C路由器是一种高性能的企业级路由器,它提供了丰富的配置命令,方便管理员对网络进行管理和优化。

本文将介绍如何使用H3C路由器的配置命令进行基本的网络配置。

登录路由器在配置H3C路由器之前,我们首先需要通过以下步骤登录路由器:1.首先,打开SSH客户端,如PuTTY。

2.输入路由器的IP地址和端口号。

3.输入用户名和密码,进行身份验证。

4.成功登录后,我们将进入路由器的命令行界面。

基本配置命令配置主机名在H3C路由器上配置主机名可以方便我们标识和管理设备。

使用以下命令可以配置主机名:[Router]system-view[Router]interface vlan-interface 1[Router-Vlan-interface1]description Management VL AN[Router-Vlan-interface1]ip address 192.168.0.1 25 5.255.255.0[Router-Vlan-interface1]quit[Router]quit配置路由配置路由是H3C路由器的核心功能之一。

使用以下命令可以配置静态路由:[Router]system-view[Router]interface gigabitethernet 0/0/1[Router-GigabitEthernet0/0/1]ip address 192.168.1.1 255.255.255.0[Router-GigabitEthernet0/0/1]quit[Router]ip route-static 0.0.0.0 0.0.0.0 192.168.1. 254配置接口H3C路由器支持多种接口类型,如以太网接口、VLAN接口等。

以下是配置以太网接口的示例命令:[Router]system-view[Router]interface gigabitethernet 0/0/1[Router-GigabitEthernet0/0/1]port link-type acces s[Router-GigabitEthernet0/0/1]port default vlan 10 [Router-GigabitEthernet0/0/1]quit配置ACL配置访问控制列表(Access Control List,ACL)可以限制网络流量。

H3C 电信静态路由

H3C 电信静态路由
ip static-route 1.48.0.0 255.254.0.0 电信网关
ip static-route 1.50.0.0 255.255.0.0 电信网关
ip static-route 1.68.0.0 255.252.0.0 电信网关
ip static-route 1.80.0.0 255.248.0.0 电信网关
ip static-route 61.140.0.0 255.252.0.0 电信网关
ip static-route 61.144.0.0 255.252.0.0 电信网关
ip static-route 61.150.0.0 255.254.0.0 电信网关
ip static-route 61.152.0.0 255.255.0.0 电信网关
ip static-route 61.165.0.0 255.255.0.0 电信网关
ip static-route 61.166.0.0 255.255.0.0 电信网关
ip static-route 61.169.0.0 255.255.0.0 电信网关
ip static-route 61.170.0.0 255.254.0.0 电信网关
ip static-route 27.148.0.0 255.252.0.0 电信网关
ip static-route 27.152.0.0 255.248.0.0 电信网关
ip static-route 27.184.0.0 255.248.0.0 电信网关
ip static-route 27.224.0.0 255.252.0.0 电信网关
ip static-route 61.159.128.0 255.255.128.0 电信网关
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

H3C路由(MSR26-30)1、进入系统视图Startup configuration file does not exist.Performing automatic configuration... Press CTRL_D to break.------------------------按Ctrl + D键终止设备查找自动配置Automatic configuration attempt: 1.Not ready for automatic configuration: no interface available.Waiting for the next...Automatic configuration is aborted.-------按Ctrl + D键后放弃自动配置的尝试Line aux0 is available.Press ENTER to get started.---------------到这里系统启动完毕,按回车键<H3C>%Aug 22 09:19:53:318 2014 H3C SHELL/5/SHELL_LOGIN: TTY logged in from aux0.--------------再按一次回车键<H3C><H3C> system-view[H3C]2、修改路由器名称<H3C>sys[H3C]sysname 名称如将默认的路由器名称改为RoNetwork_Dept,Ro表示设备类型为路由器,Network_Dept表示部门名称,以后看到这个名称就知道这是什么设备、在什么位置。

建议以后都采用这种方式来给设备命名,以方便管理。

[H3C]sysname RoNetwork_Dept[RoNetwork_Dept]如果要恢复默认名称,使用undo sysname命令:[RoNetwork_Dept]undo sysname[H3C]3、显示路由表(1)IPv4显示路由表概要信息:[RoNetwork_Dept]display ip routing-table显示路由表详细信息:[RoNetwork_Dept]display ip routing-table verbose显示某种路由协议的信息:[RoNetwork_Dept]display ip routing-table protocol {bgp|direct|guard|isis|ospf|rip|static}还有其他信息,可使用?显示帮助以便选择:[RoNetwork_Dept]display ip routing-table ?(2)IPv6只需将IPv4的命令中ip替换成ipv6即可。

4、配置接口<H3C>sys<H3C> system-view[H3C]int 接口名称如配置G0/0接口:[RoNetwork_Dept-GigabitEthernet0/0]---------进入接口配置视图配置IP地址:[RoNetwork_Dept-GigabitEthernet0/0]ip add 12.0.0.1 ?-----后面跟掩码长度也行,跟掩码也行INTEGER<1-31> IP mask lengthX.X.X.X IP mask[RoNetwork_Dept-GigabitEthernet0/0]ip add 12.0.0.1 24 ----24表示掩码长度为24位,和255.255.255.0等效[RoNetwork_Dept-GigabitEthernet0/0]undo shutdown-----激活接口[RoNetwork_Dept-GigabitEthernet0/0]dis int g0/0-----查看接口信息5、信息回显及tracert为了防止命令被系统输出的消息打断,可以配置信息回显:[RoNetwork_Dept]info-center synchronous为防止tracert超时,链路两端的设备都要开启以下功能:[RoNetwork_Dept]ip redirects enable 开启设备的ICMP重定向报文的发送功能[RoNetwork_Dept]ip ttl-expires enable 开启设备的ICMP超时报文的发送功能[RoNetwork_Dept]ip unreachable enable 开启设备的ICMP目的不可达报文的发送功能6、配置静态路由拓扑图:RoNetwork_Dept端:<H3C>sysSystem View: return to User View with Ctrl+Z.[H3C]sys RoNetwork_Dept[RoNetwork_Dept]info syncInfo-center synchronous output is on.[RoNetwork_Dept]int lo0[RoNetwork_Dept-LoopBack0]ip add 192.168.1.1 24[RoNetwork_Dept-LoopBack0]int g0/0[RoNetwork_Dept-GigabitEthernet0/0]ip add 12.0.0.1 24[RoNetwork_Dept-GigabitEthernet0/0]undo sh[RoNetwork_Dept-GigabitEthernet0/0]ip route 192.168.2.2 255.255.255.255 12.0.0.2[RoNetwork_Dept]%Aug 22 11:45:32:415 2014 RoNetwork_Dept IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/0 changed to up.%Aug 22 11:45:32:416 2014 RoNetwork_Dept IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/0 changed to up.-------系统发出的消息,g0/0接口已经up了[RoNetwork_Dept]dis ip roDestinations : 17 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop012.0.0.0/24 Direct 0 0 12.0.0.1 GE0/012.0.0.0/32 Direct 0 0 12.0.0.1 GE0/012.0.0.1/32 Direct 0 0 127.0.0.1 InLoop012.0.0.255/32 Direct 0 0 12.0.0.1 GE0/0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 Loop0192.168.1.0/32 Direct 0 0 192.168.1.1 Loop0192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.255/32 Direct 0 0 192.168.1.1 Loop0192.168.2.2/32 Static 60 0 12.0.0.2 GE0/0224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0[RoNetwork_Dept]ping 192.168.2.2 ---------使用ping命令测试路由是否配置正确Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=1.457 ms56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=1.113 ms56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=1.168 ms56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=1.189 ms56 bytes from 192.168.2.2: icmp_seq=4 ttl=255 time=1.049 ms--- Ping statistics for 192.168.2.2 ---5 packets transmitted, 5 packets received, 0.0% packet lossround-trip min/avg/max/std-dev = 1.049/1.195/1.457/0.140 ms[RoNetwork_Dept]%Aug 22 11:49:29:304 2014 RoNetwork_Dept PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packets transmitted, 5 packets received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.049/1.195/1.457/0.140 ms.[RoNetwork_Dept]RoNetCenter端:<H3C>sysSystem View: return to User View with Ctrl+Z.[H3C]sys RoNetCenter[RoNetCenter]info syncInfo-center synchronous output is on.[RoNetCenter]int lo0[RoNetCenter-LoopBack0]ip add 192.168.2.2 32[RoNetCenter-LoopBack0]int g0/0[RoNetCenter-GigabitEthernet0/0]ip add 12.0.0.2 24[RoNetCenter-GigabitEthernet0/0]undo sh[RoNetCenter-GigabitEthernet0/0]quit[RoNetCenter]ip ro 192.168.1.1 255.255.255.255 12.0.0.1Destinations : 14 Routes : 14Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.0/24 Direct 0 0 12.0.0.2 GE0/0 12.0.0.0/32 Direct 0 0 12.0.0.2 GE0/0 12.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.255/32 Direct 0 0 12.0.0.2 GE0/0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 192.168.1.1/32 Static 60 0 12.0.0.1 GE0/0 192.168.2.2/32 Direct 0 0 127.0.0.1 InLoop0 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 [RoNetCenter]配置等价静态路由RoNetwork_Dept端:[RoNetwork_Dept]int g0/1[RoNetwork_Dept-GigabitEthernet0/1]ip add 21.0.0.1 24[RoNetwork_Dept-GigabitEthernet0/1]undo sh[RoNetwork_Dept-GigabitEthernet0/1]quit[RoNetwork_Dept]ip ro 192.168.2.2 255.255.255.255 21.0.0.2 [RoNetwork_Dept]dis ip roDestinations : 21 Routes : 22Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.0/24 Direct 0 0 12.0.0.1 GE0/0 12.0.0.0/32 Direct 0 0 12.0.0.1 GE0/0 12.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.255/32 Direct 0 0 12.0.0.1 GE0/0 21.0.0.0/24 Direct 0 0 21.0.0.1 GE0/121.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 21.0.0.255/32 Direct 0 0 21.0.0.1 GE0/1 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 192.168.1.0/24 Direct 0 0 192.168.1.1 Loop0 192.168.1.0/32 Direct 0 0 192.168.1.1 Loop0 192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.1.255/32 Direct 0 0 192.168.1.1 Loop0 192.168.2.2/32 Static 60 0 12.0.0.2 GE0/021.0.0.2 GE0/1 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 RoNetCenter端:[RoNetCenter]int g0/1[RoNetCenter-GigabitEthernet0/1]ip add 21.0.0.2 24[RoNetCenter-GigabitEthernet0/1]undo sh[RoNetCenter-GigabitEthernet0/1]quit[RoNetCenter]ip ro 192.168.1.1 255.255.255.255 21.0.0.1 [RoNetCenter]dis ip roDestinations : 18 Routes : 19Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.0/24 Direct 0 0 12.0.0.2 GE0/0 12.0.0.0/32 Direct 0 0 12.0.0.2 GE0/0 12.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0 12.0.0.255/32 Direct 0 0 12.0.0.2 GE0/0 21.0.0.0/24 Direct 0 0 21.0.0.2 GE0/1 21.0.0.0/32 Direct 0 0 21.0.0.2 GE0/1 21.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0 21.0.0.255/32 Direct 0 0 21.0.0.2 GE0/1 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 192.168.1.1/32 Static 60 0 12.0.0.1 GE0/021.0.0.1 GE0/1 192.168.2.2/32 Direct 0 0 127.0.0.1 InLoop0 224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0 224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0 255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0 测试:[RoNetwork_Dept]ping 192.168.2.256 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=0.935 ms56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=1.156 ms56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=0.732 ms56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=1.301 ms56 bytes from 192.168.2.2: icmp_seq=4 ttl=255 time=0.733 ms--- Ping statistics for 192.168.2.2 ---5 packets transmitted, 5 packets received, 0.0% packet lossround-trip min/avg/max/std-dev = 0.732/0.971/1.301/0.227 ms[RoNetCenter]ping -r 192.168.1.1-------“-r”表示“Record route”,记录路由Ping 192.168.1.1 (192.168.1.1): 56 data bytes, press CTRL_C to break56 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.827 msRR: 21.0.0.112.0.0.256 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.964 msRR: 12.0.0.112.0.0.256 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=1.895 msRR: 21.0.0.112.0.0.256 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.673 msRR: 12.0.0.112.0.0.256 bytes from 192.168.1.1: icmp_seq=4 ttl=255 time=0.905 msRR: 21.0.0.112.0.0.2--- Ping statistics for 192.168.1.1 ---5 packets transmitted, 5 packets received, 0.0% packet lossround-trip min/avg/max/std-dev = 0.673/1.053/1.895/0.432 ms---数据包被轮流在两条链路上发送,但是奇怪的是,只从一条链路返回,这与GNS3的Cisco路由器不一样,Cisco的是从哪条链路出去就从哪条链路返回:参考:R1#pingProtocol [ip]:Target IP address: 192.168.2.2Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address or interface:Type 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]: rLoose, Strict, Record, Timestamp, Verbose[RV]: Record% No room for that optionLoose, Strict, Record, Timestamp, Verbose[RV]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: Packet has IP options: Total option bytes= 39, padded length=40 Record route: <*>(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)Request 0 timed outRequest 1 timed outReply to request 2 (32 ms). Received packet has optionsTotal option bytes= 40, padded length=40Record route:(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)End of listReply to request 3 (48 ms). Received packet has optionsTotal option bytes= 40, padded length=40Record route:(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)End of listReply to request 4 (24 ms). Received packet has optionsTotal option bytes= 40, padded length=40Record route:(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)End of listSuccess rate is 60 percent (3/5), round-trip min/avg/max = 24/34/48 ms[RoNetwork_Dept]int g0/0[RoNetwork_Dept-GigabitEthernet0/0]sh -------关闭G0/0接口,看看还能不能ping通[RoNetwork_Dept-GigabitEthernet0/0]%Aug 22 12:11:22:912 2014 RoNetwork_Dept IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/0 changed to down.%Aug 22 12:11:22:913 2014 RoNetwork_Dept IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/0 changed to down.quit[RoNetwork_Dept]ping 192.168.2.2Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=0.676 ms56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=0.626 ms56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=0.756 ms56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=0.952 ms56 bytes from 192.168.2.2: icmp_seq=4 ttl=255 time=0.740 ms--- Ping statistics for 192.168.2.2 ---5 packets transmitted, 5 packets received, 0.0% packet lossround-trip min/avg/max/std-dev = 0.626/0.750/0.952/0.111 ms[RoNetwork_Dept]%Aug 22 12:11:33:357 2014 RoNetwork_Dept PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packets transmitted, 5 packets received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.626/0.750/0.952/0.111 ms.可见,当其中一条链路down了之后,数据包可以通过另一条链路发往目的地。

相关文档
最新文档