Cisco LAN Switching Configuration : Server Load Balancing (SLB)

Date: Jun 24, 2009 By and . Sample Chapter is provided courtesy of Cisco Press.
This chapter covers the steps required to load balance traffic to one or more server farms and firewall farms, and also explains the steps needed to define probes that test server and firewall farm functionality.

See the following sections to configure and use these features:

  • 10-1: SLB: Covers the configuration steps needed to provide load balancing of traffic to one or more server farms
  • 10-2: SLB Firewall Load Balancing: Discusses the configuration steps necessary to load balance traffic to one or more firewall farms
  • 10-3: SLB Probes: Explains the configuration steps needed to define probes that test server and firewall farm functionality

10-1: SLB

  • SLB provides a virtual server IP address to which clients can connect, representing a group of real physical servers in a server farm. Figure 10-1 shows the basic SLB concept. A client accesses a logical “virtual” server (IP address v.v.v.v), which exists only within the Catalyst 6500 SLB configuration. A group of physical “real” servers (IP addresses x.x.x.x, y.y.y.y, and z.z.z.z) is configured as a server farm. Traffic flows between clients and the virtual server are load balanced across the set of real servers, transparent to the clients.

    Figure 10-1 SLB Concept

  • As clients open new connections to the virtual server, SLB decides which real server to use based on a load-balancing algorithm.
  • Server load balancing is performed by one of these methods:

    • Weighted round-robin: Each real server is assigned a weight that gives it the capability to handle connections, relative to the other servers. For a weight n, a server is assigned n new connections before SLB moves on to the next server.
    • Weighted least connections: SLB assigns new connections to the real server with the least number of active connections. Each real server is assigned a weight m, where its capacity for active connections is m divided by the sum of all server weights. SLB assigns new connections to the real server with the number of active connections farthest below its capacity.
  • With weighted least connections, SLB controls the access to a new real server, providing a slow start function. New connections are rate limited and allowed to increase gradually to keep the server from becoming overloaded.
  • The virtual server can masquerade as the IP address for all TCP and UDP ports of the real server farm. As well, the virtual server can appear as the IP address of a single port or service of a server farm.
  • Sticky connections enable SLB to assign new connections from a client to the last real server the client used.
  • SLB can detect a real server failure by monitoring failed TCP connections. SLB can take the failed server out of service and return it to service when it is working again.
  • SLB can use server Network Address Translation (NAT) to translate between the real and virtual server addresses if they reside on different Layer 3 subnets.
  • SLB can use client NAT to translate the source addresses of client requests into addresses on the server side of the SLB device. This is used when several SLB devices are operating so that return traffic can be sent to the correct SLB device.
  • SLB provides a control mechanism over incoming TCP SYN floods to the real servers. This can prevent certain types of denial-of-service attacks.
  • SLB can coexist with Hot Standby Router Protocol (HSRP) to provide a “stateless backup.” If one SLB router fails, a redundant router can take over the SLB function. However, existing SLB connections will be lost and will have to be reestablished from the client side.
  • IOS SLB can also operate as a Dynamic Feedback Protocol (DFP) load-balancing manager. The DFP manager collects capacity information from DFP agents running on the real servers.

