3、负载均衡配置
命令:
ip nat pool pool-name start-ip end-ip { netmask netmask | prefix-length prefix-length } type rotary
ip nat inside destination list access-list-number pool pool-name
实例:
access-list 2 permit 10.1.1.127
ip nat pool real-host 10.1.1.1 10.1.1.3 prefix-length 24 type rotary
ip nat inside destination list 2 pool real-host
interface Ethernet 0
ip address 10.1.1.254 255.255.255.0
ip nat inside
interface Serial 0
ip address 192.168.1.129 255.255.255.0
ip nat outside
功效:外部主机通过Serial0接口访问内部虚拟服务器,Cisco IOS防火墙将动态在10.1.1.1~10.1.1.3之间选择一个合适的服务器进行转发,从而实现负载均衡。