路由器R1配置如下: <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

R outer  >   en                                     进入特权模式

R outer  #   conf t                                  进入全局配置模式

Router # host R1                               更改路由器名

R1   (config)#   int lo1                               进入了loopback1

R1   (config-if)# ip add 1.1.1.1 255.255.255.0     

R1   (config-if)#   ^Z                                直接退之特权模式

R1   #config t

R1   (config)#   int s0                                配置S0

R1   (config-if)#   ip add 2 .2.2.1  255.255.255. 0          配置IP

R1   (config-if)#   clock rate 56000                     配置DCE端时钟

R1   (config-if)#   no shut                            启用端口

R1   (config-if)#  exit

R1   (config)#   router igrp 100                        启用IGRP路由协议

R1   (config-router)#   net 1.0.0.0.0                    加入直连的网络号

R1   (config-router)#   net 4.0.0.0

R1   (config-router)#   net 2.0.0.0

R1   (config-router)# variance 6                      设置variance值, 可以在路径间启用负载平衡 ,把值设成6的依据 是用低速带宽的METRIC值除高速带宽 METRIC值,如何看到低速带宽的METRIC值呢(因路由表缺省只显示最优路由) ?把高速带宽的端口禁用,就可看到低速带宽的METRIC值了

R1   (config) #  debug ip icmp

路由器R2配置如下

Router> en

Router# config t

Router (config)# host R2

R2 (config-if)# int s0

R2 (config-if)# ip add 2.2.2.2  255.255.255.0

R2 (config-if)# no shut

R2 (config-if)# exit

R2 (config)# int lo1

R2 (config-if)# ip add 4.4.4.2 255.255.255.0

R2 (config-if)# exit

R2 (config)# router igrp 100

R2 (config-router)# net 3.0.0.0

R2 (config-router)# net 4.0.0.0

R2 (config-router)# net 2.0.0.0

R2 (config-router)# variance 6

Router  (config ) # debug ip icmp

三.实验结果:

r1#ping

Protocol [ip]:

Target IP address: 3.3.3.1

Repeat count [5]: 14

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 14, 100-byte ICMP Echos to 3.3.3.1, timeout is 2 seconds:

!!!!!!!!!!!!!!

Success rate is 100 percent (14/14), round-trip min/avg/max = 8/14/40 ms

r1#

00:21:18: ICMP: echo reply rcvd, src 3.3.3.1, dst 4.4.4.1#####

00:21:18: ICMP: echo reply rcvd, src 3.3.3.1, dst 2.2.2.1

00:21:18: ICMP: echo reply rcvd, src 3.3.3.1, dst 4.4.4.1#####

00:21:18: ICMP: echo reply rcvd, src 3.3.3.1, dst 2.2.2.1

R2#ping

Protocol [ip]:

Target IP address: 1.1.1.1

Repeat count [5]: 14

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 14, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

!!!!!!!!!!!!!!

Success rate is 100 percent (14/14), round-trip min/avg/max = 8/15/44 ms

R2#

00:30:26: ICMP: echo reply rcvd, src 1.1.1.1, dst 4.4.4.2#####

00:30:26: ICMP: echo reply rcvd, src 1.1.1.1, dst 2.2.2.2

00:30:26: ICMP: echo reply rcvd, src 1.1.1.1, dst 4.4.4.2#####

00:30:26: ICMP: echo reply rcvd, src 1.1.1.1, dst 2.2.2.2