小fish 发表于 2018-7-21 14:43:37

Cisco笔记6-静态路由的负载均衡

  实验拓扑如下:

  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 NVRAMup                  up
  FastEthernet0/1            192.168.2.1   YES NVRAMup                  up
  R2#C
  Interface                  IP-Address      OK? Method Status                Protocol
  FastEthernet0/0            192.168.3.1   YES NVRAMup                  up
  FastEthernet0/1            192.168.1.2   YES NVRAMup                  up
  Loopback0                  2.2.2.2         YES NVRAMup                  up
  R3#C
  Interface                  IP-Address      OK? Method Status                Protocol
  FastEthernet0/0            192.168.3.2   YES NVRAMup                  up
  FastEthernet0/1            192.168.2.2   YES NVRAMup                  up
  Loopback0                  3.3.3.3         YES NVRAMup                  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 :
  Target IP address: 3.3.3.3
  Repeat count :

  Datagram>  Timeout in seconds :
  Extended commands : y
  Source address or interface: 2.2.2.2
  Type of service :
  Set DF bit in IP header? :
  Validate reply data? :
  Data pattern :
  Loose, Strict, Record, Timestamp, Verbose:

  Sweep range of>  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上同理,这里就不贴出来了。要全通只需在各路由器上加到未知网段的静态路由即可,写的比较粗糙只写出了主要的步骤,嘿嘿!!!
页: [1]
查看完整版本: Cisco笔记6-静态路由的负载均衡