基于telnet的NAT负载均衡
一、路由器配置
R1#sh run
interface Ethernet0/0
 ip address 192.168.1.1 255.255.255.0
 ip route 0.0.0.0 0.0.0.0 192.168.1.2
 
 R2#sh run
  interface Ethernet0/0
 ip address 192.168.1.2 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 half-duplex
interface Ethernet0/1
 ip address 192.168.2.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 half-duplex
ip route 192.168.0.0 255.255.255.0 192.168.1.1
ip nat pool p01 192.168.2.2 192.168.2.3 prefix-length 24 type rotary
ip nat inside destination list 101 pool p01
access-list 101 permit ip any host 192.168.1.2
 
R3#sh run
 interface Ethernet0/0
 ip address 192.168.2.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.2.1
 interface Ethernet0/0
 ip address 192.168.2.3 255.255.255.0
 ip route 0.0.0.0 0.0.0.0 192.168.2.1
 
二、验证
R1#telnet 192.168.1.2
Trying 192.168.1.2 ... Open
 User Access Verification
 Password:
R4>exit
 [Connection to 192.168.1.2 closed by foreign host]
R1#telnet 192.168.1.2
Trying 192.168.1.2 ... Open
 User Access Verification
 Password:
R3>
R2#sh ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 192.168.1.2:23     192.168.2.2:23     192.168.1.1:26129  192.168.1.1:26129
tcp 192.168.1.2:23     192.168.2.3:23     192.168.1.1:26543  192.168.1.1:26543