|
|
This feature module describes the Cisco IOS Server Load Balancing (SLB) feature. It includes the following sections:
The IOS SLB feature is an IOS-based solution that provides IP server load balancing. Using the IOS SLB feature, the network administrator defines a virtual server that represents a group of real servers in a cluster of network servers known as a server farm. In this environment the clients are configured to connect to the IP address of the virtual server. The virtual server IP address is configured as a loopback address, or secondary IP address, on each of the real servers. When a client initiates a connection to the virtual server, the IOS SLB function chooses a real server for the connection based on a configured load balancing algorithm.
Figure 1 illustrates IOS SLB.
This section describes the features supported in IOS SLB. It includes information on the following features:
IOS SLB provides two load balancing algorithms: weighted round robin and weighted least connections. You may specify either algorithm as the basis for choosing a real server for each new connection request that arrives at the virtual server.
The weighted round robin algorithm specifies that the real server used for a new connection to the virtual server is chosen from the server farm in a circular fashion. Each real server is assigned a weight, n, that represents its capacity to handle connections, as compared to the other real servers associated with the virtual server. That is, new connections are assigned to a given real server n times before the next real server in the server farm is chosen.
For example, assume a server farm comprised of real server ServerA with n = 3, ServerB with n = 1, and ServerC with n = 2. The first three connections to the virtual server are assigned to ServerA, the fourth connection to ServerB, and the fifth and sixth connections to ServerC.
The weighted least connections algorithm specifies that the next real server chosen from a server farm for a new connection to the virtual server is the server with the fewest active connections. Each real server is assigned a weight for this algorithm, also. When weights are assigned, the server with the fewest connections is based on the number of active connections on each server, and on the relative capacity of each server. The capacity of a given real server is calculated as the assigned weight of that server divided by the sum of the assigned weights of all of the real servers associated with that virtual server, or n1/(n1+n2+n3...).
For example, assume a server farm comprised of real server ServerA with n = 3, ServerB with n = 1, and ServerC with n = 2. ServerA would have a calculated capacity of 3/(3+1+2), or half of all active connections on the virtual server, ServerB one-sixth of all active connections, and ServerC one-third of all active connections. At any point in time, the next connection to the virtual server would be assigned to the real server whose number of active connections is farthest below its calculated capacity.
You must specify which Transmission Control Protocol/User Datagram Protocol (TCP/UDP) port a virtual server handles. The port-bound servers feature allows one virtual server IP address to represent one set of real servers for one service, such as Hypertext Transfer Protocol (HTTP), and a different set of real servers for another service, such as Telnet. Packets destined to a virtual server address for a port that is not specified in a virtual server definition are not redirected.
The client-assigned load balancing feature allows you to limit the subnets that use a virtual server.
The sticky connections feature allows new connections from a client IP address to be assigned to the same real server as previous connections from the same client address. This behavior is controlled by a configurable timer. If the timer is configured on a virtual server, new connections from a client are sent to the same real server that handled the previous client connection, as long as:
The sticky connection feature also permits the coupling of services that are handled by more than one virtual server. This feature allows connection requests for related services to use the same real server. For example, Web server (HTTP) typically uses TCP port 80, and HTTP over Secure Socket Layer (HTTPS) uses port 443. If HTTP virtual servers and HTTPS virtual servers are coupled, connections for ports 80 and 443 from the same client IP address are assigned to the same real server.
The maximum connections feature allows you to configure a limit on the number of active connections that a real server can handle.
Because of IP packet ordering anomalies, IOS SLB might "see" the termination of a TCP connection (a finish [FIN] or reset [RST]) followed by other packets for the connection. This problem usually occurs when there are multiple paths that the TCP connection packets can follow. To correctly redirect the packets that arrive after the connection is terminated, IOS SLB retains the TCP connection information, or context, for a specified length of time. The length of time the context is retained after the connection is terminated is controlled by a configurable delay timer.
IOS SLB tracks each TCP synchronous idle character (SYN) sent to a real server by a client attempting to open a new connection. If several consecutive SYNs are not answered, or if an SYN is replied to with an RST, the TCP session is reassigned to a new real server. The number of SYN attempts is controlled by a configurable reassign threshold.
IOS SLB automatically detects each failed connection attempt to a real server, and increments a failure counter for that server. (The failure counter is not incremented if a failed connection from the same client has already been counted.) If a server's failure counter exceeds a configurable failure threshold, the server is considered out of service and is removed from the list of active real servers.
When a real server fails and is removed from the list of active servers, it is assigned no new connections for a length of time specified by a configurable retry timer. After that timer expires, the server is again eligible for new virtual server connections and IOS SLB sends the server the next connection for which it qualifies. If the connection is successful, the failed server is placed back on the list of active real servers. If the connection is unsuccessful, the server remains out of service and the retry timer is reset.
In an environment that uses weighted least connections load balancing, a real server that is placed in service initially has no connections, and could therefore be assigned so many new connections that it becomes overloaded. To prevent such an overload, the slow start feature controls the number of new connections that are directed to a real server that has just been placed in service.
The SynGuard feature limits the rate of TCP SYNs handled by a virtual server to prevent a type of network problem known as an SYN flood denial of service attack. A user might send a large number of SYNs to a server, which would overwhelm or crash the server, denying service to other users. The SynGuard feature prevents an SYN flood denial of service attack from bringing down IOS SLB or a real server. SynGuard monitors the number of SYNs to a virtual server over a specific time interval and does not allow the number to exceed a configured SYN threshold. Once the threshold is reached, any new SYNs are dropped.
The IOS SLB Dynamic Feedback Protocol (DFP) is a mechanism that allows host agents in load balanced environments to dynamically report the change in status of the host systems providing a virtual service. The status reported is a relative weight that specifies a host server's capacity to perform work.
IOS SLB enables you to telnet to the load balancing device using an alternate IP address. To do so, use either of the following methods:
This function is similar to that provided by the LocalDirector (LD) Alias command.
You can balance transparent Webcaches if you know in advance the IP addresses they are serving. In IOS SLB, configure the IP addresses, or some common subset of them, as virtual servers.
![]() |
Note A Webcache can starts its own connections to real sites if pages are not available in its cache. Those connections cannot be load-balanced back to the same set of caches. SLB addresses this by allowing you to configure "client exclude" statements so that SLB does not load-balance connections initiated by the Webcaches. |
Cisco IOS Network Address Translation (NAT), RFC 1631, allows unregistered "private" IP addresses to connect to the Internet by translating them into globally registered IP addresses. Cisco IOS NAT also increases network privacy by hiding internal IP addresses from external networks.
IOS SLB can operate in one of two redirection modes:
The main advantage of dispatch mode is performance. In dispatch mode, the Layer 3 and Layer 4 addresses are not modified so IP header checksum adjustment is fast, and checksum adjustment or recalculation for TCP or UDP is not required. Dispatch mode is also simpler because packets for applications with IP addresses in the packet do not have to be examined and modified.
The main disadvantage of dispatch mode is that the virtual server IP address is not modified, so the real servers must be Layer 2 adjacent with the load balancer or intervening routers may not be able to route to the chosen real server.
NAT (directed mode) is used to solve these dispatch mode problems.
IOS SLB currently supports only server NAT. By replacing the virtual server IP address with the real server IP address (and vice versa), servers can be many hops away from the load balancer and intervening routers can route to them without requiring tunnelling. Additionally, loopback and secondary interfaces need no longer be on the real server.
![]() |
Note On the Catalyst 6000 Series and Cisco 7200 Series routers, if an IP address is configured as a real IP address for a NAT virtual server, you cannot balance connection requests from that address to a different virtual server (whether NAT or dispatch) on the same load balancer. |
The network designer must ensure that outbound packets travel through IOS SLB, using one of the following methods:
A less common form of server NAT is server port translation, which involves replacement of a virtual server port. Server port translation does not require server IP address translation, but the two translations can be used together.
An IOS SLB could represent a point of failure and the servers could lose their connections to the backbone if power fails, or if a link from a switch to the distribution-layer switch is disconnected. IOS SLB supports a stateless backup option you can use to reduce that risk. Stateless backup, based on Hot Standby Router Protocol (HSRP), provides high network availability by routing IP traffic from hosts on Ethernet networks without relying on the availability of a single Layer 3 switch.
HSRP is configured on Layer 3 switches that run IP over Ethernet. If a Layer 3 switch fails, HSRP automatically allows another Layer 3 switch to assume the function of the failing switch. HSRP is therefore particularly useful when you require continuous access to resources in the network.
HSRP is compatible with Novell's Internetwork Packet Exchange (IPX) and with AppleTalk.
![]() |
Note To avoid any single point of failure in a SLB network, use multiple Layer 2 switches to provide connectivity between the SLB devices and the servers. |
IOS SLB facilitates scalability and availability. The addition of new servers and the removal or failure of existing servers can occur at any time without affecting the availability of the virtual server.
In a branch office, IOS SLB allows balancing of multiple sites and disaster recovery in the event of full-site failure, and distributes the work of load balancing.
IOS SLB has the following restrictions:
Standards
MIBs
RFCs
Configuring IOS SLB involves identifying server farms, configuring groups of real servers in server farms, and configuring the virtual servers that represent the real servers. See the following sections for configuration tasks for the IOS SLB feature. Perform these tasks in the order given. Some of the tasks are required; others are optional.
Grouping real servers into server farms is an essential part of IOS SLB. Using server farms enables IOS SLB to assign new connections to the real servers based on their weighted capacities, and on the load balancing algorithms used.
To configure a server farm, use the following command in global configuration mode:
| Command | Purpose |
|---|---|
Router(config)# ip slb serverfarm serverfarm-name | Adds a server farm definition to the IOS SLB configuration and initiates server farm configuration mode. See the ip slb serverfarm command for more details. |
To determine which real server to use for each new connection request, the IOS SLB feature uses one of two load balancing algorithms: weighted round robin (the default) or weighted least connections. (See the "Weighted Round Robin" section or the "Weighted Least Connections" section for detailed descriptions of these algorithms.) To specify the load balancing algorithm, use the following command in server farm configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-sfarm)# predictor [roundrobin | leastconns] | Specifies whether the weighted round robin algorithm or the weighted least connections algorithm is to be used to determine how a real server is selected. See the predictor command for more details. |
To configure a bind ID on the server farm for use by DFP, use the following command in server farm configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-sfarm)# bindid [bind_id] | Specifies a bind ID on the server farm for use by DFP. See the bindid command for more details. |
A server farm comprises a number of real servers. The real servers are the physical devices that provide the load balanced services.
To identify a real server in your network, use the following command in server farm configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-sfarm)# real ip-address | Identifies a real server to the IOS SLB function and initiates real server configuration mode. See the real command for more details. |
You can configure any of the following real server attributes, by using the following commands in real server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-real)# faildetect numconns number-conns [numclients number-clients] | Specifies the number of consecutive connection failures and, optionally, the number of unique client connection failures, that constitute failure of the real server. See the faildetect command for more details. |
Router(config-slb-real)# maxconns number-conns | Specifies the maximum number of active connections allowed on the real server at one time. See the maxconns command for more details. |
Router(config-slb-real)# reassign threshold | Specifies the number of consecutive unanswered SYNs that initiates assignment of the connection to a different real server. See the reassign command for more details. |
Router(config-slb-real)# retry retry-value | Specifies the interval, in seconds, to wait between the detection of a server failure and the next attempt to connect to the failed server. See the retry command for more details. |
Router(config-slb-real)# weight weighting-value | Specifies the real server's workload capacity relative to other servers in the server farm. See the weight command for more details. |
To place the real server into service, use the following command in real server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-real)# inservice | Enables the real server for use by IOS SLB. See the inservice (real server) command for more details. |
To specify a virtual server, use the following command in global configuration mode:
| Command | Purpose |
|---|---|
Router(config)# ip slb vserver virtserver-name | Identifies a virtual server and initiates virtual server configuration mode. See the ip slb vserver command for more details. |
To associate the virtual server with a server farm, use the following command in virtual server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-vserver)# serverfarm serverfarm-name | Associates a real server farm with a virtual server. See the serverfarm command for more details. |
To configure virtual server attributes, use the following command in virtual server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-vserver)# virtual ip-address {tcp | udp} port-number [service service-name]
| Specifies the virtual server IP address, type of connection, port number, and optional service coupling. See the virtual command for more details. |
To change the default settings of the virtual server values, use the related command in virtual server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-vserver)# client ip-address network-mask | Specifies which clients are allowed to use the virtual server. See the client command for more details. |
Router(config-slb-vserver)# delay duration | Specifies the amount of time IOS SLB maintains TCP connection context after a connection has terminated. The default value is 10 seconds. See the delay command for more details. |
Router(config-slb-vserver)# idle duration | Specifies the minimum amount of time IOS SLB maintains connection context in the absence of packet activity. The default value is 3600 seconds (60 hours). See the idle command for more details. |
Router(config-slb-vserver)# sticky duration [group group-id] | Specifies that connections from the same client use the same real server, as long as the interval between client connections does not exceed the specified duration. See the sticky command for more details. |
Router(config-slb-vserver)# synguard syn-count interval | Specifies the rate of TCP SYNs handled by a virtual server in order to prevent an SYN flood denial of service attack. See the synguard command for more details. |
By default, virtual server addresses are advertised. That is, static routes to the Null0 interface are installed for the virtual server addresses. To advertise these static routes using the routing protocol, you must configure redistribution of static routes for the routing protocol. To prevent the installation of a static route, use the no form of the advertise command, in virtual server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-vserver)# no advertise | Omits the virtual server IP address from the routing protocol updates. See the advertise command for more details. |
To place the virtual server into service, use the following command in virtual server configuration mode:
| Command | Purpose |
|---|---|
Router(config-slb-vserver)# inservice | Enables the virtual server for use by IOS SLB. See the inservice (virtual server) command for more details. |
To configure IOS SLB DFP, enter the following commands in order, beginning in global configuration mode:
| Command | Purpose | |
|---|---|---|
Step 1 | Router(config)# ip slb dfp [password password [timeout]] | Configures DFP and, optionally, sets a password and initiates DFP configuration mode. See the ip slb dfp command for more details. |
Step 2 | Router(config-slb-dfp)# | Configures a DFP agent. See the agent command for more details. |
To configure IOS SLB NAT mode for a specific server farm, enter the following commands in order, beginning in global configuration mode:
| Command | Purpose | |
|---|---|---|
Step 1 | Router(config)# ip slb serverfarm serverfarm-name | Adds a server farm definition to the IOS SLB configuration and initiates server farm configuration mode. See the ip slb serverfarm command for more details. |
Step 2 | Router(config-slb-sfarm)# nat server | Configures server NAT. See the nat command for more details. |
Step 3 | Router(config-slb-sfarm)# real ip-address [port_number] | Identifies a real server to the IOS SLB function and initiates real server configuration mode. See the real command for more details. |
A Layer 3 switch running the HSRP detects a failure by sending and receiving multicast User Datagram Protocol (UDP) "hello" packets. When the IOS SLB switch running HSRP detects that the designated active Layer 3 switch has failed, the selected backup Layer 3 switch assumes control of the HSRP group MAC and IP addresses. (You can also select a new standby Layer 3 switch at that time.) Both the primary and the backup Layer 3 switch must be on the same subnetwork.
IOS SLB switching software supports HSRP over 10/100 Ethernet, Gigabit Ethernet, FEC, GEC, and BVI (Bridge-Group Virtual Interface) connections.
HSRP uses a priority scheme to determine which HSRP-configured Layer 3 switch is to be the default active Layer 3 switch. To configure a Layer 3 switch as active, you assign it a priority higher than that of all other HSRP-configured Layer 3 switches. The default priority is 100, so if you configure just one Layer 3 switch to have a higher priority, that switch becomes the default active switch.
HSRP works by the exchange of multicast messages that advertise priority among HSRP-configured Layer 3 switches. When the active switch fails to send a hello message within a configurable period, the standby switch with the highest priority becomes the active switch. The transition of packet-forwarding functions between Layer 3 switches is completely transparent to all hosts accessing the network.
HSRP-configured Layer 3 switches exchange the following types of multicast messages:
At any time, HSRP-configured Layer 3 switches are in one of the following states:
Configuration of stateless backup requires the following:
To configure stateless backup over VLANs between SLB switches, perform the following tasks in order:
Step 2 Configure the real servers--See the "Specifying a Real Server (Required)" section.
Step 3 Configure the virtual servers--See the "Specifying a Virtual Server (Required)" section.
![]() |
Note When you use the inservice (virtual server) command to configure the virtual server as "in-service" you must use the optional standby command and configure an HSRP group name. |
Step 4 Configure the IP routing protocol--See the "Configuring IP Routing Protocols" chapter of the Catalyst 4840G Software Feature and Configuration Guide.
Step 5 Configure the VLAN between the switches--See the "About Virtual LANs" chapter of the Catalyst 4840G Software Feature and Configuration Guide.
Step 6 Enable HSRP--See the "Enabling HSRP" section.
Step 7 Customize group attributes--See the "Customizing Group Attributes" section.
Step 8 Verify the IOS SLB HSRP configuration--See the "Verifying the IOS SLB Stateless Backup Configuration" section.
A sample stateless backup configuration is shown in the "Sample IOS SLB Stateless Backup Configuration" section.
| Command | Purpose |
|---|---|
Router(config-if)# standby [group-number] ip [ip-address [secondary]] | Enables HSRP. |
To customize "hot standby" group attributes, use one or more of the following commands in interface configuration mode:
To verify that stateless backup has been configured and is operating correctly, use the following show ip slb vserver commands to display information about the IOS SLB virtual server status:
Router# show ip slb vserver slb vserver prot virtual state conns ------------------------------------------------------------------- VS1 TCP 10.10.10.12:23 INSERVICE 2 VS2 TCP 10.10.10.18:23 INSERVICE 2 Router# show ip slb vserver detail VS1, state = INSERVICE, v_index = 10 virtual = 10.10.10.12:23, TCP, service = NONE, advertise = TRUE server farm = SERVERGROUP1, delay = 10, idle = 3600 sticky timer = 0, sticky subnet = 255.255.255.255 sticky group id = 0 synguard counter = 0, synguard period = 0 conns = 0, total conns = 0, syns = 0, syn drops = 0 standby group = None VS2, state = INOFSERVICE, v_index = 11 virtual = 10.10.10.18:23, TCP, service = NONE, advertise = TRUE server farm = SERVERGROUP2, delay = 10, idle = 3600 sticky timer = 0, sticky subnet = 255.255.255.255 sticky group id = 0 synguard counter = 0, synguard period = 0 conns = 0, total conns = 0, syns = 0, syn drops = 0 standby group = None
The following commands enable the HSRP standby group 100 IP address, priority, preempt, timers, configure a name and authentication for Device A in Figure 4:
Router(config-if)# standby 100 ip 172.20.100.10 Router(config-if)# standby 100 priority 110 Router(config-if)# standby 100 preempt Router(config-if)# standby 100 timers 5 15 Router(config-if)# standby 100 name Web_group1 Router(config-if)# standby 100 authentication Secret Router(config-if)# exit Router#
This section describes how to verify the following different aspects of the IOS SLB feature:
To verify that the IOS SLB is installed and working properly, follow these steps:
Step 2 Ping from that device to each of the clients and real servers. If it is not precluded by firewalls or network configuration, ping from the client side to each of the real servers.
Step 3 From the client side, ping the virtual server. Pings are answered by SLB even if no real servers are in service, so this ensures that the IOS SLB device is reachable.
Step 4 For the selected protocol, start a client connection to the virtual server.
Step 5 If you want sticky connections:
a. Configure the sticky connections.
b. Start a client connection.
c. Enter the show ip slb reals detail and show ip slb conns commands.
d. Examine the real server connection counts. The real server whose count increased is the one to which the client connection is assigned.
e. Enter the show ip slb sticky command to display the sticky relationships that IOS SLB stored.
f. End the connection.
g. Ensure that the real server's connection count decreased.
h. Restart the connection, after waiting no longer than the sticky timeout value.
i. Enter the show ip slb conns command again.
j. Examine the real server connection counts again, and verify that the sticky connection is assigned to the same real server as before.
Step 6 Start additional client connections.
Step 7 Enter the show ip slb reals detail command.
Step 8 Verify that the the connection counts are increasing.
To verify that server failures are detected correctly, follow these steps:
Step 2 Enter the show ip slb reals detail command to show the status of the real servers.
Step 3 Examine the status and connection counts of the real servers.
The following questions and answers can help you troubleshoot IOS SLB, if you have problems.
| Question | Answer |
|---|---|
Why am I able to connect to real servers directly, but unable to connect to the virtual server? | Make sure that the virtual IP address is configured as a loopback in each of the real servers (if you are running in dispatch mode). |
Why is IOS SLB not marking my real server as failed when I disconnect it from the network? | Tune the values for the numclients, numconns, and delay keywords. If you have a very small client population (for example, in a test environment), the numclients keyword could be causing the problem. This parameter prevents IOS SLB from mistaking the failure of a small number of clients for the failure of a real server. |
Why is IOS SLB not marking my connections as established even though I'm transferring data? | If you are using dispatch mode, make sure there are no alternate paths that allow outbound flows to bypass IOS SLB. Also, make sure the clients and real servers are not on the same IP subnet. |
Why does IOS SLB show my real server as inservice even though I have taken it down or physically disconnected it? | The inservice and outofservice states indicate whether the network administrator intends for that real server to be used when it is operational. A real server that was inservice but was removed from the selection list dynamically by IOS SLB as a result of automatic failure detection, is marked as failed. Use the show ip slb reals detail command to display these real server states. In release 12.1(1)E, inservice is changed to operational, to better reflect what is actually occurring. |
Why is IOS SLB not balancing correctly? I am using dispatch mode, the servers are leaving sockets open, and I am seeing RSTs in response to a number of SYNs. Curiously, sometimes things work fine. | Enter the show mls flow command: Router# sh mls flow current ip flowmask for unicast: full flow current ipx flowmask for unicast: destination only The current IP flowmask must be full flow. If it is not, correct the problem using the mls flow ip full command: Router# config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)# mls flow ip full Router(config)# |
To obtain and display runtime information about IOS SLB, use the following commands in EXEC mode:
| Command | Purpose |
|---|---|
Router# show ip slb conns [vserver virtserver-name] [client ip-address] [detail] | Displays all connections handled by IOS SLB, or, optionally, only those connections associated with a particular virtual server or client. See the show ip slb conns command for more details. |
Router# show ip slb dfp [agent ip_addr port] [detail] [weights] | Displays information about DFP and DFP agents, and about the weights assigned to real servers. See the show ip slb dfp command for more details. |
Router# show ip slb reals [vserver virtserver-name] [detail] | Displays information about the real servers defined to IOS SLB. See the show ip slb reals command for more details. |
Router# show ip slb serverfarms [name serverfarm-name] [detail] | Displays information about the server farms defined to IOS SLB. See the show ip slb serverfarms command for more details. |
Router# show ip slb stats | Displays IOS SLB statistics. See the show ip slb stats command for more details. |
Router# show ip slb sticky [client ip-address] | Displays information about the sticky connections defined to IOS SLB. See the show ip slb sticky command for more details. |
Router# show ip slb vservers [name virtserver-name] [detail] | Displays information about the virtual servers defined to IOS SLB. See the show ip slb vservers command for more details. |
This section provides the following IOS SLB configuration examples:
This section provides a configuration example based on the network layout shown in Figure 2.
As shown in the following sample code, the example topology has three public Web servers and two restricted Web servers for privileged clients in subnet 10.4.4.x. The public Web servers are weighted according to their capacity, with server 10.1.1.2 having the lowest capacity and having a connection limit imposed on it. The restricted Web servers are configured as members of the same sticky group, so that HTTP connections and Secure Socket Layer (SSL) connections from the same client use the same real server.
This configuration is coded as follows:
ip slb serverfarm PUBLIC Unrestricted Web server farm predictor leastconns Use weighted least connections algorithm real 10.1.1.1 First real server weight 16 inservice real 10.1.1.2 Second real server weight 4 maxconns 1000 Restrict maximum number of connections inservice real 10.1.1.3 Third real server weight 24 inservice
ip slb serverfarm RESTRICTED Restricted Web server farm predictor leastconns Use weighted least connections algorithm real 10.1.1.20 First real server in-service real 10.1.1.21 Second real server in-service
ip slb vserver PUBLIC_HTTP Unrestricted Web virtual server virtual 10.0.0.1 tcp www Handle HTTP requests serverfarm PUBLIC Use public Web server farm inservice
ip slb vserver RESTRICTED_HTTP Restricted HTTP virtual server virtual 10.0.0.1 tcp www Handle HTTP requests serverfarm RESTRICTED Use restricted Web server farm client 10.4.4.0 255.255.255.0 Only allow clients from 10.4.4.x sticky 60 idle 120 group 1 Couple connections with RESTRICTED_SSL inservice
ip slb vserver RESTRICTED_SSL Restricted SSL virtual server virtual 10.0.0.1 tcp https Handle SSL requests serverfarm RESTRICTED Use restricted Web server farm client 10.4.4.0 255.255.255.0 Only allow clients from 10.4.4.x sticky 60 idle 120 group 1 Couple connections with RESTRICTED_HTTP inservice
This section provides a configuration example based on the network layout shown in Figure 3.