Configuration

  1. Define a server farm.

    1. Assign a name to the server farm:

      (global) ip slb serverfarm serverfarm-name

      The server farm is identified by serverfarm-name (text string up to 15 characters).

    2. (Optional) Select a load-balancing algorithm for the server farm:

      (server-farm) predictor {roundrobin | leastconns}

      SLB selects a real server using roundrobin (weighted round-robin the default) or leastconns (weighted least connections).

    3. (Optional) Use server NAT:

      (server-farm) nat server

      By default, the virtual server and real server addresses must be Layer 2-adjacent. In other words, SLB forwards packets between the virtual server and a real server by substituting the correct MAC addresses. Server NAT can be used instead, allowing the virtual and real servers to have addresses from separate IP subnets. SLB then substitutes the Layer 3 IP addresses to forward packets between the virtual and real servers, allowing the servers to be separated by multiple routing hops.

    4. (Optional) Use client NAT.

      • Define a NAT pool of addresses:

        (global) ip slb natpool pool-name start-ip end-ip {netmask netmask |
        prefix-length leading-1-bits}[entries init-addr [max-addr]]

        A pool of IP addresses is given the name pool-name (text string up to 15 characters), consisting of addresses bounded by start-ip and end-ip. The subnet mask associated with the pool can be given as a regular subnet mask, netmask (x.x.x.x format), or as the number of leading 1 bits in the mask, leading-1-bits (1 to 32).

        For IOS SLB, client NAT allocates a number of entries as IP addresses and port numbers, init-addr (1 to 1,000,000; default 8000) as an initial set to use. When the number of dynamically allocated entries reaches half of the initial number, more entries are allocated. The maximum number of NAT entries can be defined as max-addr (1 to 8,000,000; default is the pool size times the number of ports available, or 65,535 to 11,000, or 54,535). Port numbers for translation begin at 11,000.

      • Enable client NAT with a pool:

        (server-farm) nat client pool-name

      The SLB NAT pool is identified by pool-name (up to 15 characters).

    5. (Optional) Assign a unique identifier for DFP:

      (server-farm) bindid [bind-id]

      Sometimes, a real server is assigned to multiple server farms. The bind-id (0 to 65533; default 0) is an arbitrary identification value given to a server farm. Each instance of a real server references this value, allowing DFP to assign a unique weight to it.

    6. (Optional) Test the server with a probe:

      (server-farm) probe name

      The probe defined as name (text string, up to 15 characters) periodically tests for server connectivity and operation. IOS SLB offers ping, HTTP, and Wireless Session Protocol (WSP) probes. The CSM also offers TCP, FTP, SMTP, Telnet, and DNS probes. See section “10-3: SLB Probes” for more information about configuring probes.

  2. Specify one or more real servers in the server farm.

    1. Identify the real server:

      (server-farm) real ip-address

      The real server has the IP address given by ip-address.

    2. (Optional) Specify a connection threshold.

      • Set the maximum number of connections:

        (real-server) maxconns number

      At any given time, the real server will be limited to number (1 to 4,294,967,295 connections; default 4,294,967,295) active connections.

    3. (Optional) Assign a relative capacity weight:

      (real-server) weight weighting-value

      The real server is assigned a weighting-value (1 to 255; default 8) that indicates its capacity relative to other real servers in the server farm. For weighted round-robin, weighting-value defines the number of consecutive connections the server receives before SLB moves to the next server. For weighted least connections, the next connection is given to the server whose number of active connections is furthest below its capacity. The capacity is computed as the weighting-value divided by the sum of all real server weighting values in the server farm.

    4. (Optional; IOS SLB only) Reassign connections when a server doesn’t answer:

      (real-server) reassign threshold

      SLB attempts to assign a new connection to a real server by forwarding the client’s initial SYN. If the server doesn’t answer with a SYN handshake before the client retransmits its SYN, an unanswered SYN is recorded. After threshold (1 to 4, default 3) unanswered SYNs occur, SLB reassigns the connection to the next server.

    5. (Optional; IOS SLB only) Define a failed server threshold:

      (real-server) faildetect numconns number-conns [numclients number-clients]

      A server is determined to have failed if number-conns (1 to 255, default 8 connections) TCP connections have been reassigned to another server. You can also use the numclients keyword to specify the number-clients (1 to 8, default 2) of unique clients that have had connection failures.

    6. (Optional; IOS SLB only) Specify the amount of time before retrying a failed server:

      (real-server) retry retry-value

      After a real server has been declared “failed,” SLB attempts to assign a new connection to it after retry-value (1 to 3600 seconds, default 60 seconds) time has elapsed. You can also use a value of 0 to indicate that new connections should not be attempted.

    7. Allow SLB to begin using the real server:

      (real-server) inservice

      By default, the real server is not used by SLB unless it is placed in service. To remove a server from service, use no inservice.

  3. Define a virtual server for the server farm.

    1. Name the virtual server:

      (global) ip slb vserver virtual-server-name

      The virtual server is given the name virtual-server-name (text string up to 15 characters).

    2. Assign the virtual server to a server farm:

      (virtual-server) serverfarm serverfarm-name

      SLB uses the virtual server as the front end for the server farm named serverfarm-name (text string up to 15 characters).

    3. Define the virtual server capabilities:

      (virtual-server) virtual ip-address [network-mask] {tcp | udp} [port | wsp
      | wsp-wtp | wsp-wtls | wsp-wtp-wtls] [service service-name]

      The virtual server appears as IP address ip-address (default 0.0.0.0 or “all networks”) with network-mask (default 255.255.255.255).

      With IOS SLB, it provides load balancing for the specified tcp or udp port: dns or 53 (Domain Name System), ftp or 21 (File Transfer Protocol), https or 443 (HTTP over Secure Socket Layer), www or 80 (HTTP), telnet or 23 (Telnet), smtp or 25 (SMTP), pop3 or 110 (POPv3), pop2 or 109 (POPv2), nntp or 119 (Network News Transport Protocol), or matip-a or 350 (Mapping of Airline Traffic over IP, type A). A port number of 0 can be given to indicate that the virtual server accepts connections on all ports.

      Other alternatives to a port number are wsp (connectionless WSP, port 9200), wsp-wtp (connection-oriented WSP, port 9201 with WAP FSM), wsp-wtls (connectionless secure WSP, port 9202), and wsp-wtp-wtls (connection-oriented secure WSP, port 9203).

      The service keyword can be given to force SLB to assign all connections associated with a given service-name (ftp or wsp-wtp) to the same real server. On a CSM, only ftp connections are allowed to be coupled to the originating control session.

    4. (Optional) Control access to the virtual server. To allow only specific clients to use the virtual server, enter

      (virtual-server) client ip-address network-mask

      Clients having IP addresses within the range given by ip-address (default 0.0.0.0, or all addresses) and network-mask (default 255.255.255.255, or all networks) are allowed to connect to the virtual server. The network-mask in this case resembles the mask of an access list, where a 1 bit ignores and a 0 bit matches. On a CSM, you can use the exclude keyword to disallow the IP addresses specified.

    5. (Optional) Assign connections from the same client to the same real server:

      (virtual-server) sticky duration [group group-id] [netmask netmask]

      For a given client, connections are assigned to the last-used real server for duration in seconds (0 to 65,535). Virtual servers can be assigned to a group-id (0 to 55; default 0), associating them as a single group. A netmask (default 255.255.255.255) can be given such that all client source addresses within the mask are assigned to the same real server.

    6. (Optional) Hold connections open after they are terminated:

      (virtual-server) delay duration

      After a TCP connection is terminated, SLB can maintain the connection context for duration (1 to 600 seconds, default 10 seconds). This can be useful when packets arrive out of sequence, and the connection is reset before the last data packet arrives.

    7. (Optional) Hold connections open after no activity:

      (virtual-server) idle duration

      When SLB detects an absence of packets for a connection, it keeps the connection open for duration in seconds (IOS: 10 to 65,535; default 3600 seconds or 1 hour) before sending an RST.

    8. (Optional) Prevent a SYN flood to the real servers:

      (virtual-server) synguard syn-count [interval]

      SLB monitors the number of SYNs that are received for the virtual server. If more than syn-count (0 to 4294967295; default 0 or no SYN monitoring) SYNs are received within the interval (50 to 5000 milliseconds; default 100 ms), any subsequent SYNs are dropped.

    9. (Optional) Control the advertisement of the virtual server:

      (virtual-server) advertise [active]

      By default, SLB creates a static route for the virtual server address to the Null0 logical interface. This static route can then be redistributed and advertised by a routing protocol. The active keyword causes the route to be advertised only when at least one real server is available. You can disable the advertisement with no advertise, preventing the static route from being created.

    10. Enable SLB to begin using the virtual server:

      (virtual-server) inservice [standby group-name]

      By default, the virtual server is not used by SLB unless it is placed in service. To remove a virtual server from service, use no inservice.

    11. (Optional) Use SLB stateful backup:

      (virtual-server) replicate casa listening-ip remote-ip port-number
      [interval] [password [0|7] password [timeout]]

      IOS SLB replicates and exchanges its load-sharing decision tables with other stateful backup devices using the Cisco Appliance Services Architecture (CASA) mechanism. When a failure occurs, the backup SLB device already has the current state information and can immediately take over.

      This information is sent from the listening-ip address (an interface on the local device) to the remote-ip address (an interface on the backup device), using TCP port port-number (1 to 65,535). Replication messages are sent at interval seconds (1 to 300, default 10).

      A password (text string; use 0 if unencrypted, the default, or 7 if encrypted) can be used for MD5 authentication with the backup device. The optional timeout (0 to 65,535 seconds; default 180 seconds) defines a time period when the password can be migrated from an old value to a new one. During this time, both old and new passwords are accepted.

      CSM replicates its connection information using the Content Switching Replication Protocol (CSRP). The sticky connection database or the regular connection database can be replicated. To replicate both, choose each one in a separate replicate csrp command.

  4. (Optional) Use SLB Dynamic Feedback Protocol (DFP).

    1. (Optional) Use the DFP manager to communicate with DFP agents on servers.

      • Enable the DFP manager:

        (global) ip slb dfp [password [0|7] password [timeout]]

        The router can become a DFP load-balancing manager. DFP can be configured with a password (text string; use 0 if unencrypted, the default, or 7 if encrypted) for MD5 authentication with a host agent. The optional timeout (0 to 65,535 seconds; default 180 seconds) defines a time period when the password can be migrated from an old value to a new one. During this time, both old and new passwords are accepted.

      • Specify a DFP agent:

        (slb-dfp) agent ip-address port-number [timeout [retry-count [retry-interval]]]

        A DFP agent on a real server is identified by its ip-address and the port-number number used. The DFP agent (the server) must contact the DFP manager (the IOS SLB device) at timeout intervals (0 to 65,535 seconds; default 0 seconds or no timeout period). The DFP manager attempts to reconnect to the agent retry-count (0 to 65,535 retries; default 0 retries or an infinite number) times, at intervals of retry-interval (1 to 65,535 seconds; default 180 seconds).

    2. (Optional) Use a DFP agent to provide DFP reports.

      • Define the agent:

        (global) ip dfp agent subsystem-name

        The DFP agent sends periodic reports to its manager, a distributed director device. The subsystem-name (text string up to 15 characters) enables the manager to associate the server reports with a subsystem (controlled by the SLB device) for global load balancing. To see what subsystem-name values are available from the global manager, use the ip dfp agent ? command.

      • (Optional) Set a DFP agent password:

        (dfp) password [0|7] password [timeout]

        A password (text string; use 0 if unencrypted, the default, or 7 if encrypted) can be used for MD5 authentication with a DFP manager. The optional timeout (0 to 65,535 seconds; default 180 seconds) defines a time period when the password can be migrated from an old value to a new one. During this time, both old and new passwords are accepted.

      • Set the DFP port number:

        (dfp) port port-number

        The DFP manager and agents communicate over a common port number, port-number (1 to 65535, no default). DFP managers discover their agents dynamically, requiring the port number to be identical between the manager (distributed director) and the agents (IOS SLB).

      • (Optional) Set the interval for recalculating weights:

        (dfp) interval seconds

        DFP server weights are recalculated at an interval of seconds (5 to 65,535 seconds; default 10 seconds) before they are supplied to the DFP manager.

      • Enable the DFP agent:

        (dfp) inservice

        By default, the DFP agent is disabled.

