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

上传人:夺命阿水 文档编号:21327 上传时间:2022-07-11 格式:DOC 页数:23 大小:120KB
返回 下载 相关 举报
H3C路由学习笔记-静态路由.doc_第1页
第1页 / 共23页
H3C路由学习笔记-静态路由.doc_第2页
第2页 / 共23页
H3C路由学习笔记-静态路由.doc_第3页
第3页 / 共23页
H3C路由学习笔记-静态路由.doc_第4页
第4页 / 共23页
H3C路由学习笔记-静态路由.doc_第5页
第5页 / 共23页
点击查看更多>>
资源描述

《H3C路由学习笔记-静态路由.doc》由会员分享,可在线阅读,更多相关《H3C路由学习笔记-静态路由.doc(23页珍藏版)》请在课桌文档上搜索。

1、wordH3C路由MSR26-301、进入系统视图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.-

2、按Ctrl + D键后放弃自动配置的尝试Line aux0 is available.Press ENTER to get started.-到这里系统启动完毕,按回车键%Aug 22 09:19:53:318 2014 H3C SHELL/5/SHELL_LOGIN: TTY logged in from aux0.-再按一次回车键 system-viewH3C2、修改路由器名称sysH3Csysname 名称如将默认的路由器名称改为RoNetwork_Dept,Ro表示设备类型为路由器,Network_Dept表示部门名称,以后看到这个名称就知道这是什么设备、在什么位置。建议以后都采用这种

3、方式来给设备命名,以方便管理。H3Csysname RoNetwork_DeptRoNetwork_Dept如果要恢复默认名称,使用undo sysname命令:RoNetwork_Deptundo sysnameH3C3、显示路由表1IPv4显示路由表概要信息:RoNetwork_Deptdisplay ip routing-table显示路由表详细信息:RoNetwork_Deptdisplay ip routing-table verbose显示某种路由协议的信息:RoNetwork_Deptdisplay ip routing-table protocol bgp|direct|gua

4、rd|isis|ospf|rip|static还有其他信息,可使用?显示帮助以便选择:RoNetwork_Deptdisplay ip routing-table ?2IPv6只需将IPv4的命令中ip替换成ipv6即可。4、配置接口sys system-viewH3Cint 接口名称如配置G0/0接口:RoNetwork_Deptint g0/0RoNetwork_Dept-GigabitEthernet0/0-进入接口配置视图配置IP地址:RoNetwork_Dept-GigabitEthernet0/0ip add 12.0.0.1 ?-后面跟掩码长度也行,跟掩码也行 INTEGER I

5、P mask length X.X.X.X IP maskRoNetwork_Dept-GigabitEthernet0/0ip add 12.0.0.1 24RoNetwork_Dept-GigabitEthernet0/0undo shutdown-激活接口RoNetwork_Dept-GigabitEthernet0/0dis int g0/0-查看接口信息5、信息回显与tracert为了防止命令被系统输出的消息打断,可以配置信息回显:RoNetwork_Deptinfo-center synchronous为防止tracert超时,链路两端的设备都要开启以下功能:RoNetwork_D

6、eptip redirects enable 开启设备的ICMP重定向报文的发送功能RoNetwork_Deptip ttl-expires enable开启设备的ICMP超时报文的发送功能RoNetwork_Deptip unreachable enable 开启设备的ICMP目的不可达报文的发送功能6、配置静态路由拓扑图:RoNetwork_Dept端:sysSystem View: return to User View with Ctrl+Z.H3Csys RoNetwork_DeptRoNetwork_Deptinfo syncInfo-center synchronous outp

7、ut is on.RoNetwork_Deptint lo0RoNetwork_Dept-LoopBack0ip add 192.168.1.1 24RoNetwork_Dept-LoopBack0int g0/0RoNetwork_Dept-GigabitEthernet0/0ip add 12.0.0.1 24RoNetwork_Dept-GigabitEthernet0/0undo shRoNetwork_Dept%Aug 22 11:45:32:415 2014 RoNetwork_Dept IFNET/3/PHY_UPDOWN: Physical state on the inter

8、face 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_Deptdis ip roDestinations : 17 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface -使用ping命

9、令测试路由是否配置正确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=25