The topology in Figure 3 has four Web servers, configured as follows:
Servers 1 and 2 are load balanced using Switch A, which is performing server address translation.
Servers 3 and 4 are load balanced using Switches B and C. These two switches are performing server address translation. These switches also perform server port translation for HTTP packets to and from Server 4.
The configuration statements for Switch A are:
ip slb serverfarm FARM1 ! Translate server addresses nat server ! Server 1 port 80 real 10.1.1.1 inservice ! Server 2 port 80 real 10.2.1.1 inservice ! ip slb vserver HTTP1 ! Handle HTTP (port 80) requests virtual 128.1.0.1 tcp www serverfarm FARM1 inservice
The configuration statements for Switch B are:
ip slb serverfarm FARM2 ! Translate server addresses nat server ! Server 3 port 80 real 10.3.1.1 inservice ! Server 4 port 8080 real 10.4.1.1 port 8080 inservice ! Server 4 port 8081 real 10.4.1.1 port 8081 inservice ! Server 4 port 8082 real 10.4.1.1 port 8082 inservice ! ip slb vserver HTTP2 ! Handle HTTP (port 80) requests virtual 128.2.0.1 tcp www serverfarm FARM2 inservice
The configuration statements for Switch C are:
ip slb serverfarm FARM2 ! Translate server addresses nat server ! Server 3 port 80 real 10.3.1.1 inservice ! Server 4 port 8080 real 10.4.1.1 port 8080 inservice ! Server 4 port 8081 real 10.4.1.1 port 8081 inservice ! Server 4 port 8082 real 10.4.1.1 port 8082 inservice ! ip slb vserver HTTP2 ! Handle HTTP (port 80) requests virtual 128.4.0.1 tcp www serverfarm FARM2 inservice
Figure 4 shows the topology of an IP network with two Layer 3 switches configured for HSRP. In this network:
![]() |
Note Some configurations that use HSRP still require a routing protocol for convergence when a topology change occurs. The standby Layer 3 switch becomes active, but connectivity does not occur until convergence occurs. |
If the connection between Device A and the client accessing virtual IP 1.0.0.3 fails, fast-converging routing protocols (such as Enhanced IGRP and OSPF) can respond within seconds, ensuring that Device B is prepared to transfer packets that would have gone through Device A.
The following is the configuration for Device A:
hostname Device A interface GigabitEthernet 41 ip address 1.0.0.1 255.0.0.0 standby 1 ip 1.0.0.3 standby 1 preempt standby 1 priority 110 standby 1 authentication denmark standby 1 timers 5 15 standby 1 name Web-Group interface FastEthernet 1 ip address 3.0.0.1 255.0.0.0 router eigrp 1 network 1.0.0.0 network 3.0.0.0
The following is the configuration for Device B:
hostname Device B interface GigabitEthernet 41 ip address 1.0.0.2 255.0.0.0 standby 1 ip 1.0.0.3 standby 1 preempt standby 1 authentication denmark standby 1 timers 5 15 standby 1 name Web-Group interface FastEthernet 41 ip address 2.0.0.1 255.0.0.0 router eigrp 1 network 1.0.0.0 network 2.0.0.0
The standby ip interface configuration command enables HSRP and establishes 1.0.0.3 as the IP address of the virtual router. The configurations of both Layer 3 switches include this command so that both switches share the same virtual IP address. The number 1 establishes Hot Standby group 1. (If you do not specify a group number, the default is group 0.) The configuration for at least one of the Layer 3 switches in the Hot Standby group must specify the IP address of the virtual router; specifying the IP address of the virtual router is optional for other routers in the same Hot Standby group.
The standby preempt interface configuration command allows the Layer 3 switch to become the active switch when its priority is higher than all other HSRP-configured switches in this Hot Standby group. The configurations of both switches include this command so that each can be the standby Layer 3 switch for the other switch. The number 1 indicates that this command applies to Hot Standby group 1. If you do not use the standby preempt command in the configuration for a Layer 3 switch, that switch cannot become the active Layer 3 switch.
The standby priority interface configuration command sets the Layer 3 switch's HSRP priority to 110, which is higher than the default priority of 100. Only the configuration of Device A includes this command, which makes Device A the default active Layer 3 switch. The number 1 indicates that this command applies to Hot Standby group 1.
The standby timers interface configuration command sets the interval (in seconds) between hello messages (called the hello time) to five seconds, and sets the interval (in seconds) that a Layer 3 switch waits before it declares the active Layer 3 switch to be down (called the hold time) to eight seconds. (The defaults are three and 10 seconds, respectively.) To modify the default values, you must configure each Layer 3 switch to use the same hello time and hold time. The number 1 indicates that this command applies to Hot Standby group 1.
The standby name interface configuration command associates the IOS SLB interface with an HSRP group name (in this case, Web-Group), previously specified on an inservice (virtual server) command. The number 1 indicates that this command applies to Hot Standby group 1.
This section documents new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.0 and 12.0(7)T command reference publications.
In Cisco IOS Release 12.0(1)T or later, you can search and filter the output for show and more commands. This functionality is useful when you need to sort through large amounts of output, or if you want to exclude output that you do not need to see.
To use this functionality, enter a show or more command followed by the "pipe" character (|), one of the keywords begin, include, or exclude, and an expression that you want to search or filter on:
command | {begin | include | exclude} regular-expressionFollowing is an example of the show atm vc command in which you want the command output to begin with the first line where the expression "PeakRate" appears:
show atm vc | begin PeakRateFor more information on the search and filter functionality, refer to the Cisco IOS Release 12.0(1)T feature module titled CLI String Search.
To control the installation of a static route to the Null0 interface for a virtual server address, use the advertise virtual server configuration command. Advertisement of this static route using the routing protocol requires that you configure redistribution of static routes for the routing protocol. To prevent the installation of a static route for the virtual server IP address, use the no form of this command.
advertiseSyntax Description
This command has no arguments or keywords.
Defaults
The virtual server IP address is added to the routing table.
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example prevents advertisement of the virtual server's IP address in routing protocol updates:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# no advertise
Related Commands
Displays information about the virtual servers.
Command
Description
To configure a DFP agent, use the agent DFP configuration command. To remove an agent definition from the DFP configuration, use the no form of this command.
agent ip-address port [timeout [retry_count [retry_interval]]]
Syntax Description
ip-address Agent IP address port Agent port number timeout (Optional) Time period, in seconds, during which the DFP manager must receive an update from the DFP agent. The default is 0 seconds, which means there is no timeout. retry_count (Optional) Number of times DFP manager attempts to establish the TCP connection to the DFP agent. The default is 0 retries, which means there are infinite retries. retry_interval (Optional) Interval, in seconds, between retries. The default is 180 seconds.
Defaults
Timeout default: 0 seconds (no timeout)
Retry_count default: 0 (infinite retries)
Retry_interval default: 180 seconds
Command Modes
DFP configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
You can configure up to 1024 agents.
A DFP agent collects status information about a server's load capability and reports that information to a load manager. The DFP agent may reside on the server, or it may be a separate device that collects and consolidates the information from several servers before reporting to the load manager.
Examples
The following example configures a DFP agent:
Router(config-slb-dfp)# agent 17.17.17.17 22
Related Commands
ip slb dfp Configures the IOS SLB DFP.
Command
Description
To configure a bind ID, use the bindid server farm configuration command. To remove a bind ID from the server farm configuration, use the no form of this command.
bindid [bind_id]
Syntax Description
bind_id (Optional) Bind ID number. The default bind ID is 0.
Defaults
Bind_id default: 0
Command Modes
Server farm configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
You can configure one bind ID on each bindid command.
The bind ID allows a single physical server to be bound to multiple virtual servers and report a different weight for each one. Thus, the single real server is represented as multiple instances of itself, each having a different bind ID. DFP uses the bind ID to identify for which instance of the real server a given weight is specified.
Examples
The following example configures bind ID 309:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# bindid 309
Related Commands
ip slb dfp Configures the IOS SLB DFP.
Command
Description
To clear IP SLB connections or counters, use the clear ip slb command.
clear ip slb {connections [serverfarm farm_name | vserver server_name] | counters}
Syntax Description
connections Clears the IP SLB connection database. serverfarm Clears the connection database for the serverfarm named. farm_name Character string used to identify the serverfarm. vserver Clears the connection database for the virtual server named. server_name Character string used to identify the virtual server. counters Clears the IP SLB counters.
Defaults
No default behavior or values.
Command Modes
Privileged EXEC
Command History
12.1(1)E This command was introduced.
Release
Modification
Examples
The following example clears the connection database of server farm FARM1:
Router# clear ip slb connections serverfarm FARM1
The following example clears the connection database of virtual server VSERVER1:
Router# clear ip slb connections vserver VSERVER1
The following example clears the SLB counters:
Router# clear ip slb counters
Related Commands
Displays information about the SLB server farms. Displays information about the SLB virtual servers. Displays information about the SLB connections.
Command
Description
To define which clients are allowed to use the virtual server, use the client virtual server configuration command. You can use more than one client command to define more than one client. To remove a client definition from the IOS SLB configuration, use the no form of this command.
client ip-address network-mask
Syntax Description
ip-address Client IP address. The default is 0.0.0.0 (all clients). network-mask Client IP network mask. The default is 0.0.0.0 (all subnetworks).
Defaults
Ip_address default: 0.0.0.0 (all clients)
Network_mask default: 0.0.0.0 (all subnetworks)
Taken together, the default is client 0.0.0.0 0.0.0.0 (allows all clients on all subnetworks to use the virtual server).
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
The network-mask value is applied to the source IP address of incoming connections. The result must match the ip-address value for the client to be allowed to use the virtual server.
Examples
The following example allows only clients from 10.4.4.x access to the virtual server:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# client 10.4.4.0 255.255.255.0
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To change the amount of time IOS SLB maintains TCP connection context after a connection has terminated, use the delay virtual server configuration command. To restore the default delay timer, use the no form of this command.
delay duration
Syntax Description
duration Delay timer duration in seconds. The valid range is 1 to 600 seconds. The default value is 10 seconds.
Defaults
Duration default: 10 seconds
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
The delay timer allows out-of-sequence packets and final acknowledgments (ACKs) to be delivered after a TCP connection ends.
Do not set this value to zero (0).
Examples
The following example specifies that IOS SLB maintains TCP connection context for 30 seconds after a connection has terminated:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# delay 30
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To specify the conditions that indicate a server failure, use the faildetect real server configuration command. To restore the default values that indicate a server failure, use the no form of this command.
faildetect numconns number-conns [numclients number-clients]
Syntax Description
numconns Number of consecutive TCP connection reassignments allowed before a real server is considered to have failed. number-conns Connection reassignment threshold value in the range from 1 to 255. The default is 8 connection failures. numclients (Optional) Number of unique client connection failures allowed before a real server is considered to have failed. number-clients (Optional) Client connection reassignment threshold value in the range from 1 to 8. The default is 2 client connection failures.
Defaults
If the faildetect command is not specified, the default value of the connection reassignment threshold is 8.
If the numclients keyword is not specified, the default value of the unique client failure threshold is 2.
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
In the following example the connection reassignment threshold is set to 16 and, because the number-clients keyword is not configured, the threshold for unique client connection failure is set to the default value 8. The real server is considered to have failed when 8 unique clients have had connection failures and there have been 16 connection reassignments.
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 Router(config-slb-real)# faildetect numconns 16
Related Commands
real Identifies a real server.
Command
Description
To specify the minimum amount of time IOS SLB maintains connection information in the absence of packet activity, use the idle virtual server configuration command. To restore the default idle duration value, use the no form of this command.
idle duration
Syntax Description
duration Idle connection timer duration in seconds. Valid values range from 10 to 65535. The default is 3600 seconds (1 hour).
Defaults
Duration default: 3600 seconds
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
TCP connections that do not send traffic or keepalives before the idle timer expires are assumed to be inactive and are reset (RST).
Examples
The following example instructs IOS SLB to maintain connection information for an idle connection for 120 seconds.
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# idle 120
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To enable the real server for use by IOS SLB, use the inservice real server configuration command. To remove the real server from service, use the no form of this command.
inserviceSyntax Description
This command has no arguments or keywords.
Defaults
If the inservice command is not specified, the real server is defined to IOS SLB but is not used.
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example enables the real server for use by the IOS SLB feature:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 Router(config-slb-real)# inservice
Related Commands
real Identifies a real server.
Command
Description
To enable the virtual server for use by IOS SLB, use the inservice virtual server configuration command. To remove the virtual server from service, use the no form of this command.
inservice [standby group-name]
Syntax Description
standby (Optional) Configures the HSRP standby virtual server. groupname (Optional) Specifies the HSRP group name with which the IOS SLB virtual server is associated.
Defaults
If the inservice command is not specified, the virtual server is defined to IOS SLB but is not used.
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced. 12.1(1)E The standby keyword and group-name variable were added.
Release
Modification
Examples
The following example enables the real server for use by the IOS SLB feature:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# inservice
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To configure DFP and supply an optional password, use the ip slb dfp global configuration command. To remove the DFP configuration, use the no form of this command.
ip slb dfp [password password [timeout]]
Syntax Description
password (Optional) Specifies a password for MD5 authentication. password (Optional) Password value for MD5 authentication. This password must match the password configured on the host agent. timeout (Optional) Delay period, in seconds, during which both the old password and the new password are accepted. The default value is 180 seconds.
Defaults
Timeout default: 180 seconds
Command Modes
Global configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
The optional password, if configured, must match the password configured on the host agent.
The timeout options allow you to change the password without stopping messages between the agent and the manager.
Examples
The following example configures DFP, sets the password to flounder, and configures a timeout period of 60 seconds and changes to DFP agent configuration mode:
Router(config)# ip slb dfp flounder 60 Router(config-slb-dfp)#
Related Commands
agent Configures a DFP agent.
Command
Description
To identify a server farm and enter server farm configuration mode, use the ip slb serverfarm global configuration command. To remove the server farm from the IOS SLB configuration, use the no form of this command.
ip slb serverfarm serverfarm-name
Syntax Description
serverfarm-name Character string used to identify the server farm. The character string is limited to 15 characters.
Defaults
No default behavior or values.
Command Modes
Global configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example identifies a server farm named PUBLIC:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)#?
Related Commands
real Identifies a real server.
Command
Description
To identify a virtual server and enter virtual server configuration mode, use the ip slb vserver global configuration command. To remove a virtual server from the IOS SLB configuration, use the no form of this command.
ip slb vserver virtserver-name
Syntax Description
virtserver-name Character string used to identify the virtual server. The character string is limited to 15 characters.
Defaults
No default behavior or values.
Command Modes
Global configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example identifies a virtual server named PUBLIC_HTTP:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)#
Related Commands
serverfarm Associates a real server farm with a virtual server.
Command
Description
To limit the number of active connections to the real server, use the maxconns real server configuration command. To restore the default of no limit, use the no form of this command.
maxconns maximum-number
Syntax Description
maximum-number Maximum number of simultaneous active connections on the real server. Valid values range from 1 to 4294967295. The default is 4294967295.
Defaults
Maximum_number default: 4294967295
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example limits the real server to a maximum of 1000 simultaneous active connections:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 Router(config-slb-real)# maxconns 1000
Related Commands
real Identifies a real server.
Command
Description
To specify an IOS SLB NAT mode, use the nat server farm configuration command. To remove a NAT configuration, use the no form of this command.
nat server
Syntax Description
server Specifies that the destination address in load-balanced packets sent to the real server is the address of the real server chosen by the server farm load balancing algorithm.
Defaults
None
Command Modes
Server farm configuration
Command History
12.1(1)E This command was introduced.
Release
Modification
Usage Guidelines
The no nat command is allowed only if the virtual server was removed from service with the no inservice command.
Examples
The following example changes to SLB server farm configuration mode and configures NAT mode as server address translation on server farm FARM2:
Router# ip slb serverfarm FARM2 Router(config-slb-sfarm)# nat server
Related Commands
Associates a real server farm with a virtual server. Identifies a real server as a member of a server farm.
Command
Description
To specify the load balancing algorithm for selecting a real server in the server farm, use the predictor server farm configuration command. To restore the default load balancing algorithm of weighted round robin, use the no form of this command.
predictor [roundrobin | leastconns]
Syntax Description
roundrobin (Optional) Use the weighted round robin algorithm for selecting the real server to handle the next new connection for the server farm. See the "Weighted Round Robin" section for a detailed description of this algorithm. leastconns (Optional) Use the weighted least connections algorithm for selecting the real server to handle the next new connection for this server farm. See the "Weighted Least Connections" section for a detailed description of this algorithm.
Defaults
Weighted round robin
Command Modes
Server farm configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example specifies the weighted least connections algorithm:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# predictor leastconns
Related Commands
weight Specifies the real server's capacity, relative to other real servers in the server farm.
Command
Description
To identify a real server as a member of a server farm, use the real server farm configuration command. To remove the real server from the IOS SLB configuration, use the no form of this command.
real ip-address
Syntax Description
ip-address Real server IP address.
Defaults
No default behavior or values.
Command Modes
Server farm configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example identifies a real server as a member of the server farm:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.1.1.1
Related Commands
inservice Enables the real server for use by IOS SLB.
Command
Description
Use the reassign real server configuration command to specify the threshold of consecutive unanswered synchronizations that, if exceeded, result in an attempted connection to a different real server. To restore the default reassignment threshold, use the no form of this command.
reassign threshold
Syntax Description
threshold Number of unanswered TCP SYNs that are directed to a real server before the connection is reassigned to a different real server. An unanswered SYN is one for which no SYN or ACK is detected before the next SYN arrives from the client. IOS SLB allows 30 seconds for the connection to be established or for a new SYN to be received. If neither of these occurs within that time, the connection is removed from the IOS SLB database. The 30-second timer is restarted for each SYN as long as the number of connection reassignments specified on the faildetect command's numconns keyword is not exceeded. See the faildetect command for more information. Valid threshold values range from 1 to 4 SYNs. The default value is 3.
Defaults
Threshold default: 3 SYNs
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example sets the threshold of unanswered SYNs to 2:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 Router(config-slb-real)# reassign 2
Related Commands
real Identifies a real server.
Command
Description
To specify how long to wait before a new connection is attempted to a failed server, use the retry real server configuration command. To restore the default retry value, use the no form of this command.
retry retry-value
Syntax Description
retry-value Time, in seconds, to wait after the detection of a server failure before a new connection to the server is attempted. If the new connection attempt succeeds, the real server is placed in operational state. If the connection attempt fails, the timer is reset, the connection is reassigned, and the process repeats until it is successful or until the server is placed outofservice by the network administrator. Valid values range from 1 to 3600. The default value is 60 seconds.
Defaults
Retry-value default: 60 seconds
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example specifies that 120 seconds must elapse after the detection of a server failure before a new connection is attempted:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 Router(config-slb-real)# retry 120
Related Commands
real Identifies a real server.
Command
Description
To associate a real server farm with a virtual server, use the serverfarm virtual server configuration command. To remove the server farm association from the virtual server configuration, use the no form of this command.
serverfarm serverfarm-name
Syntax Description
serverfarm-name Name of a server farm that has already been defined using the ip slb serverfarm command.
Defaults
No default behavior or values.
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows how the ip slb vserver, virtual, and serverfarm commands are used to associate the real server farm named PUBLIC with the virtual server named PUBLIC_HTTP.
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# virtual 10.0.0.1 tcp www Router(config-slb-vserver)# serverfarm PUBLIC
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To display the active IOS SLB connections, use the show ip slb conns privileged EXEC command.
show ip slb conns [vserver virtserver-name] [client ip-address] [detail]
Syntax Description
vserver (Optional) Displays only those connections associated with a particular virtual server. virtserver-name (Optional) Name of the virtual server to be monitored. client (Optional) Displays only those connections associated with a particular client IP address. ip-address (Optional) IP address of the client to be monitored. detail (Optional) Displays detailed connection information.
Defaults
If no options are specified, the command displays output for all active IOS SLB connections.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows IOS SLB active connection data:
router# show ip slb conns vserver prot client real state ---------------------------------------------------------------------------- TEST TCP 7.150.72.183:328 80.80.90.25:80 CLOSING TEST TCP 7.250.167.226:423 80.80.90.26:80 CLOSING TEST TCP 7.234.60.239:317 80.80.90.26:80 CLOSING TEST TCP 7.110.233.96:747 80.80.90.26:80 CLOSING TEST TCP 7.162.0.201:770 80.80.90.30:80 CLOSING TEST TCP 7.22.225.219:995 80.80.90.26:80 CLOSING TEST TCP 7.2.170.148:169 80.80.90.30:80 CLOSING
| Field | Description |
vserver | Name of the virtual server whose connections are being monitored and displayed. Information about each connection is displayed on a separate line. |
prot | Protocol being used by the connection. |
client | Client IP address being used by the connection. |
| Field (continued) | Description (continued) |
real | Real IP address of the connection. |
state | Current state of the connection:
|
To display DFP manager and agent information, such as passwords, timeouts, retry counts, and weights, use the show ip slb dfp privileged EXEC command.
show ip slb dfp [agent ip_address port | detail | weights]
Syntax Description
agent (Optional) Displays information about an agent. ip_address (Optional) Agent IP address. port (Optional) Agent port number. detail (Optional) Displays all data available. weights (Optional) Displays information about weights assigned to real servers for load balancing.
Defaults
If no options are specified, the command displays summary information.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows IOS SLB DFP data:
router# show ip slb dfp detail
DFP Manager:
Current passwd:NONE Pending passwd:NONE
Passwd timeout:0 sec
Uned errors:0
DFP Agent 161.44.2.34:61936 Connection state:Connected
Timeout = 0 Retry Count = 0 Interval = 180 (Default)
Security errors = 0
Last message received:10:20:26 UTC 11/02/99
Last reported Real weights for Protocol TCP, Port www
Host 17.17.17.17 1 Weight 1
Host 68.68.68.68 Bind ID 4 Weight 4
Host 85.85.85.85 Bind ID 5 Weight 5
Last reported Real weights for Protocol TCP, Port 22
Host 17.17.17.17 Bind ID 111 Weight 111
router# show ip slb dfp weights
Real IP Address 17.17.17.17 Protocol TCP Port 22 Bind_ID 111 Weight 111
Set by Agent 161.44.2.3458490 at 132241 UTC 12/03/99
Real IP Address 17.17.17.17 Protocol TCP Port www Bind_ID 1 Weight 1
Set by Agent 161.44.2.3458490 at 132241 UTC 12/03/99
Real IP Address 68.68.68.68 Protocol TCP Port www Bind_ID 4 Weight 4
Set by Agent 161.44.2.3458490 at 132241 UTC 12/03/99
Real IP Address 85.85.85.85 Protocol TCP Port www Bind_ID 5 Weight 5
Set by Agent 161.44.2.3458490 at 132241 UTC 12/03/99
router# show ip slb dfp
DFP Manager:
Current passwd:NONE Pending passwd:NONE
Passwd timeout:0 sec
Agent IP Port Timeout Retry Count Interval
---------------------------------------------------------------
161.44.2.34 61936 0 0 180 (Default)
| Field | Description |
Agent IP | IP address of the agent about which information is being displayed. |
Port | Port number of the agent. |
Timeout | Time period, in seconds, during which the DFP manager must receive an update from the DFP agent. A value of 0 means there is no timeout. |
Retry Count | Number of times the DFP manager attempts to establish the TCP connection to the DFP agent. A value of 0 means there are infinite retries. |
Interval | Interval, in seconds, between retries. |
To display information about the real servers, use the show ip slb reals privileged EXEC command.
show ip slb reals [vserver virtserver-name] [detail]
Syntax Description
vserver (Optional) Displays information about only those real servers associated with a particular virtual server. virtserver-name (Optional) Name of the virtual server. detail (Optional) Displays detailed information.
Defaults
If no options are specified, the command displays information about all real servers.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows IOS SLB real server data:
router# show ip slb reals real server farm weight state conns -------------------------------------------------------------------- 80.80.2.112 FRAG 8 OUTOFSERVICE 0 80.80.5.232 FRAG 8 OPERATIONAL 0 80.80.15.124 FRAG 8 OUTOFSERVICE 0 80.254.2.2 FRAG 8 OUTOFSERVICE 0 80.80.15.124 LINUX 8 OPERATIONAL 0 80.80.15.125 LINUX 8 OPERATIONAL 0 80.80.15.126 LINUX 8 OPERATIONAL 0 80.80.90.25 SRE 8 OPERATIONAL 220 80.80.90.26 SRE 8 OPERATIONAL 216 80.80.90.27 SRE 8 OPERATIONAL 216 80.80.90.28 SRE 8 TESTING 1 80.80.90.29 SRE 8 OPERATIONAL 221 80.80.90.30 SRE 8 OPERATIONAL 224 80.80.30.3 TEST 100 READY_TO_TEST 0 80.80.30.4 TEST 100 READY_TO_TEST 0 80.80.30.5 TEST 100 READY_TO_TEST 0 80.80.30.6 TEST 100 READY_TO_TEST 0
| Field | Description |
real | IP address of the real server about which information is being displayed. Used to identify each real server. Information about each real server is displayed on a separate line. |
server farm | Name of the server farm to which the real server. |
weight | Weight assigned to the real server. The weight identifies the real server's capacity, relative to other real servers in the server farm. |
state | Current state of the real server.
|
To display information about the server farms, use the show ip slb serverfarms privileged EXEC command.
show ip slb serverfarms [name serverfarm-name] [detail]
Syntax Description
name (Optional) Displays information about only a particular server farm. serverfarm-name (Optional) Name of the server farm. detail (Optional) Displays detailed server farm information.
Defaults
No default behavior or values.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows IOS SLB server farm data:
router# show ip slb serverfarms server farm predictor reals bind id ------------------------------------------------- FRAG ROUNDROBIN 4 0 LINUX ROUNDROBIN 3 0 SRE ROUNDROBIN 6 0 TEST ROUNDROBIN 4 0
| Field | Description |
server farm | Name of the server farm about which information is being displayed. Information about each server farm is displayed on a separate line. |
predictor | Type of load balancing algorithm (ROUNDROBIN or LEASTCONNS) used by the server farm. |
reals | Number of real servers configured in the server farm. |
bind id | Bind ID configured on the server farm. |
To display IOS SLB statistics, use the show ip slb stats privileged EXEC command.
show ip slb statsSyntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows IOS SLB statistics:
router# show ip slb stats Pkts via normal switching: 530616 Pkts via special switching:1812710 Connections Created: 783774 Connections Established: 633418 Connections Destroyed: 782752 Connections Reassigned: 0 Zombie Count: 0
| Field | Description |
Pkts via normal switching | Number of packets handled by IOS SLB via normal switching since the last time counters were cleared. |
Pkts via special switching | Number of packets handled by IOS SLB via special switching since the last time counters were cleared. |
Connections Created | Number of connections created since the last time counters were cleared. |
Connections Established | Number of connections created and have become established since the last time counters were cleared. |
Connections Destroyed | Number of connections destroyed since the last time counters were cleared. |
Connections Reassigned | Number of connections reassigned to a different real server since the last time counters were cleared. |
Zombie Count | Number of connections that are currently pending destruction, awaiting a timeout or some other condition to be met. |
To display the IOS SLB sticky database, use the show ip slb sticky privileged EXEC command.
show ip slb sticky [client ip_address]
Syntax Description
client (Optional) Displays only those sticky database entries associated with a particular client IP address. ip-address (Optional) IP address of the client.
Defaults
If no options are specified, the command displays information about all virtual servers.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows the IOS SLB sticky database:
router# show ip slb sticky client group real conns ftp-cntrl -------------------------------------------------------------- 10.10.2.12 4097 10.10.3.2 1 0
| Field | Description |
client | Client IP address which is bound to this sticky assignment. |
group | Group ID for this sticky assignment. |
real | Real server used by all clients connecting with the client IP address detailed on this line. |
conns | Number of connections currently sharing this sticky assignment. |
ftp-cntrl | Number of File Transfer Protocol (FTP) control connections currently using this sticky assignment. |
To display information about the virtual servers, use the show ip slb vservers privileged EXEC command.
show ip slb vservers [name virtserver-name] [detail]
Syntax Description
name (Optional) Displays information about only this virtual server. virtserver-name (Optional) Name of the virtual server. detail (Optional) Displays detailed information.
Defaults
If no options are specified, the command displays information about all virtual servers.
Command Modes
Privileged EXEC
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example shows virtual server data:
router# show ip slb vservers slb vserver prot virtual state conns --------------------------------------------------------------------- TEST TCP 80.80.254.3:80 OPERATIONAL 1013 TEST21 TCP 80.80.254.3:21 OUTOFSERVICE 0 TEST23 TCP 80.80.254.3:23 OUTOFSERVICE 0
| Field | Description |
slb vserver | Name of the virtual server about which information is being displayed. Information about each virtual server is displayed on a separate line. |
prot | Protocol being used by the virtual server detailed on a given line. |
virtual | Virtual IP address of the virtual server detailed on a given line. |
state | Current state of the virtual server detailed on a given line. |
conns | Number of connections associated with the virtual server detailed on a given line. |
To specify an HSRP group name with which to associate an IOS SLB interface, use the standby name interface configuration command. To remove the group name association on the interface, use the no form of this command.
standby [group-number] name group-name
Syntax Description
group-number (Optional) Group number of the interface to which the timers apply. The default is 0. group-name Specifies the HSRP group name with which the IOS SLB virtual server is associated.
Defaults
The default group number is 0.
Command Modes
Interface configuration
Command History
12.1(1)E This command was introduced.
Release
Modification
Usage Guidelines
The HSRP group name must first be specified on the inservice (virtual server) command.
Examples
In the following example, HSRP is enabled for group number 1, group name Web-Group, on Ethernet port 0 on the EIP that is installed in slot 5:
Router(config)# interface Ethernet5/0 Router(config-if)# ip address 172.18.48.154 255.255.255.128 Router(config-if)# standby 1 ip 172.18.48.124 Router(config-if)# standby 1 priority 2 preempt Router(config-if)# standby 1 name Web-Group
Related Commands
inservice Enables the virtual server for use by IOS SLB.
Command
Description
To assign all connections from a client to the same real server, use the sticky virtual server configuration command. To remove the client/server coupling use the no form of this command.
sticky duration [group group-id]
Syntax Description
duration Sticky timer duration in seconds. Valid values range from 0 to 65535. group (Optional) Places the virtual server in a sticky group, for coupling of services. group-id (Optional) Number identifying the sticky group to which the virtual server belongs. Valid values range from 0 to 255.
Defaults
Sticky connections are not tracked.
Virtual servers are not associated with any groups.
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
The last real server that was used for a connection from a client is stored for the set duration seconds. If a new connection from the client to the virtual server is initiated during that time, the same real server that was used for the previous connection is chosen for the new connection. If two virtual servers are placed in the same group, coincident connection requests for those services from the same IP address are handled by the same real server.
Examples
The following example specifies that if a client's subsequent request for a virtual server is made within 60 seconds of the previous request, then the same real server is used for the connection. This example also places the virtual server in group 10.
Router(config)# ip slb vserver VS1 Router(config-slb-vserver)# sticky 60 group 10
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To limit the rate of TCP SYNs handled by a virtual server to prevent an SYN flood denial of service attack, use the synguard virtual server configuration command. To remove the threshold, use the no form of this command.
synguard syn-count [interval]
Syntax Description
syn-count Number of unanswered SYNs that are allowed to be outstanding to a virtual server. Valid values range from 0 (off) to 4294967295. The default is 0. interval (Optional) Interval, in milliseconds, for SYN threshold monitoring. Valid values range from 50 to 5000. The default is 100 ms.
Defaults
Syn-count default: 0 (off)
Interval default: 100 ms
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example sets the threshold of unanswered SYNs to 50:
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# synguard 50
Related Commands
virtual Configures the virtual server attributes.
Command
Description
To configure virtual server attributes, use the virtual virtual server configuration command. To remove the attributes, use the no form of this command.
virtual ip-address {tcp | udp} port-number [service service-name]
Syntax Description
ip-address IP address for this virtual server instance, used by clients to connect to the server farm. tcp Perform load balancing for only TCP connections. udp Perform load balancing for only UDP connections. port-number IOS SLB virtual port (the TCP or UDP port number or port name). If specified, only the connections for the specified port on the server are load balanced. The ports and the valid name or number for the port-number argument are as follows: service (Optional) Couple connections associated with a given service, such as HTTP or Telnet, so all related connections from the same client use the same real server. service-name (Optional) Type of connection coupling. Currently, the only choice is:
Defaults
No default behavior or values.
Command Modes
Virtual server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
The no virtual command is allowed only if the virtual server was removed from service by the no inservice command.
Examples
The following example specifies that the virtual server with the IP address 10.0.0.1 performs load balancing for TCP connections for the port named www. The virtual server processes HTTP requests.
Router(config)# ip slb vserver PUBLIC_HTTP Router(config-slb-vserver)# virtual 10.0.0.1 tcp www
Related Commands
ip slb vserver Identifies a virtual server.
Command
Description
To specify a real server's capacity, relative to other real servers in the server farm, use the weight real server configuration command. To restore the default weight value, use the no form of this command.
weight weighting-value
Syntax Description
weighting-value Weighting value to use for real server predictor algorithm. Valid values range from 1 to 155. The default weighting value is 8.
Defaults
Weighting-value default: 8
Command Modes
Real server configuration
Command History
12.0(7)XE This command was introduced.
Release
Modification
Examples
The following example specifies the relative weighting values of three real servers as 16, 8 (by default), and 24, respectively:
Router(config)# ip slb serverfarm PUBLIC Router(config-slb-sfarm)# real 10.10.1.1 First real server Router(config-slb-real)# weight 16 Assigned weight of 16 Router(config-slb-real)# inservice Enabled Router(config-slb-real)# exit Router(config-slb-sfarm)# real 10.10.1.2 Second real server Router(config-slb-real)# inservice Enabled; default weight Router(config-slb-real)# exit Router(config-slb-sfarm)# real 10.10.1.3 Third real server Router(config-slb-real)# weight 24 Assigned weight of 24; not enabled
Related Commands
real Identifies a real server.
Command
Description
This section documents the following new debug command related to the IOS SLB feature:
To display debug messages for IOS SLB, use the debug ip slb EXEC command. To stop debug output, use the no form of this command.
debug ip slb {conns | dfp | icmp | reals | all}
Syntax Description
all Displays all debug messages for IOS SLB. conns Displays debug messages for all connections being handled by IOS SLB. dfp Displays debug messages for the IOS SLB DFP and DFP agents. icmp Displays all Internet Control Message Protocol debug messages for IOS SLB. reals Displays debug messages for all real servers defined to IOS SLB.
Defaults
No default behavior or values.
Command History
12.0(7)XE This command was introduced.
Release
Modification
Usage Guidelines
See the following caution before using debug commands:
![]() |
Caution Because debugging output is assigned high priority in the CPU process, it can render the system unusable. For this reason, only use debug commands to troubleshoot specific problems or during troubleshooting sessions with Cisco technical support staff. Moreover, it is best to use debug commands during periods of lower network traffic and fewer users. Debugging during these periods reduces the effect these commands have on other users on the system. |
Examples
The following example configures a debug session to check all IP SLB parameters:
Router# debug ip slb all
SLB All debugging is on
Router#
The following example stops all debugging:
Router# no debug all
All possible debugging has been turned off
Router#
The following example shows IOS SLB DFP debug output:
router# debug ip slb dfp SLB DFP debugging is on router# 022048 SLB DFP Queue to main queue - type 2 for Agent 161.44.2.3458229 022048 SLB DFP select_rc = -1 readset = 0 022048 SLB DFP Sleeping ... 022049 SLB DFP readset = 0 022049 SLB DFP select_rc = -1 readset = 0 022049 SLB DFP Processing Q event for Agent 161.44.2.3458229 - OPEN 022049 SLB DFP Queue to conn_proc_q - type 2 for Agent 161.44.2.3458229 022049 SLB DFP readset = 0 022049 SLB DFP Set SLB_DFP_SIDE_QUEUE 022049 SLB DFP Processing Conn Q event for Agent 161.44.2.3458229 - OPEN 022049 SLB DFP Open to Agent 161.44.2.3458229 succeeded, socket = 0 022049 SLB DFP Agent 161.44.2.3458229 start connect 022049 SLB DFP Connect to Agent 161.44.2.3458229 successful - socket 0
022049 SLB DFP Queue to main queue - type 6 for Agent 161.44.2.3458229 022049 SLB DFP Processing Conn Q unknown MAJOR 80 022049 SLB DFP Reset SLB_DFP_SIDE_QUEUE 022049 SLB DFP select_rc = -1 readset = 0 022049 SLB DFP Sleeping ... 022050 SLB DFP readset = 1 022050 SLB DFP select_rc = 1 readset = 1 022050 SLB DFP Agent 161.44.2.3458229 fd = 0 readset = 1 022050 SLB DFP Message length 44 from Agent 161.44.2.3458229 022050 SLB DFP Agent 161.44.2.3458229 setting Host 17.17.17.17, Bind ID 1 Weight 1 022050 SLB DFP Agent 161.44.2.3458229 setting Host 34.34.34.34, Bind ID 2 Weight 2 022050 SLB DFP Agent 161.44.2.3458229 setting Host 51.51.51.51, Bind ID 3 Weight 3 022050 SLB DFP Processing Q event for Agent 161.44.2.3458229 - WAKEUP
022050 SLB DFP readset = 1 022050 SLB DFP select_rc = 1 readset = 1 022050 SLB DFP Agent 161.44.2.3458229 fd = 0 readset = 1 022050 SLB DFP Message length 64 from Agent 161.44.2.3458229 022050 SLB DFP Agent 161.44.2.3458229 setting Host 17.17.17.17, Bind ID 1 Weight 1 022050 SLB DFP Agent 161.44.2.3458229 setting Host 68.68.68.68, Bind ID 4 Weight 4 022050 SLB DFP Agent 161.44.2.3458229 setting Host 85.85.85.85, Bind ID 5 Weight 5 022050 SLB DFP Agent 161.44.2.3458229 setting Host 17.17.17.17, Bind ID 111 Weight 111 022050 SLB DFP readset = 1
022115 SLB DFP Queue to main queue - type 5 for Agent 161.44.2.3458229 022115 SLB DFP select_rc = -1 readset = 0 022115 SLB DFP Sleeping ... 022116 SLB DFP readset = 1 022116 SLB DFP select_rc = -1 readset = 0 022116 SLB DFP Processing Q event for Agent 161.44.2.3458229 - DELETE
022116 SLB DFP Queue to conn_proc_q - type 5 for Agent 161.44.2.3458229 022116 SLB DFP readset = 1 022116 SLB DFP Set SLB_DFP_SIDE_QUEUE 022116 SLB DFP Processing Conn Q event for Agent 161.44.2.3458229 - DELETE 022116 SLB DFP Connection to Agent 161.44.2.3458229 closed 022116 SLB DFP Agent 161.44.2.3458229 deleted 022116 SLB DFP Processing Conn Q unknown MAJOR 80 022116 SLB DFP Reset SLB_DFP_SIDE_QUEUE 022116 SLB DFP Set SLB_DFP_SIDE_QUEUE 022116 SLB DFP Reset SLB_DFP_SIDE_QUEUE
cluster--Set of computer systems that are connected through multisystem hardware or software to supply services traditionally provided by a single system. This arrangement provides higher availability and better scalability of the system.
content-aware networking--Networking strategy that enables content to be dynamically distributed. Because content can be dynamically cached, it can be located at any given place at any given time and distributed between the servers and the location of the Web cache. Cisco has developed the ContentFlow architecture and the DFP to enable networks to provide content-aware networking services.
ContentFlow architecture--Cisco's content-aware networking architecture that describes message flows and actions in a distributed environment.
DFP--Dynamic Feedback Protocol. Allows host agents to dynamically report the change in status of the host systems providing a virtual service. The status reported is a relative weight that specifies a host server's capacity to perform work.
Dynamic Feedback Protocol--See DFP.
IOS SLB--IOS Server Load Balancing. Load balancing scheme in which the network administrator defines a virtual server that represents a group of real servers in a cluster of network servers known as a server farm. When a client initiates a connection to the virtual server, IOS SLB chooses a real server for the connection based on a configured load balancing algorithm.
load balancing--Spreading user requests among available servers within a cluster of servers, based on a variety of algorithms.
MD5--Message Digest Algorithm Version 5. Neighbor router authentication scheme used to ensure reliability and security when routing updates are exchanged between neighbor routers.
Message Digest Algorithm Version 5--See MD5.
NetFlow switching--High-performance network-layer switching path that captures as part of its switching function a rich set of traffic statistics including user, protocol, port, and type of service information.
round robin--See weighted round robin.
Secure Socket Layer--See SSL.
server cluster--See server farm.
server farm--Also called a server cluster. Group of real servers that provide various applications and services.
Server Load Balancing--See IOS SLB.
services manager--Functionality built into IOS SLB that makes load-balancing decisions based on application availability, server capacity, and load distribution algorithms such as weighted round robin or weighted least connections, or the DFP. The services manager determines a real server for the packet flow using load balancing and server/application feedback.
SLB--See IOS SLB.
SSL--Secure Socket Layer. Encryption technology for the Web used to provide secure transactions such as the transmission of credit card numbers for e-commerce.
virtual server--Presents a single address that represents an application server farm to clients.
weighted least connection--Load balancing algorithm in which the next real server chosen for a new connection to the virtual server is the server with the fewest active connections. Each real server is assigned a weight, n, that represents its capacity to handle connections, as compared to the other real servers associated with the virtual server. The server with the fewest connections is based on the number of active connections on each server, and on the relative capacity of each server. The capacity of a given real server is calculated as the assigned weight of that server divided by the sum of the assigned weights of all of the real servers associated with that virtual server, or n1/(n1+n2+n3...).
weighted round robin--Load balancing algorithm in which the real server used for a new connection to the virtual server is chosen in a circular fashion. Each real server is assigned a weight, n, that represents its capacity to handle connections, as compared to the other real servers associated with the virtual server. New connections are assigned to a given real server n times before the next real server in the list is chosen.
workload agents--Value-added software components developed for specific platforms by third-party developers. Workload agents run on server platforms or on platforms that manage server farms. Workload agents deliver server and application information to the services manager. This information enables the services manager to make optimum server selection.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Thu Aug 10 14:12:58 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.