SLB Example

See Figure 10-2 for a network diagram. SLB is configured to provide load balancing for two server farms: FARM1 and FARM2.

Figure 10-2 Network Diagram for the SLB Example

FARM1 is a server farm of three real web servers having IP addresses 192.168.250.10, 192.168.250.11, and 192.168.250.12. The real servers are considered in a “failed” state if four consecutive TCP connections cannot be established with the server. SLB waits 30 seconds before attempting another connection to a failed server. (The number of failed TCP connections and the retry interval are supported only in the IOS command set.) An HTTP probe is configured to try a connection to each real server in the server farm every 120 seconds.

The virtual server VSERVER1 at 10.10.10.101 uses the weighted least connections algorithm for load balancing between the real servers. New connections are made sticky (passed to the real server last used by the same client) for 60 seconds.

The CSM version of this example also includes the client and server-side VLAN numbers (10 and 20) and IP addresses (10.10.10.2 and 192.168.250.1).

One server is given a weight of 32, one server has a weight of 16, and one server has a weight of 8. New connections are assigned to the server with the least number of active connections, as measured by the server capacities. For example, server 192.168.254.10 has a weight of 32 and a capacity of 32 /(32 + 16 + 8) or 32 / 56. Server 192.168.254.11 has a weight of 16 and a capacity of 16 /(32 + 16 + 8) or 16 / 56. Server 192.168.254.12 has a weight of 8 and a capacity of 8 /(32 + 16 + 8) or 8 / 56. At any given time, the server with the number of active connections furthest below its capacity is given a new connection.