10、5 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 lossRoNetwork_DeptRoNetCenter端:sysSystem View: return to User View with Ctrl+Z.H3Csys RoNetCenterRoNetCenterinfo syncInfo-center synchro

11、nous output is on.RoNetCenterint lo0RoNetCenter-LoopBack0ip add 192.168.2.2 32RoNetCenter-LoopBack0int g0/0RoNetCenter-GigabitEthernet0/0ip add 12.0.0.2 24RoNetCenter-GigabitEthernet0/0undo shRoNetCenter-GigabitEthernet0/0quitRoNetCenterdis ip roDestinations : 14 Routes : 14Destination/Mask Proto Pr

12、e Cost NextHop InterfaceRoNetCenter配置等价静态路由RoNetwork_Dept端:RoNetwork_Deptint g0/1RoNetwork_Dept-GigabitEthernet0/1ip add 21.0.0.1 24RoNetwork_Dept-GigabitEthernet0/1undo shRoNetwork_Dept-GigabitEthernet0/1quitRoNetwork_Deptdis ip roDestinations : 21 Routes : 22Destination/Mask Proto Pre Cost NextHop

13、 Interface21.0.0.2 GE0/1RoNetCenter端:RoNetCenterint g0/1RoNetCenter-GigabitEthernet0/1ip add 21.0.0.2 24RoNetCenter-GigabitEthernet0/1undo shRoNetCenter-GigabitEthernet0/1quitRoNetCenterdis ip roDestinations : 18 Routes : 19Destination/Mask Proto Pre Cost NextHop Interface 21.0.0.1 GE0/1测试:RoNetwork

14、_DeptPing 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.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

15、=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 lossRoNetCenterping -r-“-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: i

16、cmp_seq=0 ttl=255 time=0.827 msRR: 56 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.964 msRR: 56 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=1.895 msRR: 56 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.673 msRR: 56 bytes from 192.168.1.1: icmp_seq=4 ttl=255 time=0.905 msRR: - Ping statis

17、tics for 192.168.1.1 -5 packets transmitted, 5 packets received, 0.0% packet loss-数据包被轮流在两条链路上发送,但是奇怪的是,只从一条链路返回,这与GNS3的Cisco路由器不一样,Cisco的是从哪条链路出去就从哪条链路返回:参考:R1#pingProtocol ip:Repeat count 5:Datagram size 100:Timeout in seconds 2:Extended mands n: ySource address or interface:Type of service 0:Set

18、DF bit in IP header? no:Validate reply data? no:Data pattern 0xABCD:Loose, Strict, Record, Timestamp, Verbosenone: rNumber of hops 9 :Loose, Strict, Record, Timestamp, VerboseRV: r% No room for that optionLoose, Strict, Record, Timestamp, VerboseRV: Record% No room for that optionLoose, Strict, Reco

19、rd, Timestamp, VerboseRV: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

20、.0) (0.0.0.0)Request 0 timed outRequest 1 timed outReply to request 2 (32 ms). Received packet has options Total option bytes= 40, padded length=40 Record 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).

21、 Received packet has options Total option bytes= 40, padded length=40 Record 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 options Total option bytes= 40, padded length=40 Record route:

