实验拓扑如下:
R2 Loopback :2.2.2.2
R3 Loopback :3.3.3.3
配置如下:
(1)各路由器ip地址
R1#c
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES NVRAM up up
FastEthernet0/1 192.168.2.1 YES NVRAM up up
R2#C
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.3.1 YES NVRAM up up
FastEthernet0/1 192.168.1.2 YES NVRAM up up
Loopback0 2.2.2.2 YES NVRAM up up
R3#C
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.3.2 YES NVRAM up up
FastEthernet0/1 192.168.2.2 YES NVRAM up up
Loopback0 3.3.3.3 YES NVRAM up up
(2)配置静态路由
R1
ip route 2.2.2.0 255.255.255.0 192.168.1.2
ip route 3.3.3.0 255.255.255.0 192.168.2.2
R2
ip route 3.3.3.0 255.255.255.0 192.168.3.2
ip route 3.3.3.0 255.255.255.0 192.168.1.1
R3
ip route 2.2.2.0 255.255.255.0 192.168.2.1
ip route 2.2.2.0 255.255.255.0 192.168.3.1
(3)测试
打开R2上的debug ip packet,用扩展ping来看报的send和receive情况即可是否实现了负载
R2#ping
Protocol [ip]:
Target IP address: 3.3.3.3
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 2.2.2.2
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
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 = 4/12/16 ms
R2#
00:10:17: IP: s=2.2.2.2 (local), d=3.3.3.3 (FastEthernet0/1), len 100, sending
00:10:17: IP: s=3.3.3.3 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
00:10:17: IP: s=2.2.2.2 (local), d=3.3.3.3 (FastEthernet0/0), len 100, sending
00:10:17: IP: s=3.3.3.3 (FastEthernet0/1), d=2.2.2.2, len 100, rcvd 4
00:10:17: IP: s=2.2.2.2 (local), d=3.3.3.3 (FastEthernet0/1), len 100, sending
00:10:17: IP: s=3.3.3.3 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
00:10:17: IP: s=2.2.2.2 (local), d=3.3.3.3 (FastEthernet0/0), len 100, sending
00:10:17: IP: s=3.3.3.3 (FastEthernet0/1), d=2.2.2.2, len 100, rcvd 4
00:10:17: IP: s=2.2.2.2 (local), d=3.3.3.3 (FastEthernet0/1), len 100, sending
00:10:17: IP: s=3.3.3.3 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
R3上同理,这里就不贴出来了。要全通只需在各路由器上加到未知网段的静态路由即可,写的比较粗糙只写出了主要的步骤,嘿嘿!!!