The configuration that follows shows the commands that are necessary for server farm FARM1 and virtual server VSERVER1. The same configuration is shown for an IOS-based switch and a CSM module:

(global) ip slb serverfarm FARM1
(server-farm) predictor leastconns
(server-farm) nat server
(server-farm) probe HTTP1
(server-farm) real 192.168.250.10
(real-server) weight 32
(real-server) faildetect numconns 4
(real-server) retry 30
(real-server) inservice
(real-server) exit
(server-farm) real 192.168.250.11
(real-server) weight 16
(real-server) faildetect numconns 4
(real-server) retry 30
(real-server) inservice
(real-server) exit
(server-farm) real 192.168.250.12
(real-server) weight 8
(real-server) faildetect numconns 4
(real-server) retry 30
(real-server) inservice
(real-server) exit

(global) ip slb vserver VSERVER1
(virtual-server) serverfarm FARM1
(virtual-server) virtual 10.10.10.101 tcp www
(virtual-server) sticky 60 group 1
(virtual-server) advertise active
(virtual-server) inservice
(virtual-server) exit

(global) ip slb dfp password 0 test123
(slb-dfp) agent 192.168.250.10 2000
(slb-dfp) agent 192.168.250.11 2000
(slb-dfp) agent 192.168.250.12 2000
(slb-dfp) exit

