H3C路由学习笔记-静态路由(2)

2018-12-11 22:12

56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=0.935 ms 56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=1.156 ms 56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=0.732 ms 56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=1.301 ms 56 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 loss round-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 break 56 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.827 ms RR: 21.0.0.1 12.0.0.2

56 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.964 ms RR: 12.0.0.1 12.0.0.2

56 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=1.895 ms RR: 21.0.0.1 12.0.0.2

56 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.673 ms RR: 12.0.0.1 12.0.0.2

56 bytes from 192.168.1.1: icmp_seq=4 ttl=255 time=0.905 ms RR: 21.0.0.1 12.0.0.2

--- Ping statistics for 192.168.1.1 ---

5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.673/1.053/1.895/0.432 ms

---数据包被轮流在两条链路上发送,但是奇怪的是,只从一条链路返回,这与GNS3的Cisco路由器不一样,Cisco的是从哪条链路出去就从哪条链路返回: 参考: R1#ping Protocol [ip]:

Target IP address: 192.168.2.2 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source 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]: r Number of hops [ 9 ]:

Loose, Strict, Record, Timestamp, Verbose[RV]: r % No room for that option

Loose, Strict, Record, Timestamp, Verbose[RV]: Record % No room for that option

Loose, 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 out Request 1 timed out

Reply 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 list

Reply to request 3 (48 ms). 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 list

Reply to request 4 (24 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 list

Success 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.2

Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break 56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=0.676 ms 56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=0.626 ms 56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=0.756 ms 56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=0.952 ms 56 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 loss round-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了之后,数据包可以通过另一条链路发往目的地。 配置非等价静态路由: [RoNetwork_Dept]int g0/0

[RoNetwork_Dept-GigabitEthernet0/0]undo sh ----重新激活G0/0接口 [RoNetwork_Dept-GigabitEthernet0/0]quit

[RoNetwork_Dept]undo ip ro 192.168.2.2 255.255.255.255 12.0.0.2 ---删除前面配置的路由 [RoNetwork_Dept]undo ip ro 192.168.2.2 255.255.255.255 21.0.0.2---删除前面配置的路由

[RoNetwork_Dept]ip ro 192.168.2.2 255.255.255.255 12.0.0.2 preference 1 –配置非等价静态路由,指定优先级为1 [RoNetwork_Dept]ip ro 192.168.2.2 255.255.255.255 21.0.0.2 ----采用默认的优先级60,比上一条的优先级低 [RoNetwork_Dept]dis ip ro

Destinations : 21 Routes : 21

Destination/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/1 21.0.0.0/32 Direct 0 0 21.0.0.1 GE0/1 21.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 1 0 12.0.0.2 GE0/0---只显示高优先级的路由,出口G0/0 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]dis ip ro 192.168.2.2

Summary Count : 1

Destination/Mask Proto Pre Cost NextHop Interface 192.168.2.2/32 Static 1 0 12.0.0.2 GE0/0 [RoNetwork_Dept]int g0/0

[RoNetwork_Dept-GigabitEthernet0/0]sh –再次关闭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: Line protocol state on the interface GigabitEthernet0/0 changed to down.

[RoNetwork_Dept-GigabitEthernet0/0]dis ip ro

Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0 21.0.0.0/24 Direct 0 0 21.0.0.1 GE0/1 21.0.0.0/32 Direct 0 0 21.0.0.1 GE0/1 21.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 21.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

[RoNetwork_Dept-GigabitEthernet0/0]dis ip ro 192.168.2.2

Summary Count : 1

Destination/Mask Proto Pre Cost NextHop Interface 192.168.2.2/32 Static 60 0 21.0.0.2 GE0/1

小结:

等价静态路由和非等价静态路由都能提供冗余,确保在一条链路出现故障后仍能保持网络的连通性,但是两者存在差别,等价静态路由除了提供冗余外,还能提供负载均衡,数据包会被平均在两条链路上传输,而非等价静态路由中只有高优先级(低代价)的路由是活动的,只有这条路由因为链路故障或接口关闭等原因导致不可用时,低优先级(高代价)的路由才会被启用。等价静态路由适用于存在多条带宽相同的链路的情况,而非等价静态路由适用于存在多条带宽不同的链路的情况——尤其是存在主链路和备份链路的情况。

7、配置默认路由 拓扑图:

RoNetwork_Dept端: sys

System View: return to User View with Ctrl+Z.


H3C路由学习笔记-静态路由(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:管理经济学选择题库

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: