第一步:R1上的预配置 R1(config)#int lo0 R1(config-if)#ip add 1.1.1.1 255.255.255.0 R1(config-if)#int s1/2 R1(config-if)#ip add 12.0.0.1 255.255.255.0 R1(config-if)#no sh 第二步:R2上的预配置 R2(config)#int lo0 R2(config-if)#ip add 2.2.2.2 255.255.255.0 R2(config)#int s2/1 R2(config-if)#ip add 12.0.0.2 255.255.255.0 R2(config-if)#no sh R2(config-if)#int s2/3 R2(config-if)#ip add 23.0.0.2 255.255.255.0 R2(config-if)#no sh 第三步:R3上的预配置 R3(config)#int lo0 R3(config-if)#ip add 3.3.3.3 255.255.255.0 R3(config-if)#int s3/2 R3(config-if)#ip add 23.0.0.3 255.255.255.0 R3(config-if)#no sh


实验过程: 第一步:在R1、R2和R3上加一条路由使所有直连的网段都能ping通 R1(config)#ip route 2.2.2.0 255.255.255.0 12.0.0.2 **R1#ping 2.2.2.2 ** Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/10/16 ms R2(config)#ip route 1.1.1.0 255.255.255.0 12.0.0.1 R2(config)#ip route 3.3.3.0 255.255.255.0 23.0.0.3 R2#ping 23.0.0.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/20/36 ms

R2#ping 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/19/40 ms R3(config)#ip route 2.2.2.0 255.255.255.0 23.0.0.2 R3#ping 2.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms

第二步:在R1上加上去23.0.0.0网段的路由 R1(config)#ip route 23.0.0.0 255.255.255.0 12.0.0.2 第三步:在R3上加上去12.0.0.0网段的路由 R3(config)#ip route 12.0.0.0 255.255.255.0 23.0.0.2 第四步:在R1上加上去3.3.3.0网段的路由 R1(config)#ip route 3.3.3.0 255.255.255.0 12.0.0.2 第五步:在R3上加上去1.1.1.0网段的路由 R3(config)#ip route 1.1.1.0 255.255.255.0 23.0.0.2 第六步:做全网通的测试 R1上的结果 R1#ping 2.2.2.2

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/13/36 ms R1#ping 3.3.3.3

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/48/72 ms R1#ping 23.0.0.2

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 23.0.0.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms R1#ping 23.0.0.3

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/37/76 ms R2上的结果 R2#ping 1.1.1.1

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/12/28 ms R2#ping 3.3.3.3

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/19/60 ms R2#ping 12.0.0.1

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms R2#ping 23.0.0.3

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/19/36 ms R3上的结果 R3#ping 1.1.1.1

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/22/40 ms R3#ping 2.2.2.2

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/12/28 ms R3#ping 12.0.0.1

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/30/72 ms R3#ping 12.0.0.2

Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/25/40 ms