(global) probe HTTP1 http
(probe) interval 120
(probe) port 80
(probe) request method get
(probe) exit

Displaying Information About SLB

Table 10-1 lists some switch commands that you can use to display helpful information about SLB configuration and status.

Table 10-1. Commands to Display SLB Configuration and Status Information

Display Function Command
Server farms (exec) show ip slb serverfarms
[name serverfarm-name] [detail]
Real servers (exec) show ip slb reals
[vserver virtual-server-name] [detail]
Virtual servers (exec) show ip slb vserver
[name virtual-server-name] [detail]
SLB connections (exec) show ip slb conns
[vserver virtual-server-name | client ip- address] [detail]
DFP status (exec) show ip slb dfp
[agent agent-ip-address port-number | manager manager-ip-address | detail | weights]
SLB redundancy (exec) show ip slb replicate
Probes (exec) show ip slb probe
[name probe_name] [detail]
SLB statistics (exec) show ip slb stats

10-2: SLB Firewall Load Balancing

  • Firewall load balancing balances traffic flows to one or more firewall farms.
  • A firewall farm is a group of firewalls that are connected in parallel or that have their “inside” (protected) and “outside” (unprotected) interfaces connected to common network segments.
  • Firewall load balancing requires a load-balancing device (IOS SLB) to be connected to each side of the firewall farm. A firewall farm with “inside” and “outside” interfaces would then require two load-balancing devices, each making sure that traffic flows are directed toward the same firewall for the duration of the connection. Figure 10-3 illustrates the basic firewall load-balancing concept.

    Figure 10-3 Firewall Load-Balancing Concept

  • Firewall load balancing is performed by computing a hash value of each new traffic flow (source and destination IP addresses and ports). This is called a route lookup.
  • The firewall load-balancing device then masquerades as the IP address for all firewalls in the firewall farm.
  • Firewall load balancing can detect a firewall failure by monitoring probe activity.
  • The HSRP can be used to provide a “stateless backup” redundancy for multiple firewall load-balancing devices. If one device fails, a redundant device can take over its function.
  • Multiple firewall load-balancing devices can also use “stateful backup” for redundancy. Backup devices keep state information dynamically and can take over immediately if a failure occurs.

