全部博文(102)
分类: 服务器与存储
2009-12-07 14:14:43
Configure basic load balancing (layer 3) where client traffic enters on one network and is directed to servers residing on a second network.
Clients will send application requests through the MFSC, which routes them to a virtual IP address (VIP) within ACE. The VIP used in this example resides in an ACE context which is configured with a client VLAN and a server VLAN. Client requests will hit the VIP, ACE will pick the appropriate server, and then destination NAT the client request to send to the server. The server will respond using the interface VLAN of ACE as its default gateway to the client. ACE will then change the source IP to be the VIP and forward the response to the client via the MSFC.
3 Configuration
3.1 Enable the ACL, allow the data traffic through the ACE Device
ACE-1/routed(config)# access-list everyone extended permit ip any any
ACE-1/routed(config)# access-list everyone extended permit icmp any any
3.2 Configure the Real Server and put them in inservice
ACE-1/routed(config)# rserver lnx1
ACE-1/routed(config-rserver-host)# ip add 192.168.1.11
ACE-1/routed(config-rserver-host)# inservice
ACE-1/routed(config-rserver-host)# rserver lnx2
ACE-1/routed(config-rserver-host)# ip add 192.168.1.12
ACE-1/routed(config-rserver-host)# inservice
ACE-1/routed(config-rserver-host)# rserver lnx3
ACE-1/routed(config-rserver-host)# ip add 192.168.1.13
ACE-1/routed(config-rserver-host)# inservice
ACE-1/routed(config-rserver-host)# rserver lnx4
ACE-1/routed(config-rserver-host)# ip add 192.168.1.14
ACE-1/routed(config-rserver-host)# inservice
ACE-1/routed(config-rserver-host)# rserver lnx5
ACE-1/routed(config-rserver-host)# ip add 192.168.1.15
ACE-1/routed(config-rserver-host)# inservice
3.3 configure the VIP
ACE-1/routed(config)# class-map slb-vip
ACE-1/routed(config-cmap)# match virtual-address 172.16.1.100 any
3.4 Configure the Policy-map
ACE-1/routed(config)# policy-map type loadbalance http first-match slb
ACE-1/routed(config-pmap-lb)# class class-default
ACE-1/routed(config-pmap-lb-c)# serverfarm web
ACE-1/routed(config)# policy-map multi-match client-vips
ACE-1/routed(config-pmap)# class slb-vip
ACE-1/routed(config-pmap-c)# loadbalance policy slb
ACE-1/routed(config-pmap-c)# loadbalance vip inservice
3.5 Configure the VLAN
ACE-1/routed(config)# interface vlan 20
ACE-1/routed(config-if)# description “Client Side”
ACE-1/routed(config-if)# ip address 172.16.1.5 255.255.255.0
ACE-1/routed(config-if)# no shutdown
ACE-1/routed(config-if)# interface vlan 40
ACE-1/routed(config-if)# description “Default gateway of real servers”
ACE-1/routed(config-if)# ip address 192.168.1.1 255.255.255.0
ACE-1/routed(config-if)# no shutdown
3.6 Apply the Policy-map
ACE-1/routed(config)# interface vlan 20
ACE-1/routed(config-if)# access-group input everyone
ACE-1/routed(config-if)# service-policy input client-vips