在做服务器群集的时候突然想到了这个话题,顺便在此记下以便交流。
  TCP负载均衡是指利用NAT技术,用对外的IP地址来代表多个同样的服务器就如同它们是一个服务器一样,但是的负载均衡是很不健壮的,如果有一台服务器离线,就会导致黑洞效应。
具体配置如下:
en
conf t
no ip domain loo
line 0
exec-t
logg s
int s0/1
ip add 212.160.100.100 /24
int e0/1
ip add 192.168.100.1/24
ip access ex nat
per ip 192.168.100.1/24 any
ip nat pool real prefix type rotary
ip nat  in des list nat ov
ip nat in de list nat reai int s0/1
ip nat out
int f0/1
ip nat in