Configuration

  1. Define a firewall farm.

    1. Assign a name to the firewall farm:

      (global) ip slb firewallfarm firewallfarm-name

      In IOS SLB, the collection of firewalls is referenced by firewallfarm-name (text string up to 15 characters).

    2. Identify one or more firewalls in the farm.

      • Specify the firewall’s IP address:

        (firewall-farm) real ip-address

        The firewall is directly connected (same logical subnet) to the load-balancing device with an interface at IP address ip-address.

      • (Optional) Assign a relative capacity weight:

        (real-firewall) weight weighting-value

        The real firewall is assigned a weighting-value (1 to 255; default 8) that indicates its capacity relative to other real firewalls in the firewall farm. These values are statically defined and are based on what you think the firewall can handle, relative to the others. The weight values are used only for round-robin or least-connections algorithms.

      • (Optional) Define one or more probes to detect a firewall failure:

        (real-firewall) probe probe-name

        The probe that is defined by probe-name (text string) is used periodically to determine whether the firewall has failed. Even if more than one probe is defined, the firewall is declared down if it fails just one probe. A firewall must pass all probes to be recovered again.

      • Allow load balancing to begin using the firewall:

        (real-firewall) inservice

        By default, the real firewall is not used by SLB unless it is placed in service. To remove a firewall from service, use no inservice.

    3. (Optional) Define one or more flows that will be sent to the firewall farm:

      (firewall-farm) access [source source-ip-address network-mask]
        [destination destination-ip-address network-mask]

      When multiple firewall farms exist, traffic can be identified by address and sent through the appropriate firewall farm. A traffic flow is defined by its source and destination addresses and subnet masks. If either source or destination keywords are omitted, they default to 0.0.0.0 with a mask of 0.0.0.0, signifying all addresses and networks. This is the default behavior.

    4. (Optional) Choose a firewall load-balancing method:

      (firewall-farm) predictor hash address [port]

      By default IOS SLB uses the source and destination IP addresses of a flow to select a destination firewall. Use the port keyword to use the source and destination addresses, and the source and destination TCP or UDP port numbers, in the selection decision.

    5. (Optional) Use stateful backup to recover from a failure:

      (firewall-farm) replicate casa listening-ip remote-ip port-number
        [interval] [password [0|7] password [timeout]]

      The redundant load-balancing devices use CASA structure to exchange and replicate state information. This is sent from the listening-ip address (an interface on the local device) to the remote-ip address (an interface on the backup device), using port-number (1 to 65535). Replication messages are sent at interval seconds (1 to 300, default 10).

      A password (text string; use 0 if unencrypted, the default; or 7 if encrypted) can be used for MD5 authentication with the backup device. The optional timeout (0 to 65,535 seconds; default 180 seconds) defines a time period when the password can be migrated from an old value to a new one. During this time, both old and new passwords are accepted.

    6. (Optional) Adjust the TCP or UDP connection parameters.

      • Enter the TCP or UDP configuration mode:

        (firewall-farm) {tcp | udp}

        You might need to make adjustments to both TCP and UDP. In this case, this command can be repeated to configure each independently.

      • (Optional; TCP only) Hold connections open after they are terminated:

        (firewall-farm-protocol) delay duration

        After a TCP connection is terminated, the connection context can be maintained for duration (1 to 600 seconds, default 10 seconds). This can be useful when packets arrive out of sequence and the connection is reset before the last data packet arrives.

      • (Optional) Hold connections open after no activity:

        (firewall-farm-protocol) idle duration

        When an absence of packets is detected for a connection, the connection is kept open for duration (10 to 65,535 seconds; default 3600 seconds or 1 hour) before an RST is sent.

      • (Optional) Specify the maximum number of connections:

        (firewall-farm-protocol) maxconns number

        At any given time, the real server is limited to number (1 to 4,294,967,295; default 4,294,967,295) active connections.

      • (Optional) Assign connections from the same IP address to the same firewall:

        (firewall-farm-protocol) sticky duration [netmask netmask]

      For a given IP address, connections are assigned to the last-used firewall for duration (0 to 65,535 seconds). A netmask can be given so that all source addresses within the mask are assigned to the same firewall.

    7. (IOS SLB only) Allow firewall load balancing to begin using the firewall:

      (firewall-farm) inservice

      By default, the firewall is not used by firewall load balancing unless it is placed in service. To remove a firewall from service, use no inservice.