22、(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_Deptint g0/0RoNetwork_Dept-GigabitEthernet0/0sh -关闭G0/0接口,看看还能不能ping通RoNetwork_Dept-GigabitEthernet0/0%Aug 22 12

23、: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.quitRoNetwork_DeptPing 192.168.2.2 (192.168.2.2)

24、: 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:

25、 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 loss可见,当其中一条链路down了之后,数据包可以通过另一条链路发往目的地。配置非等价静态路由:RoNetwork_Deptint g0/0RoNetwork_Dept-GigabitEthernet0/0undo sh -重新激活G0/0接口RoNetwork_Dept-GigabitEthernet0/0quit -删除前面配置的路由-删除前面

26、配置的路由RoNetwork_Deptip ro 192.168.2.2 255.255.255.255 12.0.0.2 preference 1配置非等价静态路由,指定优先级为1 -采用默认的优先级60,比上一条的优先级低RoNetwork_Deptdis ip roDestinations : 21 Routes : 21Destination/Mask Proto Pre Cost NextHop Interface-只显示高优先级的路由,出口G0/0Summary Count : 1Destination/Mask Proto Pre Cost NextHop InterfaceRo

27、Network_Deptint g0/0RoNetwork_Dept-GigabitEthernet0/0sh再次关闭G0/0接口,看看路由表的变化RoNetwork_Dept-GigabitEthernet0/0%Aug 22 12:24:56:174 2014 RoNetwork_Dept IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/0 changed to down.%Aug 22 12:24:56:177 2014 RoNetwork_Dept IFNET/5/LINK_UPDOWN: Lin

28、e protocol state on the interface GigabitEthernet0/0 changed to down.RoNetwork_Dept-GigabitEthernet0/0dis ip roDestinations : 17 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface-高优先级的路由不可用后,自动使用低优先级的Summary Count : 1Destination/Mask Proto Pre Cost NextHop Interface小结:等价静态路由和非等价静态路由都能提供冗余

29、,确保在一条链路出现故障后仍能保持网络的连通性,但是两者存在差异,等价静态路由除了提供冗余外,还能提供负载均衡,数据包会被平均在两条链路上传输,而非等价静态路由中只有高优先级低代价的路由是活动的,只有这条路由因为链路故障或接口关闭等原因导致不可用时,低优先级高代价的路由才会被启用。等价静态路由适用于存在多条带宽一样的链路的情况,而非等价静态路由适用于存在多条带宽不同的链路的情况尤其是存在主链路和备份链路的情况。7、配置默认路由拓扑图:RoNetwork_Dept端:sysSystem View: return to User View with Ctrl+Z.H3Csysn RoNetwork

30、_DeptRoNetwork_Deptint lo0RoNetwork_Dept-LoopBack0int g0/0RoNetwork_Dept-GigabitEthernet0/0undo shRoNetwork_Dept-GigabitEthernet0/0quitRoNetwork_Deptdis ip roDestinations : 14 Routes : 14Destination/Mask Proto Pre Cost NextHop InterfaceRoSoftware_Dept端:sysSystem View: return to User View with Ctrl+Z

31、.H3Csysn RoSoftware_DeptRoSoftware_Deptint l0RoSoftware_Dept-LoopBack0int g0/0RoSoftware_Dept-GigabitEthernet0/0undo shRoSoftware_Dept-GigabitEthernet0/0quitRoSoftware_Deptdis ip roDestinations : 14 Routes : 14Destination/Mask Proto Pre Cost NextHop InterfaceRoNetCenter端:%Aug 22 13:53:14:358 2014 H3

32、C SHELL/5/SHELL_LOGIN: TTY logged in from aux0.sysSystem View: return to User View with Ctrl+Z.H3Csysn RoNetCenterRoNetCenterint g0/0RoNetCenter-GigabitEthernet0/0undo shRoNetCenter-GigabitEthernet0/0int g0/1RoNetCenter-GigabitEthernet0/1undo shRoNetCenter-GigabitEthernet0/1int l0RoNetCenter-LoopBac

33、k0quitRoNetCenterdis ip roDestinations : 19 Routes : 19Destination/Mask Proto Pre Cost NextHop Interface测试:Ping 192.168.3.3 (192.168.3.3): 56 data bytes, press CTRL_C to break56 bytes from 192.168.3.3: icmp_seq=0 ttl=254 time=2.658 ms56 bytes from 192.168.3.3: icmp_seq=1 ttl=254 time=1.115 ms56 byte

34、s from 192.168.3.3: icmp_seq=2 ttl=254 time=1.805 ms56 bytes from 192.168.3.3: icmp_seq=3 ttl=254 time=1.883 ms56 bytes from 192.168.3.3: icmp_seq=4 ttl=254 time=3.954 ms- Ping statistics for 192.168.3.3 -5 packets transmitted, 5 packets received, 0.0% packet lossPing 192.168.2.2 (192.168.2.2): 56 d

35、ata bytes, press CTRL_C to break56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=0.863 ms56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=0.950 ms56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=1.091 ms56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=1.090 ms56 bytes from 192.168.2.2: icmp_seq=4 ttl=255 time=1.103 ms- Ping statistics for 192.168.2.2 -5 packets transmitted, 5 packets received, 0.0% packet loss23 / 23

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 在线阅读 > 生活休闲


备案号:宁ICP备20000045号-1

经营许可证:宁B2-20210002

宁公网安备 64010402000986号