Firewall Load-Balancing Example

To perform firewall load balancing, two load-balancing devices are needed: one located externally and one located internally with respect to the firewall farm. Figure 10-4 shows a network diagram for this example.

Figure 10-4 Network Diagram for the Firewall Load-Balancing Example

The firewall farm consists of two real firewalls. Their “outside” (unprotected) interfaces are at 192.168.1.2 and 192.168.1.3. Their “inside” (protected) interfaces are at 192.168.100.2 and 192.168.100.3. On the outside, the default gateway is 10.5.1.1, and the external SLB device is at 10.5.1.2.

The internal SLB device performs firewall load balancing for outbound traffic to the firewall farm. As well, it provides normal server load balancing for an internal server farm. The real servers are 10.70.1.10 and 10.70.1.20, and the virtual server appears as 10.5.1.80.

Ping probes are used by both external and internal SLB devices to test for firewall operation. An HTTP probe tests each of the real servers in the server farm. These use the default GET method and are sent every 240 seconds.

The configuration for the external load-balancing device is shown first:

(global) ip slb firewallfarm Outside
(firewall-farm) real 192.168.1.2
(real-firewall) weight 8
(real-firewall) probe Ping1
(real-firewall) inservice
(real-firewall) exit
(firewall-farm) real 192.168.1.3
(real-firewall) weight 8
(real-firewall) probe Ping2
(real-firewall) inservice
(real-firewall) exit
(firewall-farm) inservice
(firewall-farm) exit
(global) ip slb probe Ping1 ping
(probe) address 192.168.100.1
(probe) interval 10
(probe) faildetect 4
(global) ip slb probe Ping2 ping
(probe) address 192.168.100.1
(probe) interval 10
(probe) faildetect 4
(probe) exit

Now the configuration for the internal load-balancing device is shown:

(global) ip slb firewallfarm Inside
(firewall-farm) real 192.168.100.2
(real-firewall) weight 8
(real-firewall) probe Ping1
(real-firewall) inservice
(real-firewall) exit
(firewall-farm) real 192.168.100.3
(real-firewall) weight 8
(real-firewall) probe Ping2
(real-firewall) inservice
(real-firewall) exit
(firewall-farm) inservice
(firewall-farm) exit

(global) ip slb serverfarm Servers
(server-farm) nat server
(server-farm) probe HTTP1
(server-farm) real 10.70.1.10
(real-server) inservice
(real-server) exit
(server-farm) real 10.70.1.20
(real-server) inservice
(real-server) exit

(global) ip slb vserver Vservers
(virtual-server) serverfarm Servers
(virtual-server) virtual 10.5.1.80 tcp 0
(virtual-server) inservice
(virtual-server) exit

(global) ip slb probe Ping1 ping
(probe) address 192.168.1.1
(probe) interval 10
(probe) faildetect 4
(probe) exit
(global) ip slb probe Ping2 ping
(probe) address 192.168.1.1
(probe) interval 10
(probe) faildetect 4
(probe) exit
(global) ip slb probe HTTP1 http
(probe) port 80
(probe) interval 240
(probe) request

Displaying Information About Firewall Load Balancing

Table 10-2 lists some switch commands that you can use to display helpful information about SLB firewall load-balancing configuration and status.

Table 10-2. Commands to Display SLB Firewall Load-Balancing Configuration and Status Information

Display Function

Command

Status of firewalls in a farm

(exec) show ip slb reals

Firewall weight and connection counters

(exec) show ip slb reals detail

Firewall farm status

(exec) show ip slb firewallfarm

Load-balancing connections to firewalls

(exec) show ip slb conns [firewall firewallfarm-
name] [detail]

Probes

(exec) show ip slb probe [name probe_name] [detail]

Sticky connections

(exec) show ip slb sticky

10-3: SLB Probes

  • Probes can be used to test for server or firewall connectivity and proper operation.
  • Probes can be defined to simulate requests for these protocols:

    • ICMP: Sends ICMP echo (ping) requests to a real server.
    • HTTP: Sends HTTP requests to a real server, using TCP port 80.
    • WSP: Requests and verifies the replies using Wireless Access Protocol (WAP), port 9201.
    • Telnet: Opens and closes a Telnet connection (TCP port 23) to a real server.
    • TCP: Establishes and resets TCP connections to a real server. This can be used to support any TCP port, including HTTPS or SSL, port 443.
    • FTP: Opens and closes an FTP connection (TCP ports 20 and 21) to a real server.
    • SMTP: Opens and closes an SMTP connection (TCP port 25) to a real server.
    • DNS: Sends requests to and verifies the replies from a real DNS server.

Configuration

  1. Define the probe:

    (global) ip slb probe name {ping | http | wsp}

    The probe is named name (text string up to 15 characters) and can be referenced by other SLB server and firewall farm commands. IOS SLB allows these probe types: ping (ICMP), http, or wsp (WAP port 9201). (Optional) Define the target address:

    (probe) address [ip-address]

    For a server farm, this command is not used. The ip-address used by the probe is inherited from each real server in the server farm. With IOS SLB, addresses are not inherited when the probe is used for a firewall farm. You must use this command to define the address of a target firewall.

  2. Set the probe behavior:

    1. (Optional) Set the time between probes:

      (probe) interval seconds

      Probes are sent toward the target at intervals of seconds (IOS SLB: 1 to 65,535 seconds; default 1 second; CSM: 5 to 65,535 seconds; default 120 seconds).

    2. (Optional) Define the criteria for a failure:

      (probe) faildetect retry-count

      With IOS SLB, a server or firewall is considered to have failed if retry-count (1 to 255; default 10) consecutive ping probes are unanswered. With a CSM, the target has failed if retry-count (0 to 65,535; default 3) probes of any type are unanswered.

  3. (Optional; HTTP probe only) Define the HTTP probe operation:

    1. (Optional) Set the port number:

      (probe) port port-number

      Usually, an HTTP probe uses port-number 80. If the port-number is unspecified, however, it is inherited from the virtual server. For a firewall probe, the port-number must be given (1 to 65,535). The target device must answer an HTTP request for the probe to work.

    2. (Optional) Define the HTTP probe method:

      (probe) request [method {get | post | head | name name}] [url path]

      The probe requests information from the server using the get (the default), post, head (request a header data type), or name (request the data named name) method. A URL can also be given, specifying the server path (text string URL; default /).

    3. (Optional) Specify the probe header information:

      (probe) header field-name [field-value]

      The probe header name is set to field-name (text string up to 15 characters), with a value of field-value. A colon is automatically inserted between the name and value. By default, the request contains these headers:

      Accept: */*
      Connection: close
      User-Agent: cisco-slb-probe/1.0
      Host: virtual-IP-address
    4. (Optional) Specify the HTTP authentication values:

      (probe) credentials username [password]

      If HTTP authentication is required, a username (text string, up to 15 characters) and a password (text string up to 15 characters) can be given for the probe.

    5. (Optional) Expect a specific status code to be returned:

      (probe) expect [status status-code] [regex regular-expression]

      A real server or a firewall is considered to have failed if it either does not respond to an HTTP probe or if it returns a status-code (100 to 599, default 200) other than the one specified. For firewalls, the status-code should be set to 401. For a CSM, the status code must be within the range min-number (default 0) and max-number (optional, default 999).

      With IOS SLB, you can also expect a regular expression along with the status code. Use the regex keyword and specify a regular-expression (text string, no default). Only the first 2920 bytes of the probe reply are searched for a match.

  4. (Optional; WSP probe only) Define the target URL:

    (probe) url [path]

    A URL can also be given, specifying the server path (text string URL; default /).

Displaying Information About SLB Probes

To display helpful configuration and status information about SLB probes, enter the following command:

(exec) show ip slb probe [name probe_name] [detail]

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |