ServerIron - 12301 - SLBguide
ServerIron - 12301 - SLBguide
ServerIron - 12301 - SLBguide
ServerIron ADX
Server Load Balancing Guide
Supporting Brocade ServerIron ADX 12.3.01a
2011 Brocade Communications Systems, Inc. All Rights Reserved. Brocade, the B-wing symbol, BigIron, DCFM, DCX, Fabric OS, FastIron, IronView, NetIron, SAN Health, ServerIron, TurboIron, and Wingspan are registered trademarks, and Brocade Assurance, Brocade NET Health, Brocade One, Extraordinary Networks, MyBrocade, VCS, and VDX are trademarks of Brocade Communications Systems, Inc., in the United States and/or in other countries. Other brands, products, or service names mentioned are or may be trademarks or service marks of their respective owners. Notice: This document is for informational purposes only and does not set forth any warranty, expressed or implied, concerning any equipment, equipment feature, or service offered or to be offered by Brocade. Brocade reserves the right to make changes to this document at any time, without notice, and assumes no responsibility for its use. This informational document describes features that may not be currently available. Contact a Brocade sales office for information on feature and product availability. Export of technical data contained in this document may require an export license from the United States government.
European Headquarters Brocade Communications Switzerland Srl Centre Swissair Tour B - 4me tage 29, Route de l'Aroport Case Postale 105 CH-1215 Genve 15 Switzerland Tel: +41 22 799 5640 Fax: +41 22 799 5641 E-mail: [email protected]
Document History
Title
ServerIron ADX Server Load Balancing Guide ServerIron ADX Server Load Balancing Guide
Publication number
53-1002279-01 53-1002279-02
Summary of changes
New document Documentation for VIP RHI With Dangling subnet feature added to Server Load Balancing chapter to support Release 12.3.01a.
Date
May 2011 August 2011
Contents
Chapter 1
Chapter 2
iii
Configuring SLB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Configuration guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Defining the real servers and real application ports. . . . . . . . . 27 Defining a virtual server (VIP) . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Binding virtual and real servers . . . . . . . . . . . . . . . . . . . . . . . . . 28 Changing the Load-Balancing Predictor Method . . . . . . . . . . . . 28 Real server ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Adding a source IP address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Source NAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Minimizing source-IP and source-NAT-IP requirements for large deployments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Remote server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Sticky and concurrent connections . . . . . . . . . . . . . . . . . . . . . . 46 Application port grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Primary and backup servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Direct Server Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Port ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Port aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 QOS marking of SLB packets . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Disabling or deleting VIPs and real ports . . . . . . . . . . . . . . . . . . 81 Hash-based SLB with server persistence. . . . . . . . . . . . . . . . . . 88 SLB Spoofing configuration and support . . . . . . . . . . . . . . . . . . 97 Policy-based SLB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Miscellaneous options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Application-specific SLB considerations . . . . . . . . . . . . . . . . .167 Show and debug commands. . . . . . . . . . . . . . . . . . . . . . . . . . .168 SLB configuration examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168 Displaying the BP distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168 Windows Terminal Server with L7 persistence . . . . . . . . . . . . . . . .169 Understanding windows terminal server . . . . . . . . . . . . . . . . .169 Configuring Windows Terminal Server . . . . . . . . . . . . . . . . . . . 171 Enhanced BP distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Chapter 3
Chapter 4
Health Checks
Health checks overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Layer 3 health checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Disabling Layer 3 health checks . . . . . . . . . . . . . . . . . . . . . . . .180 Modifying the ping interval and ping retries. . . . . . . . . . . . . . .181 Server periodic-ARP enhancement. . . . . . . . . . . . . . . . . . . . . .181
iv
Layer 4 health checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181 Performing Layer 4 UDP keepalive health checks for the DNS port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Layer 7 health checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Application ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 HTTP (status code). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 HTTP (content verification) . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Scripted (content verification for unknown ports) . . . . . . . . . .188 IMAP4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 LDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 MMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 NNTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 PNM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 POP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 RADIUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 RTSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 SMTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 SSL (complete) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 SSL (simple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Port-specific settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 RADIUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 LDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 Simple and compound SSL health checks. . . . . . . . . . . . . . . .198 Layer 7 health check for an unknown port . . . . . . . . . . . . . . .198 Server and application port states . . . . . . . . . . . . . . . . . . . . . . . . .200 Server states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200 Application port states. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Port profiles and attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 Configuring a port profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 Configuring port profile attributes . . . . . . . . . . . . . . . . . . . . . .204 Port policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Port policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Configuring a port policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Binding the policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Configuring a keepalive interval under a port Policy . . . . . . . .212 Health check policy for VIP port . . . . . . . . . . . . . . . . . . . . . . . .213 Element health checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Configuring element-action expressions . . . . . . . . . . . . . . . . .214 Attaching a health-check policy to an application port on a server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Displaying health-check policies and their status . . . . . . . . . .221 Displaying health-check policy statistics . . . . . . . . . . . . . . . . .222 Clearing health-check policy statistics . . . . . . . . . . . . . . . . . . .222
Health check with content match . . . . . . . . . . . . . . . . . . . . . . . . . .223 Content match for HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Content match for non-HTTP ports . . . . . . . . . . . . . . . . . . . . . .226 Binary scripted health check. . . . . . . . . . . . . . . . . . . . . . . . . . .229 Boolean health checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Boolean health-check policies . . . . . . . . . . . . . . . . . . . . . . . . .230 Health-check policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Configuring boolean health check . . . . . . . . . . . . . . . . . . . . . .231 Miscellaneous health check settings . . . . . . . . . . . . . . . . . . . . . . .233 Basing an alias ports health on the health of its master port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 Global tracking of alias port health . . . . . . . . . . . . . . . . . . . . .234 Basing a ports health on the health of another port . . . . . . .234 Reassign threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 FastCache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 Globally disabling all health-check policies . . . . . . . . . . . . . . .237 Health checking for real servers in other subnets. . . . . . . . . .237 Best path to a remote server . . . . . . . . . . . . . . . . . . . . . . . . . .237 Health check of multiple web sites on the same real server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 Minimum healthy real servers under VIP port . . . . . . . . . . . . .239 Server port bring-up enhancement . . . . . . . . . . . . . . . . . . . . .240 Slow-start mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 FIN close for server health check . . . . . . . . . . . . . . . . . . . . . . . 247 Health-check state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 Enhanced server bringup . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 Track-Port support under real server for health checks . . . . .249 Sample show commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 Syslog for health status change . . . . . . . . . . . . . . . . . . . . . . . .250 Health checks for firewall paths . . . . . . . . . . . . . . . . . . . . . . . .251 Session table parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 Configuring TCP age. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Configuring UDP age . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Setting the clock scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257 Syslog for session table entries . . . . . . . . . . . . . . . . . . . . . . . .257
Chapter 5
vi
Layer 7 content switching on HTTP response . . . . . . . . . . . . . . . . .286 Response header rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286 Configuring HTTP header response rewrite . . . . . . . . . . . . . . .286 Response body rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Configuring HTTP body response rewrite . . . . . . . . . . . . . . . . .288 Using multiple cookies under virtual server port . . . . . . . . . . . . . .290 Configuring multiple unique cookie insertion with cookie path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290 Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291 Server passive cookie persistence . . . . . . . . . . . . . . . . . . . . . . . . .294 Configuring server passive cookie persistence . . . . . . . . . . . .294 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 Server and server port persistence with CSW nested rules. . . . . .297 Configuring server and server port persistence with CSW nested rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297 Configuring persist on the nested rule . . . . . . . . . . . . . . . . . . .298 Configuring persist on the real port . . . . . . . . . . . . . . . . . . . . .298 Displaying CSW information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Displaying the statistics for all HTTP content rewrites . . . . . .305 Displaying Layer 7 switching statistics . . . . . . . . . . . . . . . . . . .306 Usage guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 Support for large GET requests. . . . . . . . . . . . . . . . . . . . . . . . .307 TCP/UDP content switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308 Understanding TCP/UDP content switching. . . . . . . . . . . . . . .308 Configuring TCP/UDP content switching . . . . . . . . . . . . . . . . .308 TCP/UDP content switching commands. . . . . . . . . . . . . . . . . .313 Miscellaneous Layer 7 switching configurations . . . . . . . . . . . . . . 316 Changing the maximum number of concurrent Layer 7 connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Dropping requests on exceeding Max-conn per real server . . 316 Cleaning up all hash buckets . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Layer 7 content buffering options. . . . . . . . . . . . . . . . . . . . . . . 317 HTTP 1.1 support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 Setting up SSL session ID switching . . . . . . . . . . . . . . . . . . . . . . . .322 Command reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 rewrite request-delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 rewrite request-insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 rewrite request-replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
Chapter 6
High Availability
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Hot standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Symmetric-active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Active-active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329
vii
Hot standby SLB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 Hot standby protocol operations. . . . . . . . . . . . . . . . . . . . . . . .331 Configuring basic hot standby. . . . . . . . . . . . . . . . . . . . . . . . . .332 Additional configuration variations . . . . . . . . . . . . . . . . . . . . . .338 Sample configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Symmetric SLB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 Configuring Symmetric active-standby . . . . . . . . . . . . . . . . . . .346 Additional configuration variations . . . . . . . . . . . . . . . . . . . . . .349 Sym-Active SLB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361 Difference between Sym-Active versus Symmetric SLB . . . . .362 Configuring Symmetric active-active . . . . . . . . . . . . . . . . . . . .362 Additional variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363 Multiple high availability SLB pairs in the same VLAN . . . . . .363 NAT in HA environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 IP NAT session synchronization in high-availability configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370 Shareable source NAT for high availability . . . . . . . . . . . . . . . .370 Configuring synchronization with HA . . . . . . . . . . . . . . . . . . . .375 Miscellaneous options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375 Displaying VIP owner in HA setup . . . . . . . . . . . . . . . . . . . . . . .375 Identifying the ports attached to a router . . . . . . . . . . . . . . . . 376 VRRP Flap Dampening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 Dampening Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377 Dampening Approach Overview . . . . . . . . . . . . . . . . . . . . . . . .378 Damped State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378 Configuring VRRP Flap Dampening . . . . . . . . . . . . . . . . . . . . .378 VRID Group Dampening. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .379 VRID Dampening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
Chapter 7
viii
IPv6 to IPv4 gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389 Features not supported with the IPv6 to IPv4 gateway . . . . . .390 Packet fragmentation with the IPv6 to IPv4 gateway . . . . . . .390 ICMP packet processing for the IPv6 to IPv4 gateway. . . . . . .391 IPv6 to IPv4 gateway high availability support . . . . . . . . . . . . .392 Configuring the IPv6 to IPv4 gateway . . . . . . . . . . . . . . . . . . . .393 Displaying IPv6 to IPv4 gateway information . . . . . . . . . . . . . .394
Appendix A
Appendix B
Appendix C
ix
Displaying configuration information . . . . . . . . . . . . . . . . . . . . . . . .446 Showing aggregate health of tracked ports . . . . . . . . . . . . . . .446 Auto repeat of show command output . . . . . . . . . . . . . . . . . . .447 Clearing all session table entries . . . . . . . . . . . . . . . . . . . . . . .448 Clearing the connections counter. . . . . . . . . . . . . . . . . . . . . . .449
Appendix D
Audience
This document is designed for system administrators with a working knowledge of Layer 2 and Layer 3 switching and routing. If you are using a Brocade Layer 3 Switch, you should be familiar with the following protocols if applicable to your network IP, RIP, OSPF, BGP, ISIS, IGMP, PIM, DVMRP, and VRRP.
ServerIron ADX 1000 ServerIron ADX 4000 ServerIron ADX 8000 ServerIron ADX 10000
Document conventions
This section describes text formatting conventions and important notice formats used in this document.
Text formatting
The narrative-text formatting conventions that are used are as follows:
xi
bold text
Identifies command names Identifies the names of user-manipulated GUI elements Identifies keywords Identifies text to enter at the GUI or CLI
italic text
code text
For readability, command names in the narrative portions of this guide are presented in bold: for example, show version.
NOTE
CAUTION A Caution statement alerts you to situations that can be potentially hazardous to you or cause damage to hardware, firmware, software, or data.
DANGER A Danger statement indicates conditions or situations that can be potentially lethal or extremely hazardous to you. Safety labels are also attached directly to products to warn of these conditions or situations.
xii
Corporation
Sun Microsystems Microsoft Corporation The Open Group
Related publications
The following Brocade documents supplement the information in this guide:
Release Notes for ServerIron Switch and Router Software TrafficWorks 12.2.0 ServerIron ADX Graphical User Interface ServerIron ADX Server Load Balancing Guide ServerIron ADX Advanced Server Load Balancing Guide ServerIron ADX Global Server Load Balancing Guide ServerIron ADX Security Guide ServerIron ADX Administration Guide ServerIron ADX Switch and Router Guide Brocade ServerIron ADX Hardware Installation Guide ServerIron ADX Firewall Load Balancing Guide Ironware MIB Reference Manual
Web access
The Knowledge Portal (KP) contains the latest version of this guide and other user guides for the product. You can also report errors on the KP. Log in to my.Brocade.com, click the Product Documentation tab, then click on the link to the Knowledge Portal (KP). Then click on Cases > Create a New Ticket to report an error. Make sure you specify the document title in the ticket description.
xiii
xiv
Chapter
Release 12.3.01a
Enhancement
VIP RHI With Dangling subnet
Description
Describes operation of VIP RHI with Dangling and Non-Dangling subnets.
Release 12.3.01
Release 12.3.01
Enhancement
NAT64 Gateway
Description
Starting with software release 12.3.01, the Brocade ServerIron ADX adds support for standards-based NAT64 gateway capabilities to provide inter-operation between IPv4 networks and IPv6 networks. In NAT64 gateway mode, the ServerIron ADX enables IPv6-only clients to connect to IPv4-only infrastructure and also maintains state information for translated flows. It also preserves the originating client IPv6 address by inserting it into a custom HTTP header. In addition, the ServerIron ADX enables communication from IPv4-only devices to IPv6-only resources in stateless mode, and it also allows for peer-to-peer communication where traffic can originate from an end-node running either of the two protocols.
DNS Attack Protection With this release, the ServerIron ADX also provides protection against distributed denial of service attacks such as DNS amplification attacks. A ServerIron ADX can be configured to forward, drop or rate limit DNS traffic based on DNS query name, DNS query type, and DNS recursion flag. Multiprotocol BGP support With software release 12.3.01, the ServerIron ADX extends support for Border Gateway routing Protocol (BGP) for IPv4 and IPv6 network prefixes. This gives network administrators added flexibility for deploying the Brocade ADX in environments running RIP, OSPFv2, OSPFv3, IS-IS and BGP routing protocols. The support is also extended to VIP route health injection with BGP in order to provide disaster recovery in the event of data center/site failure. Starting with release 12.3.01, the ServerIron ADX protects application delivery infrastructures from flood of unknown Unicast packets by processing them in hardware.
Book: ServerIron ADX Security Guide. Chapter: Network Security Section: DNS Attack Protection Book: ServerIron ADX Switch and Router Guide. Chapter: Configuring BGP4 (IPv4) Chapter: Configuring BGP4+
Book: ServerIron ADX Switch and Router Guide. Chapter: Configuring Basic Features Section: Enabling hardware switching for unknown unicast traffic Book: ServerIron ADX Security Guide. Chapter: Access Control List Section: How ServerIron processes ACLs
IPv6 access control lists (ACLs) are now processed in hardware for high-performance and secure application delivery. The section referenced here describes how to switch ACL processing for legacy performance.
Transaction Rate Limiting (TRL) and SPAM Mitigation (Policy-based Server Load Balancing) for IPv6 Pre
With release 12.3.01, the Brocade ServerIron ADX enables protection against SPAM attacks and connection attacks arriving from IPv6 prefixes in addition to IPv4 prefixes.
Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Policy-based SLB Book: ServerIron ADX Security Guide. Chapter: Network Security Section: Transaction Rate Limit (TRL) Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Configuring DNS CPU-based throttling
DNS request processing time can become very slow when CPU utilization is at a high level (90 -95%). With this feature you can direct a ServerIron ADX to reject new DNS requests when CPU utilization goes beyond a configured threshold.
Release 12.3.00
Enhancement
Disaster Recovery using Global Server Load Balancing (GSLB) in DNSSEC Environments
Description
DNS security extensions (DNSSEC) adds security to the Domain Name System. DNSSEC validates message authenticity which is an important component of DNS security and helps mitigate cache poisoning attacks and ensures data integrity. Brocade ServerIron ADX is extending support for Global server load balancing (GSLB) in DNSSEC environments; thereby providing disaster recovery for mission-critical applications. In addition, the Brocade ServerIron ADX provides efficient traffic distribution among DNSSEC servers while operating in statefull or stateless mode. The Brocade ServerIron ADX is extending support for an XML API over SOAP to foster information exchange between a ServerIron ADX and an external orchestration software or tool. This enables service provider and enterprise customers to communicate with a Brocade ServerIron ADX from their familiar programming environments such as PERL, JAVA etc, and gain additional control over their application delivery infrastructures. The following is a brief summary of control functions available through the SOAP/XML API: Virtual server and port configuration Real Server and port configuration Traffic Statistics. System Resource checks
Release 12.3.00
IS-IS support & IS-IS Route Health Injection (IPv4 and IPv6
With this release, support is extended for the IS-IS routing protocol for both IPv4 and IPv6 prefixes: Support for level 1, level 2 and level 1+2 router types Support for IS-IS peering and related timers Support for Hello packet padding Support for router priority setting for designated router (pseudo node) election Use of "multicast" MAC for IS-IS packet exchange (hello, LSA) with peers Support for Equal Cost multi-path load balancing (ECMP) Support for peer authentication modes: MD5 and clear-text IS-IS Route filtering - distribute list to deny routes Disaster Recovery with IS-IS Route Health Injection The traffic segmentation capability in release 12.3 allows customers to implement additional security measures and meet several PCI compliance guidelines. This functionality ensures that traffic between SLB domains on the same ServerIron ADX flows through an upstream layer3 device such as a firewall instead of switching locally. The Brocade ServerIron ADX is adding intelligence to inspect cookies inserted by application servers and provides flow persistence based on inserted cookie values. This greatly simplifies load balancing in certain environments where persisting based on a server-inserted cookie is critical to achieve flow integrity. The release 12.3 extends support for larger packet sizes up to 9K bytes in IPv4 server load balancing, transparent cache switching and firewall load balancing environments.
Book: ServerIron ADX Switch and Router Guide. Chapter: Configuring IS-IS (IPv4) Chapter: Configuring IPv6 IS-IS
Traffic Segmentation
Book: ServerIron ADX Security Guide. Chapter: Network Security Section: Traffic Segmentation Book: ServerIron ADX Server Load Balancing Guide Chapter: Layer 7 Confent Switching Section: Server passive cookie persistence Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Configuring a TCP MSS value at the TCP profile level
By default, fragmentation is not supported in the Stateless Server Load Balancing mode. Consequently, fragmented packets are dropped. This feature allows you to configure fragmentation support for a specified port in the stateless mode.
Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Fragmentation support in the stateless mode Book: ServerIron ADX Administration Guide Chapter: ServerIron System Management Section: Event Logging
Event logging
The Event Logging feature of the ServerIron ADX captures all of the activity on the MP and BP consoles and saves it in a file named "eventlog.txt" which is saved on the internal USB drive. This log captures all of the following information along with a timestamp: Syslog messages when they are logged All MP console messages (boot and application) All BP console messages on each Core (boot and application) All CLI commands typed by users at the MP and BP consoles All commands typed at the OS prompt
Release 12.2.1
Enhancement
VIP Route Health Injection (RHI) for IPv6
Description
Brocade ServerIron ADX offers two approaches for achieving traffic distribution among multiple sites: Global Server Load Balancing (GSLB) and VIP Route Health Injection. Both methods provide traffic distribution and site failure protection. Unlike GSLB, VIP route health injection is independent of the DNS infrastructure. It relies on the underlying routing infrastructure to achieve load balancing. Starting with this release, Brocade ServerIron ADX is extending support for VIP route health injection to IPv6 application services. This allows injection of IPv6 VIP routes inside the OSPF version 3 routing process meant for carrying IPv6 routes. Consequently administrators can now roll-out VIP route health injection based multi-site redundancy solutions for both IPv4 and IPv6 application services.
Release 12.2.1
Predictors or load balancing algorithms play an important role in achieving traffic distribution among application servers. Brocade ServerIron ADX supports a variety of predictors including: least connections, round-robin, enhanced weighted, dynamic weighted and response time. Many of these predictors are connection-based which means that the application servers are picked based on the current connection load situation. While this is ideal in most situations, some designs require different treatment for traffic distribution. To handle such designs, Brocade is offering a new weighted-round-robin-static predictor that is completely agnostic of current connection load. Brocade ServerIron ADX offers one of the best solutions in the industry for protection against TCP SYN attacks. This functionality is disabled by default and can be enabled on a per-interface basis. This release offers additional intelligence to automatically switch attack protection on-or-off depending on thresholds that are pre- specified by the administrator. When the connection rate exceeds a specified "ON-threshold", the SYN proxy mechanism is enabled automatically, and when the connection rate drops below a specified "OFF-threshold", the SYN proxy mechanism is disabled. This helps minimize connection establishment latency associated with proxy connections when infrastructure isn't under attack. The Brocade ServerIron ADX provides for optimal distribution of traffic among cache servers through its Transparent Cache Switching or Redirection feature. This feature improves the cache-hit ratio and saves WAN bandwidth cost. The commonly used File Transfer Protocol (FTP) can run in either of the two modes: active FTP or Passive FTP. Previously, ServerIron ADX only offered support for transparent cache switching with Active FTP. This release extends transparent cache switching support to Passive FTP. This feature allows you to create a master password that grants permission to export all SSL keys on a ServerIron ADX using SCP copy.
Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Static Weighted Round Robin predictor
Book: ServerIron ADX Security Guide Chapter: Syn-Proxy and DoS Protection Section: Syn-Proxy auto control Section: Configuring Syn-Proxy auto control
Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Transparent Cache Switching Section: Passive FTP for TCS
Book: ServerIron ADX Security Guide Chapter: Secure Socket Layer (SSL) Acceleration Section: Creating a Master Password for export of SSL keys
In a transparent cache redirection solution, it is critical to provide cache server persistence to minimize content duplication, maximize cache-hit ratio and save WAN bandwidth. Prior releases of Brocade ServerIron ADX offered cache persistence based on the following: IP address, requested URL path, requested URL host name and requested URL parameters. This release extends this list by offering persistence based on custom string within a requested hostname or URL. A common example where this feature can be helpful is with video streams that users download from the Internet. Because each of these video streams has a unique video-id, the cache hit ratio can be significantly improved by persisting on a unique video-id string that resides inside requested URL. In previous versions of the ServerIron ADX software, this feature was configured using the csw-hash url command within the server cache-group configuration. With this release, it is configured as an match option within a CSW policy configuration. The previous command is no longer available. Brocade is pleased to announce general availability of a new ASM4-based ADX 4000 bundle. This bundle extends the ServerIron ADX 4000 family and offers a new entry-level, modular application delivery controller platform. The bundle is delivered pre-configured with: one ASM4 application switch module (a software-restricted flavor of ASM8 module) one management module one 12-port Gigabit Ethernet fiber line card eight Gigabit Ethernet copper SFP connectors two AC power supplies premium software. The ASM4 module is enabled for four application cores, and is upgradeable to eight application cores through the capacity-on-demand feature of the ServerIron ADX. Using a simplified, software license-upgrade approach, you can double application throughput capacity of the ASM4 bundle from 9 Gbps to 17.5 Gbps. If you add a second ASM8 module, then the performance will increase to 35 Gbps. This ASM4 bundle must run the Brocade ServerIron ADX software release 12.2.1 or later. The Brocade ServerIron ADX offers a powerful load balancing solution for infrastructure devices such as firewalls. You can distribute traffic load among multiple low-end or high-end firewalls and achieve flow persistence using the Brocade ServerIron ADX devices, and thereby achieve maximum return on your investment. Previously, the Brocade ServerIron ADX supported firewall load balancing for up to 3 zones: internal, external and DMZ zones. With this release, support is extended for up to 8 zones for larger deployments that involve firewall devices supporting more than 3 zones. The number of firewall paths has been raised from 32 to 64, while the maximum supported firewall count is kept at 16.
Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Configuring TCS Section: Cache Persistence using hashing on a portion of the URL
Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Configuring TCS Section: Cache Persistence using hashing on a portion of the URL Book: ServerIron ADX Installation Guide Chapter: Product Overview Section: Application Switch Module (ASM) Book: ServerIron ADX Administration Guide Chapter: Capacity on Demand Section: Software-based licensing overview
Book: ServerIron ADX Firewall Load Balancing Guide Chapter: Configuring Multizone FWLB Chapter: ServerIron FWLB Overview Section: FWLB configuration limits
Release 12.2.0
Release 12.2.0
Enhancement
TCP/UDP Content Switching
Description
TCP/UDP content switching allows the ServerIron ADX to make switching decisions based on the content of TCP and UDP traffic.
This feature allows you to configure a default gateway for reverse SLB traffic at the Virtual server level.
This feature allows you to increase the TCS hash bucket count to a higher number to ensure a more reasonable distribution of excess traffic among remaining cache servers when a cache server goes down.
Where there are high amounts of multicast traffic, this feature allows you to configure hardware-based multicast switching on a ServerIron ADX to enable the ingress port to flood multicast traffic across the VLAN instead of sending it to the management module.
This feature allows you to configure a ServerIron ADX to allow traffic to a virtual port being load-balanced to a different set of real ports based on its protocol (TCP or UDP).
This feature Distributes traffic among real servers based on a dynamic weight value that is derived from the response time of health check packets.
Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Server response time Section: Changing the Load-Balancing Predictor Method Section: Configuring the smooth factor Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Configuring TCS Section: Cache Persistence using URL Hashing Book: ServerIron ADX Server Load Balancing Guide Chapter: Layer 7 Content Switching Section: CSW policies Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Configuring TCS Section: Displaying Cache Information Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Port holddown timer Book: ServerIron ADX Server Load Balancing Guide Chapter: IPv6 Support for Server Load Balancing Section: IPv6 to IPv4 gateway Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: SIP Server Load Balancing Section: Configuring a DSCP value for SIP health checks
The ServerIron ADX enables traffic distribution among cache servers in a TCS setup after inspecting and hashing based on the request URL. This enables cache persistence based on the requested URL and minimizes duplication of content among multiple cache servers.
In previous released, when no rule in a CSW policy was matched, the traffic was dropped by default. With this release, when no CSW rule is matched, traffic is forwarded to the Internet by default.
The show cache-group command has been enhanced to display the number of Layer 7 cache buckets.
When configured, this feature prevents a failed port from being marked active until a configurable time period has elapsed.
This feature allows an IPv6 client to send and receive packets to and from an IPv4 server.
This feature allows you to set a DSCP value in the IP header of SIP health-check packets.
Release 12.1.00
This feature allow you to configure a ServerIron ADX to set the DSCP bits to a configured value in all packets sent to servers bound to a specified VIP. This feature can be used with Layer-3 DSR servers that are appropriately coded with additional intelligence to interpret DSCP marked packets and send them directly to the clients. This feature allows you to use SNMP to monitor the load on cache servers and load-balance the cache servers using that information.
Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: QOS marking of SLB packets Book: ServerIron ADX Advanced Server Load Balancing Guide Chapter: Configuring TCS Section: SNMP-based Cache Server load balancing Book: ServerIron ADX Security Guide Chapter: Secure Socket Layer (SSL) Acceleration Section: Configuring a CA Certificate File Book: ServerIron ADX Security Guide Chapter: Secure Socket Layer (SSL) Acceleration Section: Configuring certificate chain depth Book: ServerIron ADX Graphical User Interface Guide Chapter: Configuring Server Load Balancing Chapter: Maintenance Book: ServerIron ADX Administration Guide Chapter: Capacity on Demand
This features provides Support for up to 32 DN names for all root and intermediate CA certificates.
This feature allow you to increase certificate chain depth within an SSL profile from the default of 4 up to a maximum of 10
Enhancements to GUI
With this release, two new functions are added to the Graphical User interface: Software Upgrade Application Template
Capacity on Demand
Software and hardware features of both fixed-configuration (ServerIron ADX 1000 series) and chassis (ServerIron ADX 4000 and 10000) ServerIron ADX application switches can be obtained at time of purchase or upgraded later through software-based licensing.
Release 12.1.00
Enhancement
SSL Acceleration (configuration)
Description
With this release, ServerIron ADX supports integrated hardware-based SSL acceleration. The referenced section describes how the feature works and how to configure software for it.
10
This referenced section describes the hardware required for SSL acceleration and how to install it. When you reload your system with version 12.1.00 of the software, it automatically checks to see if the boot code and FPGA code on your system are compatible with the application image being loaded. If you have an older version of the boot code or FPGA code, it will be displayed and you will be directed to use the boot upgrader command to load the appropriate code. The Track Trunk Port with VRRP-E feature allows the ServerIron ADX to track the failure of individual ports within a trunk. When a tracked port within a trunk fails, the VRID priority value is changed, which changes the failover value.
Book: ServerIron ADX Installation Guide Book: Release Notes for TrafficWorks Software Release 12.1.00 Section: Upgrading Boot and FPGA Code
Book: ServerIron ADX Switch and Router Guide Chapter: Configuring VRRP and VRRP-E Section: Track Trunk Port with VRRP-E Book: ServerIron ADX Administration Guide Chapter: ServerIron ADX System Management Section: Using the Management Port
Management Port
With this release, the ServerIron ADX supports an Ethernet port that is designed for managing the device. This port allows you to provide management access to a ServerIron ADX on a separate and more secure network than the one where general network traffic is being passed. This access is provided through an RJ-45 connector on the front panel of the ServerIron ADX 1000 platforms or on the management module for ServerIron ADX chassis products. With this release, Uni-Directional Link Detection (UDLD) support for Tagged and Untagged ports has changed. See the referenced document for details.
Book: ServerIron ADX Switch and Router Guide Chapter: Configuring Uni-Directional Link Detection (UDLD) Section: Configuring UDLD Book: ServerIron ADX Switch and Router Guide Chapter: Configuring Trunk Groups and Dynamic Link Aggregation Section: Single link LACP Book: ServerIron ADX Switch and Router Guide Chapter: Configuring Trunk Groups and Dynamic Link Aggregation Section: Trunk Group Rules
This release supports single-link LACP on the ServerIron ADX. A single instance of link aggregation (single-link LACP) can be used to provide unidirectional link detection. Single-link LACP is based on the 802.3ad LACP protocol, but allows you to form an aggregated link with only one Ethernet port. In previous versions of the ServerIron ADX, ports in a trunk had to be in continuous groups. Now you can configure any eight ports in a static or LACP trunk.
11
Release 12.1.00
IPv6
Book: ServerIron ADX Switch and Router Guide Chapter: Configuring IPv6 Addressing Chapter: Configuring IPv6 Dynamic Routing Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: IPv6 Support for SLB Book: ServerIron ADX Switch and Router Guide Chapter: sFlow Book: ServerIron ADX Security Guide Chapter: Network Security Section: Syn-cookie threshold trap Book: ServerIron ADX Server Load Balancing Guide Chapter: Server Load Balancing Section: Minimum healthy servers on a VIP port Book: ServerIron ADX Switch and Router Guide Chapter: Configuring Base Layer-3 Section: Disabling Layer 2 switching Book: ServerIron ADX Administration Guide Chapter: Role Based Management Book: ServerIron ADX Server Load Balancing Guide Chapter: High Availability Section: Configuring failover based on the number of active virtual ports Book: ServerIron ADX Server Load Balancing Guide Chapter: High Availability Section: Delayed Failover N/A
sFlow
This release introduces the sFlow feature to the ServerIron ADX. sFlow is a system for observing traffic flow patterns and quantities within and among a set of ServerIron ADX devices This release supports the configuration of a syn-cookie threshold trap.
With this feature, you can configure a VIP port to carry traffic only when a configured minimum number of real server ports that are bound to the VIP port are healthy and in the UP state.
Route Only
The Route Only feature allows one port or all ports in a system to be configured in a mode where only packets meant for Layer-3 forwarding are forwarded by the system.
Role Based Management (RBM) allows a user to view and/or update configurations, including virtual servers, real servers, and csw policies, without being able to view or edit configurations associated with another user. With this feature, you can configure the active-standby peer to fail over based on the number of router ports and active virtual ports.
With this feature configured, when a ServerIron ADX switch detects a failover condition because of a VIP/VPORT count change, the failover is delayed and re-examined after a configured time period. In this release, packet buffering has been increased from one to six packets.
12
13
Release 12.1.00
14
Chapter
Overview
The Application Delivery Controllers (ADC) such as Brocade ServerIron ADX help ease the administration of TCP-based or UDP-based applications. They provide server load balancing (SLB) for the application servers, help offload CPU-intensive tasks from the application servers, and provide added security to the server farm. In Figure 1, the system administrator has greater flexibility in managing application server resources. By using a ServerIron application delivery switch, the system administrator can seamlessly add or remove the application servers (real servers) and handle the changing traffic requirements without disrupting service to the end-users. The application clients access the virtual IP address or VIP (virtual server) that is hosted by the ServerIron ADX. In addition to offering increased control over server resources, the ServerIron ADX offers numerous other functions, such as application health checks, server offload, and greater security.
FIGURE 1
Internet
SI
Virtual Server Address www.alterego.com 207.95.55.1 Web requests forwarded among multiple servers unseen by end users
The Server Load Balancing (SLB) requires associations between the application servers (real servers) and the virtual server (VIP). The associations are done by binding TCP or UDP ports on the real servers with TCP or UDP ports on the virtual server. When a client sends a TCP or UDP request to an application port defined under the virtual server, then the ServerIron identifies one of the back-end application servers based on the configured load balancing method and forwards the client request to it. The client is completely unaware of this traffic distribution, but observes increased availability, faster response time and better throughput. The ServerIron can be configured to host multiple application services such as web (http), ftp, or DNS under a single virtual server.
15
Overview
In Figure 1, an application administrator has established a web site www.alterego.com. This web site is mapped to the virtual server (VIP 207.95.55.1) that is hosted on the ServerIron ADX. All queries made to this web site arrive at the virtual server. The ServerIron then distributes these queries among the four back-end application servers. The actual addresses of these four real web servers remain unknown and unseen to the end users. They observe only one IP address, which is the VIP address for the web service.
Load-Balancing predictor
The load-balancing predictor is an algorithm that determines how traffic is distributed among the application servers (real servers). It is possible to fine-tune traffic distribution among servers by selecting one of the following predictors:
NOTE
16
two BPs are enabled and in an operating state four servers are connected: Server1 with a weight of 4, Server2 with a weight of 2, Server3
weight of 4 and Server4 with a weight of 2,
Server1 and Server2 are serviced from BP1 Server3 and Server4 are serviced from BP2
Distribution will occur as described in the following. For BP1
17
Overview
1. The first request is sent to Server1. 2. The second request is sent to Server2. 3. The third request is sent to Server1. 4. The fourth request is sent to Server2. 5. The fifth request is sent to Server1. 6. The sixth request is sent to Server1. For BP2 1. The first request is sent to Server3. 2. The second request is sent to Server4. 3. The third request is sent to Server3. 4. The fourth request is sent to Server4. 5. The fifth request is sent to Server3. 6. The sixth request is sent to Server3. Notice that this sequence for each pair of servers is exactly the same as described in the example for the Weighted Round Robin predictor. The only difference is that these selections are being performed concurrently on each of the BPs which allows each server to be selected more frequently. This method scales to accommodate the number of processors present in the system. The Static Weighted Round Robin predictor can be applied globally to the entire ServerIron ADX or locally per virtual server as described in Changing the Load-Balancing Predictor Method on page 28. To use the static weighted round robin predictor for Layer-7, a server group must be defined for bound real servers. When all of the servers fail to meet the Layer-7 selection criteria, load balancing will not fall back to Layer-4 server load balancing.
NOTE
NOTE
18
TABLE 1
Real server A weight = 1 Connections
0 0 0 0 0 0 1 1 1 1 1 1 2 2 2
Connections
0 0 0 0 1 2 2 2 2 2 3 4 4 4 4
Connections
0 1 2 3 3 3 3 4 5 6 6 6 6 7 8
Server load
0/3=0 1/3=0 2/3=0 3/3=1 3/3=1 3/3=1 3/3=1 4/3=1 5/3=1 6/3=2 6/3=2 6/3=2 6/3=2 7/3=2 8/3=2
19
Overview
a. For the weighted predictor, the server load is calculated as connections divided by server weight = server load. Fractional remainders are rounded down. If there is a tie, the server with the highest weight receives the connection
Connection assignments with enhanced weighted predictor for enhanced weighted load-balancing In enhanced weighted load-balancing, the traffic is distributed in the same proportions as in weighted load-balancing, but the order of distribution is different. With enhanced weighted load-balancing, the real server with the greatest weight is allocated a connection first, but then the next connection is allocated to the real server with the next greatest weight, and then to the server with the next greatest weight on-down-the-line, until all servers have received their first connection. The process repeats with each real server getting a connection in sequence until each real server has connections equal to its assigned weight. Table 2 shows the distribution pattern for Enhanced Weighted Load-Balancing in an example configuration with three real servers, A, B, and C. Real server A has a weight of 1, real server B has a weight of 2, and real server C has a weight of 3. The numbers in bold indicate which server receives the new connection. When the weighted predictor is configured, connections are assigned as shown in Table 2.
TABLE 2
Real server A weight = 1 Connections
0 0 0 1 1 1 1 1 1 2 2 2 2 2 2
Connections
0 0 1 1 1 2 2 2 3 3 3 4 4 4 5
Connections
0 1 1 1 2 2 3 4 4 4 5 5 6 7 7
Server load
0x6/3=0 1x6/3=2 1x6/3=2 1x6/3=2 2x6/3=4 2x6/3=4 3x6/3=6 4x6/3=8 4x6/3=8 4x6/3=8 5 x 6 / 3 = 10 5 x 6 / 3 = 10 6 x 6 / 3 = 12 7 x 6 / 3 = 14 7 x 6 / 3 = 14
a. For the enhanced weighted predictor, the server load is calculated as connections x [combined weights / server weight] = server load. Fractional remainders are rounded down. If there is a tie, the server with the highest weight receives the connection.
Weighted and Enhanced Weighted predictors can be enabled as described in: Changing the Load-Balancing Predictor Method on page 28.
20
NOTE
Weight server1 = 7 Weight server2 = 8 Weight server3 = 2 Weight server4 = 2 Weight server5 = 5 Total weight of all servers = 24
The result is that server1 gets 7/24 of the current number of connections, server2 gets 8/24, server3 gets 2/24, and so on. If a new server, server6, is added with a weight of 10, the new server gets 10/34.
21
Overview
If the SNMP-weight indicates that your fastest server gets 50 percent of the connections, the server will get 50 percent of the connections at a given time. However, because the server is faster than others, it can complete more than 50 percent of the total connections overall by servicing the connections at a higher rate. As a result, the weight is not a fixed ratio but instead adjusts to server capacity over time. Dynamic-weighted Reverse The SNMP response from each server is regarded as a performance weight. Reverse-Weighted load balancing is similar to Direct-Weighted, except that the SNMP-weight will be calculated by the difference of the maximum based value and the dynamic SNMP response value (max. based value SNMP response). The server load balance will balance the same way as the direct-weighted predictor with the dynamically calculated SNMP-weight value. For an example of CPU usage, if you configure the maximum based value to 100% and the SNMP response is 90% of CPU usage, the SNMP weight becomes 10% (100 90 = 10). The server load balance does direct-weight load balancing with the 10% unused CPU time. In other words, servers with a higher SNMP response (a higher CPU usage and lower SNMP-weight) receive a lower percentage of connections at a time.
If the response time is 0, the weight is 1000 If the response time is greater than 100 ms, the weight is 1 If the response time is between 0.1 and 100 ms, the weight is 100 divided by the response
time (in 0.1 ms intervals) The response time predictor is only applicable to TCP traffic. The server response time predictors can be applied globally to apply for the entire ServerIron ADX or locally per virtual server as described in Changing the Load-Balancing Predictor Method on page 28.
Sticky connections
When a service request by a client mandates a series of sequential TCP or UDP port connections to be served by the same real server, you can enable a sticky connection on that TCP or UDP virtual server port. For example, if a user is accessing dynamically generated pages, the client must consistently attach to the same server; otherwise, the state information is lost. By default, the sticky parameter is disabled for virtual service ports, except for Secure Socket Layer (SSL).
22
Concurrent connections
The concurrent connection option is similar to the sticky option. However, instead of supporting sequential connections to the same server, the concurrent connection option supports both a primary connection and secondary connections. The connections are supported at the same time. The primary connection is the controlling connection and dictates the resource, such as a server, to which subsequent or secondary connections are made. When the controlling connection is established, the server dynamically assigns a TCP or UDP port to which the client should open subsequent or secondary connections. Subsequent connections from that client are accepted on the server as long as the controlling connection is still active. Figure 2 shows an example of a concurrent connection. A client initiates a session request to the NETPERF application supported on servers S1, S2, and S3. When the SLB switch receives the request, the switch forwards the request to server S2. This forms the primary connection. Then S2 dynamically assigns a port, 10000, to the application and forwards it to the client.
NOTE
The method the server uses to communicate the dynamic port to the client is application-specific. The ServerIron ADX switches all subsequent connections to S2 to ensure that the NETPERF session completes successfully. By default, the concurrent property of a virtual TCP or UDP service port is enabled except for FTP, Telnet, TFTP, HTTP, and SSL ports.
23
Overview
FIGURE 2
SI
All servers are running the NETPERF application. port 10000 S2
Step 3 S2 dynamically assigns port 10000 to the service (NETPERF application) and forwards it back to Client1. Subsequent connections (secondary connections) marked with port 10000 will be forwarded by the SLB switch to S2 ensuring that the NETPERF session completed successfully. S3
Remote Servers
The application servers that are a layer 3 hop away (in other words, in a different subnet that is separated by router) are identified as Remote Severs in ServerIron.
24
Figure 3 shows an example of two ServerIron ADXs deployed in a SLB Direct Server Return configuration.
FIGURE 3
Internet
SI-A
SI-B
You configure Direct Server Return on an individual TCP or UDP port basis when you configure your virtual servers. The feature requires that you configure a loopback interface on each real server and give the loopback interface the IP address of the VIP. The ServerIron ADX sends the client traffic to the real server without translating the destination address from the VIP into the real server's IP address. Thus, the real server receives the client traffic addressed to its loopback address and responds directly to the client. The Direct Server Return feature can be used on a single ServerIron ADX supporting a single server farm, but is also is quite powerful when used on multiple ServerIron ADXs in combination with the Symmetric SLB feature. For a complete configuration example, refer to DSR configuration example on page 65.
Configuring SLB
To configure basic SLB, perform the following tasks:
Define the application servers as real servers on the ServerIron ADX. Refer to Defining the
real servers and real application ports on page 27.
Define a virtual server. Refer to Defining a virtual server (VIP) on page 28. Bind the real servers to the VIP. Refer to Binding virtual and real servers on page 28.
25
Configuring SLB
Figure 4 shows an example of a basic SLB configuration. This example uses multiple Web servers to handle remote Web requests received on the Web site. The Web site URL is assigned to the switch as the focal point for all inquiries as a virtual server address. The virtual server will then forward requests to each of the four Web servers as specified by the predictor (load balancing metric). The sections following the example show how to configure the ServerIron ADX in the example using the CLI.
FIGURE 4
SI
TABLE 3
Domain name
Port
80
Real IP
207.95.55.21 (Web1) 207.95.55.22 (Web2) 207.95.55.23 (Web3) 207.95.55.24 (Web4)
Port
80 80 80 80
www.alterego.com
Configuration guidelines
The following configuration guidelines should be observed when configuring SLB on a switch:
Each virtual server name and IP address must be unique. Each virtual server can have multiple TCP or UDP ports assigned. Each real server name and IP address must be unique. Each real server can have multiple TCP or UDP ports assigned. Each real server TCP or UDP port can be bound only to one virtual TCP or UDP port. One virtual TCP or UDP port can be bound to one or more real TCP or UDP ports.
NOTE
If you need to map a real server port to multiple VIP ports, you can use the many-to-one TCP or UDP port binding feature. Refer to Many-to-one TCP/UDP port binding on page 452.
26
Binding must be done to establish a relationship between virtual and real servers.
Syntax: [no] server real [<name>] <ip-address> Syntax: [no] port <tcp/udp-port> After you have defined the real server, you can refer to it using its name or IP address, and modify its configuration.
ServerIronADX(config)# server real Web1 ServerIronADX(config-rs-Web1)# port ftp ServerIronADX(config-rs-Web1)# exit ServerIronADX(config)# server real 207.95.55.21 ServerIronADX(config-rs-Web1)# port ftp ServerIronADX(config-rs-Web1)# exit ServerIronADX(config)# no server real Web1
If a real server is not reachable from the ServerIron ADX at Layer 2 (does not respond to ARP requests from the ServerIron), then define it as a remote server.
NOTE
NOTE
Optionally, if you have a one-armed topology, you may need to enable source NAT along with source-ip to ensure that return traffic flows through the ServerIron.
27
Configuring SLB
Syntax: [no] server virtual-name-or-ip [<name>] <ip-address> Syntax: [no] port <tcp/udp-port> After you have defined the virtual server, you can add configuration statements or delete the server by referring to the servers IP address or name, by entering commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip www.altergo.com 207.95.55.1 ServerIronADX(config-vs-www.alterego.com)# port http ServerIronADX(config-vs-www.alterego.com)# exit ServerIronADX(config)# server virtual-name-or-ip 207.95.55.1 ServerIronADX(config-vs-www.alterego.com)# exit ServerIronADX(config)# server virtual-name-or-ip www.altergo.com ServerIronADX(config-vs-www.alterego.com)# exit ServerIronADX(config)# no server virtual-name-or-ip 207.95.55.1
Syntax: [no] bind <tcp/udp-port-number> <real-server-name> <tcp/udp-port-number> For clarity, the bindings in the example are shown as four separate entries. You can enter all the binding information as one command: bind http Web1 http Web2 http Web3 http Web4 http
NOTE
28
To globally change the load-balancing method used by the ServerIron ADX, enter the following command.
ServerIronADX(config)# server predictor round-robin
To change the load-balancing method used by the ServerIron ADX for Virtual Server v1, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 ServerIronADX(config-vs-v1)# server predictor enhanced-weighted
Syntax: [no] server predictor least-conn | round-robin | weighted-round-robin | weighted-round-robin-static |weighted | enhanced-weighted | dynamic-weighted <direct | reverse> | response-time Selecting the least-conn parameter configures the Least Connections load-balancing method. This method is described in Least connections predictor on page 16. Selecting the round-robin parameter configures the Round Robin load-balancing method. This method is described in Round Robin predictor on page 17. Selecting the weighted-round-robin parameter configures the Weighted Round Robin load-balancing method. This method is described in Weighted Round Robin predictor on page 17. Selecting the weighted-round-robin-static parameter configures the Static Weighted Round Robin load-balancing method. This method is described in Static Weighted Round Robin predictor on page 17. Selecting the weighted parameter configures the Weighted load-balancing method. This method is described in Weighted and Enhanced Weighted load balancing on page 18. Selecting the enhanced-weighted parameter configures the Weighted load-balancing method. This method is described in Weighted and Enhanced Weighted load balancing on page 18. Selecting the response-time parameter configures the Response time load-balancing method. This method is described in Server response time on page 22. Configuring the response time load balancing method requires that you configure a smooth factor as described in Configuring the smooth factor on page 32. Selecting the dynamic-weighted parameter configures the Dynamic Weighted load-balancing method. This method can be configured as either direct or reverse as described in Dynamic weighted predictor on page 21. Details about configuring the Dynamic Weighted load-balancing method as direct or reverse are described in Configuring dynamic weighted predictor on page 31. If you enable any of the weighted methods, you must configure the weights for all real servers involved. The weights can range from 0 through 65000. This configuration is described in Configuring a weighted predictor on page 30.
If a given VIP port is bound to multiple ports on the same real server, then the least-connection predictor may not produce even traffic distribution. Use the round-robin predictor instead. For overview information, refer to Load-Balancing predictor on page 16.
NOTE
29
Configuring SLB
NOTE
Real Server Weight assignments apply to all ports configured under the real server. For the Weighted Round Robin predictor, server weights are assigned at the server level and
not at the server port level. The load balancing, however, is based on per-server port.
The Weighted Round Robin predictor has VIP port-level granularity. This granularity is reflected
in the output from the show server session and show server conn commands, because they display output for the Weighted Round Robin predictor at a per vip-port level. To configure weights for three real servers, enter commands such as the following.
ServerIronADX(config)# server ServerIronADX(config-rs-rsA)# ServerIronADX(config-rs-rsA)# ServerIronADX(config)# server ServerIronADX(config-rs-rsB)# ServerIronADX(config-rs-rsB)# ServerIronADX(config)# server ServerIronADX(config-rs-rsC)# ServerIronADX(config-rs-rsC)# real rsA weight 1 exit real rsB weight 2 exit real rsC weight 3 exit
Syntax: [no] weight <weight-value> The weight command assigns a performance weight to each server or firewall. Servers or firewalls with a larger or higher weight assigned receive a larger percentage of connections. The <weight-value > parameter specifies the real servers weight relative to other real servers in terms of the number of connections on the server. More precisely, this weight is based on the number of session table entries the ServerIron ADX has for TCP or UDP sessions with the real server. You can specify a value from 0 through 65000. The default is 1. Configuring the weight for real servers This parameter specifies the weight assigned to the real server. It is used for the weighted and least connection with server response-time-weights for load balancing methods. Suppose you want to assign a higher weight to real server Web1 to bias traffic toward that server. No other changes are made to the weights of Web servers 2, 3, and 4, and they remain configured with the default weight of zero (Figure 4). Enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip www.alterego.com
30
ServerIronADX(config-vs-www.alterego.com)# predictor weighted ServerIronADX(config-vs-www.alterego.com)# server real Web1 207.95.55.21 ServerIronADX(config-vs-www.alterego.com)# exit ServerIronADX(config)# server real Web1 ServerIronADX(config-rs-Web1)# weight 10
Syntax: weight <least-connections-weight> The <least-connections-weight> parameter specifies the real servers weight relative to other real servers in terms of the number of connections on the server. More precisely, this weight is based on the number of session table entries the ServerIron ADX has for TCP or UDP sessions with the real server. You can specify a value from 0 65000. The default is 1. This parameter is required. However, if you want to use a weight value only for the Server Response Time but not for the number of connections, specify 0 for this parameter. If you enter a value for <response-time-weight>, the ServerIron ADX adds the two weight values together when selecting a real server. If you specify equal values for each parameter, the ServerIron ADX treats the weights equally. The number of connections on the server is just as relevant as the servers response time. However, if you set one parameter to a higher value than the other, the ServerIron ADX places more emphasis (weight) on the parameter with the higher value. For example, if you specify a higher server response time weight than the weight for the number of connections, the ServerIron ADX pays more attention to the servers response time than to the number of connections it currently has when considering the real server for a new connection.
Configuring a real server with SNMP query requirements on page 31 Configuring a virtual server with a dynamic weighted predictor on page 32
Configuring a real server with SNMP query requirements A list of the SNMP Object ID (OID) can be configured under a real server. An OID represents the weight of the real server, for example server CPU utilization or its memory usage. To configure SNMP query requirements use the following command.
ServerIronADX(config-rs-rs1)# snmp-request oid 1 1.3.6.1.2.1.25.3.3.1.2.1
Syntax: snmp-request oid <ID> <string> The <ID> parameter specifies the snmp-request entry identification, decimal value 1 - 256 The <string> parameter specifies the ASCII string ASN.1 format - 1.3.6.1.2.1.25.3.3.1.2.1 SNMP versions 1 and 2 use community strings to restrict SNMP access. The administrator must configure an SNMP community string to match with those configured in all the real servers.
ServerIronADX(config-rs-rs1)#snmp-request community public
Syntax: snmp-request community public <port> The <port> parameter specifies the snmp-request host UDP port (Default: port 161) You can configure the frequency of the periodic SNMP queries using the following command.
ServerIronADX(config)# server snmp-poll 5
Syntax: server snmp-poll <num> The <num> parameter specifies the decimal value in seconds (Default: 3 sec.)
31
Configuring SLB
Configuring a virtual server with a dynamic weighted predictor Select a dynamic-weighted direct or reverse predictor and an SNMP OID. Dynamic-weighted direct To configure a dynamic-weighted reverse predictor, use the following command.
ServerIronADX(config-vs-vs1)# predictor dynamic-weighted direct oid 1
Dynamic-weighted reverse To configure a dynamic-weighted reverse predictor, use the following command.
ServerIronADX(config-vs-vs1)# predictor dynamic-weighted reverse oid 1 max 50
Configuration example
ServerIronADX(config)#server snmp-poll 5 ServerIronADX(config)#server real rs1 10.1.1.1 snmp-request community public port 161 snmp-request oid 1 1.3.6.1.2.1.25.3.3.1.2.1 snmp-request oid 2 1.3.6.1.2.1.1.3.0 port http port http keepalive ServerIronADX(config)#server virtual vs1 200.1.1.1 predictor dynamic-weighted direct oid 1
32
For example, if a given real servers previous response time value was 2 milliseconds, and a new measurement also results in 2 milliseconds, the calculated server response time using the default smooth factor is as follows: R = ((90 * 2) + ((100 - 90) * 2) / 100 R = 180 + 20 / 100 R = 200 / 100 R=2 If the real servers response time slows due to processing for additional connections, the slower response time affects the Server Response Time calculation for the server. For example, if the next server response time sample is 5 milliseconds instead of 2, the Server Response Time calculation is as follows: R = ((90 * 2) + ((100 - 90) * 5) / 100 R = 180 + 50 / 100 R = 230 / 100 R = 2.3 Since the real servers response time has slowed by two and a half times, the servers response time calculation biases the ServerIron away from selecting that server for new connections. You can affect the degree of difference in subsequent response time weights by changing the smooth factor (S). For example, if you change the smooth factor from 90 (the default) to 50, the calculations shown above have the following results: Here is the calculation when the previous and new response times are 2 milliseconds: R = ((50 * 2) + ((100 - 50) * 2) / 100 R = 100 + 100 / 100 R = 200 / 100 R=2 Here is the calculation if the servers next response time is 5 milliseconds. R = ((50 * 2) + ((100 - 50) * 5) / 100 R = 100 + 250 / 100 R = 350 / 100 R = 3.5 Notice that the differences between the first and second samples are much greater when the smooth factor is 50 than when the smooth factor is 90. A large value gives the previous response time more weight than the new response time. A small value gives the new response time more weight than the previous response time. You can change the smooth factor on an individual virtual servers application port basis. If you change the smooth factor for a virtual server, the change affects all Server Response Time calculations for the real servers bound to the virtual server. If you change the smooth factor for an application port, the change affects Server Response Time calculations only for port bindings that use that application port.
33
Configuring SLB
To change the smooth factor for a virtual servers application port, enter a command such as the following at the configuration level for the virtual server:
ServerIronADX(config-vs-Joes_Garage)# port 80 smooth-factor 50
Syntax: [no] smooth-factor <num> The <num> variable specifies the smooth factor value the server response time calculation uses. You can specify a number from 1 99. The default is 60.
State (enabled or disabled) Ports are enabled by default. Keepalive health check state Keepalive health checks are enabled if you have configured a
port profile for the port and did not globally disable the health check. You can disable the keepalive health check locally for the port on a specific real server while leaving the health check globally enabled.
Layer 7 health check parameters For some application ports that are known to the
ServerIron ADX, you can customize the Layer 7 health checks for individual real servers.
NOTE
For the HTTP ports, you also can configure Layer 7 health checks for Transparent Cache Switching.
Syntax: [no] port <tcp/udp-port> disable | enable To re-enable a port, enter commands such as the following.
ServerIronADX(config)# server real Sy_Borg 192.168.4.69 ServerIronADX(config-rs-Sy_Borg)# no port http disable
To disable all the application ports on a real server, enter the following command at the configuration level for the server.
ServerIronADX(config-rs-R1)# port disable-all
34
To disable all real and virtual HTTP ports, enter the following commands..
ServerIronADX(config)# server port 80 ServerIronADX(config-port-http)# disable ServerIronADX(config-port-http)#
NOTE
New connections are only sent to servers that have passed an application health check. In some configurations, such as those that use a cluster of servers for an application, you might want to configure the ServerIron ADX to stop sending requests to a server when the requested application is down on the server. For example, this feature is useful in an NFS configuration. When you enable this feature, the ServerIron ADX resets the connection for an unavailable TCP application on a real server in addition to redirecting future requests away from this real server. To enable the feature, enter the following commands.
ServerIronADX(config)# server virtual vip-test 50.50.1.250 ServerIronADX(config-vs-vip-test)# port http ServerIronADX(config-vs-vip-test)# port http reset-on-port-fail ServerIronADX(config-vs-vip-test)#
The above example enables the feature for the http application defined under the virtual server. Similarly, this feature can be enabled for the other application ports as well.
35
Configuring SLB
Slow-start mechanism
When the ServerIron ADX begins sending client requests to a real server that has recently gone online, it allows the server to ramp up by using the slow-start mechanism. The slow-start mechanism allows a server (or a port on the server) to handle a limited number of connections at first and then gradually handle an increasing number of connections until the maximum is reached. The ServerIron ADX uses two kinds of slow-start mechanisms:
The non-configurable server slow-start mechanism applies to a real server that has just gone
online.
The configurable port slow-start mechanism applies to individual TCP application ports that
have just been activated on a real server. Refer to Slow-start mechanism on page 240 for more information.
NOTE
To disable the keepalive health check, enter commands such as the following.
ServerIronADX(config)# server real Auto_Plooker 192.168.2.69 ServerIronADX(config-rs-Auto_Plooker)# no port http keepalive
36
ServerIronADX(config-rs-R1)# port 80 tcp-only ServerIronADX(config-rs-R1)# exit ServerIronADX(config)# server real R2 10.10.11.1 ServerIronADX(config-rs-R2)# port 80 udp-only
Syntax: [no] port <portnum> {tcp-only | udp-only} The <portnum> parameter specifies the application port you want to make tcp-only or udp-only. TCP only and UDP only are mutually exclusive. This means that when tcp-only is configured, udp-only cannot be configured for a port at the same time. udp-only will be automatically disabled if tcp-only is configured, and vice versa.
Syntax: [no] port <tcp/udp-portnum> stateless The <tcp/udp-portnum> parameter specifies the application port you want to make stateless. This software release supports stateless SLB only for TCP port 80 (HTTP).
NOTE
The ServerIron ADX and real servers are on different subnets. The remote access server (RAS) and ServerIron ADX are on different subnets.
37
Configuring SLB
The border access router (BAR) and ServerIron ADX are on different subnets.
Refer to Web hosting with ServerIron ADX and real servers in different subnets on page 456 for an example of the type of configuration in which you need to use this feature.
NOTE
Depending on the configuration, you might also need to enable source NAT. Refer to Web hosting with ServerIron ADX and real servers in different subnets on page 456 for general information about the NAT operations performed by the ServerIron ADX. The ServerIron ADX supports a maximum of 64,000 simultaneous connections on each source IP address. This maximum value is based on the architectural limits of IP itself. As a result, if you add only one source IP address, the ServerIron ADX can support up to 64,000 simultaneous connections to the real servers. If you configure 64 source IP addresses, the ServerIron ADX can support more simultaneous connections.
ServerIronADX(config)#server source-ip 192.168.1.5 255.255.255.0 192.168.1.1
Syntax: [no] server source-ip <ip-addr> <network-mask> <default-gateway> The <default-gateway> parameter is required. By specifying "0.0.0.0" as a gateway, the system is going to use the ip default-gateway setting for the default gateway. The gateway function will not actually be disabled for the interface. You can configure source IP addresses to enable the ServerIron ADX to communicate with routers and real servers in different subnets. For example, Figure 5 shows an example of a ServerIron ADX that uses both public and private source NAT addresses. You can define a combined total of 64 source-ip and source-nat-ip addresses on a ServerIron ADX running switch code. The source-ip command is not required on ServerIrons running router code.
NOTE
FIGURE 5
ServerIron ADX configured with public and private source NAT addresses
Remote Server R3 209.157.22.12
Internet
SI
-management IP address 192.168.1.69 -VIP 192.168.1.70 source IP address 192.168.1.5 -source IP address 10.10.10.5 =source IP address 10.10.20.5 -source NAT enabled
The ServerIron ADX in this example is configured with three source IP addresses. Two of the addresses are in the subnets of the real servers and the third address is in the same subnet as the ServerIron ADX management address.
38
The software considers any address that is not within the following address ranges to be a public address. These address ranges are defined as private address ranges in RFC 1918:
If the <ip-addr> parameter is not already configured as a source IP address on the ServerIron ADX (with the server source-ip command), an error message is displayed. The server source-ip setting is primarily used to provide the ServerIron ADX with source IP addresses in subnets other than that of the Management IP address. You can configure source IP addresses in the same subnet as the management IP, and you can configure multiple source IP addresses within each subnet. This gives you multiple opportunities to specify multiple default gateways for each subnet. However, the ServerIron uses only one default gateway per subnet. The ServerIron ADX uses the following rules when using the default gateways you have configured: 1) If the server source-ip you have configured is in the same subnet as the Management IP address (M-IP) then the ServerIron ADX will use the Management IP address (M-IP) default gateway (the IP address you have configured with ip default-gateway) and ignore any other default gateway that you would have configured at the end of the server source-ip line. In the following example, the ServerIron will use only 192.168.1.254 as a gateway and will ignore 192.168.1.253.
server source-ip 192.168.1.11 255.255.255.0 192.168.1.253 ip address 192.168.1.10 255.255.255.0 ip default-gateway 192.168.1.254
2) If you configure multiple server source-ip addresses in a subnet different from the Management IP address's, then the ServerIron ADX will use the gateway that you configure at the end of the first server source-ip. In the following example, the ServerIron ADX will use 192.168.1.254 as the gateway for all packets from 192.168.1.10 and 192.168.1.11 and also uses 192.168.2.254 as the gateway for all packets from 192.168.2.10 and 192.168.2.11. The ServerIron ADX will ignore 192.168.1.253 and 192.168.2.253.
server source-ip 192.168.2.10 255.255.255.0 192.168.2.254 server source-ip 192.168.2.11 255.255.255.0 192.168.2.253 server source-ip 192.168.1.11 255.255.255.0 192.168.1.253 ip address 192.168.1.10 255.255.255.0 ip default-gateway 192.168.1.254
The server source-ip setting is only applicable when ServerIron ADX is using the switch code. If you need to have a different gateway for each destination network (for example, if you have your remote real servers split between multiple subnets, with each subnet behind a different router, and each of these routers directly connected to the ServerIron ADX), Brocade recommends that you use router code instead of switch code.
39
Configuring SLB
Source NAT
Source NAT configuration is useful where a ServerIron is connected in one-armed mode; for example where it is connected to the network infrastructure through an uplink as shown in Figure 6. In this situation the ServerIron ADX passes the source IP address of the client to a back-end application server. If these servers have a direct path to the client, (as would be the case in one-armed design) the response will bypass the ServerIron ADX in the return path. This bypass breaks the traffic flow because the client sees the response coming from the IP address of the real server, instead of the IP address of the virtual server. With Source NAT configured, a ServerIron ADX replaces the IP address of a client IP with the IP address of the ServerIron ADX in request packets forwarded to the real server. This action forces the real server to forward replies to the ServerIron ADX instead of bypassing it. Figure 6 provides an example of what can occur when a real server has a path back to a client that bypasses a ServerIron ADX without Source NAT enabled as described in the following. 1. A request from the Client arrives at the ServerIron through a Layer 2 switch. 2. The ServerIron translates the VIP IP address to the IP address of the real server and forwards the request to the real server. 3. The real server sees the request coming from the IP address of the client and replies back directly through the Layer-2 switch bypassing the ServerIron. 4. The Client sees the response coming from an unknown IP address (other than the one that it sent the request to) and drops the packet.
FIGURE 6
Layer-2 Switch
1 3 2
Real Server
ServerIron
In Figure 7 the traffic flow of the configuration is changed by enabling Source NAT as described in the following: 1. A request from the Client arrives at the ServerIron through a Layer 2 switch. 2. The ServerIron translates the VIP IP address to the IP address of the real server, replaces the IP address of the client with its own IP address and forwards the request to the real server. 3. The real server sees the request coming from the IP address of the ServerIron and replies back through the layer 2 switch to the ServerIron.
40
4. The ServerIron translates the IP address of the real server to the VIP IP address and replies to the client.
FIGURE 7
4 1
Layer-2 Switch ServerIron
3 2
Real Server
Source NAT can be configured either globally or per Real Server as described in the following sections: Enabling source NAT globally and Enabling source NAT on a real server.
Syntax: [no] server source-nat On a ServerIron ADX running switch code, you must also configure a source IP address. These ServerIron ADXs use source NAT to translate the management IP address in the source field of the IP packet into the source IP address you configure. Refer to Minimizing source-IP and source-NAT-IP requirements for large deployments on page 44. Refer to Web hosting with ServerIron ADX and real servers in different subnets on page 456 for an example of the type of configuration in which you need to use Source NAT. You can define a total of 64 source-ip and source-nat-ip addresses on ServerIrons running switch code. The source-ip command is not required on ServerIrons running router code.
NOTE
in a system with a large number of Barrel Processors (BP), the usable source Nat ports are limited. The larger the number of BPs that a system has, the lesser number of Source ports available for the BP. It is suggested that you use the Enabling Port Allocation feature when all 64 Source IPs are used up. Refer to Enabling port allocation per real server for source IP on page 45 and Enabling port allocation per real server for source NAT IP on page 45 for details.
41
Configuring SLB
When source Nat is enabled for FTP traffic, the ServerIron ADX only supports one mode for an established connection. This means that a user cannot toggle between active and passive mode for an existing FTP connection.
NOTE
For Router (R) code, the ServerIron ADX uses the Interface or VE address to do source NAT by default. No user action is needed. Optionally, you can define source NAT IP addresses if they are required. You can define total of 64 Interface or VE and source NAT IP addresses. Interface or VE addresses do not exist on Switch (S) code. If you are configuring a pair of ServerIron ADXs for hot-standby (active-standby) and you want to use the same source IP address on each ServerIron ADX, use the server source-nat-ip command instead.
NOTE
NOTE
42
The <default-gateway> parameter is required. If you do not want to specify a gateway, enter "0.0.0.0". The port-range parameter specifies which port range this peer uses for source NAT for this source IP address.Specify 1 for the lower port range or 2 for the upper port range. The peer using the upper port range is the owner of the source IP address. After you enter this command, ownership of the source IP address is negotiated between the peers. There must be a Layer 2 connection between the two ServerIron ADXs. Displaying Information about the Shared Source IP Address To display information about the source IP address, enter the command such as the following. Syntax: show server source-nat-ip <ip-addr>
Syntax: source-nat-ip <ip-addr> The <ip-addr> parameter is the shared source NAT IP address.
In comparison, the source-nat access-list <acl-id> command configures source NAT on a real server to be performed on traffic whose source IP address is permitted by ACL 1.
ServerIronADX(config)# server real r1 10.10.10.10 ServerIronADX(config-rs-r1)# source-nat access-list 1
43
Configuring SLB
Syntax: server source-nat <client-subnet> <source-ip> Enter the IP address to which the client belongs for <client-subnet>. Enter the source NAT IP address of the subnet with which you want to associate the clients subnet. The source NAT IP address you enter must be configured on the ServerIron.
NOTE
This enhancement only applies to the server source-ip and server source-nat-ip. It is not applicable to source-ip and source-nat-ip addresses used for SSL.
You need to write memory and reload after you configure this feature.
NOTE
44
If source-ip and source-nat-ip are configured for the same subnet, then the source-nat-ip is given a higher priority. In the router case, the interface IPs are programmed as source-ips on the BP. The IP that matches the default gateway is given preference in the router case. As a result, if you configure the source-nat-ip in a subnet different than the gateway remote servers that are defined on the ServerIron ADX, then this source-nat-ip must not be used. You should take this into account during network design. For example, if you want to keep using the same IP 4.4.4.101 as source-ip, but change old source-ip feature to new source-ip port-alloc-per-real. You need to perform the following steps in order: 1. Bring traffic that hit 4.4.4.101 to zero. 2. No server source-ip 4.4.4.101 255.255.255.0.0.0.0.0 3. Server source-ip 4.4.4.101 255.255.255.0.0.0.0.0 per-alloc-per-real
NOTE
Configuration
To enable this feature, use the port-alloc-per-real keyword along with server source-ip or server source-nat-ip commands.
Enabling port allocation per real server for source IP Enabling port allocation per real server for source NAT IP
NOTE
The maximum number of configured source-nat-ip addresses that can be supported by the port allocation per real server feature is 16.
Syntax: [no] server source-nat-ip <ip-addr> <ip-mask> <default-gateway> port-range <1>|<2> [port-alloc-per-real] You should not enable or disable this functionality while the IP addresses are in use by the traffic flow. You must bring the traffic level to zero using this IP address or remove the command and redefine it. You should not enable or disable this functionality while the IP addresses are in use by the traffic
NOTE
45
Configuring SLB
flow. You must bring the number of traffic flows utilizing this IP address to zero or remove the command and redefine it. As an example, for changing from statement #1 to statement #2 below, either bring the traffic level to nil or negate the command first using "no server...." and then re-define it.
statement #1: server ... port-range 1 statement #2: server ... port-range 1 port-alloc-per-real
Remote server
If the server is attached through one or more router hops, configure the server as remote. When you add a remote real server, the ServerIron ADX does not include the server in the predictor (load-balancing method). Instead, the ServerIron ADX sends traffic to the remote server only if all local real servers are unavailable. The server name is used to bind the server IP address, so that the real server name can be used to represent the server. To configure a remote real server, enter a command such as the following. Syntax: server remote-name <name> <ip-addr> The server name can be any alphanumeric string of up to 32 characters. This command is used in conjunction with the Server Load Balancing feature on the ServerIron ADX switch. Refer to Unbinding all application ports from virtual servers on page 126.
NOTE
46
For a configuration example and more information, refer to TCP/UDP application groups on page 453. To configure a TCP or UDP application group, enter the following commands. These commands configure HTTP (port 80), Telnet (port 23), and TFTP (port 69) to be sticky. In addition, the Telnet and TFTP ports are configured to track the HTTP port.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 sticky
Syntax: [no] port <portnum> client-subnet-sticky prefix-length <prefix-length> or Syntax: [no] port <portnum> client-subnet-sticky subnet-mask <client-subnet-mask> In this example, client requests from subnet 192.168.9.x would go to the same real server. Sub-net sticky connections are aged out according to the sticky age setting, in the same way regular sticky connections are aged out. The features port sticky and port client-subnet-sticky cannot be configured together on the same port on the same virtual server. The SSL port is configured as sticky by default, and the CLI will not allow you to configure port client-subnet-sticky on an SSL port of a virtual server. As a work around, you must first disable the sticky function before configuring port ssl client-subnet-sticky on a virtual server.
ServerIronADX(config)# server ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# virtual-name-or-ip vs1 10.10.10.10 port ssl no port ssl sticky port ssl client-subnet-sticky prefix-length 24
47
Configuring SLB
The sticky age is a global setting applying to all virtual servers; you can also set the sticky age for an individual virtual server. The sticky age for the individual virtual server overrides the global setting. To set the sticky age globally, enter a command such as the following.
ServerIronADX(config)# server sticky-age 20
To set the sticky age for an individual virtual server, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip v1 ServerIronADX(config-vs-v1)# sticky-age 20
Syntax: [no] server sticky-age <2-60> Possible values for sticky age are from 2 through 60 minutes. The default is 5 minutes. Allowing sticky ports You can configure the ServerIron ADX to continue using a sticky port (a persistent connection) even if you have entered a command to unbind the port or the port is disabled. When you unbind an application port from a server, the ServerIron ADX temporarily places the port in the aw_unbnd (awaiting unbind) state. If you delete an application port, the ServerIron ADX temporarily places the port in the aw_del (awaiting delete) state. These temporary states allow open sessions on the port to be completed before the port is unbound or removed. By default, when the ServerIron ADX receives a new request associated with a sticky port in the aw_unbnd state, the ServerIron ADX establishes the session on another real server, not the real server from which you are unbinding the port. You can configure the ServerIron ADX to accept new sessions for the same real server for a sticky port, even under the following conditions:
The real server port is in the aw_unbnd state. The real server port is in the aw_del state. The real server port is disabled.
To do so, enter the following command.
ServerIronADX(config)# server allow-sticky
Syntax: [no] server allow-sticky [refresh-age] The refresh-age option resets the age of a sticky session on the port whenever a new connection associated with the sticky port is established. This parameter ensures that the session stays up indefinitely until it is no longer needed. By default, the ServerIron ADX does not reset the age of the session when new connections are established. Instead, the session times out after the sticky age expires. If you use refresh-age, the ServerIron ADX resets the age of the session to the value of the sticky age. For example, if the sticky age is five minutes (the default), when the ServerIron ADX establishes a new session on the sticky port, the ServerIron ADX resets the age time for the session to five minutes. Each time the ServerIron ADX receives another connection request associated with the sticky session, the ServerIron ADX resets the session age again.
48
Syntax: sticky-age-multiplier <multiplier-value> The <multiplier-value> variable is a numerical value in the following range: 2 to 120. This value is used to produce a sticky-age value for the Virtual Server it is configured under that is a multiple of the value configured globally for the ServerIron as described in Setting the sticky age on page 47. For example, if the sticky age is configured to be 20 minutes, and the sticky-age-multiplier to be 40, then the actual sticky age of the sticky sessions for the server will be 20x40= 800 minutes. Please note that even though the sticky-ages are multiplied, the show session command will still only show ordinary age of the sticky sessions. The difference is that the age is incremented in a slower pace when multiplier is applied. For example if the sticky-age-multiplier is configured to be 40, the age counter in the session table is incremented once in 40 minutes instead of 1 minute. You can remove the multiplier by using sticky-age-multiplier 1 or no sticky-age-multiplier <number>
NOTE
49
Configuring SLB
When the active-primary-overide-sticky command is configured, if the primary server goes down and then comes back up, any new connection to the DNS port is sent to the primary server. The old sticky session to the backup server is deleted, and a new sticky session to the primary server is created.
FIGURE 8
erverIron#sh version SW: Version 08.2.00aT24 Copyright (c) 1996-2002 Foundry Networks, Inc. ! Compiled on Aug 06 2004 at 18:46:45 labeled as WSR08200a server virtual vip1 40.40.1.10 HW: ServerIron 400 Router, SYSIF version 21 predictor round-robin ======================================================================= port http sticky SI L 1: B0GMR WSM Management Module, SYSIF 2, { ACTIVE port http group-sticky Serial #: SA10040963 bind http rs1 http rs2 http web1 http web2 http 0 MB SHM, 3 Application Processors bind http web3 http ! 8192 KB BRAM, SMC version 1, ICBM version 21 SW: (1)08.2.00aT72 (2)08.2.00aT72 (3)08.2.00aT72 ======================================================================= L 2: B24E Copper Switch Module Serial #: Non-exist. 2048 KB BRAM, SMC version 2, ICBM version 21 256 KB PRAM(256K+0K) and 2048*8 CAM entries for DMA 4, version 0808 256 KB PRAM(256K+0K) and shared CAM entries for DMA 5, version 0808 rs1 rs2 shared web1 web2 web3 256 KB PRAM(256K+0K) and CAM entries for DMA 6, version 0808 ======================================================================= 11 group-id 2 2 ctive management group-id module: 466 MHz Power PC processor 750 (version 8/8302) 66 MHz bus 512 KB boot flash memory
Figure 8 shows two server groups: group-id 1 1 and group-id 2 2. The configured VIP is serving the clients and load balancing traffic across the servers in their respective groups.
50
When a client first enters the system, the ServerIron ADX inspects the defined groups, predictors, and chooses a server within a group to create a sticky session. When a new connection comes in from the same client and group sticky is configured, the ServerIron ADX will find all the servers belonging to the group and will load balance among the servers. Perform the following steps. 1. Set up the real servers and group IDs. The rs1 and rs2 are in group 1. The devices Web1, Web2, and Web3 are in group 2.
server real rs1 20.20.1.40 port http port http url "HEAD /" port http group-id 1 1 server real rs2 20.20.1.41 port http port http url "HEAD /" port http group-id 1 1 server real Web1 20.20.1.42 port http port http url "HEAD /" port http group-id 2 2 server real Web2 20.20.1.43 port http port http url "HEAD /" port http group-id 2 2 server real Web3 20.20.1.44 port http port http url "HEAD /" port http group-id 2 2
2. On the VIP, ensure the minimum required commands for Group Sticky are present: port <type> group-sticky and port <type> sticky. If stickiness is not configured, load balancing among the group will not work.
ServerIronADX(config-vs-v1)# server virtual-name-or-ip vip1 40.40.1.10 ServerIronADX(config-vs-vip1)# predictor round-robin ServerIronADX(config-vs-vip1)# port http sticky !(or port http client-subnet-sticky) ServerIronADX(config-vs-vip1)# port http group-sticky ServerIronADX(config-vs-vip1)# bind http rs1 http rs2 http Web1 http Web2 http ServerIronADX(config-vs-vip1)# bind http Web3 http
Once a group sticky session is created, all subsequent traffic will be load balanced across the group. The first incoming sticky session will go to a real server in group 1. All subsequent connections will also go to group 1. If multiple clients are in the same subnet, then use the port http client-subnet-sticky command instead of port http sticky. The group sticky behavior will apply itself to the client-subnet-sticky.
NOTE
When a real servers port is part of two groups, the group-sticky feature takes the first listed group ID only, if the first connection is load balanced to this server.
51
Configuring SLB
3. Identify what server the sticky session is pointed to. In the example below, the sticky session was originated from the client 30.30.1.1 to the VIP 40.40.1.10 using real server rs1. All the traffic to/from the client is being load balanced across the group (group-id 1 1) to which the real server rs1 belongs. Enter the show session all 0 command (at the BP console) such as the following
.
ServerIronADX# rconsole 1 1 ServerIronADX 1/1# show session all 0 Session Info: Flags - 0:UDP, 1:TCP, 2:IP, 3:INT, 4:INVD, H: sessInHash, N: sessInNextEntry Index Src-IP ===== ====== 0 30.30.1.1 Dst-IP ====== 40.40.1.10 S-port D-port Age Next Serv Flags ====== ====== === ==== ==== ========= 0 80 59 000000 rs1 SLB3 H
NOTE
In most cases, an "S-port" of value "0" indicates a sticky session. Regardless of the source port (S-port) of the connection, the sticky session will stick to Src-IP 30.30.1.1, Dst-IP 40.40.1.10, and D-port 80 in the example. To clear a sticky session, use the clear server session command. Enabling group sticky failover Normal Group Sticky behavior sends connections to a group of servers. When an entire server group is unreachable, Group Sticky Failover sends connections to a different reachable group. The sticky session is removed from the unreachable group; a connection request is forwarded to a new group, and a new sticky session is then formed with that group. To enable group sticky failover, enter commands such as the following.
ServerIronADX(config)#server virtual-name-or-ip vip1 40.40.1.10 ServerIronADX(config-vs-vip1)# predictor round-robin ServerIronADX(config-vs-vip1)# port http sticky ServerIronADX(config-vs-vip1)# port http group-sticky ServerIronADX(config-vs-vip1)# port http group-sticky-failover ServerIronADX(config-vs-vip1)# bind http rs1 http rs2 http rs3 http rs4 http ServerIronADX(config-vs-vip1)# bind http rs5 http
Use the required port http group-sticky-failover command in addition to port http sticky and port http group-sticky commands. The group-sticky-failover option alone will not work. Syntax: port <type> group-sticky-failover The server sticky-age mechanism can also be applied to a sticky group, as shown.
ServerIronADX(config)#server sticky-age ? DECIMAL Number
NOTE
52
Although the concurrent connections attribute is similar to application groups, application groups apply to specific TCP or UDP ports that you configure on the virtual server. For servers that use passive FTP *in DSR configuration*, configure the FTP ports to be both sticky and concurrent. To enable an application port to be concurrent, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 concurrent
NOTE
Syntax: [no] access-list <num> deny | permit <source-ip> | <hostname> <wildcard> [log] or Syntax: [no] access-list <num> deny | permit <source-ip>/<mask-bits> | <hostname> [log] Syntax: [no] port <tcp/udp-port> sticky-acl <num> This feature is different from the sticky feature, which you can associate with ports on the virtual server level. The sticky attribute ensures that subsequent packets from the same client during the same TCP session go to the same real server. In this case, the ServerIron ADX knows the packets are from the same client based on the source IP address. When a proxy is used, subsequent packets from the same client can have different IP addresses. For standard IP ACL configuration information, refer to the Configuring Standard ACLs section in the Access Control Lists chapter of the ServerIron ADX Security Guide.
NOTE
53
Configuring SLB
NOTE
You must configure all the grouped ports to be sticky and bind them to all real servers involved.
If a client requests one of the ports that follows the primary port before requesting the primary port itself, the ServerIron ADX does not make the connection sticky. Only after the client requests the primary port does the ServerIron ADX make subsequent requests from the client for that port or ports that track the primary port sticky.
NOTE
NOTE
For servers that use passive FTP *in DSR configuration*, configure the FTP ports to be both sticky and concurrent. For a configuration example and more information, refer to TCP/UDP application groups on page 453. To configure a TCP or UDP application group, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 sticky ServerIronADX(config-vs-v1)# port 23 sticky ServerIronADX(config-vs-v1)# port 69 sticky ServerIronADX(config-vs-v1)# track 80 23 69 ServerIronADX(config-vs-v1)# bind 80 r1 80 r2 80 ServerIronADX(config-vs-v1)# bind 23 r1 23 r2 23 ServerIronADX(config-vs-v1)# bind 69 r1 69 r2 69 These commands configure HTTP (port 80), Telnet (port 23), and TFTP (port 69) to be sticky.
Track-group
Configuring a track port group A track group is similar to track ports. The ServerIron ADX sends a clients request for one of the ports to the same real server that the ServerIron ADX selected for the clients most recent request for another application port. The features differ in the following way:
54
In a track port configuration, the tracking applies only to the primary port, which is the first port
in the list of track ports. If the client requests one of the other applications (one of the applications that is tracking the primary application) first, the ServerIron ADX track feature does not apply.
In a track port group, the ServerIron ADX sends a clients requests for any of the applications in
the group to the same real server, regardless of which application the client requests first. For a configuration example and more information, refer to TCP/UDP application groups on page 453. Note that if any service port is down for a real server, any track port groups on that real server are not considered for load balancing.
NOTE
You must configure all the track port groups to be sticky and bind them to all real servers involved. To configure a track port group, use either of the following methods. The following commands illustrate the track group function.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 sticky ServerIronADX(config-vs-v1)# port 69 sticky ServerIronADX(config-vs-v1)# port 23 sticky ServerIronADX(config-vs-v1)# track-group 80 69 23 ServerIronADX(config-vs-v1)# bind 80 r1 80 r2 80 ServerIronADX(config-vs-v1)# bind 23 r1 23 r2 23 ServerIronADX(config-vs-v1)# bind 69 r1 69 r2 69 ServerIronADX(config-vs-v1)# exit
Syntax: [no] track-group <TCP/UDP-port>... In this example, the track-group command groups the HTTP port (80), Telnet port (23), and TFTP port (69) together. Whenever a client attempts to connect to a port within the group, the ServerIron ADX ensures that all ports in the group are active before granting the connection. The sticky parameter makes the TCP or UDP ports sticky. The sticky parameter must be set for all ports in the group. After the ServerIron ADX sends a client to a real server for any of these three ports, subsequent requests from that client for the HTTP, TFTP, or Telnet port go to the same real server. Up to eight ports can be grouped together using the track group function. A port can be part of only one group. The track-group and track commands for a port are mutually exclusive. Track group health check for real servers
NOTE
The track-group functionality discussed earlier is available under virtual server definition. The ServerIron ADX also allows track-group specification under real server definition. This capability helps reduce the need for creating large numbers of boolean health checks. You can track the health of multiple application ports under a real server definition. If the health of one of the application ports fails, the aggregated health will be marked as fail. The feature co-exists with existing health checks and other features of the ServerIron ADX. If even one of the application ports under real server is not up, the track-group state will be down and the traffic will not be forwarded to any of the ports in the track group. A sample configuration is shown below.
55
Configuring SLB
ServerIronADX(config)# server real r1 1.1.1.1 ServerIronADX(config-real-server-r1) port 80 ServerIronADX(config-real-server-r1) port ftp ServerIronADX(config-real-server-r1) port dns ServerIronADX(config-rsr1) hc-track-group 80 21 53
The ServerIron ADX now tracks health status for ports 80, 21, and 53. If any of these ports is down. the combined health would be marked as failed and the ServerIron will not use these ports for load balancing traffic. Sample configuration
server real rs1 10.1.1.1 port http port 8081 port 8082 hc-track-group http 8081 8082
A primary server is used by the ServerIron ADX when load balancing client requests for an
application. It is a locally attached server added using the server real-name-or-ip command or Web equivalent.
A backup server is used by the ServerIron ADX only if all the primary servers are unavailable for
the requested application. It is remotely attached added using the server remote-name command or Web equivalent You can explicitly designate a server to be a primary or backup server, regardless of the command you used to add it. Therefore, a primary or backup server can be locally attached or attached through a router. In addition, this feature implements the primary and backup configuration on an individual VIP basis. You designate each backup server by changing the real server configurations. You do not need to designate the primary servers. You enable the feature in individual VIPs for individual application ports.
56
Figure 9 shows an SLB configuration that uses locally attached and remotely attached servers. The configuration also uses some of the servers as the primary load-balancing servers while using the other servers only as backups. Notice that one of the locally attached servers is a backup server while one of the remotely attached servers is a primary load-balancing server.
FIGURE 9
SI
R1 Primary R2 Primary
R3 Backup
R4 Primary
R5 Backup
By default, when this feature is enabled on a VIP and all the primary servers are unavailable, a VIP begins using the backup servers until a primary server becomes available again. When a primary server is available, the VIP uses the primary server instead. Optionally, you can configure a VIP to continue to use the backup servers even after the primary servers become available again. To configure primary and backup servers, perform the following tasks. 1. Edit the configuration of each backup real server to designate the server as a backup.
NOTE
You do not need to designate the primary servers. The ServerIron ADX assumes that all servers you do not designate as backup servers are primary servers. 2. Enable use of the primary and backup servers in individual VIPs on individual application ports. Only the VIPs and application ports for which you enable the feature use it. The other application ports within the VIP, and the other VIPs, use the locally-attached servers (configured using the server real-name-or-ip command) as their primary servers and the remotely-attached servers (configured using the server remote-name command) as their backup servers. Optionally, configure the individual applications on the VIPs to continue using the backup servers following a failover, instead of returning to the primary servers.
57
Configuring SLB
Syntax: [no] backup In order for the backup functionality to operate, you must also apply the lb-pri-servers command.
This command enables VIP1 to use the backup and primary servers for application port HTTP. The port http lb-pri-servers command is needed for the backup functionality to operate, regardless of the real servers you have, local or remote. For example, even if all your real servers are local and you have one designated as backup, it will not be used as a backup unless you apply this command. To configure the VIP and application port to continue using the backup servers even after the primary servers become available again, use the backup-stay-active parameter, as in the following example.
ServerIronADX(config-vs-VIP1)# port http lb-pri-servers backup-stay-active
Configuration example
The example configures load-balancing shown in Figure 9 on page 57. To configure the real servers, enter commands such as the following.
ServerIronADX(config)# server real R1 10.10.10.10 ServerIronADX(config-rs-R1)# port http ServerIronADX(config-rs-R1)# exit ServerIronADX(config)# server real R2 10.10.10.20 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# exit ServerIronADX(config)# server real R3 10.10.10.30 ServerIronADX(config-rs-R3)# backup ServerIronADX(config-rs-R3)# port http ServerIronADX(config-rs-R3)# exit ServerIronADX(config)# server remote-name R4 198.10.10.40 ServerIronADX(config-rs-R4)# port http ServerIronADX(config-rs-R4)# exit ServerIronADX(config)# server remote-name R5 198.10.10.50 ServerIronADX(config-rs-R5)# backup ServerIronADX(config-rs-R5)# port http
Notice that the backup command is used with servers R3 and R5. To configure the VIP, enter commands such as the following.
ServerIronADX(config-rs-R5)# server virtual-name-or-ip VIP1 198.10.10.100 ServerIronADX(config-vs-VIP1)# port http lb-pri-servers ServerIronADX(config-vs-VIP1)# bind http R1 http R2 http R3 http R4 http R5 http
58
FIGURE 10
SI
In this example, real servers RS1 and RS2 are bound to a VIP. Each real server has three ports defined: HTTP, FTP, and DNS. RS1 is the primary server for HTTP and FTP, and the backup for DNS. RS2 is the primary server for DNS and the backup for HTTP and FTP. An HTTP or FTP request will not be sent to RS2 unless the HTTP or FTP service on RS1 is down, and a DNS request will not be sent to RS1 unless the DNS service on RS2 is down. To configure the VIP and the real servers in Figure 10, enter commands such as the following.
ServerIronADX(config)# server ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config-vs-vs1)# ServerIronADX(config)# server ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config)# server ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# virtual-name-or-ip vs1 10.10.10.10 port http bind http rs1 http rs2 http port http lb-primary-servers port ftp bind ftp rs1 ftp rs2 ftp port ftp lb-primary-servers port dns bind dns rs1 dns rs2 dns port dns lb-primary-servers real rs1 10.10.10.1 port http port ftp port dns backup exit real rs2 10.10.10.2 port http backup port ftp backup port dns exit
59
Configuring SLB
Condition 1: When A goes down and B is alive, the server is selected from C and B. Condition 2: When both A and B go down, the server is selected from C and D. Condition 3: if backup-stay-alive is not configured. When B comes up and A stays down alive, the server is selected from C and B. Condition 4: if backup-stay-alive is configured, when B comes up and A stays down, the server is selected from C and D. Slow start of the backup and the primary servers If the server selection predictor is least connection, the backup server may be overwhelmed by the flood of the new connections when its primary server goes down. The same is true when the primary server goes back up and starts to take over the connections from the backup server. The slow start mechanism will be used whenever the switching of the backup or primary server happens, to give the server the chance to ramp up. The slow start mechanism of the backup or the primary server will be the same as the one currently being used for the new servers. The slow start parameters are configured on the real server port. The slow start is enabled by default.
NOTE
60
One backup per primary port or server There will be the following restrictions:
At the real port mode, the primary and backup ports have a one-to-one relationship. That is,
the primary port can only be backed up by one backup port, and the backup port can only back up one primary port.
At the real server mode, the primary and backup servers have a one-to-one relationship. That
is, the primary server can only be backed up by one backup server, and the backup server can only back up one primary server. The back port has the precedence over the back server When both the port and the server backup are configured, the port configuration takes precedence over the server configuration. For instance, the following is configured:
The server C is the backup of the server A. The port 8080 of the server C is the backup of the port 8080 of the server B.
Then, the port 8080 of the server C becomes the backup of the port 8080 of the server B, but not the backup of the port 8080 of the server A. Real server backup commands Server backup association on page 61
Server port backup association on page 61 Display the backup bindings on page 62
Server backup association This command is to configure the backup server for a particular primary server, in the real server mode. Syntax: [no] backup [server-name]
Example
To configure the real server R2 as the backup of the real server R1.
ServerIronADX(config)# server real-name R1 10.10.10.10 ServerIronADX(config-rs-R1)# port http ServerIronADX(config-rs-R1)# exit ServerIronADX(config)# server real-name R2 10.10.10.20 ServerIronADX(config-rs-R2)# backup R1 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# exit
Server port backup association This command is to configure the backup server port for a particular primary server port, in the real server port mode. Syntax: [no] port <port-name> backup [server-name] [port-name]
Example
To configure the http port of the real server R2 as the backup of the http port of the real server R1.
ServerIronADX(config)# server real-name R1 10.10.10.10 ServerIronADX(config-rs-R1)# port http ServerIronADX(config-rs-R1)# exit
61
Configuring SLB
ServerIronADX(config)# server real-name R2 10.10.10.20 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# port http backup R1 http ServerIronADX(config-rs-R2)# exit
When both server backup and server port backup are configured, the server port backup has the precedence over the server backup.
Example
ServerIronADX(config)# server real-name R1 10.10.10.10 ServerIronADX(config-rs-R1)# port http ServerIronADX(config-rs-R1)# exit ServerIronADX(config)# server real-name R2 10.10.10.20 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# port http R1 http ServerIronADX(config-rs-R2)# exit ServerIronADX(config)# server real-name R3 10.10.10.30 ServerIronADX(config-rs-R2)# backup R2 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# port http backup R1 http ServerIronADX(config-rs-R2)# exit
NOTE
The server R3 will be the backup of R2, while the HTTP port on R3 will be the backup of the HTTP port on R1. Display the backup bindings This command is used to display the binding relationship between the servers and the ports. Syntax: show server backup-server-port-binding
Example
ServerIronADX(config)# server real-name R1 10.10.10.10 ServerIronADX(config-rs-R1)# port http ServerIronADX(config-rs-R1)# exit ServerIronADX(config)# server real-name R2 10.10.10.20 ServerIronADX(config-rs-R2)# backup R1 ServerIronADX(config-rs-R2)# port http ServerIronADX(config-rs-R2)# port http backup R1 http ServerIronADX(config-rs-R2)# exit ServerIronADX(config)# show server backup-server-port-binding Server/Port State - 0: disabled, 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Real Server rs3:(state 6) Backup Server : rs2(state 6) Port 80(state 6) <---------- Port rs2:80(state 6)
62
Direct Server Return configurations enhance server response time and increase capacity on the ServerIron ADX by allowing server responses to bypass the ServerIron ADX on the way to clients, while increasing the number of simultaneous connections the ServerIron ADX can support. When DSR is used in the configuration, the return traffic gets directed over a more efficient path.
FIGURE 11
DSR
Client
Client requests
SI-A
Server sends return traffic directly to the client
SI-B
Server
DSR configurations can enhance server response time and increase capacity on the ServerIron ADX, by allowing server responses to bypass the ServerIron ADX on the way to clients while increasing the number of simultaneous connections the ServerIron ADX can support. Some ServerIron ADX implementations are in topologies where both directions of load-balancing traffic, the client-to-server and server-to-client traffic, flow through the ServerIron ADX. In this type of configuration, the ServerIron ADX uses two sessions for each connection. One session is for the client-server traffic and the other session is for the server-client traffic. Typically, the client-server traffic uses less bandwidth than the server-client traffic. The client-server traffic usually consists of the initial GET requests to the VIP and TCP ACKs when the client receives a response from the server. The remaining traffic consists of the requested Web pages sent to the client by the server. The Direct Server Return feature places the real server directly in contact with the client, so that server-client traffic does not pass through the ServerIron ADX but instead goes directly from the server to the client. By placing the client directly in contact with the real server, Direct Server Return enhances overall performance and throughput and enhances the service experienced by the client. A ServerIron ADX configured for Server Load Balancing acts as a dispatcher, sending client requests for a VIP directly to the real server, which responds directly to the client. The ServerIron ADX does not translate the destination IP address in the clients request from the VIP into the real servers IP address as in other SLB configurations. Instead, the ServerIron ADX leaves the destination IP address unchanged.
63
Configuring SLB
You cannot have a router hop between the ServerIron ADXs. They must have Layer 2 connectivity. The Direct Server Return feature applies to individual TCP/UDP ports. To configure the ServerIron ADX for Direct Server Return, you enable the feature for individual TCP/UDP ports when configuring the virtual server. For example, when you enable TCP port 80 (HTTP) on a virtual server, you can add the DSR parameter to enable Direct Server Return for that port. Traffic for other ports still returns through the ServerIron ADX. The ServerIron ADX does not translate the destination IP address in client requests for the port with Direct Server Return enabled. However, the ServerIron ADX still translates the destination IP address in the clients request to the real servers IP address for other ports. To configure the real servers for Direct Server Return, configure a loopback interface on each real server and assign the VIP addresses to the loopback interface. The loopback interface enables the real server to respond to client requests directed at the VIPs, while at the same time keeping the real server hidden. The loopback interface responds to unicast traffic directed to it, but does not respond to ARP requests. The ServerIron ADX responds to pings and ARPs for the VIPs. Thus, an attempt to obtain the real servers MAC address by using ARP protocol, a VIP does not succeed. Refer to Configuring the loopback address on a real server on page 68.
NOTE
Syntax: [no] port <tcp/udp-port> dsr You can use Layer 4 and Layer 7 health checks in your DSR configuration.
The ServerIron ADX addresses Layer 3 (IP ping) health checks to the real server IP address. The ServerIron ADX addresses Layer 4 and Layer 7 health checks to the real server MAC
address and to the loopback address that matches the VIP address. The configuration procedures for the health checks are the same as for other types of SLB. Refer to Chapter 4, Health Checks.
64
Upon receiving first FIN from a client, the ServerIron ADX puts sessions in a deletion queue, thus speeding up the deletion process. Syntax: [no] port <port> dsr fast-delete If there is pending data delayed beyond the accelerated timeout, the session may become prematurely aged out. Exercise caution when enabling this command.
NOTE
65
Configuring SLB
TABLE 4
ServerIron ADX
A
Priority
254
Real IP address
Real Server 1: 10.0.0.1 Real Server 2: 10.0.0.2
80 180
www.def.com
VIP2: 209.157.22.101
80
180 180
www.abc.com
VIP1: 209.157.22.100
80
180 80
www.def.com
VIP2: 209.157.22.101
254
80
80
FIGURE 12
Internet
SI-A
SI-B
66
To implement the configuration shown in Figure 12, configure ServerIron ADXs A and B. Note the dsr parameter on the port commands that add the HTTP port (TCP port 80) to the VIPs. To enable Direct Server Return for additional TCP/UDP ports, use the dsr parameter for each port when you add the port to a VIP. Be sure you configure all the real servers on both ServerIron ADXs, and bind the VIPs on each ServerIron ADX to all the real servers.
NOTE
Brocade recommends that you specify 2 (instead of 1) as a low priority or 254 (instead of 255) as a high priority. This way, you can easily force failover of the high priority ServerIron ADX to the low priority ServerIron ADX by changing the priority on just one of the ServerIron ADXs. For example, you can force a failover by changing the priority on the high priority ServerIron ADX from 254 to 1. Since the priority on the low priority ServerIron ADX is 2, the low priority ServerIron ADX takes over for the VIP. Likewise, you can force the low priority ServerIron ADX to take over by changing its priority to 255, since the priority on the high priority ServerIron ADX is only 254.
NOTE
10.0.0.2
10.0.1.1
10.0.1.2
67
Configuring SLB
ServerIronADXA(config-vs-VIP2)# bind http Real_Server_1 180 Real_Server_2 180 Real_Server_3 180 Real_Server_4 180 ServerIronADXA(config-vs-VIP2)# no http port translate ServerIronADXA(config-vs-VIP2)# sym-priority 2 ServerIronADXA(config-vs-VIP2)# exit ServerIronADXA(config)# write memory
10.0.0.2
10.0.1.1
10.0.1.2
show server global - Refer to Displaying global Layer 4 ServerIron ADX configuration on
page 429.
68
show server sessions - Refer to Displaying port-binding information on page 441. show server traffic - Refer to Displaying packet traffic statistics on page 444.
The show server global command gives the output of the show server backup or the show server symmetric command, depending on which high availability method is in use, plus some additional configuration information that would have to be shared between a pair of ServerIron ADXs in a high availability environment. The following is a sample for a ServerIron using Sym-active SLB.
ServerIronADX# show server Server Symmetric port = 2/7 Group_id = 1 Candidate cnt = 1 Port No-rx 2/7 0 Server Load Balancing - global parameters Predictor = round-robin Force-deletion = 0 Reassign-threshold = 20 Reassign-limit = 3 TCP-age = 30 UDP-age = 5 Sticky-age = 5 TCP-syn-limit = 65535 msl = 8 TCP-total conn = 0 Unsuccessful conn = 0 NO-RESET-on-max-conn = Disabled Ping-interval = 2 Ping-retries = 4 Session ID age = 30
69
Configuring SLB
Bind info Virtual server: v Status: enabled IP: 192.168.199.99 telnet -------> a: 192.168.99.11, telnet (remote) (Active) b: 192.168.99.12, telnet (remote) (Failed) http -------> a: 192.168.99.11, http (remote) (Active) b: 192.168.99.12, http (remote) (Failed) Client->Server = 0 Server->Client = Drops = 0 Aged = Fw_drops = 0 Rev_drops = FIN_or_RST = 0 old-conn = Disable_drop = 0 Exceed_drop = Stale_drop = 0 Unsuccessful = SYN def/proxy RST = 0 Server Resets = Out of Memory = 0 Out of Memory = last conn rate = 0 max conn rate = last TCP attack rate = 0 max TCP attack rate = fast vport found = 4 fast vport n found = Fwd to non-static FI = 0 Dup stale SYN = ServerIronADX# show server Server Symmetric port = 2/7 Group_id = 1 Candidate cnt = 1 Port No-rx 2/7 0 Server Load Balancing - global parameters Predictor = round-robin Force-deletion = 0 Reassign-threshold = 20 Reassign-limit = 3 TCP-age = 30 UDP-age = 5 Sticky-age = 5 TCP-syn-limit = 65535 msl = 8 TCP-total conn = 0 Unsuccessful conn = 0 NO-RESET-on-max-conn = Disabled Ping-interval = 2 Ping-retries = 4 Session ID age = 30 Bind info Virtual server: v Status: enabled IP: 192.168.199.99 telnet -------> a: 192.168.99.11, telnet (remote) (Active) b: 192.168.99.12, telnet (remote) (Failed) http -------> a: 192.168.99.11, http (remote) (Active) b: 192.168.99.12, http (remote) (Failed)
0 0 0 0 0 0 0 0 0 0 11 0
70
2
0 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0
Client->Server = 0 Server->Client = Drops = 0 Aged = Fw_drops = 0 Rev_drops = FIN_or_RST = 0 old-conn = Disable_drop = 0 Exceed_drop = Stale_drop = 0 Unsuccessful = SYN def/proxy RST = 0 Server Resets = Out of Memory = 0 Out of Memory = last conn rate = 0 max conn rate = last TCP attack rate = 0 max TCP attack rate = fast vport found = 4 fast vport n found = Fwd to non-static FI = 0 Dup stale SYN = TCP forward FIN = 0 TCP reverse FIN = Fast path FWD FIN = 0 Fast path REV FIN = Fast path SLB SYN = 0 Dup SYN after FIN = Duplicate SYN = 0 Duplicate sessions = TCP ttl FIN recvd = 0 TCP ttl reset recvd = Sessions in DEL_Q = 0 Sess force deleted = Fwd sess not found = 0 sess already in delQ = Sess rmvd from delQ = 0 New sess sync sent = 0 New sess sync recvd = TCP SYN received = 0 TCP SYN dropped = TCP SYN to MP = 0 TCP SYN ACK to MP = TCP SYN ACK received = 0 TCP SYN ACK dropped = TCP pkt received = 0 TCP pkt dropped = TCP pkt to MP = 0 PBSLB tftp status = Avail. Sessions on MP = 999993 Total Sessions on MP = slot-1 cpu-1 Avail. Session = 1999992 Total Sessions = 2000000 slot-1 cpu-2 Avail. Session = 1999992 Total Sessions = 2000000 slot-1 cpu-3 Avail. Session = 1999992 Total Sessions = 2000000 Total C->S Conn = 0 Total S->C Conn = 0 Total Reassign = 0 Unsuccessful Conn = 0 Server State - 0: disabled, 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Real Server State CurrConn TotConn TotRevConn CurrSess PeakConn a 6 0 0 0 0 0 b 1 0 0 0 0 0 last conn rate = 0 max conn rate = last TCP attack rate = 0 max TCP attack rate = SYN def RST = 0 SYN flood = ServerIronADX#
0 0 0
Port ranges
Port ranges can be defined under real servers or virtual servers. Port ranges can be used with bind statement under VIP. Additionally, you can define port profiles for a port range and specify characteristics such as TCP or UDP, keepalive timers, retires for all ports inside port range. Port-policy definition is not supported with port range. This is because all ports inside a port range must have the same characteristics, and these characteristics can be defined using port profile. The ServerIron ADX processes client requests destined to ports inside a port range in the same way it processes connections to individual ports.
NOTE
71
Configuring SLB
Syntax: [no] port <port-number> to <port-number> Enter the ports numerical value for <port-number>. When defining a port range:
Ports in a port range must be consecutive. You must define a starting port and an ending port for the range. The starting port must be greater than zero (0). The ending port must be larger than the starting port. There can be up to 50 ports in a port range. You can change the starting port and ending port using a single command. When changing the ports in a port range, if the port range is not used with a bind statement or other configuration, then the change is applied immediately; otherwise, the change remains pending until the apply port-range command is issued.
You cannot include the default port (65535) and well-known ports in a port range. Furthermore, if role-based management is used, only the super user or global manager can
create port ranges at the global configuration level. Role-based users can use port ranges and bind them under the real server and virtual server configuration levels. Also, role-based users can view the list of port ranges by issuing the show port-range command.
If the system encounters an error while implementing port-range and its associated features, it
will still go ahead and complete the process. It will then log an error message. The system user must manually remove the port-range config, correct the error, and re-apply the configuration until it succeeds.
If you define many port ranges to cover many application ports (several hundreds or thousands
of ports) then you need to keep an eye on MP CPU resources, because a system may not be able to handle health checks for all these ports. Disabling of health checks for several ports or port-ranges may be needed in such cases to prevent health check issues.
Port ranges cannot be used with alias port ("real-port") definitions. Port ranges can be combined with Layer 4 switching only. They cannot be used with Layer 7
switching.
Port ranges cannot be used with IPv6 services. Some of the other features not supported with port range are: PBSLB, TCS, boolean health
check, scripted health check, track-groups, track-ports, tcp offload, and keepalive
72
Syntax: [no] port-range <port-range-name> Enter the ID of the port range for <port-range-name>. Refer to the rules in Defining a port range on page 72 for additional rules. You can add more than one port range to a real server; however, the ports in the port ranges cannot overlap. For example, if you define PR1 to include ports 8051 to 8100 and define PR2 to include ports 8061 to 8110, then you cannot use these two port ranges under the same real server because ports are overlapping. Also, if a port is included inside a port range and that port range is specified under real server, then the port cannot be specified separately under same real server. All commands available to a single application port are available to the ports in a port range. For example, you can configure keepalive for a port range as you would for a single port.
ServerIronADX(config)# server real rs1 10.0.0.1 ServerIronADX(config-rs-rs1)# port-range pr1 keepalive
Syntax: [no] port-range <port-range-name> Enter the ID of the port range for <port-range-name>. The rules for including port ranges to a real server also apply to a virtual server. (Refer to Using a port range under a real server definition.)
73
Configuring SLB
Syntax: [no] server port-profile port-range <port-range-name> The following commands are available under the port-profile-range configuration level:
When defining a port profile for a port range, note the following:
A separate port profile for an individual port inside a port-range definition is not permitted. All
ports inside a port-range must have the same properties.
In the case of overlapping port ranges that are used under different real servers, a port profile
for only one of the port ranges is allowed. You cannot have conflicting properties for the same port under different port ranges.
Syntax: show port-range [<start-index>] Issuing the show port-range command displays information for all the port ranges configured on the ServerIron ADX. To limit the number of port ranges included in the output, issue the show port-range <start-index> command. Information only for the port ranges starting from the specified start-index is displayed
.
ServerIronADX# show port-range Name Start pr2 8090 pr3 8140 pr98 9800 range4 7001
Pending Start
Using a <start-index> variable begins display at the record specified where the first record has a value of 0. In the following example, the <start-index> value of 2 is used on the same port-range displayed in the previous example.
HA1(config)# show port-range 2 Name Start pr98 9800 range4 7001 End Pending Start 9803 7050 Pending End RefCnt 4
74
To display a list of port ranges with a name that starts with a specified prefix, issue the following command.
ServerIronADX(config)# show port-range starts-with pr
TABLE 5
Field
Name Start End Pending Start Pending End RefCnt
Port aliasing
Many-to-one TCP or UDP port binding
When you associate a VIP with a real server, you make the association for a particular TCP or UDP port. The association of a TCP or UDP port on a VIP with a TCP or UDP port on a real server is called a "port binding". Typical configurations use one VIP-to-real-server binding for a TCP or UDP port. For example, if you bind VIP 192.29.2.2 to real server 10.0.0.1 for port 80 (the well-known HTTP port), generally you do not then create another binding between VIP 192.29.2.2 and real server 10.0.0.1 for the same port. However, if you want to track statistics for individual applications or domain names mapped to the same port, the ServerIron ADX allows you to configure an alias for the port. You configure a separate alias for each additional VIP. For example, if you are associating three VIPs with the same real server, you define two TCP or UDP port aliases, one for each of the additional VIPs. The ServerIron ADX collects and displays statistics and configuration information individually for each VIP, but sends all traffic to the same TCP or UDP port number on the real server. Refer to Many-to-one TCP or UDP port binding on page 75 for an example application using this feature.
75
Configuring SLB
NOTE
This command is backward-compatible with the real-port command. To bind multiple ports to one real server port, follow these steps. 1. Create a real server with two ports.
ServerIronADX(config)# server real rs1 ServerIronADX(config-rs-rs1)# port 81 ServerIronADX(config-rs-rs1)# port 8081 <- alias port
NOTE
5. Bind the alias ports to the real servers on the virtual servers.
ServerIronADX(config-vs-vs1)# bind http rs1 81 rs2 82
7.
Bind the alias ports to the real servers on the virtual servers.
ServerIronADX(config-vs-vs2)# bind http rs1 8081 real-port 81 rs2 8082 real-port 82
NOTE
76
In the following examples, notice that alias port 8081 is defined for binding between the real server and virtual server. The alias port and the real-port work together. To bind one real server port to multiple VIPs (vs1 and vs2), enter commands such as the following
.
server real rs port 8080 port 8081 <---- alias port server virtual-name-or-ip vs1 port http bind http rs 8080 server virtual-name-or-ip vs2 port http port http real-port 8080 <---- use real port 8080 to do port translation bind http rs 8081 <--- bind to alias port
To bind one real server port to multiple virtual ports of one VIP, enter commands such as the following
.
server real rs port 8080 port 8081 <------ alias port server virtual-name-or-ip vs port http bind http rs 8080 port 81 port 81 real-port 8080 <---- use real port 8080 to do port translation bind 81 rs 8081 <---- bind to alias port
Configuration rules
Use the following rules when configuring the ServerIron ADX to bind more than one virtual server to the same real server using the same application port:
You must configure both the real port and the alias port on the real servers. For example, if you
need to create alias port 180 so that you can bind two virtual servers to the same real server and application port (80) on a real server, you must configure port 80 and port 180 on the real server. Otherwise, you will not be able to completely bind all the virtual servers to the real server. In the example below, the following real server configurations are incomplete because neither of the real servers has both the untranslated and alias ports configured.
ServerIronADX(config)# server real-name r1 10.0.1.5 ServerIronADX(config-rs-r1)# port http ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# server real-name r2 10.0.2.200 ServerIronADX(config-rs-r2)# port 180 ServerIronADX(config-rs-r2)# exit
You cannot bind to both the untranslated port and the alias port in the same bind statement. In
the example below, the following bind statement is invalid.
ServerIronADX(config-vs-VIP1)# port http ServerIronADX(config-vs-VIP1)# bind http r1 http r2 180
77
Configuring SLB
When you configure SLB, one of the tasks you perform is to bind the TCP or UDP application ports on the virtual server to their counterparts on the real server. For example, if clients will be sending requests to port 80 (HTTP) on virtual server www.mysite.com, but your real servers expect the HTTP connections to arrive on port 8080 of real server R1, you must bind port 80 on the virtual server to port 8080 on the real server. One of the requirements is that a real server can be bound to only one virtual server using the same TCP or UDP application port. As a result, when you bind a real server port to a virtual server port, you cannot then bind the same real server port to a different virtual server port. Normally, the ServerIron ADX translates the IP address and application port of the virtual server requested by the client into the real server IP address and application port that you bind to the virtual server. However, when you disable port translation, the ServerIron ADX does not perform the translation for the application port. Instead, the ServerIron ADX translates the destination IP address in the clients request to the IP address of a real server, but leaves the application port in the clients request untranslated.
Configuration example
To implement the configuration shown above, enter commands such as the following.
ServerIronADX(config)# server real-name r1 10.0.1.5 ServerIronADX(config-rs-r1)# port http ServerIronADX(config-rs-r1)# port 180 ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# server real-name r2 10.0.2.200 ServerIronADX(config-rs-r2)# port http ServerIronADX(config-rs-r2)# port 180 ServerIronADX(config-rs-r2)# exit ServerIronADX(config)# server virtual-name-or-ip VIP1 209.157.22.88 ServerIronADX(config-vs-VIP1)# port http ServerIronADX(config-vs-VIP1)# bind http r1 http r2 http ServerIronADX(config-vs-VIP1)# exit ServerIronADX(config)# server virtual-name-or-ip VIP2 209.157.22.99 ServerIronADX(config-vs-VIP2)# port http ServerIronADX(config-vs-VIP2)# no port http translate ServerIronADX(config-vs-VIP2)# bind http r1 180 r2 180
The well-known port (80) is used for VIP1, but an alias (180) is used for VIP2. The real servers actually use port 80 for traffic to both virtual IP addresses. However, the alias port enables the ISP to distinguish among the two IP addresses and their traffic when they display SLB information on the ServerIron ADX. The no port http translate command is required. This command enables the ServerIron ADX to send traffic from multiple VIPs to the same real TCP/UDP port on the real server (in this example, http (port 80)). If you leave this command out, the ServerIron ADX does not use port 180 as an alias but instead sends the VIP traffic to TCP/UDP port 180 on the real server rather than 80. Because the untranslated port is logically bound to the translated port and both ports are bound to the same port on the real server, state information for the untranslated port is based on the translated ports state. In this example, state information for port 180 is based on the state for port 80. The state is shown in the Ms (Master port state) field of the display produced by the show server real command. Refer to Displaying real server configuration statistics on page 432.
NOTE
78
You can configure the ServerIron ADX to perform health checks on each VIP independently. Refer to Health check of multiple web sites on the same real server on page 238. To display statistics for the separate real IP addresses, enter the following command at any command prompt.
ServerIronADX(config)# show server real Server State - 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Name: r1 IP: 10.0.1.5 : 1 State: 3 Wt: 1 Max-conn: 1 000000 Src-nat (cfg:op) = 0: 0 Dest-nat-(cfg:op) = 0: 0 Port State Ms CurConn TotConns Rx-pkts Tx-pkts Rx-octet Tx-octet Reas 180 enabled 2 0 0 0 0 0 0 0 http enabled 0 0 0 0 0 0 0 0 Keepalive: Disabled, status code(s) default (200-299, 401) HTTP URL: "HEAD /" defaulunbnd 0 0 0 0 0 0 0 0 Server Total 0 0 : 0 0 1 State: 3 0: 0 Wt: 1 0 0 0
NOTE
IP: 10.0.2.200
Max-conn: 1
0: 0 Dest-nat-(cfg:op) =
Port State Ms CurConn TotConns Rx-pkts Tx-pkts Rx-octet Tx-octet Reas http enabled 2 0 0 0 0 0 0 0 Keepalive: Disabled, status code(s) default (200-299, 401) HTTP URL: "HEAD /" defaulunbnd 0 0 0 0 0 0 0 0 Server Total 0 0 0 0 0 0 0
The lines highlighted in bold indicate the separate HTTP port numbers. The two HTTP lines for real server 1 (r1) indicate that an alias is in use. The first line lists the alias port number, and the second line lists the actual port number used by the real server. Even though the same port number is used on the real server, the ServerIron ADX display distinguishes the traffic for the two virtual IP addresses.
NOTE
The state of the alias HTTP port is always the same as the state of the actual HTTP port used in the packets the ServerIron ADX sends to the real server. The state is shown in the Ms (Master port state) column in the show server real display. Refer toDisplaying real server configuration statistics on page 432.
79
Configuring SLB
Assume a configuration having two VIPs on the same real server with different health checks for each VIP using no port translate. If the real server health check fails for the first VIP (bound to master port), traffic is not sent to the second VIP (bound to alias port). The client will receive a RST. When port use-alias-port-state is enabled, traffic to a VIP on the alias port will be forwarded if the health of the alias port passes. This feature is useful in scenarios where master port health and alias port health are using different URLs for health check.
Syntax: port <tcp/udp port> use-alias-port-state In the next example, if site test1 goes down, the ServerIron ADX would stop forwarding traffic to VIP2 as well. In this scenario, you would enable the port http use-alias-port-state command so that traffic to VIP2 does not stop when site test1 goes down.
ServerIronADX(config)# server real r1 10.10.1.31 ServerIronADX(config-rs-r1)# port http ServerIronADX(config-rs-r1)# port http url "test1.html" ServerIronADX(config-rs-r1)# port 8080 ServerIronADX(config-rs-r1)# port 8080 url "test2.html" ServerIronADX(config-rs-r1)# server virt VIP1 10.10.1.121 ServerIronADX(config-vs-v1)# port http ServerIronADX(config-vs-v1)# bind http r1 http ServerIronADX(config-vs-v1)# server virt VIP2 10.10.1.122 ServerIronADX(config-vs-v2)# port http ServerIronADX(config-vs-v2)# bind http r1 8080 ServerIronADX(config-vs-v2)# no port http translate
80
NOTE
This feature is not supported with IPv6 In the following example, real server rs1 is configured with an HTTP port. Virtual server vip1 is configured with the tos-marking command to set the DSCP bits of all packets sent to servers bound to it with the value 18. The VIP HTTP port is then bound to the real server rs1 HTTP port. All packets sent to the HTTP port of rs1 through vip1 will be marked with a DSCP value of 18.
ServerIronADX(config)# server real rs1 10.10.1.31 ServerIronADX(config-rs-rs1)# port http ServerIronADX(config-rs-rs1)# exit ServerIronADX(config)# server virtual-name-or-ip vip1 10.10.1.151 ServerIronADX(config-vs-vip1)# tos-marking 18 ServerIronADX(config-vs-vip1)# bind http rs1 http
Syntax: tos-marking <DSCP-value> The <DSCP-value> variable specifies the value of the DSCP bits that you want to send to all packets sent to servers bound to the VIP. This feature can be used with Layer-3 DSR servers that are appropriately coded with additional intelligence to interpret DSCP marked packets and send them directly to the clients. When this configuration is used, you can configure the hc-l3-dsr option to send the health check packets back to the VIP on the ServerIron ADX.
ServerIronADX(config)# server virtual-name-or-ip vip1 10.10.1.151 ServerIronADX(config-vs-vip1)# tos-marking 18 hc-l3-dsr ServerIronADX(config-vs-vip1)# bind http rs1 http
Syntax: tos-marking <DSCP-value> hc-l3-dsr The <DSCP-value> variable specifies the value of the DSCP bits that you want to send to all packets sent to servers bound to the VIP. With the hc-l3-dsr option configured the health check reply packets will be sent back to the VIP on the ServerIron ADX. If you have the tos-marking command configured without this option, if a reply packet has the VIP as its Source IP address, health checks will fail and the packet will be dropped. If the hc-l3-dsr option is configured and the reply packet has the real server IP address (or any IP address other than the VIPs IP address) as its Source IP address, health checks will fail.
81
Configuring SLB
Use the no parameter to globally re-enable virtual servers after disabling them. Syntax: [no] server disable-vip To disable an individual virtual server, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip www.foo.com ServerIronADX(config-vs-www.foo.com)# disable
Syntax: [no] port <tcp/udp-port> disable To re-enable a port, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip Zoot_Allures 1.2.3.4 ServerIronADX(config-vs-Zoot_Allures)# no port http disable
To disable all virtual HTTP ports, enter commands such as the following.
82
To disable all real and virtual HTTP ports, enter commands such as the following.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-http)# disable ServerIronADX(config-port-http)#
Deleting a VIP
It is critical that you follow the steps below before deleting a VIP that is in production or is handling live traffic. 1. Disable the real server ports that are associated with this virtual server port.
ServerIronADX(config)# server real rs1 ServerIronADX(config-real-rs1)# port http disable ServerIronADX(config-real-rs1)# exit
Syntax: [no] server real <real-server-name> Syntax: [no] port <port> disable 2. Keep checking the current connection count against the real server until the connection count falls to zero.
ServerIronADX# show server real rs1
Syntax: show server real <real-server-name> 3. If the current connection value does not drop to zero after some time has passed, then unbind the real server port from under the VIP.
ServerIronADX(config)# server virtual vs1 ServerIronADX(config-virtual-vs1)# no bind http rs1 http ServerIronADX(config-real-rs1)# exit
Syntax: no bind <virtual-port> <real-server-name> <real-server-port> 4. Double check to make sure that real server is unbound from the virtual server. Syntax: show server bind If the real server is not unbound properly, then check the connection count under the BP console and try clearing the server sessions.
ServerIronADX# rconsole 1 1 ServerIronADX1/1# show server real rs1 ServerIronADX1/1#rconsole-exit ServerIronADX# rconsole 1 2 ServerIronADX1/2# show server real rs1 ServerIronADX1/1#rconsole-exit ServerIronADX# rconsole 1 3 ServerIronADX1/3# show server real rs1 ServerIronADX1/1# rconsole-exit
83
Configuring SLB
Syntax: rconsole-exit If there are existing connections or the port is still in AWU or AWM state, then clear the server sessions using following command. Syntax: clear server all-session <real-server-name> <real-port> 5. After the connection count drops to zero or the unbinding is successful, delete the VIP.
ServerIronADX(config)# no server virtual vs1
Syntax: no server virtual <virtual-server-name> 6. If real servers are not required, then delete those also.
ServerIronADX(config)# no server real rs1
Syntax: no server real <real-server-name> If any current connection or current session cannot be disabled and the port is in "AWU" or "AWM", then issue a clear server all-session command.
Enabling force-delete
SLB and TCS allow the graceful shutdown of servers and services. By default, when a service is disabled or deleted, the ServerIron ADX does not send new connections to the real servers for that service. However, the ServerIron ADX does allow existing connections to complete normally, however long that takes. You can force the existing SLB connections to be terminated within two minutes, by using the server force-delete command. If you disable or delete a service, do not enter an additional command to reverse the command you used to disable or delete the service, while the server is in graceful shutdown. Refer to Real server shutdown on page 85 for important information about shutting down services or servers. Suppose you have unbound the Telnet service on real server 15, but you do not want to wait until the service comes down naturally. You can force server load-balancing connections to be terminated by entering the following command.
ServerIronADX(config)# server force-delete
NOTE
Syntax: server force-delete To display active sessions for a specific server, enter show server real server <number> and a display as seen below will appear. Notice that the display below shows the Telnet connection on server 15 as awaiting unbinding. Without server force-delete, this feature will stay in this state until the session ends naturally. Because the binding is awaiting deletion, it will also still be seen as an active binding, if you enter the show server bind command, such as the following.
ServerIronADX(config-vs-building)# show server bind Virtual Server Name: building, IP: 207.95.5.130 http -------> s21: 207.95.18.21, http s15: 207.95.18.15, http s50: 207.95.18.50, http ftp -------> s50: 207.95.18.50, ftp
84
After force delete is enabled, the unbinding will occur within two minutes and the show session real server s15 command will show the connection as unbound.
.
ServerIronADX(config)# show session real s15 Real Servers Info Server State - 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Name: s15 IP: 207.95.18.15 State: 6 Wt: 1 Max-conn: 1000000 Port State CurConn TotConns Rx-pkts Tx-pkts Rx-octet Tx-octet Reas http active 0 1711509 0 1206 0 82402 0 ftp active 0 0 0 0 0 0 0 telnet unbnd 0 2 406 385 24700 23112 0 default unbnd 0 0 0 0 0 0 0 Server Total 0 1711511 406 1591 24700 105514 0
NOTE
The binding for the real server will also be eliminated from the show server bind display.
Edit the real server configuration on the ServerIron ADX to disable the TCP/UDP ports on the
server. For example, to disable port 80 (HTTP), you can use the port http disable command at the real server level of the CLI. If you use this method, you do not need to re-define the real server to add the server back to SLB. However, you do need to re-enable the disabled TCP/UDP ports.
Delete the real server from the ServerIron ADX. This option immediately prevents new
connections. To safely delete the real server from the ServerIron, we recommend the following procedure. 1. Under the real server, disable the application ports. 2. Check to ensure the current connections and session comes down to zero (in show server real output). 3. Under VIP, unbind the real server. 4. Delete the real server. The ServerIron ADX allows existing connections to end normally or, if you have enabled the force shutdown option, the ServerIron ADX ends all connections within two minutes. If you use this method and later want to re-add the real server to the ServerIron ADX, you must redefine the real server, then rebind the real server to the appropriate VIP.
85
Configuring SLB
Shut down the real server itself, rather than change definitions on the ServerIron ADX. When
the real server stops responding to health checks, the ServerIron ADX removes the server from the SLB. This option is simple because it does not require any configuration changes on the ServerIron ADX. However, this option immediately disconnects all users, whereas the above options allow the server or service to gracefully shut down (unless you use the force shutdown option).
TABLE 6
Action
With Force-Delete
Sessions deleted within 2 minutes. Sessions deleted within 2 minutes. Sessions deleted within 2 minutes. Sessions deleted within 2 minutes.
Behavior with flapping ports If a port keeps flapping within the configured port holddown timeout period, the port is held down until the port stops flapping for the configured timeout. In practice this means that the port must be available for a time interval greater than the configured timeout period for it to come back up. If a port that was disabled when the holddown timer is started is enabled within the timeout period, the port is held down until the timeout period has passed. The port hold down timer can be configured globally, per real server port and per port-profile.
NOTE
86
Changing the default port holddown timer value The default holddown timeout is 2 minutes. The following command allows you to configure this global timeout value or reset the timeout to the default.
ServerIronADX(config)# server port-holddown-timeout 240
Syntax: [no] server port-holddown-timeout <timeout-value> The <timeout-value> variable specifies the length of the port holddown timer in seconds. Acceptable values are 1 second to 86400 seconds (1 day). The default value is 120 seconds (2 minutes). The value set by this command applies to all port holddown configurations. Enabling the port holddown timer globally You can configure the port holddown timer globally to enable port hold down for all ports on all real servers. This setting overrides any configurations for individual ports.
ServerIronADX(config)# server port-holddown
Syntax: [no] server port-holddown Enabling the port hold down timer for an individual real server port You can configure the port hold down timer to enable port holddown for an individual port within a real server configuration.
ServerIronADX(config)# server real rs1 ServerIronADX(config-real-rs1)# port http holddown
Syntax: [no] port <port-type> holddown The variable <port-type> specifies the port that you want to apply the holddown timer to. Enabling the port holddown timer for a port profile You can configure the port hold down timer to enable port holddown for all ports within a server port profile.
ServerIronADX(config)# server port http ServerIronADX(config-port-http)# holddown
Syntax: [no] holddown Displaying port holddown The show server real and show server real detail commands provide information about the current state and duration of port holddown. In the following example, the show server real command displays the state of the http port as HLD.
87
Configuring SLB
ServerIronADX(config)# show server real rs1 Real Servers Info ======================== State(St) - ACT:active, ENB:enabled, FAL:failed, TST:test, DIS:disabled, UNK:unknown, UNB:unbind, AWU:await-unbind, AWD:await-delete, HLD:held-down Name: rs1 State: Active Cost: 0 IP:192.168.3.1: 1 Mac: 000c.29b6.64de Weight: 1/1 MaxConn: 2000000 SrcNAT: cfg, op DstNAT: not-cfg, not-op Serv-Rsts: 0 tcp conn rate:udp conn rate = 0:0, max tcp conn rate:max udp conn rate = 0:0 BP max local conn configured No: 0 0 0 0 0 0 BP max conn percentage configured No: 0 0 0 0 0 0 Use local conn : No SIP current TCP connections = 0 Port ---default http St -UNB HLD Ms -0 0 CurConn ------0 0 TotConn ------0 0 Rx-pkts ------0 0 Tx-pkts ------0 0 Rx-octet -------0 0 Tx-octet -------0 0 Reas ---0 0
The time remaining for the holddown state is displayed by the show server real detail command as shown in the following.
ServerIronADX(config)# show server real rs1 det http HLD 0 0 0 0 0 0 0 0 max_conn = 10 fail time = 0, Vir IP 192.168.1.2 tcp conn rate:udp conn rate = 0:0, max tcp conn rate:max udp conn rate = 0:0 SIP TCP Current Connections = 0 BP max local conn configured No: 0 0 0 0 0 0 BP max conn percentage configured No: 0 0 0 0 0 0 Use local conn : No resp_time = 7 Keepalive(G/L:Off/On):On Status Code(s): default (200-299, 401) HTTP URL: "HEAD /" tcp-age: 30 Hold-down time remaining: 25 second(s) dns ACT 0 0 39 39 45 10151 3972 0
88
Using the sticky feature, the current maximum persistence possible for Stateful SLB is 20 hours. This setting may not be sufficient for systems that always need the client to be directed to the same real server, unless an event such as real server failure necessitates reassignment of the client to a different server.
clear-on-change Whenever a new server comes up, the entire persistent hash table is
cleared and assignments are started afresh. For more information, refer to Enabling the clear-on-change mechanism on page 90.
reassign-on-change The default. Whenever a new server comes up, the ServerIron ADX
calculates the number of hash entries allocated to each existing server. The ServerIron ADX then reassigns some of these entries to the new server. For more information, refer to Enabling the reassign-on-change mechanism on page 91.
The reassign-on-change function is selected by default. Syntax: [no] port <port> persist-hash [clear-on-change | reassign-on-change] When persistent hashing is configured for a VIP, the round robin predictor for the VIP is automatically enabled. This default is used to evenly distribute hash assignments. After you enter the port <port> persist-hash command, the predictor round-robin command automatically appears under the virtual server in the configuration file.
89
Configuring SLB
SSL is a special case where sticky automatically gets turned on. If persistent hashing must be configured for port SSL, you need to explicitly turn off sticky on the SSL port using the no port ssl sticky command and then enable persistent hashing for this port.
NOTE
When the clear-on-change command is set for persistent hashing, the entire persistent hash table is cleared whenever a new server comes up. For example, is shown in the following figure. Figure 13 shows the persistent hash table for a virtual server port before the rs3 comes up.
FIGURE 13
Assume the administrator now binds port HTTP of a new real server rs3 to port HTTP of virtual server vs1. When real server rs3 comes up, the entire persistent hash table is cleared. Figure 14 shows the persistent hash table for a virtual server port after the rs3 comes up.
90
FIGURE 14
When reassign-on-change is enabled (the default), the ServerIron ADX reassigns some of the existing hash table entries on the introduction of a new server.
Reassign threshold When the number of empty hash entries (buckets) in the persistent hash
table falls to or below this threshold (less than or equal to), the ServerIron ADX reassigns some of the persistent hash entries on introduction of a new real server. By default, the ServerIron ADX reassigns persistent hash entries to the new real server only if there are no empty persistent hash entries (for example, the default persist hash reassign threshold is 0 percent). To specify the threshold, enter a command such as the following.
ServerIronADX(config)# server persist-hash-threshold 5
Syntax: [no] server persist-hash-threshold <percent-value> The <percent-value> can be any value from 0 through 99. With the reassign mechanism, if multiple servers come up simultaneously and need reassignment because the number of empty hash table entries is below the reassign threshold, then the ServerIron ADX will clear the persistent hashing table.
Reassign duration If the number of empty persistent hash entries is below the reassign
threshold, the ServerIron ADX reassigns some of the persistent hash entries over a period of time to the new real server. This duration of time is known as the persist hash reassign duration. To specify the reassign duration, enter a command such as the following.
ServerIronADX(config)#server persist-hash-reassign-duration 5
This global command is applied to all configured VIP ports that are persist-hash enabled. The ServerIron ADX will complete the reassignment within 2 minutes by default. Syntax: [no] server persist-hash-reassign-duration <value>
91
Configuring SLB
The system has finished reassigning X persistent hash entries to the new real server (occurs in
the amount of time specified by the persist-hash-reassign-duration)
The number of persistent hash entries assigned to the new real server is equal to the lowest
number of persistent hash entries assigned to any of the existing real servers, whichever happens earlier. Consider the following reassignment example. Figure 15 shows the hash table before reassignment.
FIGURE 15
port http Hash 0 Hash 1 .............. Hash 47 Hash 48 Hash 49 Hash 50 Hash 51 Hash 52 Hash 53 Hash 54 Hash 55 Hash 56 .............. Hash 255
none none
rs1 rs1 rs1 rs1 rs1 rs1 rs1 rs1 rs2 rs2 none
92
Persistent hash entries have been assigned as follows. Entries 47 to 54 have been assigned to real server rs1. Entries 55 and 56 have been assigned to rs2. All other entries are empty (no real server has been assigned to them). In this example, the administrator configures a reassign-threshold of 99 percent. That is, whenever the number of empty hash entries falls below 99 percent, the ServerIron ADX will reassign the persistent hash table entries whenever a new real server comes up. The reassign-duration is the default value (2 minutes). Next, the administrator binds port HTTP of a new real server rs3 to port HTTP of virtual server vs1. When real server rs3 comes up, the ServerIron ADX calculates the number of active real server ports. In this example, the number is 3 (rs1, rs2 and rs3). The system then calculates the number of empty hash table entries. In this example, the number is 246. Because less than 99 percent of the hash table entries are empty, the ServerIron ADX now attempts to reassign some of the persistent hash entries to the new real server rs3. The ServerIron ADX then calculates entries per server X as follows. X = total assigned hash table entries/number of active real servers = 10/3 = 3 The ServerIron ADX now attempts to reassign 3 persistent hash entries to the new real server over 2 minutes. The system will stop after it has reassigned 2 entries of real server rs1 to new real server rs3. The reason is that when rs3 is assigned 2 persistent hash entries, the value is equal to the number of entries assigned to existing real server rs2. Figure 16 shows the persistent hash table after the reassignment.
FIGURE 16
port http Hash 0 Hash 1 .............. Hash 47 Hash 48 Hash 49 Hash 50 Hash 51 Hash 52 Hash 53 Hash 54 Hash 55 Hash 56 .............. Hash 255
none none
rs3 rs3 rs1 rs1 rs1 rs1 rs1 rs1 rs2 rs2 none
93
Configuring SLB
If this command is configured and multiple servers need reassignment simultaneously, then the ServerIron ADX will leave the persistent hash table unchanged. Syntax: port <port> no-auto-clear-persist-hash-buckets
FIGURE 17
Hash 255
none
Real server rs1 has been assigned to persistent hash table entries corresponding to hash value 0 and hash value 2. Real server rs2 has been assigned to the entry corresponding to hash value 1. Now assume all other hash table entries have not been assigned to any real servers. If port HTTP of real server rs1 fails, then the ServerIron ADX will clear assignment of rs1 to the persistent hash entries in the above table. Figure 18 shows the persistent hash table for vs1 for port HTTP after server failure.
FIGURE 18
none
rs2
none none
Hash 255
The ServerIron ADX does not immediately assign a new server to the cleared hash table entries. Instead, the ServerIron ADX will select and assign a real server for these entries using the SLB predictor the next time a client hashes to these hash table entries. In the previous example, assume a client now makes an HTTP request for virtual server vs1. Assume also the clients IP address hashes to a value of 2. The ServerIron ADX checks the hash table entry corresponding to hash value 2 in the above persistent hash table. Because no real server is associated with the hash entry, the ServerIron ADX selects a new real server, such as rs2, using the SLB predictor and then assigns the server to the hash table entry. This and subsequent requests from the client will then be serviced by rs2. Figure 19 shows the new real server rs2 to service request to the client.
94
FIGURE 19
none
rs2 rs2
Hash 255
none
Hit
Hit
Syntax: show server persist-hash-buckets <virtual-server-name> If you do not specify a virtual server name, all the persistent hash tables for all virtual server ports for all virtual servers will be displayed. Table 7 displays the output field description of show server persist-hash-buckets command.
TABLE 7
Field
Virtual server Port Bucket Server Hit
95
Configuring SLB
Syntax: show server manual-persist-assign-hash <client-ip> <virtual-server-name> <virtual-port> <real-server-name> <real-port> To verify the assignment, enter the following command.
ServerIronADX# show server persist-hash Virtual port Persist Hash Buckets: Virtual Server <http-vs> Port <80>: Bucket: Server Hit Bucket: Server 36: http-rs1 0
Hit
Syntax: show server persist-hash If a real server is manually assigned to a hash entry, the hit count will not be incremented for the assignment. Additionally, if you manually assign a real server for a hash table entry for which another real server is currently assigned, the new real server will replace the old real server for the hash entry as follows.
ServerIronADX# show server manual-persist-assign-hash 1.1.1.33 http-vs 80 http-rs2 80 Hash bucket for Client IP 1.1.1.33 = 36 Replacing current server http-rs1 allocated for hash 36 with server http-rs2 Server http-rs2 allocation to bucket 36 of specified virtual server for port 80 completed!
96
Configuration example:
ServerIronADX(config)# server virtual-name-or-ip vip1 10.10.1.100 ServerIronADX(config-vs-vip1)# port http ServerIronADX(config-vs-vip1)# port http spoofing
Syntax: [no] port <port> spoofing SLB spoofing is supported for all TCP traffic except for complex protocol ports (for example FTP, MMS, RTSP and TFTP). SLB spoofing is supported for UDP (from 12.3.00 release) with the following limitations.
UDP spoofing will not work if GSLB is configured UDP spoofing will not work if dns-udp-count-connection is configured. It is not supported for IMCP response traffic originated from the VIP.
Policy-based SLB
Policy-Based Server Load Balancing (PBSLB) is the ServerIron ADXs ability to direct requests to a server group based on the source IP address (IPv4 or IPv6)of the request. When policy-based SLB is enabled for a port on a virtual server, the ServerIron ADX examines the source IP address of each new connection sent to the VIP on the port. The ServerIron ADX looks up the source IP address of the request in an internal policy list. The policy list is a table that associates IP addresses with real server groups. If an entry for the IP address is found in the policy list, then the ServerIron ADX forwards the request to the associated real server group. If no entry for the IP address is found, the ServerIron ADX directs the request to a server group specified as the "default" server group. Figure 20 shows a sample policy-based SLB configuration.
97
Configuring SLB
FIGURE 20
Real Server HTTP requests from 400::1 address 10.10.10.10 are sent here. Real Server rs7 400::2
Internet
HTTP requests made to www.mysite.com Server Group ID=2
SI
SLB Policy: 10.10.10.1 -> Group 1 20.20.0.0/16 -> Group 2 Default -> Group 3 300::/64 -> Group 4
All other HTTP requests made to the VIP are sent here.
Real Server rs6 400::1 HTTP requests from network 300::/64 are sent here. Real Server rs7 400::2
The policy list contains three entries: one associating IP address 10.10.10.1 with real server group 1, another associating network address 20.20.0.0/16 with real server group 2 and a third. associating network address 300::/64 with real server group 4. In addition, real server group 3 is specified as the default server group. In this example, policy-based SLB works as follows:
When a request from address 10.10.10.1 is received on the VIP, the ServerIron ADX forwards
the request to one of the load-balanced servers in real server group 1.
When a request from network 20.20.0.0/16 is received, it is forwarded to the real server in
group 2.
When a request from network 300::/64 is received, it is forwarded to the real server in group 4. When a request from a different address is received, because it does not have an entry in the
policy list, it is forwarded to one of the load-balanced real servers in the default server group, which is specified as group 3. Requests for an IPv4 address are sent to the rs4 and requests for an IPv6 address are sent to rs5.
NOTES:
98
Because policy-based SLB is enabled on a per-VIP basis, some VIPs configured on the
ServerIron ADX can have policy-based SLB enabled, while others do not.
Policy-based SLB can coexist with other ServerIron ADX features, including FWLB, NAT,
and TCS.
Policy-based SLB cannot coexist on the same VIP with Layer 7 switching features,
including URL switching and cookie switching.
If the number of policies is small, you can create the policy list file using the CLI. Refer to
Creating the policy list using the CLI.
If the number of policies is large, you can download the policy list file from a TFTP server or a
USB flash. Refer to Creating the policy list file to dynamically download from a TFTP server or USB flash Creating the policy list using the CLI The following command can be used to add policies. For IPv4
ServerIronADX(config)# server pbslb add 10.10.10.1 1
Syntax: server pbslb add <ipv4-addr> {<prefix> |<netmask> [<server-group-id>] The <ip-addr> variable can be a complete host address, or a network address followed by IPv4 mask bits. You must specify either a <prefix> or a <netmask>. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. For the example shown in Policy-based SLB configuration on page 98, the policies can be added as shown in the following.
ServerIronADX(config)# server pbslb add 10.10.10.1 1 ServerIronADX(config)# server pbslb add 20.20.0.0/16 2
For IPv6
ServerIronADX(config)# server pbslb add 300::/64 4
Syntax: server pbslb add <ipv6-addr> <prefix> [<server-group-id>] The <ipv6-addr> variable can be a complete host address, or a network address followed by IPv6 mask bits specified by the <prefix> variable. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. For the example shown in Policy-based SLB configuration on page 98, the policies can be added as shown in the following.
ServerIronADX(config)# server pbslb add 300::/64
99
Configuring SLB
Creating the policy list file to dynamically download from a TFTP server or USB flash To dynamically download a policy list file from a TFTP server or USB flash, it must be a flat ASCII text file that consists of one or more policy-based SLB entries configured in the following format. <ip-addr> [<network-mask>] [<server-group-id>] The <ip-addr> variable can be a complete host address, or a network address followed by IP mask bits. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. For the example shown in Policy-based SLB configuration on page 98, the policies would be defined as shown in the following.
10.10.10.1 1 20.20.0.0/16 2 300::/64 4
The policy list file created in the format defined above can be transferred to the ServerIron ADX from either a TFTP server or through a USB flash drive. A single download file should contain all IPv4 and IPv6 entries. These entries can be in any order. Downloading a new file overwrites the existing policy list file on a ServerIron ADX. Consequently any entries that are not in the most recent download will be lost. Dynamically downloading a policy list using TFTP When a policy list is created, as described in Creating the policy list file to dynamically download from a TFTP server or USB flash, the following command can be used to download the file from a TFTP server.
ServerIronADX(config)# server pbslb tftp 192.168.9.210 policy-list.txt 5
NOTE
When you enter this command, the downloaded policy list file immediately replaces the entries in the ServerIron ADXs policy-based SLB configuration. Syntax: server pbslb tftp <tftp-server-ip-addr> <filename> <retry-count> The <tftp-server-ip-addr> variable specifies the IP address of the TFTP server. The <filename> variable specifies the name of the policy list file. The <retry-count> variable specifies the number of times that the ServerIron ADX retries the download if the first attempt is not successful. Dynamically downloading a policy list using an external USB flash drive The following command can be used to download the policy list file from an external USB flash drive.
ServerIronADX(config)# server pbslb /usb1/policy-list.txt 5
The filename must begin with /usb1/ when downloading from and external USB flash drive. When you enter this command, the downloaded policy list file immediately replaces the entries in the ServerIron ADXs policy-based SLB configuration. Syntax: server pbslb <usb-filename>
NOTE
100
The <usb-filename> variable specifies the name of the policy list file. It must begin with /usb1/. Downloading a policy list using the internal USB flash drive To be able to download a policy list file form the internal USB drive, you must first download the file from the external USB drive to the internal USB using the following command.
ServerIronADX# copy usb1 usb0 policy-list.txt policy-list.txt
Syntax: copy usb1 usb0 <source-filename> <destination-filename> The <source-filename> variable specifies the name of the file that is being copied from the external USB flash drive to the internal USB flash drive. The <destination-filename> variable specifies the name of the file once it is copied to the internal USB flash drive. After using the copy usb1 usb0 command to copy the file to the internal USB flash drive, you can use the following command to download the policy list from the internal USB flash drive.
ServerIronADX(config)# server pbslb /usb0/policy-list.txt
When you enter this command, the downloaded policy list file immediately replaces the entries in the ServerIron ADXs policy-based SLB configuration. Syntax: server pbslb <usb-filename> The <usb-filename> variable specifies the name of the policy list file. It must begin with /usb0/. Redirecting traffic to the default group during download The ServerIron ADX supports seamless download (or no blocking of VIP traffic while a policy list is being downloaded) only when the number of PBSLB entries do not exceed the following: for IPv4 1,000,000entries, for IPv6 256,000 entries. A ServerIron ADX maintains two separate tables in memory: one for the existing list and one for the new list that is being downloaded. After the new list is completely downloaded, it is swapped with the existing list. This method allows for the new policy list to take effect immediately without affecting the VIP traffic during the download. This redirect method only applies when the maximum number of PBSLB entries has not been increased to over 1,000,000 for IPv4 or 256,000 for IPv4 through use of the server pbslb max-entries command. For policy list files that contain more than 1,000,000 entries, all VIP traffic will be blocked during the download and will resume only after the policy list file is completely downloaded. To be able to send VIP traffic to the default server group instead of blocking it during download, enable the server pbslb send-to-default-group-during-download feature. There are three steps to turn on this feature. 1. Create a PBSLB default group-ID. 2. Assign real server ports to the default group. 3. Enable send-to-default-group-during-download. Creating a PBSLB default group To create a PBSLB default group, enter a command such as the following. For IPv4
ServerIronADX(config)# server pbslb default-group-id ipv4 4
NOTE
101
Configuring SLB
For IPv6
ServerIronADX(config)# server pbslb default-group-id ipv6 2
Syntax: [no] server pbslb default-group-id { ipv4 | ipv6 } <group-id> Assigning real server ports to default group A default group can contain one or more real servers. If there is more than one real server in a default group, requests are load balanced across all the servers in the group. To assign real servers to the default group, enter commands such as the following.
ServerIronADX(config)# server real-name rs1 207.95.7.14 ServerIronADX(config-rs-rs1)# port http group-id 4 4 ServerIronADX(config-rs-rs1)# exit
Enabling pbslb send-to-default-group-during-download To enable send-to-default-group-during-download, enter a command such as the following.
ServerIronADX(config)#server pbslb send-to-default-group-during-download
Syntax: [no] server pbslb send-to-default-group-during-download You configure this command only if you have increased the maximum number of PBSLB entries over the default number.
NOTE
To specify 50,000 as the maximum number of IPv6 entries for policy-based SLB, enter the following command.
ServerIronADX(config)# server pbslb max-entries ipv6 50000
Syntax: server pbslb max-entries { ipv4 | ipv6 } <max-number> The <max-number> variable specifies the maximum number of PBSLB entries you want to configure. The maximum number of IPv4 entries that ServerIron ADX supports is 10,000,000. The maximum number of IPv6 PBSLB entries that ServerIron ADX supports is 1,000,000. After you enter this command and save the configuration, you must reload the software for the new maximum limit to take effect.
102
Syntax: server pbslb delete <ipv4-addr> { <netmask> | <prefix> [<server-group-id>] The <ipv4-addr> variable specifies the IPv4 entry that you want to delete from the policy list. You must specify either a <prefix> or a <netmask>. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. For IPv6
ServerIronADX(config)# server pbslb delete 3000::1/128
Syntax: server pbslb delete <ipv6-addr> <prefix>. [<server-group-id>] The <ipv6-addr> variable specifies the IPv6 entry that you want to delete from the policy list. You must specify a <prefix>. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX.
NOTE
This command will delete all the entries in the PBSLB list. You can enter the show pbslb all 0 command to first display the contents of the list before deleting the entire list.
ServerIronADX(config)# server pbslb delete all ipv6 The whole IPv6 table of PBSLB has been deleted.
Syntax: server pbslb delete all {ipv6 | ipv4} The ipv4 parameter directs the ServerIron ADX to delete the entire IPv4 PBSLB list. The ipv6 parameter directs the ServerIron ADX to delete the entire IPv6 PBSLB list.
Syntax: copy pbslb-running-config tftp <tftp-server-ip-addr> <filename> The <tftp-server-ip-addr> variable is the IP address of the TFTP server. The <filename> is the name the policy list file will be saved as.
103
Configuring SLB
The next time the ServerIron ADX is booted, the policy list will appear in the running-config. Syntax: server pbslb enable-config-gen
NOTE
The ServerIron ADX is unable to copy a policy list with more than 1,000 entries to Flash.
Syntax: server pbslb default-group-id { ipv4 | ipv6 } <group-id> The ipv4 parameter directs the ServerIron ADX to direct the request to an IPv4 server group. The ipv6 parameter directs the ServerIron ADX to direct the request to an IPv6 server group. The <server-group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX.
Syntax: [no] server real <real-server-name> <ip-addr> Syntax: [no] port <port> group-id <server-group-id-pairs> In this example, the server real command defines a real server called rs1 with an IP address of 207.95.7.1.
104
The port http group-id command indicates the server groups to which the real server belongs. The server group is expressed as a pair of numbers, indicating a range of real server group IDs. The first number is the lowest-numbered server group ID, and the second is the highest-numbered server group ID. For example, if a real server belongs only to the server group with ID = 1, the last two numbers in the port http group-id command would be 1 1. (Note the space between the two numbers.) If a real server belongs to server groups 1 through 10, the last two numbers in the command would be 1 10. Valid numbers for server group IDs are from 0 through 1023. To include a real server in groups that are not consecutively numbered, you can enter up to four server group ID pairs. For example, to include a real server in groups 1 5 and 11 15, you would enter the following command.
ServerIronADX(config-rs-rs1)# port http group-id 1 5 11 15
You can also specify the server group ID pairs on separate lines; for example.
ServerIronADX(config-rs-rs1)# port http group-id 1 5 ServerIronADX(config-rs-rs1)# port http group-id 11 15
The configuration for the remaining real servers in Figure 20 on page 98 is shown below. These commands place real server rs2 in server group ID = 1 (along with real server rs1), real server rs3 in server group ID = 2, and real servers rs4 and rs5 in server group ID = 3.
ServerIronADX(config)# server ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config)# server ServerIronADX(config-rs-rs3)# ServerIronADX(config-rs-rs3)# ServerIronADX(config)# server ServerIronADX(config-rs-rs4)# ServerIronADX(config-rs-rs4)# ServerIronADX(config)# server ServerIronADX(config-rs-rs5)# ServerIronADX(config-rs-rs5)# ServerIronADX(config)# server ServerIronADX(config-rs-rs5)# ServerIronADX(config-rs-rs5)# ServerIronADX(config)# server ServerIronADX(config-rs-rs5)# ServerIronADX(config-rs-rs5)# real port exit real port exit real port exit real port exit real port exit real port exit rs2 207.95.7.2 http group-id 1 1 rs3 207.95.7.3 http group-id 2 2 rs4 207.95.7.4 http group-id 3 3 rs5 2001:db8::1 http group-id 3 3 rs6 400::1 http group-id 4 4 rs7 400::2 http group-id 4 4
105
Configuring SLB
Syntax: [no] server pbslb scan-session-table-after-config-change Use the no form of the command to disable this feature. The feature is disabled by default.
If the group-id is not 0, if the servers are healthy, and the max-conn limit is not reached, traffic
is load balanced among servers as per predictor.
If all servers of the group are in a failed state or the max-conn limit is reached, traffic is load
balanced among "failsafe" group servers.
If all of the servers of the "failsafe" group are in a failed state or the max-conn limit is reached,
traffic is denied (RST in case of TCP and drop in case of UDP). For IP addresses not present in the PBSLB list:
If the default-group-id is not configured or is configured as 0 (deny group), traffic is denied. If the default-group-id is configured, traffic is load balanced among default-group servers as
per predictor.
If all of the servers of the default-group are in a failed state or the max-conn limit is reached on
all servers, the traffic is load balanced among "failsafe" group servers.
If all of the servers of the failsafe group are in a failed state or the max-conn limit is reached,
the traffic is denied. Command line interface There are three steps to enable this feature.
106
1. Create a PBSLB failsafe group ID. 2. Assign real server ports to a failsafe group 3. Enable PBSLB on a VIP port Creating a PBSLB failsafe group To create a PBSLB failsafe group, enter a command such as the following.
ServerIronADX(config)# server pbslb failsafe-group-id ipv4 2
Syntax: [no] server pbslb failsafe-group-id { ipv4 | ipv6 } <group-id> The ipv4 parameter directs the ServerIron ADX to create an IPv4 failsafe group. The ipv6 parameter directs the ServerIron ADX to create an IPv6 failsafe group. The <group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. Assigning real server ports to a failsafe group A failsafe group can contain one or more real servers. If there is more than one real server in a failsafe group, requests are load balanced across all the servers in the group. To assign real servers to the failsafe group, enter commands such as the following.
ServerIronADX(config)# server real-name rs1 207.95.7.1 ServerIronADX(config-rs-rs1)# port http group-id 2 2 ServerIronADX(config-rs-rs1)# exit
Enabling PBSLB on a VIP port To enable PBSLB on a VIP port, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip mysite 209.157.22.63 ServerIronADX(config-vs-mysite)# port http ServerIronADX(config-vs-mysite)# port http sw-l4-pbslb ServerIronADX(config-vs-mysite)# bind http rs1 http
Using show commands To view the number of requests forwarded to the failsafe server group, enter the following command.
ServerIronADX# show pblsb failsafe ipv4
Syntax: show pbslb failsafe { ipv4 | ipv6} To clear the PBSLB failsafe counter, enter the following command.
ServerIronADX# clear pbslb failsafe
107
Configuring SLB
The server pbslb tftp command must be configured before the server pbslb time-of-day or server pbslb download-interval command, so the ServerIron ADX knows which server and file name to use in the download.
NOTE
The PBSLB time-of-day granularity is in minutes, so seconds are ignored in the configuration. For example, if you enter time as 16:35:30, it is taken as 16:35:00. Configuring PBSLB download interval To configure the ServerIron ADX to download a PBSLB list at a periodic interval, use commands similar to the following.
ServerIronADX(config)# server pbslb tftp 10.10.1.101 iplist.txt 2 ServerIronADX(config)# server pbslb download-interval 20
NOTE
Syntax: server pbslb download-interval <interval-in-minutes> In this example, the ServerIron downloads the list in iplist.txt from server 10.10.1.101 once every 20 minutes. If it encounters an error, it retries two times. Configuring PBSLB time of day To configure the ServerIron to download a PBSLB list at a specified time, use commands similar to the following. The SNTP clock must be set for this command to work.
ServerIronADX(config)# server pbslb tftp 10.10.1.101 iplist.txt 2 ServerIronADX(config)# server pbslb time-of-day 15:30:00 16:00:00
NOTE
Syntax: server pbslb time-of-day <time in hh:mm:ss> In this example, the ServerIron ADX downloads the PBSLB list at 3:30 pm and 4:00 pm every day until the command is reset. You can configure a maximum of five time-of-day parameters.
108
Syntax: show pbslb <ip-address> The <ip-address> variable specifies the IPv4 or IPv6 address of the entry in the currently loaded policy list that you want to display. The show pbslb command displays the entry in the policy list that corresponds to the specified IP address. If no entry is found for the specified IP address, no output is displayed. To display multiple entries in the policy list, enter a command such as the following.
ServerIronADX# show pbslb all ipv6 10 Max Count: 1000000 Total Count: 2 IP address Mask Server Group ID 300::1 128 11 300::2 128 12
Syntax: show pbslb all {ipv4 | IPv6} <index> The show pbslb all command displays 20 entries in the policy list, starting from the point specified with the <index> parameter. In the example, 20 entries in the policy list are displayed, starting from the 100th entry. The ipv4 parameter directs the ServerIron ADX to display IPv4 entries. The ipv6 parameter directs the ServerIron ADX to display IPv6 entries.
Syntax: show pbslb group <group-id> ipv6 <index> The <group-id> variable is alphanumeric and refers to one of the real server groups configured on the ServerIron ADX. The show pbslb group command displays entries in the policy list, starting from the point specified with the <index> parameter.
109
Configuring SLB
Packet trace
When a policy list file is downloaded to the ServerIron ADX, messages to indicate download progress are printed on the console. By default, when a policy list file is downloaded through a Telnet or SSH session to the ServerIron ADX, these messages do not appear on the Telnet or SSH session. To monitor the download progress, you need to enable packet trace using the following command.
ServerIronADX# ptrace term debug output is now sent to this terminal
TABLE 8
Message
BP sync msg BP Sync fail
Error messages
Description
The number of messages that it took for the MP to synch the downloaded PBSLB table to the BP (The download itself is staggered, so it is done in multiple passes). The number of messages (mentioned above) that failed successful transmission. In the event of a failure, the message is sent again. If BP sync fails, the MP will try to push down the PBSLB table to the BPs again after 100 ms. This process continues until the BP synch is completely successful. On the BP, the PBSLB tree is not populated until the download is totally successful. The number of times the ServerIron ADX was unsuccessful in allocating memory for the PBSLB table. The device tries to allocate the entire table at once, so if there is an error, this counter can only show a value of 1. The number of times the ServerIron ADX could not add a new PBSLB entry to the table because the PBSLB is already full. This value should indicate the number by which the downloaded pbslb table size exceeds the value that the ServerIron ADX supports. When the PBSLB list is downloaded, it is first populated into a flat table that does not have any hierarchy. After populating this table, the MP will construct the DP table to actually store the PBSLB entries for later lookups. Even when the MP synchs the PBSLB info to the BPs, it is the flat table that is pushed down and not the DP table. Full error refers to those error cases where new entries cannot be added to the DP table because the tree is already full. Table full error refers to those error cases where no more entries can be added to the flat table because the flat table is filled up. Is used to catch miscellaneous unexpected errors. For example, if the download buffer of the PBSLB table from MP to BP is corrupted. Another example is when we try to add an entry to the tree and the entry cannot be added due to an unexpected error.
Alloc err
Full err
Unknown err
110
Miscellaneous options
Changing a real servers IP address
The ServerIron ADX enables you to easily change a real servers IP address, even when the real server is active. This capability is useful when you want to perform some maintenance on the real server (either the server itself or the servers configuration on the ServerIron ADX) or when the network topology has changed. By default, when you change a servers IP address, the ServerIron ADX performs the change gracefully, as follows:
Existing connections are allowed to continue on the old IP address until they terminate
normally.
Syntax: [no] ip-address <ip-addr> [force-shutdown] The <ip-addr> parameter specifies the real servers new IP address. The force-shutdown parameter immediately resets a clients connection to the IP address when the ServerIron ADX receives TCP data from the client. By default, the ServerIron ADX allows existing connections to terminate normally following the address change.
Adding a description
You can add a description to a real server, virtual server, firewall, or cache. The description appears in the output of show commands and in the running-config and startup-config files. To add a description, enter commands such as the following.
ServerIronADX(config)# server real RS20 1.2.3.4 ServerIronADX(config-rs-RS20)# description "Real Server # 20"
Local A local server is one that is connected to the ServerIron ADX at Layer 2. The ServerIron
ADX uses local servers for regular load balancing.
Remote A remote server is one that is connected to the ServerIron ADX through one or more
router hops. The ServerIron ADX uses remote servers only if all the local servers are unavailable.
111
Configuring SLB
To use a remote server for regular load balancing, refer to Primary and backup servers on page 56.
NOTE
Syntax: [no] max-conn <1-2000000> You can also limit the maximum number of connections for individual application ports on a real server. For example, to limit the number of FTP connections on real server Web1 to 10, enter the following commands.
ServerIronADX(config)# server real Web1 ServerIronADX(config-rs-Web1)# port ftp max-conn 10
Syntax: [no] port <port> max-conn <number> For FTP (Port 21), the number of current connections is equal to the number of control connections, plus any data connections opened during the session. For example, logging on to an FTP site (the control connection) and transferring a file from the FTP site equal two connections. Therefore, although you have only one control connection, additional operations you perform while you are logged on could consume all the FTP connections allowed.
NOTE
NOTE
If you use the max-conn command for a firewall, the command specifies the maximum permissible number of connections that can be initiated from this ServerIron ADX's direction on the firewall paths. The max-conn command does not limit the total number of connections that can exist on the ServerIron ADX, which includes connections that come from the ServerIron ADXs at the other ends of the firewall paths. For Firewall Load Balancing (FWLB), the command to restrict the total number of connections that can exist on the ServerIron ADX is fw-exceed-max-drop.
112
Syntax: [no] tcp-mss <mss-value> The <mss-value> variable specifies the global MSS value. This value can be from 576 to 9176.
Syntax: [no] tcp-mss <mss-value> The <mss-value> variable specifies MSS value for all the real servers bound to the specified virtual server. This value can be from 576 to 9176.
Syntax: [no] port <virtual-server-port> tcp-mss <mss-value> The <virtual-server-port> variable specifies the TCP port that the MSS value will be applied to. The <mss-value> variable specifies the MSS value for all the real server ports bound to the specified virtual server port. This value can be from 576 to 9176.
Syntax: [no] tcp-mss <mss-value> The <mss-value> variable specifies the MSS value for all the real servers bound to the specified virtual server configured with the specific TCP profile. This value can be from 576 to 9176.
113
Configuring SLB
Syntax: [no] port <virtual-port> response-rewrite-policy <response-rewrite-policy-name> <tcp-profile-name> The <virtual-port> variable specifies the TCP port that the specified TCP policy will be bound to. The <response-rewrite-policy-name> variable specifies the response rewrite policy that the specified TCP policy will be bound to. The <tcp-profile-name> variable specifies the TCP policy that the specified response rewrite policy and virtual port will be bound to.
Syntax: [no] ip global-mtu <mtu-value> The <mtu-value> variable specifies IP MTU value that will be applied globally. This value can be from 576 to 9216. The sum of this value and 18 Bytes (for the Layer-2 header) will be used to set the maximum frame size at the port level. The default IP MTU value is 1500 which results in a default max frame size of 1518. When a global IP MTU value is configured, it is applied to all physical ports that are part of the default VLAN and to all VE interfaces that are associated with non-default VLANs. While the global IP MTU value supersedes the default MTU value for the ServerIron ADX, it does not supercede a value configured for an individual VE interface. Configuring jumbo frame support for a VE interface To configure an IP MTU value for a VE interface, use the following command.
ServerIronADX(config)# interface ve 3 ServerIronADX(config-vif-3)# ip mtu 9216
Syntax: [no] ip mtu <mtu-value> The <mtu-value> variable specifies IP MTU value that will be applied for the specified VE interface. This value can be from 576 to 9216. The sum of this value and 18 Bytes (for the Layer-2 header) will be used to set the maximum frame size at the port level. The default IP MTU value is 1500 which results in a default max frame size of 1518. An IP MTU value set with this command supersedes the default MTU value for the ServerIron ADX as well as any global level that is configured on the ServerIron ADX.
114
Displaying the IP MTU value The following commands allow you to view the currently configured IP MTU values on a ServerIron ADX. These values can be displayed for a physical Ethernet interface or for a virtual interface (VE) as shown. To display the IP MTU value for a physical Ethernet interface use the command shown in the following. The MTU value is displayed below as MTU 4000 bytes.
ServerIronADX(config)#show int e 1/1 GigabitEthernet1/1 is down, line protocol is up Hardware is GigabitEthernet, address is 0004.08a0.4040 (bia 0004.08a0.4040) Configured speed auto, actual unknown, configured duplex fdx, actual unknown Member of L2 VLAN ID 1, port is untagged, port state is FORWARDING STP configured to ON, priority is level0, flow control enabled mirror disabled, monitor disabled Not member of any active trunks Not member of any configured trunks No port name MTU 4000 bytes, encapsulation ethernet IPv6 is disabled 300 second input rate: 0 bits/sec, 0 packets/sec, 0.00% utilization 300 second output rate: 0 bits/sec, 0 packets/sec, 0.00% utilization 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 multicasts, 0 unicasts 0 input errors, 0 CRC, 0 frame, 0 ignored 0 runts, 0 giants, DMA received 0 packets 0 packets output, 0 bytes, 0 underruns Transmitted 0 broadcasts, 0 multicasts, 0 unicasts 0 output errors, 0 collisions, DMA transmitted 0 packets
To display the IP MTU value for a virtual VE interface use the command shown in the following. The MTU value is displayed below as MTU 7000 bytes.
ServerIronADX(config-vif-6)#show interfaces ve 6 Ve6 is down, line protocol is up Hardware is Virtual Ethernet, address is 0004.08a0.4040 (bia 0004.08a0.4040) No port name Internet address is 192.168.2.1/24, MTU 7000 bytes, encapsulation ethernet IPv6 is disabled
Syntax: [no] server syn-limit <1 65535> The default value is 65535.
115
Configuring SLB
All TCP traffic All UDP traffic Individual TCP or UDP ports
The ServerIron ADX increments the connection counter for real server connections only after the ServerIron ADX selects a server for the connection. If the ServerIron ADX cannot serve a client request because a real server, cache, or firewall already has the maximum number of connections for the current second for the requested port, the ServerIron ADX tries another server. If there are no servers available, the ServerIron ADX sends a TCP RST to the client. If you configure a limit for TCP or UDP and also for an individual application port, the ServerIron ADX uses the lower limit. For example, if you limit new TCP connections to a real server to 1000 per second and also limit new HTTP connections to 600 per second, the ServerIron ADX limits connections to TCP port HTTP to 600 per second. The ServerIron ADX counts only the new connections that remain in effect at the end of the one-second interval. If a connection is opened and terminated within the interval, the ServerIron ADX does not include the connection in the total for the server.
NOTE
NOTE
Connection rates might not be strictly limited to the configured values. A slight drift can be introduced due to latency. For example, with traffic running at 1000 connections per second, and max-tcp-conn-rate configured at 100, the connection rate could go up to 140. To limit the number of new TCP and UDP connections a real server can receive each second, enter commands such as the following.
ServerIronADX(config)# server real RS1 1.2.3.4 ServerIronADX(config-rs-RS1)# max-tcp-conn-rate 1000 ServerIronADX(config-rs-RS1)# max-udp-conn-rate 800
The first command limits new TCP connections to the real server to 1000 per second. The second command limits the rate of new UDP connections to the real server to 800 per second. Syntax: max-tcp-conn-rate <num> Syntax: max-udp-conn-rate <num> The <num> parameter specifies the maximum number of connections per second. There is no default. The maximum connection rate that can be configured is 4294967295. To limit the rate of new connections for a specific application port, enter commands such as the following.
ServerIronADX(config-rs-RS1)# port http ServerIronADX(config-rs-RS1)# port http max-tcp-conn-rate 600
These commands add port HTTP (80) to the real server and limit the rate of new connections to the port to 600. Syntax: port <TCP/UDP-portnum> max-tcp-conn-rate <num>
116
Syntax: port <TCP/UDP-portnum> max-udp-conn-rate <num> The port <TCP/UDP-portnum> parameter specifies the application port. The <num> parameter specifies the maximum number of connections per second. The maximum connection rate that can be configured is 4294967295.
NOTE
This feature cannot be enabled for real servers that support complex protocols (FTP and streaming media ports bound). The reason is that these applications negotiate ports for the data channel, on the fly. When Syn-Proxy is configured on the ServerIron ADX, it is applied to both pass-through and SLB traffic. The features "Syn-Proxy for PassThrough Traffic" and "Hardware Forwarding of Real Server PassThrough Traffic" are mutually exclusive. Therefore, you need to configure Syn-Proxy only for SLB traffic when the hardware forward feature is enabled. Syn-Proxy for SLB traffic can be configured using the server security-on-vip-only command. Hardware forwarding of pass through traffic is enabled under a real server. When you want non-SLB traffic from a particular real server to be hardware forwarded, enable hardware forwarding for that real server. To configure hardware forwarding of pass-through traffic for a specific real server, enter the following command.
ServerIronADX(config-rs-rs1)# hw-fwd-pass-through-traffic
Syntax: [no] hw-fwd-pass-through-traffic To globally configure hardware forwarding of pass-through traffic for all real servers in the system, enter the following command.
ServerIronADX(config)# server hw-fwd-pass-through-traffic
Syntax: [no] server hw-fwd-pass-through-traffic The show cam layer4/7 command has been enhanced to show the new user type: Real server port.
.
ServerIronADX# show cam layer4/7 detail slb User Type: Real server port Entry Type: Real server port Match Srcip: 10.32.5.111 (0x0a20056f) Mask: 0xffffffff Srcport : 5050 Mask: 0xffff 16594 - (DestIP & 0xF): 0 to 1 FID: dd03 BP: 3/1 16596 - (DestIP & 0xF): 2 FID: dd02 BP: 3/1 16598 - (DestIP & 0xF): 3 FID: dd06 BP: 3/2 16598 - (DestIP & 0xF): 3 FID: dd06 BP: 3/2 16602 - (DestIP & 0xF): 6 to 7 FID: dd0b BP: 3/3 16604 - (DestIP & 0xF): 8 FID: dd0a BP: 3/3 16606 - (DestIP & 0xF): 9 FID: dd02 BP: 3/1 16608 - (DestIP & 0xF): a to b FID: dd03 BP: 3/1 16610 - (DestIP & 0xF): c FID: dd07 BP: 3/2 16612 - (DestIP & 0xF): d FID: dd06 BP: 3/2 16614 - (DestIP & 0xF): e FID: dd0b BP: 3/3 16616 - (DestIP & 0xF): f FID: dd0a BP: 3/3
117
Configuring SLB
Syntax: server [hash-crc32l | hash-crc32u | hash-xori | hash-xoru] hash-crc32l: This algorithm performs CRC on the 32-bits of Source IP in the forward direction and the 32-bits of Destination IP in the reverse direction. The lower 5 bits of the computed result are used to distribute traffic among BPs. This is the default setting. hash-crc32u: This algorithm performs CRC on the 32-bits of Source IP in the forward direction and the 32-bits of Destination IP in the reverse direction. The upper 5 bits of the computed result are used to distribute traffic among BPs. hash-xorl: This algorithm performs XOR on the 32-bits of Source IP in the forward direction and the 32-bits of Destination IP in the reverse direction. The lower 5 bits of the computed result are used to distribute traffic among BPs. hash-xoru: This algorithm performs XOR on the 32-bits of Source IP in the forward direction and the 32-bits of Destination IP in the reverse direction. The upper 5 bits of the computed result are used to distribute traffic among BPs.
118
NOTE
This command can be configured with any of the hash algorithms configured using the server hash-xxx command described previously. This command cannot be used for protocols that involve dynamic ports such as FTP and RTSP and with sticky features.
Quietly drops the request. Sends an ICMP Destination Unreachable message (for UDP or TCP). Sends a TCP RST (for TCP only) the default action.
Generally, an application is unavailable if all the real servers that have the application are unavailable or if the application is not configured on the VIP requested by the client.
119
Configuring SLB
To configure the ServerIron ADX to send a TCP RST to a client, enter the following command.
ServerIronADX(config)# server reset-message
NOTE
The server reset message overrides the ICMP Destination Unreachable message. If the configuration contains both, the ServerIron ADX sends a TCP RST instead of an ICMP message for TCP requests. For UDP requests, the device still sends ICMP messages. TCP RST does not apply to UDP. For information on how to globally configure the ServerIron ADX to send an ICMP Destination Unreachable message to a client, refer to Sending ICMP Port Unreachable or Destination Unreachable Messages on page 119. The server no-reset-on-max-conn command overrides the server reset-message command. For more information, refer to Disabling TCP RST message on maximum connections on page 121.
NOTE
Syntax: [no] server tcp-age reset [both | client | server] This command only works if you are running Layer 7 SLB. The both option (default) enables the device to send messages to clients and servers. The client option enables the device to send messages only to clients. The server option enables the device to send messages only to servers.
Disabling TCP RST message when a real server goes down during an open session
By default, if a real server goes down during an open TCP session with a client, the ServerIron ADX sends a TCP RST message to the client to terminate the session normally. When the real server comes back up, clients can establish a new session with the server. You can globally disable the TCP RST message from being sent under these circumstances. When you disable the TCP RST message, the client can resume the interrupted session when the real server comes back up. Disabling the TCP RST messages affects only the message sent to a client when a real server goes down during a clients session with the server. TCP RST messages sent under other circumstances are not affected. To globally disable the TCP RST message from being sent, enter the following command.
ServerIronADX(config)# server no-reset-for-established-session
NOTE
120
Syntax: [no] server no-reset-for-established-session By default, sending TCP RST messages is enabled.
Syntax: [no] server no-reset-on-max-conn This command overrides the server reset-message command, which enables the ServerIron ADX to send TCP RST to clients that request unavailable applications. If the configuration contains both commands, the ServerIron ADX will not send a TCP RST to a connecting client if the maximum connections limit on the real servers has been reached.
NOTE
Stateful SLB is the standard form of SLB that uses session table entries to track session
information. All traffic for stateful SLB takes an optimized processing path.
Stateless SLB is a form of SLB that does not use session table entries. All packets that go
through stateless ports take an optimized processing path. When you enable fast-path processing, the ServerIron ADX does not process every TCP or UDP packet in a given session in detail. Instead, the ServerIron ADX uses information gathered during setup of the session to forward packets in the session.
121
Configuring SLB
SLB optimization is useful if simple SLB (stateful or stateless) is the primary or sole application on the device. If you use the ServerIron ADX for other features such as Global Server Load Balancing (GSLB) or Firewall Load Balancing (FWLB), SLB optimization is not useful.
NOTE
Stateful and stateless SLB traffic is optimized by default. Enabling fast-path processing for stateless SLB When you enable fast-path processing, the ServerIron ADX does not process every TCP or UDP packet in a given session in detail. Instead, the ServerIron ADX uses information gathered during setup of the session to forward packets in the session. All packets that go through stateless ports take an optimized processing path. SLB optimization is useful if simple SLB is the primary or sole application on the device. If you use the ServerIron ADX for other features such as GSLB or FWLB, SLB optimization is not useful. Fast-path processing applies only to some configurations. To enable fast-path processing for stateless SLB, enter the following command.
ServerIronADX(config)# server fast-stateless
NOTE
You can use only one type of optimization at a time. You cannot use stateful and stateless
optimization at the same time.
Optimization applies only to SLB TCP or UDP traffic that is initiated by clients. Other types of
traffic are not optimized.
Optimization does not apply to fragmented IP packets. In the current release, the port name or number on the VIP must be same as the one on the
real server bound to the VIP. Port translation is not supported.
FTP traffic is not supported. Source NAT (source-nat command) is not supported. Host ranges (host-range command) are not supported. The show server stateless command does not display hits. Many-to-one TCP or UDP port binding (no port <tcp/udp-port> translate command) is not supported.
NOTE
Traffic for an SLB configuration that does not meet these criteria is still forwarded using normal processing, but fast-path processing is not used.
122
For stateless SLB, optimization is supported only for the following TCP or UDP ports that are
well-known to the ServerIron ADX:
7 (echo) 9 (discard) 21 (ftp) 22 (ssh) 23 (telnet) 25 (smtp) 37 (time) 49 (tacacs) 53 (dns) 67 (bootps) 68 (bootpc) 69 (tftp) 80 (http) 109 (pop2) 110 (110) 119 (nntp) 123 (ntp) 137 (netbios-ns) 138 (netbios-dgm) 143 (imap4) 161 (snmp) 162 (snmp-trap) 179 (bgp) 195 (dnsix) 389 (ldap) 434 (mobile-ip) 443 (ssl) 517 (talk) 520 (rip) 554 (rtsp) 1755 (mms) 1812 (radius) 1645 (radius-old) 7070 (pnm) 1558 (xing) 12468 (vxstream1) 12469 (vxstream2)
123
Configuring SLB
Syntax: server msl <seconds> The <seconds> parameter can be from 1 through 180 seconds. The default is 8 seconds. Note that attempting to set the value to 0 resets the value to the default (8 sec.). To disable TCP fast aging and use the 1- to 2- minute aging time from previous releases, enter the following command.
ServerIronADX(config)# server no-tcp-fast-age-on-server-reset
NOTE
124
To configure an individual virtual server for the transparent VIP feature, enter a command such as the following.
ServerIronADX(config-vs-TransVIP)# transparent-vip
Syntax: server reassign-threshold [6-4000] If you do not specify a number, the ServerIron ADX assigns a threshold value of 20.
The first command changes the CLI to the configuration level for the real server you want to copy. The second command creates a clone of real server rs1. The clone is named "rs2" and has IP address 5.6.7.8. Syntax: [no] clone-server <name> <ip-addr>
The <name> parameter specifies the name of the clone. The <ip-addr> parameter specifies the IP address of the clone.
NOTE
To delete a server clone, you must manually edit the startup-config file to remove the command. The "no" option is not supported for this command.
125
Configuring SLB
Defining a host range simplifies configuration by allowing you to enter a single command or Web option for the whole range of addresses instead of entering information for each address individually. You must also configure a corresponding range of addresses on the virtual server. For a complete configuration example, refer to TCP/UDP application groups on page 453. To configure a host range on a real server.
ServerIronADX(config)# server real-name r1 10.0.0.1 ServerIronADX(config-rs-r1)# host-range 20
This command configures a range of 20 IP addresses, from 10.0.0.1 through 10.0.0.20. Syntax: [no] host-range <num>
NOTE
Once you unbind the ports, you can rebind them only on an individual virtual server and port basis.
126
Allow "TCP only" or "UDP only" port definitions under virtual server Allow similar definitions under real server also
On ServerIron ADX, when a port is defined under VIP, both UDP and TCP traffic with the port number are enabled and passed through to the real server. This scenario is not desirable in some cases. As an enhancement, the user is allowed to define a TCP-only or UDP-only port so that only TCP or UDP traffic with the specified port number can pass through. TCP-only or UDP-only traffic control has been supported internally on ServerIron ADX, but no CLI is available for the user to enable it. As the enhancement, the following commands allow the user to enable or disable TCP-only or UDP-only traffic control for a port defined under VIP. Syntax: [no] port <port> tcp-only Syntax: [no] port <port> udp-only The command is available under VIP configuration mode. When either TCP-only or UDP-only is configured, only TCP traffic or UDP traffic can pass through as configured; otherwise both TCP traffic and UDP traffic can pass through. TCP-only and UDP-only are exclusive, which means when TCP-only is configured, TCP-only and UDP-only cannot be configured for a particular port at the same time. UDP-only will be automatically disabled if TCP-only is configured, and vice versa.
NOTE
Syntax: port <UDP-portnum> udp-fast-age To set the amount of time sessions for ports configured with the udp-fast-age command stay in the delete queue before being deleted.
ServerIronADX(config)# server msl 2
Syntax: server msl <secs> The <secs> parameter can be from 1 40 seconds.
127
Configuring SLB
Syntax: [no] port dns | radius udp-normal-age For DNS and RADIUS UDP load balancing, unless the port is configured with this command, the DNS or RADIUS sessions are always aged out after two minutes.
NOTE
By default, a ServerIron ADX will exercise normal-age for DNS and RADIUS if the response is fragmented traffic from a real server. If you would like to enable the fast-age feature for fragmented traffic as well as non-fragmented traffic, you need to explicitly configure the udp-fast-age command on the port level.
Syntax: [no] tcp-age <minutes> To set the UDP age for virtual server v1 to 26 minutes, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 ServerIronADX(config-vs-v1)# udp-age 26
Syntax: [no] udp-age <minutes> To set the TCP age for the HTTP port on virtual server v1 to 10 minutes, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 ServerIronADX(config-vs-v1)# port http tcp-age 10
Syntax: [no] port <port> tcp-age <minutes> To set the UDP age for the SNMP port on virtual server v1 to 26 minutes, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 ServerIronADX(config-vs-v1)# port snmp udp-age 26
Syntax: [no] port <port> udp-age <minutes> You can set the TCP or UDP age from 2 through 60 minutes. The default TCP age is 30 minutes. The default UDP age is five minutes.
128
More specific settings override more general settings; that is, a TCP or UDP age setting for the HTTP port will override a TCP or UDP age setting for the virtual server, which will override the global TCP or UDP age (set with the server tcp-age or server udp-age commands).
Syntax: [no] server throttle-on-overload <cpu-percentage> The <cpu-percentage> specifies the threshold of UCP utilization when the ServerIron ADX will reject new DNS requests. Limitation This feature is applicable for UDP DNS only.
NOTE
CPU utilization is not collected for every packet but every second. Consequently, the throttling decision might not always be accurate. Because of this, CPU utilization might go higher than the set threshold in some situations.
NOTE TABLE 9
Port type
The maximum number of ports with L47 health checks enabled may be lower. Number of supported real servers, virtual servers, and ports on a ServerIron ADX4000, ServerIron ADX 8000 and ServerIron ADX10000
Default
4096 1024 8192
Minimum
64 64 256
Maximum
16384 4096 32768
TABLE 10
Port type
Real Server Virtual Server Server Ports
Number of supported real servers, virtual servers, and ports on a ServerIron ADX1000
Default
1024 256 2048
Minimum
64 64 256
Maximum
4096 1024 8192
129
Configuring SLB
NOTE
The implicit default port under virtual and real servers are included in the port count.
Syntax: [no] next-hop <next-hop-IPaddress> The next-hop-IPaddress variable specifies the IP address of the nest hop gateway for the virtual server.
NOTE
The IP address specified for the next-hop-IPaddress must be directly connected to the ServerIron ADX.
130
You can also configure the virtual server to allow it to fall back to its default gateway as shown in the following.
ServerIronADX(config)# server virtual-name-or-ip v1 1.1.1.1 ServerIronADX(config-vs-v1)# next-hop-allow-fallback-to-default-gateway
131
Configuring SLB
VIP is healthy. If the VIP is healthy, the ServerIron ADX injects a VIP route into its route table for
the VIP. The ServerIron ADX then advertises the route to other routers using an IGP routing protocol, such as OSPF or OSFPv3.
VIP is not healthy. The ServerIron ADX removes the IP route to the VIP from its route table. As a
result, the route is withdrawn by the routing protocols and is no longer used by upstream routers. The upstream routers instead use another route to the same VIP.
NOTE
IPv4 uses the OSPF routing protocol. For IPV6, the OSPFv3 routing protocol is used. Routers receiving client traffic for the VIP select the best route to the VIP. As a result, clients enjoy fast response time regardless of their location, because their gateway routers use the best path to the VIP. RHI also prevents client traffic from being routed to a VIP that is unavailable. VIP Route health injection advertises the host route to the VIP instead of a network route to the VIP's subnet. This approach ensures that the clients' gateway routers receive a route to the IP address only if that VIP is available. Configuration of VIP RHI is the same in most cases for IPv4 and IPv6 addresses. It is clearly shown in the following sections where there are differences in configuration commands or procedures.
NOTE
Disabling the real ports of all real servers using server disable-all-real causes the respective virtual port's RHI state to become "Not Healthy", and the VIP host route will not be advertised. Refer to show server virtual-name-or-ip. In contrast, when you disable the virtual port of virtual server, the RHI state of a virtual port will not become "Not Healthy", and the ServerIron ADX will keep advertising the VIP host route. Injecting and deleting VIP route based on VIP health The route for a VIP is injected when the VIP was previously unhealthy and is now deemed to be healthy. Similarly, the route for the VIP is withdrawn if it was previously healthy and is now down. The health of a VIP is based on the health of its VIP ports. The health of a VIP port is based on the health of the real server ports bound to that VIP port. You can configure any of the traditional health checks supported for the real servers. When a real server port fails the health check, the ServerIron ADX will check if the real server port is bound to a VIP port whose VIP has the RHI feature enabled. If so, the ServerIron ADX will determine how many real server ports bound to the VIP port are healthy. If the amount is below the threshold (if percentage threshold is configured) or if none of the other real server ports are healthy (if percentage threshold is not configured), then the VIP port will be declared unhealthy. If you have
132
configured the option where a VIP should be considered healthy if at least one VIP port is healthy, then the ServerIron ADX will check if there are any other healthy VIP ports. If there are none, it will delete the VIP route. If you have not configured this option (a VIP should be considered healthy only if all VIP ports are healthy), then the ServerIron ADX will delete the VIP route. Similarly, when a real server port transitions from the failed to the active state, the ServerIron ADX will check if the real server port is bound to a VIP port whose VIP has the RHI feature enabled. If this is the case, the ServerIron ADX will determine how many real server ports bound to the VIP port are healthy. If you have configured a percentage threshold, and if this number is above the threshold, then ServerIron ADX will declare this VIP port healthy. If you have not configured a threshold, then the ServerIron ADX will declare this VIP healthy. If you have configured the option where a VIP should be considered healthy if at least one VIP port is healthy and the VIP was previously unhealthy, then it will inject the VIP route. If you have not configured this option (a VIP should be considered healthy only if all VIP ports are healthy), then the ServerIron ADX will check if all other VIP ports are healthy. If they are, the ServerIron ADX will inject the VIP route. Configuration considerations Before you enable RHI, consider the following three issues:
Static route redistribution It is required to redistribute the host route for the VIP into OSPF or
OSPFv3. To enable redistribution of static routes, enter commands such as the following: For IPv4
ServerIronADX(config)# router ospf ServerIronADX(config-ospf-router)# area 0 ServerIronADX(config-ospf-router)# redistribution static
Disabling network route advertisement for an interface associated with VIP RHI The ip
dont-advertise or ipv6 dont-advertise commands configure the ServerIron ADX to block advertisement of the network on the interface. If you do not block advertisement of the network, the ServerIron ADX will advertise a route to the network containing the VIP, even if the VIP itself is unavailable. After you enter the ip dont-advertise command, the ServerIron ADX advertises only a host route to the VIP address. Therefore, if the VIP is not healthy, the ServerIron ADX will remove the static host route for the VIP address and also not advertise a network route for the network containing the VIP address.
NOTE
When using the dont-advertise commands, the IP or IPv6 and subnet mask length should be the same as the interface IP or IPv6 and subnet mask length. For IPv4
ServerIronADX(config)# interface ethernet 4/15 ServerIronADX(config-if-4/15)# ip address 10.1.1.99 255.255.255.0 ServerIronADX(config-if-4/15)# ip dont-advertise 10.1.1.99 255.255.255.0
133
Configuring SLB
ServerIronADX(config)# interface loopback 1 ServerIronADX(config-lbif-1)# ipv6 address 4444::1/64 ServerIronADX(config-if-3/1)# ipv6 dont-advertise 4444::1/64
Syntax: ipv6 dont-advertise <ipv6-prefix>/<prefix length> The following example of the display from the show ipv6 route command shows how dont-advertise routes are represented for IPv6 routes. As shown, the route type for these routes is C (N).
ServerIronADX-A(config-lbif-3)#show ipv6 route IPv6 Routing Table - 5 entries: Type Codes: C - Connected, C(N) Connected(Dont-Advertise), S - Static, R RIP, O - OSPF, B - BGP, D - RA Type IPv6 Prefix Next Hop Router Interface Dis/Metric C 3000::/64 :: e 1 0/0 C 4000::/64 :: ve 40 0/0 C (N) 4444::/64 :: loopback 1 0/0 S 4444::/96 4444::110 loopback 1 1/1 C (N) 6020::/78 :: loopback 3 0/0
For VIP RHI to work, you can either configure a loopback interface or VE interface in the same
subnet as the VIP subnet (Non-Dangling VIP). or confgure the VIP without any assocated interface (Dangling VIP described in VIP RHI With Dangling subnet). The loopback interface or VE interface (if being configured for the VIP RHI) must have the ip dont-advertise command configured. The following example configures a loopback interface to support two VIPs. VIP IP addresses Virtual server 1 IP: 204.1.152.65 Virtual server 2 IP: 204.1.152.66 If the subnet of the VIPs is /30 then you need to configure either a VE interface or a loopback interface as follows:
ServerIronADX1000(config)# interface loopback 2 ServerIronADX1000(config-lbif-2)# ip address 204.1.152.67/28 ServerIronADX1000(config-lbif-2)#ip dont-advertise 204.1.152.67/28
Enabling or disabling VIP RHI The ServerIron ADX can enable VIP RHI globally or at the VIP sublevel for IPv4 hosts, IPv6 hosts or both. To enable VIP RHI feature globally for all VIPs, enter commands such as the following. For IPv4
ServerIronADX(config)# server global-advertise-vip-route v4-only
For IPv6
ServerIronADX(config)# server global-advertise-vip-route v6-only
Syntax: [no] server global-advertise-vip-route [v4-only | v6-only | both] The v4-only parameter enables VIP RHI globally for IPv4 hosts. The v6-only parameter enables VIP RHI globally for IPv6 hosts. The both parameter enables VIP RHI globally for IPv4 and IPv6 hosts. If none of these parameters are specified, VIP RHI is enabled globally for IPv4 hosts only and disabled globally for both IPv4 and IPv6 hosts.
134
Where VIP hosts are classified as healthy, the ServerIron ADX injects static host/subnet routes. If a VIP is found to be unhealthy, RHI withdraws the static host/subnet route but the feature remains enabled. Using the no option with this command (IPv4 and IPv6) disables RHI and causes all routes that were injected by RHI causing the global-advertise command to be removed. Routes injected by local advertise will still be in effect and will override the global advertise setting. To enable VIP RHI for an individual virtual server, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip vs1 ServerIronADX(config-vs-vs1# advertise-vip-route
NOTE
NOTE
Where VIP hosts are classified as healthy, the ServerIron ADX injects a static host/subnet routes only for the VIP specified by the advertise-vip-route command. If a VIP is found to be unhealthy, RHI withdraws the static host/subnet route for the host of the configured VIP but the feature remains enabled. Using the no option with this command causes any routes for this VIP host injected by RHI to be withdrawn. To disable VIP RHI for an individual virtual server, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip vs1 ServerIronADX(config-vs-vs1# disable-advertise-vip-route ServerIronADX(config-vs-vs1)# end
Syntax: [no] disable-advertise-vip-route This command is useful if you need to enable VIP RHI globally and disable it for a few virtual servers.
NOTE
Due to certain design restrictions, we advise that users turn off the RHI feature before modifying an interface configuration (on the interface to which the VIP is attached). After changes have been made to the interface configuration, you can turn the RHI feature on again. Following this method allows new VIP static routes to be recomputed and advertised while the old VIP routes are withdrawn. Use the Global and Local VIP advertise commands to turn the RHI on and off. " Defining the health of a VIP port There are two options for defining VIP port health:
By default, a VIP port will be considered healthy as long as there is at least one healthy real
server port bound to it.
You can define the percentage of bound real server ports that must be healthy in order to
consider the VIP port healthy. To define the percentage of bound real server ports that must be healthy to consider a VIP port healthy, enter commands such as the following.
ServerIronADX(config)# server rhi-active-bindings-threshold 20
Syntax: [no] server rhi-active-bindings-threshold <percent> A valid range for <percent> is 1 through 100.
135
Configuring SLB
If the <percent> parameter is not set, the percentage is 0. In this case, the default method will be used to determine the health of the VIP port. For example, a VIP port will be considered healthy as long as there is at least one healthy real server port bound to it. As another example, consider a virtual server 1.1.1.101 with port http configured. This port http of the virtual server is bound to port http of real server 1.1.1.15 and port http of real server 1.1.1.44. If you have not configured any active bindings threshold percentage, then port http of VIP 1.1.1.101 will be considered healthy as long as at least one of the two bound real server ports is healthy. If you configure an active bindings threshold percentage of 100, then this setting requires all bound real server ports for the VIP port to be healthy in order to consider the VIP port healthy. If real server port http for real server 1.1.1.15 goes down, then VIP port http is no longer considered healthy because only 50 percent of the bound real server ports are healthy. The configuration in this example requires 100 percent of the bound real server ports to be up in order to consider the VIP port as healthy. Defining the health of a VIP Multiple VIP ports can be configured for a VIP. There are two options provided for determining the health of a VIP:
By default, a VIP will be considered healthy if all VIP ports for the VIP are healthy. You can specify a VIP to be considered healthy as long as there is at least one healthy VIP port.
To specify that a VIP should be considered healthy if at least one VIP port is healthy, enter commands such as the following.
ServerIronADX(config)# server rhi-one-vip-port-up
Syntax: [no] server rhi-one-vip-port-up If this command is not configured, a VIP will be considered healthy only if all VIP ports are healthy.
NOTE
If a VIP port is not bound to any real server ports, it will not be used for deciding the health of the VIP. If a VIP port is bound but you do not want to use it to determine the health of the VIP as described above, then configure the following for the VIP port.
ServerIronADXA(config)# server virtual-name-or-ip dns-p1 ServerIronADXA(config-vs-dns-p1)# port ftp rhi-dont-use-port
Syntax: [no] port <port> rhi-dont-use-port As another example, assume port http and port ftp have been configured for virtual server vs1. You then bind port ftp of real server rs1 and port ftp of real server rs2 to port ftp of virtual server vs1. Similarly, you bind port http of real server rs1 and port http of real server rs2 to port http of virtual server vs1. If you need to base the health of the VIP vs1 only on the health of the VIP port http, then you can configure the following for the port ftp.
ServerIronADX(config)# server virtual-name-or-ip vs1 ServerIronADX(config-vs-dns-p1)# port ftp rhi-dont-use-port
As a result, only the health of port http of virtual server vs1 will be used to determine the health of virtual server vs1 and consequently to determine if the VIP route for vs1 should be injected or withdrawn.
136
Configuring the VIP RHI Route Mask Length You can configure the subnet mask length that VIP RHI injects into the routing table for a specific virtual server by entering a command such as the following.
ServerIronADX(config)# server virt virt-2 ServerIronADX(config-vs-virt-2)# vip-route-subnet-mask-length 28
Syntax: [no] vip-route-subnet-mask-length <length> The <ipv4-subnet-mask-length> parameter specifies the IPv4 subnet mask length of VIP RHI injected route for this virtual server. This parameter must have a value between interface subnet mask length and 32. The <ipv6-subnet-mask-length> parameter specifies the IPv6 subnet mask length of VIP RHI injected route for this virtual server. This parameter must have a value between interface subnet mask length and 128. The [no] server global-vip-route-mask-length command that configured the VIP RHI route mask length at a global level has been deprecated. This configuration will be translated to VIP level mask length under each individual VIP during image upgrade. The VIP-RHI mask length should not be less than the interface subnet mask length. Depending on the interface mask length and the vip-route-mask length there can be either a host route or single/dual subnet routes to this VIP host.
ServerIronADX(config-vs-virt-2)# vip-route-subnet-mask-length 28
NOTE
For example, If you have a VIP host with the IPv6 address 2001::10 configured over a loopback interface with the IPv6 address 2001::1/64 will, by default, RHI inject a static host route as shown below. S 2001::10/128 2001::10 loopback 1 1/1 If you configure a vip-route-mask-length as 96 then when this VIP becomes healthy, an IPv6 subnet route with a mask length of 96 is advertised as shown below. S 2001::/96 2001::10 loopback 1 1/1 Where a user configures the vip-route-subnet mask length to the same values as the interface mask length, RHI injects two subnet static routes instead of one. In this situation the user will see two routes instead of one. For example, if the interface subnet mask length is 64 and the user configures the vip-subnet-mask-length as 64, two routes will be advertised as shown below. S 2001::/65 S 2001::80:0:0:0/65 2001::10 2001::10 loopback 1 1/1 loopback 1 1/1
Please note the subnet mask length of the above routes. When the user changes the VIP subnet mask length to and from being equal to the interface subnet mask length, the VIP static route injected will be corrected between dual routes and a single static route. This dual route extension was created to accommodate a larger range/number of VIP hosts within a subnet. One exception to the above dual route case is where value of the vip-route-subnet-mask-length exceeds 125. In this situation, RHI will only inject host static routes.
NOTE
137
Configuring SLB
Use caution while configuring the vip-route-subnet-mask-length value. Please make sure that the VIP subnets do not overlap with each other. VIP RHI With Dangling subnet Normally a VIP with RHI should have an associated interface with an interface address (IPv4 or IPv6) belonging to the VIP subnet. This means that at least one IP address belonging to the VIP subnet is consumed by the interface and cannot be used as a public address for the VIP server and RHI has to depend on having an associated interface. A user who does not wish to waste one public IP address to the interface can do so without adding any IP address in the VIP subnet. In this situation the VIP is deemed to be a Dangling VIP(not associated with any interface). If the user adds an IP address in the VIP subnet to an interface, such a VIP is called a Non-dangling VIP. The ServerIron ADX supports both Dangling and Non-Dangling VIPs. RHI determines the mode of the VIP at the time when advertise is enabled. The routes advertised also differ slightly in case of dangling VIPs as described in the following: Non-dangling VIPs: RHI will associate with the matching interface and set boundaries for the VIP route to be advertised. In this case, RHI makes sure that it does not advertise a route bigger than the size of the associated subnet itself. This also includes advertising of dual routes. This configuration also allows dynamic-sym-priority to be bound with an associated interface status. Dangling VIPs: RHI will use the VIP-route-subnet-mask-length and blindly advertise a static route of that size. A user will see static routes with the next hop address as 255.255.255.255 in case of IPv4 VIP and :: (invalid IPv6 address) for an IPv6 VIP. In case of IPv4 the port value of the route shows 'DROP' and for IPv6 the port is 'null'. In this mode dynamic-sym-priority is NOT bound to interface status. The following examples display how the output from the show ip route will differ for the same Destination address for Non-dangling and Dangling VIPs. Notice that for Dangling VIPs the Gateway is specified as a non-valid route (IPv4 and IPv6). Also, the Interface is specified as drop for IPv4 and null for IPv6. Display of these values is normal for Dangling VIPs. Example for Non-Dangling VIPs
ServerIronADX# show ip route Total number of IP routes: 1 Start index: 1 B:BGP D:Connected default Destination NetMask 1 1.1.1.0 255.255.255.0 ServerIronADX# show ipv6 route IPv6 Routing Table - 1 entrie: Type Codes: C - Connected, S - Static, Typ IPv6 Prefix Next Hop Router S 2001::10/128 2001::10
NOTE
R:RIP
S:Static
Gateway 1.1.1.105
Port lb1
138
R:RIP
S:Static
Gateway 255.255.255.255
Important caveats. 1. Order of configuration is important in RHI. A user should choose between the two available modes (Dangling & Non-Dangling) first and configure the interface and VIP RHI accordingly. 2. Changing the interface configuration (for example: adding or deleting an IP address in the VIP subnet or disabling the interface) while the RHI is active is NOT RECOMMENDED. 3. To change the mode of the VIP, a user must remove RHI advertise first, change the interface configuration and then re-enable the RHI configuration. RHI computes the mode only at the time of enabling the RHI advertise option. VIP RHI and high availability topologies Hot Standby topology - VIP RHI is only supported on the ServerIron Router (R) platform. A Hot Standby topology is not supported for the R code base. Therefore, VIP RHI is not applicable to Hot Standby topologies.
Symmetric and sym-active topologies - In both symmetric and sym-active topologies, only the
owner of the VIP (the VIP in the Active state) will inject the route. In this topology, the ServerIron will withdraw the VIP route when a VIP transitions from Active to Standby state. Similarly, the ServerIron will inject the VIP route when a VIP transitions from Standby to Active, if the VIP is healthy at the time of the transition. Optionally, you can enable ServerIron to inject a VIP route inside the routing process regardless of its VIP ownership status. Enter the following command if you want to enable both ServerIrons to inject VIP route regardless of its ownership.
ServerIronADX(config)# server rhi-inject-always
Syntax: [no] server rhi-inject-always Displaying RHI information To view the RHI information for a VIP port, enter the following command.
139
Configuring SLB
ServerIronADX# show server Name: dns-p1 Pred: least-conn Port ---http State ----enabled Sticky -----NO
virtual-name-or-ip dns-p1 http State: Enabled ACL-Id: 0 Concur -----NO Proxy ----NO DSR --NO CurConn ------0 IP:1.1.1.101: TotalConn: 0 TotConn ------0 1
PeakConn -------0
Bind count for virtual port = 1 Active count for virtual port = 1 RHI state for virtual port = Healthy Use port for RHI VIP health = YES Binding Information: ===================== http -------> http-ns: 1.1.1.15,
http (Active)
Bound Port Information: ======================== State(St) - ACT:active, ENB:enabled, FAL:failed, TST:test, DIS:disabled, UNK:unknown, UNB:unbind, AWU:await-unbind, AWD:await-delete Port ---St -Ms CurConn TotConn -- ------- ------Rx-pkts ------Tx-pkts ------Rx-octet -------Tx-octet -------Reas ----
Syntax: show server virtual-name-or-ip <name> <port> Table 11 shows the field descriptions for the show server virtual-name-or-ip <name> <port> command
TABLE 11
Field
Bind count for virtual port Active count for virtual port RHI state for virtual port
Health of this VIP will be used in the determination of the VIP health or not (related to command port <port> rhi-dont-use-port).
To display the RHI information for a VIP, enter the following command.
ServerIronADX# show server virtual-name-or-ip Virtual Servers Info Name: dns-p1 Pred: least-conn VIP RHI: Enabled State: Enabled ACL-Id: 0 VIP RHI state: healthy IF UP IP:1.1.1.101: TotalConn: 0 1
140
Port ----
State -----
Sticky -----NO NO
Concur -----NO NO
Proxy ----NO NO
DSR --NO NO
CurConn ------0 0
TotConn ------0 0
PeakConn -------0 0
Syntax: show server virtual-name-or-ip [<name>] Table 12 shows the field descriptions for the show server virtual-name-or-ip [<name>] command
TABLE 12
Field
VIP RHI VIP RHI state
Displaying route type When VIP RHI is enabled for a virtual server, the VIP host route type is shown as "S:Static". The reason for doing this is the ServerIron ADX can use redistribute static of routing protocols (OSPF and RIP for IPv4 and OSPFv3 for IPv6) to advertise the VIP host route. When the network route advertisement is disabled, the ServerIron ADX shows the route's type as "D(N)". The following snap shot of show ip route was taken from a ServerIron ADX with VIP RHI enabled.
.
ServerIronADX# show ip route Total number of IP routes: 11 Start index: 1 B:BGP D:Connected R:RIP S:Static O:OSPF *:Candidate default Destination NetMask Gateway Port Cost 1 20.20.1.0 255.255.255.0 0.0.0.0 v2 1 2 30.30.0.0 255.255.0.0 40.40.1.101 v1 2 3 40.40.1.0 255.255.255.0 0.0.0.0 v1 1 4 50.50.1.0 255.255.255.0 0.0.0.0 v4 1 5 60.60.1.0 255.255.255.0 0.0.0.0 v3 1 6 60.60.1.10 255.255.255.255 60.60.1.10 v3 1 7 70.70.1.0 255.255.255.0 0.0.0.0 3/12 1 8 70.70.1.10 255.255.255.255 70.70.1.10 3/12 1 9 80.80.1.0 255.255.255.0 20.20.1.101 v2 2 10 90.90.1.0 255.255.255.0 0.0.0.0 3/12 1 11 90.90.1.10 255.255.255.255 90.90.1.10 3/12 1
The following snap shot of show ipv6 route was taken from a ServerIron ADX with VIP RHI enabled.
141
Configuring SLB
ServerIronADX(config)#show ipv6 route IPv6 Routing Table - 6 entries: Type Codes: C - Connected, C(N) Connected(Dont-Advertise), S - Static, R - RIP, O - OSPF, B - BGP, D - RA Type IPv6 Prefix Next Hop Router Interface Dis/Metric C 2001::/64 :: ve 20 0/0 S 3001::/64 4001::101 ve 40 1/1 C 3500::/64 :: e 1/11 0/0 C 4001::/64 :: ve 40 0/0 C (N) 5000::/64 :: loopback 1 0/0 C bbbb::/64 :: e 1/9T 0/0 Dob-4U-SI-A(config)#
Tip: Some administrators may view this approach as a contradiction to the basic definition of a route type. The route type of a network that is owned by an ServerIron ADX (router) is usually shown as "D:connected" and a manually added static route type is to be shown as "S:Static".
142
Configuration examples Both ServerIron ADX sites working in primary mode Figure 21 shows both the ServerIron ADXs working in the primary mode.
FIGURE 21
Primary mode
Client #3
Router #3
Client #1
Client #2
C
OSPF or BGP
Router #1
Ve1: 40.40.1.120 /24 OSPF or RIP V2 Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise subnets Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise Web1 to Web10 Servers: subnets 60.60.1.40 - 60.60.1.49
Router #2
Ve1: 140.140.1.120 / 24 OSPF or RIP V2
PC
Site #1 ServerIron
S L2 S
S L2 S
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 120.120.1.120 /24 OSPF or RIP V2 or Static Routes
Site #2 ServerIron
PC
S
RS1 & RS2 Servers: 20.20.1.40 & 20.20.1.41
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 20.20.1.120 /24 OSPF or RIP V2 or Static Routes
Internal Router #1
Internal Router #2
S
Rem1 & Rem2 servers: 80.80.l.40 & 80.80.1.41
Virtual Servers for which VIP RHI is enabled: VIP60: 60.60.1.10 (Web1 to web10) & Prefix: /30 VIP50: 50.50.1.10 (Wr1 to wr10) & Prefix: /30 VIP70: 70.70.1.10 (test) & Prefix: /30 VIP90: 90.90.1.10 (Rem1 & Rem2) & Prefix: /28
Site 1 configuration
ver 09.3.00b265TD4 ! module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! server predictor round-robin server global-advertise-vip-route v4-only server rhi-active-bindings-threshold 80 server port 21
143
Configuring SLB
tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 20.20.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 20.20.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 30.30.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real Web1 60.60.1.40 port 8601 ! server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601 ! server real Web4 60.60.1.43 port 8601
144
! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 80.80.1.40
145
Configuring SLB
8601 ftp smtp ssl dns dns zone "satish.com" snmp mms rtsp
! server remote-name rem2 80.80.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp
146
! server virtual-name-or-ip vip20 20.20.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site1-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.100 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output !
147
Configuring SLB
interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 40.40.1.120 255.255.255.0 ip address 40.40.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 20.20.1.120 255.255.255.0 ip address 20.20.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! ! end
Site 2 configuration
module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! server predictor round-robin server global-advertise-vip-route v4-only
148
server rhi-active-bindings-threshold 80 server port 21 tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! ! server real rs1 120.120.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 120.120.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 130.130.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real Web1 60.60.1.40
149
Configuring SLB
port 8601 ! server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601 ! server real Web4 60.60.1.43 port 8601 ! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /"
150
! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 180.180.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 180.180.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp !
151
Configuring SLB
server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp ! server virtual-name-or-ip vip120 120.120.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site2-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.101 255.255.255.255
152
ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 140.140.1.120 255.255.255.0 ip address 140.140.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 120.120.1.120 255.255.255.0 ip address 120.120.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
Site-1 ServerIron ADX in primary mode and site-2 in backup mode Figure 22 shows the site-1 where the ServerIron ADX is in primary mode and in the site-2 where the ServerIron ADX is in the backup mode.
153
Configuring SLB
FIGURE 22
Router #3
Client #1
Client #2
C
OSPF or BGP
Router #1
Ve1: 40.40.1.120 /24 OSPF or RIP V2 Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise subnets Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise Web1 to Web10 Servers: subnets 60.60.1.40 - 60.60.1.49
Router #2
Ve1: 140.140.1.120 / 24 OSPF or RIP V2
PC
Site #1 ServerIron
S L2 S
S L2 S
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 120.120.1.120 /24 OSPF or RIP V2 or Static Routes
Site #2 ServerIron
PC
S
RS1 & RS2 Servers: 20.20.1.40 & 20.20.1.41
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 20.20.1.120 /24 OSPF or RIP V2 or Static Routes
Internal Router #1
Internal Router #2
S
Rem1 & Rem2 servers: 80.80.l.40 & 80.80.1.41
Virtual Servers for which VIP RHI is enabled: VIP60: 60.60.1.10 (Web1 to web10) & Prefix: /30 VIP50: 50.50.1.10 (Wr1 to wr10) & Prefix: /30 VIP70: 70.70.1.10 (test) & Prefix: /30 VIP90: 90.90.1.10 (Rem1 & Rem2) & Prefix: /28
Site 1 configuration The following configuration is only for virtual server vip60 (60.60.1.10).
! ver 09.3.00b269TD4 ! module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! server predictor round-robin server global-advertise-vip-route v4-only server rhi-active-bindings-threshold 80 server port 21 tcp server port 80
154
tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 20.20.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 20.20.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 30.30.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real Web1 60.60.1.40 port 8601 ! server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601
155
Configuring SLB
! server real Web4 60.60.1.43 port 8601 ! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http
156
port http url "HEAD /" ! server remote-name rem1 80.80.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 80.80.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns
157
Configuring SLB
bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp ! server virtual-name-or-ip vip20 20.20.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site1-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.100 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input
158
mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 40.40.1.120 255.255.255.0 ip address 40.40.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 20.20.1.120 255.255.255.0 ip address 20.20.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
Site 2 configuration
! ver 09.3.00b269TD4 ! module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan !
159
Configuring SLB
! healthck Site1-chk icmp dest-ip 40.40.1.120 healthck Site1-NOT boolean not Site1-chk healthck Web1-8601-chk tcp dest-ip 60.60.1.40 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web2-8601-chk tcp dest-ip 60.60.1.41 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web3-8601-chk tcp dest-ip 60.60.1.42 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web4-8601-chk tcp dest-ip 60.60.1.43 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web5-8601-chk tcp dest-ip 60.60.1.44 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web6-8601-chk tcp dest-ip 60.60.1.45 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check
160
healthck Web7-8601-chk tcp dest-ip 60.60.1.46 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web8-8601-chk tcp dest-ip 60.60.1.47 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web9-8601-chk tcp dest-ip 60.60.1.48 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web10-8601-chk tcp dest-ip 60.60.1.49 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web1-chk boolean and Site1-NOT Web1-8601-chk healthck Web2-chk boolean and Site1-NOT Web2-8601-chk healthck Web3-chk boolean and Site1-NOT Web3-8601-chk healthck Web4-chk boolean and Site1-NOT Web4-8601-chk healthck Web5-chk boolean and Site1-NOT Web5-8601-chk healthck Web6-chk boolean and Site1-NOT Web6-8601-chk healthck Web7-chk boolean and Site1-NOT Web7-8601-chk healthck Web8-chk boolean and Site1-NOT Web8-8601-chk
161
Configuring SLB
healthck Web9-chk boolean and Site1-NOT Web9-8601-chk healthck Web10-chk boolean and Site1-NOT Web10-8601-chk ! server predictor round-robin server global-advertise-vip-route v4-only server rhi-active-bindings-threshold 80 server port 21 tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 120.120.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 120.120.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 130.130.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp
162
! server real Web1 60.60.1.40 port 8601 port 8601 healthck Web1-chk ! server real Web2 60.60.1.41 port 8601 port 8601 healthck Web2-chk ! server real Web3 60.60.1.42 port 8601 port 8601 healthck Web3-chk ! server real Web4 60.60.1.43 port 8601 port 8601 healthck Web4-chk ! server real Web5 60.60.1.44 port 8601 port 8601 healthck Web5-chk ! server real Web6 60.60.1.45 port 8601 port 8601 healthck Web6-chk ! server real Web7 60.60.1.46 port 8601 port 8601 healthck Web7-chk ! server real Web8 60.60.1.47 port 8601 port 8601 healthck Web8-chk ! server real Web9 60.60.1.48 port 8601 port 8601 healthck Web9-chk ! server real Web10 60.60.1.49 port 8601 port 8601 healthck Web10-chk ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /"
163
Configuring SLB
! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 180.180.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 180.180.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp
164
port port port port bind bind bind bind bind bind bind
dns snmp mms rtsp http test http smtp test smtp ftp test ftp dns test dns snmp test snmp mms test mms rtsp test rtsp
! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp ! server virtual-name-or-ip vip120 120.120.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site2-SI logging buffered 1000 mirror ethernet 4/12 !
165
Configuring SLB
server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.101 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 140.140.1.120 255.255.255.0 ip address 140.140.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 120.120.1.120 255.255.255.0 ip address 120.120.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 !
166
interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
Syntax: [no] server rtsp-for-unknown-port The ServerIron ADX supports RTSP client port values of up to 9999. If the client is using a port number above 9999, you must configure the client to use a lower port value.
NOTE
Deletion of UDP data session along with TCP control session for RTSP
The ServerIron ADX tracks both control and data sessions for RTSP regardless of the underlying transport layer (TCP or UDP) used by these sessions. When the system deletes an RTSP control session (TCP based), it also deletes the respective data session (which may be UDP based). Use the following command to enable this functionality.
ServerIronADX(config)# server rtsp-delete-udp-with-tcp-sess
167
168
The following example shows how to calculate the BP for a reverse-SLB flow coming from Real-Server (1.1.1.1:80) to Source-NAT-IP (5.5.5.5).
ServerIronADX(config)#show bp-distribution source-ip 1.1.1.1 5.5.5.5 80 2048 0 Packets for the specified flow map to: BP 1/1
It displays which barrel processor the particular flow is landing on. The command takes IP addresses in either IPv4 or IPv6 format.
Understanding windows terminal server on page 169 Configuring Windows Terminal Server on page 171
FIGURE 23
Client
ServerIron
R1
R2
Session Directory
When the new connection is made, the ServerIron ADX load balances it to one of the bound terminal servers. R2 in the example above. On receiving the client logon, R2 checks with the session directory to see if the username exists in its database. Because this user had not previously established a session, the logon is established with R2.
169
R2 forwards a token to the user with the server IP address. The client now connects to the virtual server (VIP), and includes the token. The ServerIron ADX inspects this token and then establishes a connection with the server that the token identifies. Figure 24 shows how Windows Terminal Server load balancing with persistence works in the case of a disconnected session.
FIGURE 24
Client
ServerIron
R1
R2
Session Directory
The ServerIron ADX load balances the initial connection to one of its bound servers. When the user logs on, the terminal server that receives this request, checks with the session directory to see if there is an established session in its database. The session directory communicates the same information to the terminal server. Because the user has an established session with another server, the terminal server forwards a token to the user with the IP address of the server that it had disconnected from or had a failed session. The user now connects to the VIP and uses the token with the server IP to which it needs to be connected. After inspecting the token, the ServerIron ADX directs the server to the IP in the token rather than load balancing the request.
NOTE
This IP port should be one of the servers bound to the VIP. Otherwise, the ServerIron ADX does not direct the request.
The IP address redirection feature on the terminal server session directory needs to be turned OFF for Windows Terminal Server to work. If IP address redirection is ON, the client tries to establish the session with the server directly after receiving the token. Only with Windows Terminal Server OFF, is a routing token for redirection used. The client connects to the VIP of SI and uses the token for redirection.
NOTE
170
Enhanced BP distribution
To increase the hashing granularity for traffic distribution across BPs use the following command:
ServerIronADX(config)#server jc-enhanced-hash-type
To perform hashing, you can achieve better granularity by using more bits (last 8 bits) from the client IP address, instead of using the default 4 bits. As a result, the hash distribution across BPs is in the ratio 43:43:43:43:42:42 as opposed to the ratio 3:3:3:3:2:2. This will benefit you from seeing uneven distribution of traffic across BPs, because of the client IP address range and its usage is limited only to SLB configurations.
171
Enhanced BP distribution
172
Chapter
Overview
This chapter describes Server Load Balancing configuration options that are stateless. Stateless SLB does not use session table entries for the TCP or UDP sessions between the ServerIron ADX and clients or real servers. These configuration options are useful if you want to deploy multiple ServerIron ADXs to provide service for the same VIPs or applications, but the network topology cannot ensure that server responses will pass back through the ServerIron ADX. The Direct Server Return (DSR) feature allows you to deploy a single ServerIron ADX in a network where the server responses do not pass back through the ServerIron ADX. Compare the configuration example for SwitchBack with the examples in this chapter to determine which type of configuration is applicable to your network. Refer to Direct Server Return on page 62.
NOTE
NOTE
The ServerIron ADX does not support Stateless SLB with aliased ports, such as shown in the following configuration:
server virtual-name-or-ip v3 10.176.7.23 port dns port dns stateless bind dns rs1 7777 real-port dns
The server responses for the application can use alternate paths back to the client. For
example, the ServerIron ADX and real servers can be connected through a network that provides multiple return paths to the client. Because the port is stateless, the ServerIron ADX does not assume that the application is unhealthy if the servers response does not flow back through the ServerIron ADX.
The ServerIron ADX has more session resources available for application ports that need them.
For example, if your server farm provides non-secure web content in addition to secured transaction processing using SSL, you can use the ServerIron ADX to maintain state information for the SSL connections while allowing the HTTP (web) connections to be stateless. The SSL connections flow back through the ServerIron ADX, but the HTTP connections use any available path as determined by a real servers gateway and other routes back to the client.
173
The SwitchBack feature also allows server responses to take paths that do not pass back through the ServerIron ADX. However, SwitchBack still uses session table resources because the ServerIron ADX creates a session table entry for the connection from the client to the real server.
NOTE
The ServerIron software currently supports stateless TCP/UDP only for stateless application protocols such as HTTP (TCP port 80).
NOTE
NOTE
FTP and TFTP services do not maintain a fixed server port for responses. In such cases stateless mode cannot be used.
How the ServerIron ADX selects a real server for a stateless port
The ServerIron ADX does not use the standard SLB load-balancing methods when selecting a real server for a stateless application port. Instead, the ServerIron ADX uses hash values to select a real server. The ServerIron ADX calculates the hash value for a given client request based on the requests source IP address and source TCP/UDP port. The ServerIron ADX has up to 8192 hash buckets (the default is 256) and divides the number of buckets evenly among the real servers. When the ServerIron ADX forwards a clients request for a stateless application port to the real server that corresponds to the calculated hash value, the ServerIron ADX does not change the source address of the clients request, but does change the destination address from the requested VIP into the real servers IP address. For example, when a ServerIron ADX receives a request for TCP port 80 (HTTP) on VIP (192.168.4.69) from client 209.161.1.88, the ServerIron ADX calculates a hash value based on 209.161.1.88 and 80, then forwards the request to the real server that has the calculated hash value. The request packet is in the following format:
Source IP: Clients IP address Source application port: Port number selected by clients application Destination IP:Real servers IP Destination application port: Port number requested by client
If client 209.161.1.88s Web browser sent the request from TCP port 8080, and the ServerIron ADXs hash calculation resulted in selecting real server 10.10.10.2, the packet would have the following address values:
Source IP: 209.161.1.88 Source application port: 8080 Destination IP:Real servers IP 10.10.10.2 Destination application port: 80
Because the clients request contains the clients IP address and application port, the real server can send the packet back to the client along any valid routing path. The request does not need to pass back through the ServerIron ADX that forwarded the request. In fact, the ServerIron ADX that forwards the requests to the transparent VIP does not create session table entries for the requests.
174
Because the ServerIron ADX does not maintain state information for the requests for stateless application ports, the ServerIron ADX does not care whether the server response for a stateless port passes back through the ServerIron ADX on the way to the client. For a normally configured VIP, the servers response passes back though the ServerIron ADX. For a transparent VIP, the response does not necessarily pass back through the ServerIron ADX. Because the ServerIron ADX does not create session table entries for requests to the stateless application port, you cannot use ServerIron ADX features that use information from the session table. For example, you cannot use source NAT, port translation, and similar features.
NOTE
Syntax: [no] server stateless-hash-table-size <table-size> The <table-size> variable can be set to any of the following values: 256, 512, 1024, 2048, 4096, or 8192. The default value is 256.
Syntax: [no] port <tcp/udp-portnum> stateless The <tcp/udp-portnum> parameter specifies the application port you want to make stateless.
175
For UDP connections consisting of one client packet and one server response packet, you can disable the stateless SLB hashing algorithm. When the stateless SLB hashing algorithm is disabled for UDP ports, the ServerIron ADX uses the round-robin load balancing method to select a real server for the request. In this case, the ServerIron ADX load balances UDP packets destined for the VIP without creating a session and without calculating hash values based on UDP port number and source IP address. DNS is an example of a UDP port where this feature can be used. The advantage of disabling the stateless SLB hashing algorithm is that a new real server can be selected immediately after it is brought up. For example, to disable the stateless SLB hashing algorithm for the DNS port (UDP port 53), enter commands such as the following:
ServerIronADX(config)# server virtual-name-or-ip Stateless 192.168.4.69 ServerIronADX(config-vs-Stateless)# port dns stateless no-hash
NOTES: When this command is applied, in some cases it will not take affect. This occurs if the sessions are stuck and it requires you to clear the sessions first and then apply the command, as described in the following.
1. Disable the real server and unbind the VIP. 2. Clear the sessions using the clear server sessions <real server name> command. 3. Apply the stateless no-hash command, bind the real servers to the VIP and enable the real server.
Syntax: [no] port <tcp/udp-port> [stateless [tcp | udp] [no-hash]] The <tcp/udp-port> parameter specifies the application port you want to make stateless. The stateless parameter configures the port to be stateless. The tcp | udp parameter restricts stateless operation to the specified protocol (TCP or UDP). The no-hash parameter disables the SLB hashing mechanism for the port (and protocol, if specified). When hashing is disabled, the ServerIron uses the round-robin load balancing method to select a real server for each request.
176
Syntax: [no] port <port-name> stateless frag-support The <port-name> variable specifies the port in the stateless mode that is being enabled for fragmentation.
Feature Limitations
One real server cannot be bound to multiple VIPs even for a different service. This means that,
given a real server IP, there is only one VIP that is bound to this real server.
All packets initiated from real server will be NATed. One can however, have an association each for IPv6 and IPv4 address of same server to
different VIP (one V6 VIP and one v4 VIP).
Fragmented pass-through traffic is not supported For L7 switching for a different port under the same VIP, Brocade highly recommends using
another VIP.
Connections originating from real server ports other than the ports configured on the
ServerIron ADX as real server ports are not supported when fragmented. Example VIP: 11.1.1.1:80 rs1 10.1.1.1:80 and rs2 10.1.1.2:80 In this configuration, packets from rs1 and rs2 with a source port other than port 80, will exhibit unpredictable behavior when they are fragmented. In these cases, configure the virtual server as a statefull virtual server.
177
178
Chapter
Health Checks
If the ARP entry for the server times out, the ServerIron ADX uses the IP ping to create a new
ARP entry for the server. The ARP request is sometimes referred to as a Layer 2 health check because the request is for the real servers hardware layer address.
If the time between the last packet sent to the server and the last packet received from the
server increases, the ServerIron ADX uses the IP ping to determine whether the slowed response time indicates loss of the server. If the server responds to the ping, the ServerIron ADX then sends a Layer 4 or Layer 7 health check, depending on whether the ports application type is known to the ServerIron ADX. The ServerIron ADX sends pings at an interval of 2 seconds apart, and retries unsuccessful pings up to 4 times by default. You can change the ping interval and retries if desired. Refer to Modifying the ping interval and ping retries on page 181. The following Layer 3 health check types are supported:
179
TABLE 13
Type
ARP request
When performed
IP ping
When you configure a real server If the ARP entry ages out If the time between the last packet sent to the server and the last packet received from the server increases
Syntax: [no] server no-real-l3-check To globally disable Layer 3 health check for all remote real servers or of IP addresses learned through GSLB, enter the following command.
ServerIronADX(config)# server no-remote-l3-check
Syntax: [no] server no-remote-l3-check The server no-remote-l3-check command also disables Layer3 health checks of IP addresses learned through GSLB. To disable the Layer 3 health check on an individual real server, enter the following command.
ServerIronADX(config-rs-R1)# no-l3-check
NOTE
Syntax: [no] no-l3-check This command applies to local real servers and remote real servers.
180
Syntax: [no] server ping-interval <value> The <value> variable can be a value from 1 through 10 seconds. The default is 2 seconds. To modify the number of times the ServerIron ADX will ping a real server before changing the server state to FAILED, enter the following command.
ServerIronADX(config)# server ping-retries 7
Syntax: [no] server ping-retries <value> The <value> variable can be a value from 2 through 10. The default retry value is 4.
TCP health check The ServerIron ADX checks the TCP ports health based on a TCP three-way
handshake:
The ServerIron ADX sends a TCP SYN packet to the port on the real server. The ServerIron ADX expects the real server to respond with a SYN ACK. If the ServerIron ADX receives the SYN ACK, the ServerIron ADX sends a TCP RESET, satisfied that the TCP port is alive.
UDP health check The ServerIron ADX sends a UDP packet with garbage (meaningless) data
to the UDP port:
If the server responds with an ICMP Port Unreachable message, the ServerIron ADX concludes that the port is not alive. If the server does not respond at all, the ServerIron ADX assumes that the port is alive and received the garbage data. Because UDP is a connectionless protocol, the ServerIron ADX and other clients do not expect replies to data sent to a UDP port, so a lack of response indicates a healthy port.
The ServerIron ADX assumes that a port is a UDP port unless you configure the port as a TCP port. To configure a port as a TCP port, add a port profile for the port and specify the port type TCP. Refer to Basing a ports health on the health of another port on page 234.
NOTE
181
After the ServerIron ADX sends an initial packet (TCP or UDP) to the server to bring the port up, the ServerIron ADX waits one second and then checks for a response from the server. If no response is received during that time, the ServerIron ADX will send another packet. The time at which the ServerIron ADX sends the second packet depends on the number of ports being brought up at that time. The ServerIron ADX will send the second packet after it has sent initial packets to all the other ports being brought up at that time. By default, the ServerIron ADX does not repeat the Layer 4 health check after bringing up the port when you bind the real server to the virtual server. However, you can enable a periodic keepalive health check for the port. To configure the keepalive health check globally, configure a port profile for the port. You also can enable or disable the keepalive health check on individual real servers. The following Layer 4 health check types are supported:
TCP UDP
Table 14 describes the Layer 4 health check types performance and its description.
TABLE 14
Type
TCP
When you bind a TCP application port on a real server to a TCP application port on a virtual server At regular intervals, if keepalive is enabled for the port and the port does not have a Layer 7 health check
UDP
When you bind a UDP application port on a real server to a UDP application port on a virtual server At regular intervals, if keepalive is enabled for the port and the port does not have a Layer 7 health check
Performing Layer 4 UDP keepalive health checks for the DNS port
You can configure the ServerIron ADX to perform Layer 4 UDP keepalive health checks for the DNS port (port 53). To do this globally for the DNS port on all real servers, enter the following commands.
ServerIronADX(config)# server port dns ServerIronADX(config-port-dns)# udp l4-check-only
When the DNS port on a real server is brought up, by default the ServerIron ADX performs a Layer 4 TCP health check. You can configure the ServerIron ADX to perform a Layer 4 UDP health check when the DNS port is brought up by adding the no tcp keepalive enable command to the DNS port profile as in the following example.
182
DNS on page 185 FTP on page 186 HTTP (status code) on page 187 HTTP (content verification) on page 187 Scripted (content verification for unknown ports) on page 188 IMAP4 on page 188 LDAP on page 188 MMS on page 189 NNTP on page 189 PNM on page 189 POP3 on page 190 RADIUS on page 190 RTSP on page 191 SMTP on page 191 SSL (complete) on page 191 SSL (simple) on page 192 Telnet on page 192
183
Application ports
The ServerIron ADX selects a Layer 4 or Layer 7 health check based on whether the application port is known to the ServerIron ADX. A Layer 4 health check is a TCP or UDP request and is not related to a specific application. A Layer 7 health check is an application-aware health check designed for the specific application. The following application ports are known to the ServerIron ADX. The ServerIron ADX performs Layer 7 health checks for these ports. For other ports, the ServerIron ADX performs a Layer 4 TCP or UDP health check instead. TCP ports:
FTP (port 21). Ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name FTP
corresponds to port 21.
HTTP (port 80) IMAP4 (port 143) LDAP (port 389) MMS (port 1755) NNTP (port 119) PNM (port 7070) POP3 (port 110) RTSP (port 554) SMTP (port 25) SSL (port 443) TELNET (port 23)
UDP ports:
DNS (port 53) RADIUS (port 1812) RADIUS-OLD (port 1645), which is used in some older RADIUS implementations instead of port
1812
NOTE
You can add either port 1812 or port 1645 to a given real or virtual server, but you cannot add both ports to the same server. The keepalive health checks are disabled by default. To enable a keepalive health check for an application port, configure a port profile for the port (which automatically enables the keepalive globally for the port) or enable the keepalive on individual real servers that use the port.
DNS
The ServerIron ADX performs one or both of the following types of DNS health checks:
Address-based The ServerIron ADX sends an address request for a specific domain name. If
the server successfully responds with the IP address for the domain name, the server passes the health check.
Zone-based The ServerIron ADX sends a Source-of-Authority (SOA) request for a specific zone
name. If the server is authoritative for the zone and successfully responds to the SOA request, the server passes the health check.
184
If you configure both types of DNS health check for a server, the server must successfully respond to both health checks to remain in the server rotation. You enable each type of DNS health check on a global basis and configure them on an individual server basis.
NOTE
If the server replies with the requested IP address or zone name, the ServerIron ADX considers
the server port to be ACTIVE and marks it as such.
If the server does not reply with the requested IP address or zone name, the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not send the requested information, the ServerIron ADX marks the DNS port on the server FAILED and removes the server from the rotation for DNS services. By default, the health check is non-recursive. If the real server (DNS server) does not successfully reply to the health check, then the DNS port fails the health check. You can enable the real server to perform a recursive lookup for the IP address or zone requested by the health check. In this case, if the real server does not have the requested address or zone, the server can pass the request on to a DNS server with higher authority. Refer to Enabling recursive DNS health checks on page 195. Performed: Immediately following a successful Layer 4 UDP health check
NOTE
FTP
The ServerIron ADX waits for a message from the server:
If the server sends a greeting message with status code 220, the ServerIron ADX resets the
connection and marks the port ACTIVE.
185
If the server does not send a greeting message with status code 220, the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for FTP service. Performed: Immediately following a successful Layer 4 TCP health check
If the server responds with an acceptable status code, the ServerIron ADX resets the
connection and marks the port ACTIVE. For SLB, the default acceptable status codes for the check are 200 299 and 401. For TCS, the default acceptable status codes are 100 499.
If the server responds with a different status code, the ServerIron ADX marks the HTTP port
FAILED.
If the server does not respond, the ServerIron ADX retries the health check up to the number of
times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for HTTP service. You can change the status code range for individual servers. If you do so, the defaults are removed and only the status code ranges you specify cause the server to pass the health check. Performed: Immediately following a successful Layer 4 TCP health check
NOTE
If the page meets the criteria for keeping the port up, then the ServerIron ADX marks the port
ACTIVE. This means that the HTTP application has passed the health check.
If the page meets the criteria for bringing the port down, then the ServerIron ADX marks the
port FAILED.
186
If the page meets none of the selection criteria, then the ServerIron ADX marks the port either
ACTIVE or FAILED according to a user-defined setting. Refer to Configuring HTTP content matching lists on page 223 for information on specifying a page to check and on setting up lists of selection criteria. Performed:
Immediately following a successful Layer 4 TCP health check At regular intervals, if keepalive is enabled for the port
If the text in the response meets the criteria for keeping the port up, then the ServerIron ADX
marks the port ACTIVE.
If the text in the response meets the criteria for bringing the port down, then the ServerIron
ADX marks the port FAILED.
If the text in the response meets none of the selection criteria, then the ServerIron ADX marks
the port either ACTIVE or FAILED according to a user-defined setting.
If no response is received within the configured interval (the default is five seconds), the
ServerIron ADX sends a RST and retries the health check. After the configured number of retries (the default is two retries), if the server still does not respond, the ServerIron ADX marks the server port FAILED. Refer to Configuring scripted health checks on page 226 for more information. Performed: Immediately following a successful Layer 4 TCP health check
IMAP4
The ServerIron ADX waits for a message from the IMAP4 server:
If the server sends a greeting message that starts with * OK, The ServerIron ADX sends a
Logout command to the IMAP4 port on the real server, resets the connection, and marks the port ACTIVE.
If the server does not send a greeting message that starts with * OK, the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for IMAP4 service.
187
LDAP
The ServerIron ADX sends a bind request to the LDAP server and waits for a reply. The bind request includes a configurable version number, which can be 2 or 3. The default is 3.
If the server sends a bind reply with a result code of any status (no error), the ServerIron ADX
resets the connection and marks the port ACTIVE.
If the server does not send a bind reply by the time the LDAP keepalive retries expires, the
ServerIron ADX retries the health check up to the number of times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for LDAP service. Performed: Immediately following a successful Layer 4 TCP health check
MMS
The ServerIron ADX sends an intentionally invalid request to the server:
If the server replies with a packet containing the value "MMS", the ServerIron ADX marks the
port ACTIVE.
If the server does not reply with a packet containing the value "MMS", the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for MMS service. You can view the ServerIron ADXs invalid request in the MMS server log. The log entry has error code 400. Performed: Immediately following a successful Layer 4 TCP health check
NOTE
NNTP
The ServerIron ADX waits for a message from the NNTP server:
If the server sends a greeting message with status code 200 or 201, the ServerIron ADX sends
a Quit command to the NNTP port on the real server, then resets the connection by sending a quit and a RESET, one immediately after the other, and marks the port ACTIVE.
188
If the server does not send a greeting message with status code 200 or 201, the ServerIron
ADX retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for NNTP service. Performed: Immediately following a successful Layer 4 TCP health check
PNM
The ServerIron ADX sends a PNM file request that does not have a file name:
If the server sends a reply containing the value "PNA", the ServerIron ADX marks the port
ACTIVE.
If the server does not send a reply containing the value "PNA", the ServerIron ADX retries the
health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for PNM service. Performed: Immediately following a successful Layer 4 TCP health check
POP3
The ServerIron ADX waits for a message from the POP3 server:
If the server sends a greeting message that starts with + OK, the ServerIron ADX sends a
Quit command to the POP3 port on the real server, then resets the connection by sending a quit and a RESET, one immediately after the other, and marks the port ACTIVE
If the server does not send a greeting message that starts with + OK, the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for POP3 service. Performed: Immediately following a successful Layer 4 TCP health check
RADIUS
The ServerIron sends an authentication request with a user name, password, and key to the RADIUS server. The account information does not need to be valid for the server to pass the health check. In fact, to prevent someone from learning account information by observing the ServerIrons RADIUS health check, Brocade recommends you use invalid information. If the server replies with the result code ACCEPT or REJECT, the ServerIron considers the port to be fine and marks it ACTIVE.
189
If the server does not reply or the server Sends an ICMP Destination Unreachable message, the ServerIron retries the health check up to the number of times configured (the default is two retries). If the server still does not reply with ACCEPT or REJECT, the ServerIron marks the RADIUS port FAILED and removes the server from the rotation for RADIUS services. You can configure a check either for the well-known RADIUS port number 1812 or port 1645. You cannot configure a health check for both of these ports on the same server. Performed: Immediately following a successful Layer 4 UDP health check
NOTE
RTSP
The ServerIron ADX sends a standard RTSP option packet, using sequence number 1:
If the server responds with an acceptable status code, the ServerIron ADX resets the
connection and marks the port ACTIVE. For SLB, the default acceptable status codes for the check are 200 299 and 401.
If the server responds with a different status code, the ServerIron ADX marks the port FAILED. If the server does not respond, the ServerIron ADX retries the health check up to the number of
times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for RTSP service. Performed: Immediately following a successful Layer 4 TCP health check
SMTP
The ServerIron ADX waits for a message from the SMTP server:
If the server sends a greeting message with status code 220, the ServerIron ADX sends a Quit
command to the SMTP port on the real server, then resets the connection by sending a quit and a RESET, one immediately after the other, and marks the port ACTIVE.
If the server does not send a greeting message with status code 220, the ServerIron ADX
retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected message, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for SMTP service. Performed: Immediately following a successful Layer 4 TCP health check
190
SSL (complete)
The ServerIron ADX initiates an SSL connection with the server on TCP port 443, a secure link is negotiated, and encrypted data is transferred across it. After the SSL connection is established, the ServerIron ADX sends the SSL server an HTTP GET or HEAD request. The GET or HEAD request specifies a page containing the URL of a page on the server. By default, the ServerIron ADX sends a HEAD request for the default page, 1.0, although this can be changed with the port ssl url command:
If the server responds with an acceptable status code, the ServerIron ADX resets the
connection and marks the port ACTIVE.
If the server does not respond, the ServerIron ADX retries the health check up to the number of
times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for SSL service. Performed:
Immediately following a successful Layer 4 TCP health check At regular intervals, if keepalive is enabled for the port
SSL (simple)
The ServerIron ADX sends an SSL client hello with the SSL SID set to 0:
If the server responds, then the ServerIron ADX resets the connection and marks the port
ACTIVE.
If the server does not respond, the ServerIron ADX retries the health check up to the number of
times configured (the default is two retries). If the server still does not respond, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for SSL service. Performed:
Immediately following a successful Layer 4 TCP health check At regular intervals, if keepalive is enabled for the port
Telnet
The ServerIron ADX waits for a message from the Telnet server:
If the server sends a command string that starts with the IAC escape characters (FF), the
ServerIron ADX resets the connection and marks the port ACTIVE.
If the server does not send a command that starts with the IAC escape character, the
ServerIron ADX retries the health check up to the number of times configured (the default is two retries). If the server still does not send the expected escape character, the ServerIron ADX marks the server port FAILED and removes the server from the load-balancing rotation for Telnet service. Performed: Immediately following a successful Layer 4 TCP health check
191
Port-specific settings
Layer 7 health checks
You can configure the following Layer 7 health check parameters on a real server basis:
Keepalive health check state (enabled or disabled) HTTP keepalive method, values, and valid status codes HTTP content matching lists for HTTP content verification health checks Scripted health checks (content verification health checks for unknown ports) DNS keepalive method and values (zone-based or addressed-based check and the zone or domain name)
RADIUS keepalive values (user name, password, and encryption key) LDAP version (2 or 3)
The ServerIron ADX uses its own management IP address or a source IP address configured on the ServerIron ADX as the source IP address in the health check packets (as opposed to a virtual IP address). If the real servers are in the same subnet as the ServerIron ADX, then the health checks can use the ServerIron ADXs management IP address. Otherwise, the health checks use a source IP address. Refer to Web hosting with ServerIron ADX and real servers in different subnets on page 456.
NOTE
NOTE
Syntax: [no] port <port> keepalive If you use the no parameter in front of the command, you are locally disabling the health check. The health checks are locally disabled by default. The <port> parameter can have one of the following values:
dns (port 53) ftp (port 21). Ports 20 and 21 both are FTP ports but in the ServerIron ADX, the name ftp
corresponds to port 21.
192
imap4 (port 143) ldap (port 389) nntp (port 119) ntp (port 123) pop2 (port 109) pop3 (port 110) radius (UDP port 1812) radius-old (UDP port 1645, which is used in some older RADIUS implementations instead of port 1812) smtp (port 25) snmp (port 161) ssl (port 443) telnet (port 23) tftp (port 69) <number>
NOTE
Specify the port number if the port is not one of the well-known names listed above.
HTTP
Changing HTTP keepalive method, value, and status codes
The ServerIron ADX supports two kinds of HTTP health checks:
HTTP status code health checks look at the status code returned in HTTP responses to
keepalive requests.
HTTP content verification health checks look at the actual HTML contained in HTTP responses
to keepalive requests. The default URL page for HTTP keepalive requests used in HTTP health checks is HEAD /1.0. You can change the URL that the ServerIron ADX requests on a real server basis. For HTTP content verification health checks, you may want to change the default URL page for HTTP keepalive requests URL page, since a request for HEAD /1.0 would not return a response containing HTML for content verification. You can specify a GET request for a page containing text that can be searched and verified. Refer to Configuring HTTP content matching lists on page 223 for more information. To configure the HTTP keepalive request to send a GET request for sales.html, enter the following commands.
ServerIronADX(config)# server real zip 207.96.3.251 ServerIronADX(config-rs-zip)# port http url "GET /sales.html" ServerIronADX(config-rs-zip)# exit
NOTE
193
ServerIronADX(config)# server virtual-name-or-ip shoosh 207.96.4.250 ServerIronADX(config-vs-shoosh)# port http ServerIronADX(config-vs-shoosh)# bind http zip http ServerIronADX(config-vs-shoosh)# exit
Syntax: port http url [GET | HEAD] [/]<URL-page-name> GET or HEAD is an optional parameter that specifies the request type. By default, HTTP keepalive uses HEAD to retrieve the URL page. You can override the default and configure the ServerIron ADX to use GET to retrieve the URL page. The slash (/) is an optional parameter. If you do not set the GET or HEAD parameter, and the slash is not in the configured URL page, then ServerIron ADX automatically inserts a slash before retrieving the URL page. To change the HTTP status codes that the ServerIron ADX considers normal (not indicative of a failure of the HTTP service), enter the following command.
ServerIronADX(config-rs-zip)# port http status-code 200 201 300 302
Syntax: port http status-code <range> [<range>[<range>[<range>]]] The command in the example specifies two ranges (200 201 and 300 302). You can specify up to four ranges (total of eight values). To specify a single message code for a range, enter the code twice. For example to specify 200 only, enter the following command: port http status-code 200 200.
NOTE
When you change the status code ranges, the defaults are removed. As a result, you must specify all the valid ranges, even if a range also is within the default ranges. For example, if you still want codes 200 299 to be valid, you must specify them.
DNS
Enabling recursive DNS health checks
By default, a Layer 7 health check for a DNS port sends the query only to the real server (DNS server). If the DNS server does not reply with the IP address or zone name requested by the health check, the port fails the health check. You can enable the real server to perform a recursive lookup for the IP address or zone requested by the health check. In this case, if the real server does not have the requested address or zone, the server can pass the request on to a DNS server with higher authority. The real server can repeat this process until either a DNS server with higher authority successfully replies to the health check, or the server with the highest authority is unable to successfully reply to the request. To enable recursive DNS health checks globally at the port profile level for the DNS port, enter commands such as the following.
ServerIronADX(config)# server port dns ServerIronADX(config-port-dns)# allow-recursive-search
NOTE
This feature applies to Boolean health checks in addition to standard (non-Boolean) health checks.
194
You can enable this feature only on the well-known DNS port (53).
NOTE
Address-based The ServerIron ADX sends an address request for a specific domain name. If
the server successfully responds with the IP address for the domain name, the server passes the health check.
Zone-based The ServerIron ADX sends a Source-of-Authority (SOA) request for a specific zone
name. If the server is authoritative for the zone and successfully responds to the SOA request, the server passes the health check. To configure the domain name for address-based DNS health checking, enter the following command.
ServerIronADX(config-rs-zip)# port dns addr_query "evil.mojo.com"
Syntax: [no] port dns addr_query "<name>" To configure the zone name for zone-based DNS health checking, enter the following command.
ServerIronADX(config-rs-zip)# port dns zone mojo.com
RADIUS
Configuring RADIUS health check values
You can define the RADIUS parameters that the ServerIron ADX sends to a RADIUS application port during the Layer 7 health check. The RADIUS health check requests a specific user name, password, and authentication key from the RADIUS server. To specify these values, use one of the following methods. To configure the parameters for a RADIUS health check, enter commands such as the following at the Real Server level of the CLI.
ServerIronADX(config-rs-rocket)# port radius username evil ServerIronADX(config-rs-rocket)# port radius password woody ServerIronADX(config-rs-rocket)# port radius key laser
Syntax: [no] port radius username <string> Syntax: [no] port radius password <string> Syntax: [no] port radius key <string>
195
LDAP
Changing the LDAP version
By default, the ServerIron ADX Layer 7 health check for LDAP ports tests for version 3 LDAP. You can change the version to 2 if needed. To change the LDAP version the ServerIron ADX uses when checking the health of an LDAP port on a real server, enter a command such as the following at the Real Server level of the CLI.
ServerIronADX(config-rs-rocket)# port ldap 2
Syntax: [no] port ldap <num> The <num> parameter specifies the version and can be 2 or 3. The default is 3.
If the LDAPS server sends a bind reply with a result code of any status (no error), the ServerIron
ADX resets the connection and marks the port ACTIVE.
If the LDAPS server does not send a bind reply by the time the LDAPS keepalive interval
expires, the ServerIron ADX retries the health check up to the number of times configured (by default, two retries). If the LDAPS server still does not respond, the ServerIron ADX marks the server port FAILED and removes the LDAPS server from the load-balancing rotation for LDAPS service. You can configure standard (non-Boolean) LDAPS health checks in addition to Boolean LDAPS health checks. Health checking commands available for other TCP ports are also available for the LDAPS port.
196
ServerIronADX(config)# server port ldaps ServerIronADX(config-port-ldaps)# tcp keepalive enable ServerIronADX(config-port-ldaps)# exit ServerIronADX(config)# server real r1 10.10.1.101 ServerIronADX(config-rs-r1)# port ldaps ServerIronADX(config-rs-r1)# exit
If no-fast-bringup is not configured for the LDAPS port, if l4-check-only is configured for the LDAPS port, or if the keepalive health check for the LDAPS port is disabled, the ServerIron ADX does not establish a secure connection when performing a health check on port 636. Instead, the ServerIron ADX establishes a regular TCP connection on port 636 and sends a TCP RESET, using the same method as the LDAP health check.
A Layer 7 health check must be configured in order for the ServerIron ADX to establish a secure connection on the LDAPS port. If only a Layer 4 health check is configured, then the ServerIron ADX establishes a regular TCP connection on port 636.
The Simple method sends the server an SSL client hello with the SSL SID set to 0. If the server
responds, then the server passes the health check. The ServerIron ADX then resets the connection and marks the SSL port ACTIVE.
The Compound method negotiates an SSL connection and sending a GET or HEAD request to
the server once the connection is established. The GET or HEAD request specifies a page containing the URL of a page on the server. If the server responds with an acceptable status code, the ServerIron ADX resets the connection and marks the port ACTIVE.
To use the complete SSL health check, enter the following command (notice the no).
ServerIronADX(config)# no server use-simple-ssl-health-check
Error messages
The following error messages are related to SSL health check, after receiving SSL data while it cannot find the key to decrypt the data. The key is missing possibly due to a time out.
197
ssl_receive_data but tcb->ssl is null SSL cleanup: can't find key ??? SSL interface: ssl_read_data return error !!! ssl_receive_data but tcb->ssl is null SSL cleanup: can't find key ??? SSL interface: ssl_read_data return error !!! ssl_receive_data but tcb->ssl is null SSL cleanup: can't find key ??? SSL interface: ssl_read_data return error !!!
The ServerIron ADX normally stops processing the rest of the data and releases the SSL control block data structure. However when the ServerIron ADX does not do that, the ServerIron ADX finds the SSL data structure is null and prints these messages.
FTP (port 21) IMAP4 (port 143) LDAP (port 389) POP3 (port 110) SMTP (port 25) Telnet (port 23)
UDP ports:
FTP (port 21) IMAP4 (port 143) LDAP (port 389) POP3 (port 110) SMTP (port 25) Telnet (port 23)
The health check mechanisms for these ports are described in Health checks overview on page 179. To configure an unknown TCP port to use the Layer 7 health check for one of the applications listed above, enter commands such as the following.
ServerIronADX(config)# server port 999 ServerIronADX(config-port-999)# tcp keepalive protocol smtp
These commands configure port profile parameters for port 999. The second command in the example makes the port a TCP port and assigns the SMTP Layer 7 health check to the port.
198
Syntax: [no] server port <TCP-portnum> Syntax: [no] tcp keepalive protocol <TCP-port> The protocol <TCP-port> parameter specifies the type of Layer 7 health you want to use for the port. You can specify one of the following:
Configure the Layer 7 health check on the DNS port (53). For configuration information, refer to
Configuring DNS health check method and values on page 195. The unknown port uses the same health check parameters as the ones you configure for the DNS port. For example, if you configure an address-based DNS health check for a specific domain name, the ServerIron ADX requests the same domain name when checking the health of the unknown port.
Create a port profile for the unknown port and specify dns or 53 as the well-known port whose
Layer 7 health check you want to use. To configure an unknown port to use a Layer 7 health check, enter commands such as the following.
ServerIronADX(config)# server port 999 ServerIronADX(config-port-999)# udp keepalive protocol dns
Syntax: server port <UDP-portnum> Syntax: udp keepalive protocol <UDP-portnum> The protocol <UDP-port> parameter specifies the type of Layer 7 health you want to use for the port. You can specify dns or 53.
NOTE
Layer 4 refers to making a TCP connection to a port. Layer 7 refers to making an HTTP request and getting an HTTP reply.
199
TABLE 15
State
ENB:enabled FAL:failed TST:testing
Server states
Description
There is no link to the real server. The real server is configured on the ServerIron ADX but is not physically connected to the ServerIron ADX. The real server has failed to respond to repeated Layer 3 health checks (IP pings). Typically, a real server changes to the FAILED state from the SUSPECT state. A real server will go to "Testing" if it is reachable at Layer 2 but not at Layer 3. When you first add a real server, the ServerIron ADX will first try to ARP it. While it is ARPing, the server state will read "State: Enabled". After the real server replies to the ARP, the ServerIron ADX will normally send one ICMP echo request. After it gets the ARP reply and before it gets the ICMP echo reply, the ServerIron ADX will show the real server state as Testing. If you have a firewall application on the real server so that it responds to ARP queries but not to ICMP pings, then the real server will show as "Testing" indefinitely. Use the show server real command to display detailed state information. The show server bind command is more concise, though it focuses on port status. The ServerIron ADX associates a time stamp with each packet sent to and received from the real servers. If the time gap between the last packet received from the server and the last packet sent to the server grows to 3 or 4 seconds, the ServerIron ADX sends a ping (Layer 3 health check) to the server. If the server does not respond within the ping interval (a configurable parameter), the ServerIron ADX changes the state to SUSPECT and resends the ping, up to the number of retries specified by the ping retries parameter (also configurable). If the server still does not respond after all the retries, the state changes to FAILED. If the server does respond, the state changes to ACTIVE. The server gracefully shut down. Refer to server force-delete command under the section Enabling force-delete . A real server will go to active as long as it is reachable at Layer 2 and Layer 3, regardless of whether its ports are bound to anything, or whether its ports pass tests. After receiving the first ping reply, the ServerIron ADX normally switches to periodic ARPs. If you enable server l3-health-check globally, then the ServerIron ADX switches to using periodic pings instead. The real server still shows the state active. If you enter the no server l3-health-check command globally, then the ServerIron ADX will switch back to ARP. After the first ping succeeds, if you do not have Layer 3 health checks enabled, you can add an ICMP blocking ACL on the real server, and the system will still display "Active". If you re-add server l3-health-check, then the real server state will change from Active to Suspect and then Failed. This behavior takes place before any ports have been bound to a virtual server. All these states on a real server have nothing to do with Layer 4 or Layer 7. Used for ports that have not been bound to a virtual server. Both can occur when you're trying to unbind or delete ports. You might not even see them in anything but a live environment. After you remove real servers from a virtual server or delete virtual servers or unbind ports, normally the ServerIron ADX or stackable waits until connections in progress finish their business.
SUS:suspect
GDN:grace-dn ACT:active
200
TABLE 16
State
ENABLED FAILED
TEST SUSPECT
Information about the remaining real servers has been omitted for brevity. Syntax: show server real The state information shown by this display is highlighted in bold type in the example. The state of the server itself is listed first, then the states of each of the application ports configured on the server are displayed.
201
In this example, the server itself is enabled. The HTTP port is also enabled, but the default port (a port the ServerIron ADX automatically configures on all the real and virtual servers) is unbound. These states are typical of a ServerIron ADX that is configured for deployment but has not been connected to the real servers. The information under the row for the HTTP application shows settings for the Layer 7 health checks for the port. For information about HTTP health checks and other configurable Layer 7 health check parameters, refer to Layer 7 health checks on page 192.
PeakConn 39 0
Information about the remaining virtual servers has been omitted for brevity. In this example, the virtual server and the application ports configured on the server are enabled, indicating that the server and the application ports are configured on the ServerIron ADX but the ServerIron ADX is not connected to the real servers bound to this virtual server. Refer to Displaying real server state information on page 202 for descriptions of the server and application states. The number following state in the Sym row indicates the Symmetric SLB state of this VIP.
NOTE
202
Even for ports known to the ServerIron ADX, you must configure a profile for the port to globally configure the ports parameters and to configure the keepalive health check. After you add the port by indicating whether it is a TCP or UDP port, the ServerIron ADX automatically enables the keepalive health check for the port. Enabling or disabling a keepalive health check does not affect the health check the ServerIron ADX sends when you bind a real server to a virtual server using the application port. The keepalive health check state also does not affect the health checks the ServerIron ADX sends if the servers response time slows. The keepalive interval and retry values for each type of TCP/UDP health check are global parameters. For example, if you change the number of retries for the HTTP health check (TCP port 80), the change applies to all instances of port 80 on all the real servers configured on the ServerIron ADX.
NOTE
TABLE 17
State
As shown in the Table 17, after a keepalive health check is enabled, to disable it you must do so both globally and locally. If you want to enable keepalive health checks only on specific real servers (locally), you can easily do so by making sure the health checks are disabled globally, then enabling them on individual real servers. To enable or disable a keepalive health check globally, use one of the following methods. To enable or disable a keepalive health check locally, refer to Enabling Layer 7 health check on page 193. DNS, HTTP, and RADIUS health checks use additional parameters, which you can configure using separate commands. Refer to Changing HTTP keepalive method, value, and status codes on page 194, Configuring DNS health check method and values on page 195, or Configuring RADIUS health check values on page 196.
NOTE
When health checks are enabled for the ports on the VIPs in a host range, the ServerIron ADX checks the health of the applications on the base IP address only. The ServerIron ADX assumes that the health of an application is the same for all the VIPs within the host range.
NOTE
203
To add a port and specify that it is a TCP port, enter commands such as the following.
ServerIronADX(config)# server port 8080 ServerIronADX(config-port-8080)# tcp
Syntax: server port <TCP/UDP-portnum> Syntax: tcp | udp [keepalive [disable | enable]]
To change a ports keepalive interval and retries, enter a command such as the following.
ServerIronADX(config-port-80)# tcp keepalive 15 5
Syntax: tcp | udp keepalive [<interval-in-seconds> <retries>] You can specify from 2 through 120 seconds for the <interval-in-seconds> variable. You can specify from 1 through 5 for the <retries> variable.
TABLE 18
Attribute
The number of seconds between health checks and the number of times the ServerIron ADX re-attempts a health check to which the server does not respond. Refer to Changing a ports keepalive parameters on page 204. Whether the ServerIron ADXs health check for the port is enabled or disabled. Recurring Layer 4 and Layer 7 health checks are disabled by default. When you configure a port profile, the software automatically globally enables the health check for the application. You also can explicitly disable or re-enable the keepalive health check at this level. NOTE: If you are configuring a port profile for a port that is known to the ServerIron ADX, the keepalive parameters affect Layer 7 health checks. For other ports, the keepalive parameters affect Layer 4 health checks.
Keepalive port
By default, the ServerIron ADX bases the health of an application port on the port itself. You can specify a different application port for the health check. In this case, the ServerIron ADX bases the health of an application port on the health of the other port you specify. Refer to Basing a ports health on the health of another port on page 234. NOTE: You cannot base the health of a port well-known to the ServerIron ADX on the health of another port, whether the port is well-known or not well-known.
204
TABLE 18
Attribute
Session synchronization
In Symmetric SLB configurations, this attribute provides failover for individual sessions on the application port. Normally, existing sessions are not carried over from one ServerIron ADX to another during failover. Refer to Enabling session synchronization on page 208. You can enable logging for session table entries created for this port. Refer to Syslog for session table entries on page 257. Configures the ServerIron ADX to control the rate of new connections to the application port to allow the server to ramp up. Refer to Port slow-start mechanism on page 242. If you plan to use server response time as a load-balancing method, you can adjust the amount of preference the ServerIron ADX gives the most recent response time compared to the previous response time. Refer to Changing the smooth factor on an application Pport on page 208. By default, a Layer 7 health check for a DNS port sends the query only to the real server (DNS server). If the DNS server does not reply with the IP address or zone name requested by the health check, the port fails the health check. You can enable the real server to perform a recursive lookup for the IP address or zone requested by the health check of the well-known DNS port (53). Refer to Enabling recursive DNS health checks on page 195.
Smooth factor
You also can change port attributes locally, on the Real Server and Virtual Server configuration levels. Port profiles simplify configuration by letting you characterize a port globally. For example, if many of your real servers use TCP port 80 (the well-known number for HTTP) and you want to change the keepalive interval for the port, you can do so globally. You do not need to change the value multiple times on each real server.
205
The ServerIron ADX knows the port types of some well-known port numbers. If you are using a port number for which the ServerIron ADX does not know the port type, you can specify whether the port is TCP or UDP and configure its keepalive values globally. You do not need to define the port on every server. Unless a port is known to the ServerIron ADX to be a TCP port, the ServerIron ADX assumes the port is UDP. If you are using a port number that is not known to the ServerIron ADX and the port type is TCP, you must specify this either globally (using a port profile) or locally (when configuring the individual real servers and virtual servers). Otherwise, the ServerIron ADX will use a UDP health check to test the port and the port will fail the health check.
NOTE
If you bind an application port on a real server to the same port on a virtual server, the port on the real server inherits the attributes of the port on the virtual server.
NOTE
206
ServerIronADX(config)# show server real rs1 detail Real Servers Info Name : rs1 Mac-addr: 0003.47bf.bad2 IP:192.168.6.91 Range:1 State:Active Max-conn:1000000 Least-con Wt:0 Resp-time Wt:0 Src-nat (cfg:op):(off:off) Dest-nat (cfg:op):(off:off) Remote server : No Dynamic : No Server-resets:0 Mem:server: 02057999 Mem:mac: 02037cb0 Port ---telnet State ----Ms CurConn TotConn Rx-pkts -- ------- ------- ------Tx-pkts ------Rx-octet -------0 Tx-octet -------0 Reas ---0
active 0 0 0 0 0 max_conn = 1000000 sessions = 0 Keepalive(G/L:Off/Off):Off tcp-age: 40 8083 active 0 0 0 0 0 max_conn = 1000000 sessions = 0 Keepalive(G/L:On/Off):On tcp-age: 40 8082 active 0 0 0 0 0 max_conn = 1000000 sessions = 0 Keepalive(G/L:On/Off):On tcp-age: 35 * 4 8081 active 0 1 1 10 19 max_conn = 1000000 sessions = 2 Keepalive(G/L:On/Off):On tcp-age: 53 http failed 0 0 0 0 0 max_conn = 1 sessions = 0 Keepalive(G/L:On/Off):On Status Code(s): default (200-299, 401) HTTP URL: "HEAD /" tcp-age: 60 * 2 default unbnd 0 0 0 0 0 max_conn = 0 sessions = 0 Server Total 1 1 10 19
2280
4380
2280
4380
207
The ServerIron ADX immediately deletes a UDP DNS or RADIUS session table entry when the ServerIron ADX receives a reply for the application from a real server. If desired, you can configure the ServerIron ADX to age these ports like other UDP ports, using the UDP age timer. Refer to Enabling normal UDP aging for DNS and RADIUS on page 128. For DNS and RADIUS UDP load balancing, the age value does not follow the normal configuration and default value unless udp-normal-age is configured on the port. The default UDP age will always be 2 minutes unless udp-normal-age is configured. To change the global default for all TCP or UDP ports, refer to Configuring TCP age on page 256 or Configuring UDP age on page 256. To override the default TCP age and set the age for TCP port 80 to 15 minutes, enter the following commands.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-80)# tcp 15
NOTE
Syntax: server port <TCP/UDP-portnum> Syntax: tcp | udp <age> The default TCP age is 30 minutes. The default UDP age is 5 minutes.
208
To change the smooth factor for an application port, enter a command such as the following.
ServerIronADX(config-port-80)# smooth-factor 50
Port policy
Port policies
Server port policies help reduce the configuration required for health checks and provide more flexibility while configuring health checks. Previously, ServerIron ADX allowed the use of Layer 7 health check parameters for known ports, such as HTTP, LDAP, SMTP, IMP4, POP3, NNTP, Telnet, and FTP, to check the health of unknown ports. For example, a configuration such as the following may be entered.
ServerIronADX(config)# server port 999 ServerIronADX(config-port-999)# tcp keepalive protocol smtp
In this release, health checks for SSL, RTSP, MMS, PNM, and LDAPS have been added to check the health of unknown ports, using the server port-policy command. The configuration of server port policies consists of two parts:
Syntax: server port-policy <policy-name> Once the policy is named, the CLI changes to the configuration-port-policy level. 2. (Optional) Specify the port that will be checked by the policy.
ServerIronADX(config-port-policy-name)# port 8080
Syntax: port <port-num> 3. Specify what protocol will be checked on the traffic that passes through the port.
ServerIronADX(config-port-policy-name)# protocol http
Syntax: protocol <protocol-value> If the protocol is not configured, the policy cannot be bound to a real server port. Enter a TCP or UDP port name or number for <protocol-value>. For TCP ports, enter FTP (port 21), HTTP (port 80), IMAP4 (port 143), LDAP (port 389), LDAPS (port 636), MMS (port 1755), NNTP (port 119), PNM (port 7070), POP3 (port 110), RTSP (port 554), SMTP (port 25), TELNET (port 23).
209
Port policy
NOTE
Ports 20 and 21 both are FTP ports but on the ServerIron, the name "FTP" corresponds to port 21. For UDP ports, enter DNS (port 53) or RADIUS (port 1812). 4. Configure a keepalive interval under a port policy.
ServerIronADX(config-port-policy-pp1)# keepalive-interval 5
Syntax: [no] keepalive-interval <seconds> Refer to Configuring a keepalive interval under a port Policy on page 212 for more details. 5. (Optional) Enter the number of times the policy will be tried before the ServerIron ADX marks the port as "UP" or "DOWN".
ServerIronADX(config-port-policy-name)# retries 5
Syntax: retries <num> The default is 3 tries. 6. (Optional) Specify the protocol value.
ServerIronADX(config-port-policy-name)# protocol http url www.mycompanynet.com
Syntax: protocol <protocol-options> Enter one of the following for <protocol-options>, specifying the values for the required parameters:
7.
http status-code <min> <max> http url <url> http content-match <match-list> dns addr-query <value> dns zone <value> radius key <radius-key> radius password <value> radius nas-ip <ip-address> radius nas-port <value>
Syntax: l4-check By default, Layer 7 health check is enabled; however, Layer 4 health check is not. You must enable Layer 4 health check if you want to use that feature.
210
Syntax: server real <real-server-name> <real-server-ip-address> Syntax: [no] port <port-num> use-port-policy <policy-name> For the <policy-name> variable, enter the name of the policy you created. Once a policy is bound to a real server port, the ServerIron ADX will use the values configured in the policy for health checks. The ServerIron ADX sends a health check to the port configured in the policy; however, if you do not configure a port number in the policy, the ServerIron ADX sends the health check to the port to which it is bound.
NOTE
The port policy configuration will take precedence over a port profile.
Example 1:
ServerIronADX(config)# server port-policy p1 ServerIronADX(config-port-policy-p1)# port 8080 ServerIronADX(config-port-policy-name)# protocol ssl ServerIronADX(config-port-policy-name)# retries 5 ServerIronADX(config-port-policy-name)# exit ServerIronADX(config)# server real r1 10.10.1.101 ServerIronADX(config-rs-r1)# port 1234 use-port-policy p1 ServerIronADX(config-rs-r1)# port 1234 keepalive
In Example 1, Port 1234 on Real Server 1 will be marked as UP, if the Layer 7 health check on Port 8080 on the server with the IP address of 10.10.1.101 passes.
Example 2:
ServerIronADX(config)# server port-policy p2 ServerIronADX(config-port-policy-name)# protocol http ServerIronADX(config-port-policy-name)# l4-check ServerIronADX(config-port-policy-name)# exit ServerIronADX(config)# server real r2 10.10.1.102 ServerIronADX(config-rs-r1)# port 1234 use-port-policy p2
In Example 2, a port has not been configured for "policy p2," so the ServerIron ADX will use the port to which the policy is bound. Port 1234 of real server r2 will be marked as "UP" if the health check to port 1234 on the 10.10.1.101 Server passes the Layer 4 health-check.
Example 3:
In the following example, Port Policy pp1 is configured with a keepalive interval of 5 seconds, while Port Policy pp2 has a keepalive interval of 30 seconds. Port Policy pp1 is bound to Real Server rs1 port 8080 and Real Server rs2 port 9090; therefore, these two ports have a 5 second keepalive interval. Port Policy pp2 is bound to Real Server rs3 port 8080 and Real Server rs4 port 9090. These two ports have a keepalive interval of 30 seconds.
ServerIronADX(config)# server port-policy pp1 ServerIronADX(config-port-policy-pp1)# keepalive-interval 5 ServerIronADX(config-port-policy-pp1)# protocol http ServerIronADX(config-port-policy-pp1)# protocol http url "GET /abc.html" ServerIronADX(config-port-policy-pp1)# retries 3 ServerIronADX(config-port-policy-pp1)# exit ServerIronADX(config)# server port-policy pp2 ServerIronADX(config-port-policy-pp2)# keepalive-interval 30
211
Port policy
ServerIronADX(config-port-policy-pp2)# ServerIronADX(config-port-policy-pp2)# ServerIronADX(config-port-policy-pp2)# ServerIronADX(config-port-policy-pp2)# ServerIronADX(config)# server real rs1 ServerIronADX(config-rs-r1)# port 8080 ServerIronADX(config-rs-r1)# port 8080 ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# server real rs2 ServerIronADX(config-rs-r2)# port 9090 ServerIronADX(config-rs-r2)# port 9090 ServerIronADX(config-rs-r2)# exit ServerIronADX(config)#server# real rs3 ServerIronADX(config-rs-r3)# port 8080 ServerIronADX(config-rs-r3)# port 8080 ServerIronADX(config-rs-r3)# exit ServerIronADX(config)# server real rs4 ServerIronADX(config-rs-r4)# port 9090 ServerIronADX(config-rs-r4)# port 9090 ServerIronADX(config-rs-r4)# exit
use-port-policy pp1
use-port-policy pp1
use-port-policy pp2
use-port-policy pp2
Syntax: [no] keepalive-interval <seconds> Enter from 1 through 120 for the <seconds> variable. In the following example, real server rs1 port 8080 and real server rs2 port 9090 will have a keepalive interval of 5 seconds. Also, real server rs1 port 8080 and real server rs4 port 9080 will have a keepalive interval of 30 seconds.
ServerIronADX(config)# server port-policy pp1 ServerIronADX(config-port-policy-pp1)# keepalive-interval 10 ServerIronADX(config-port-policy-pp1)# protocol http ServerIronADX(config-port-policy-pp1)# protocol http url "GET /abc.html" ServerIronADX(config-port-policy-pp1)# retries 3 ServerIronADX(config-port-policy-pp1)# exit ServerIronADX(config)# server port-policy pp2 ServerIronADX(config-port-policy-pp2)# keepalive-interval 30 ServerIronADX(config-port-policy-pp2)# protocol http ServerIronADX(config-port-policy-pp2)# protocol http url "GET /xyz.html" ServerIronADX(config-port-policy-pp2)# retries 2 ServerIronADX(config-port-policy-pp2)# exit
After configuring the policy, bind it to a real server port. (Refer to Binding the policy on page 210 for details.) For example:
ServerIronADX(config)# server ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# real port port port exit rs1 8080 8080 keepalive 8080 use-port-policy pp1
212
ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config-rs-rs2)# ServerIronADX(config)# server ServerIronADX(config-rs-rs3)# ServerIronADX(config-rs-rs3)# ServerIronADX(config-rs-rs3)# ServerIronADX(config-rs-rs3)# ServerIronADX(config)# server ServerIronADX(config-rs-rs4)# ServerIronADX(config-rs-rs4)# ServerIronADX(config-rs-rs4)#
port 9090 port 9090 keepalive port 9090 use-port-policy pp1 exit real port port port exit real port port port rs3 8080 8080 keepalive 8080 use-port-policy pp2
NOTE
The ServerIron ADX will now use the values configured under server port policy "policy1" to send out health-checks to ports 80 on R1, R2 and R3.
213
Health check type For application types that are well-known to the ServerIron ADX, you can
specify whether you want to use the Layer 4 health check or the Layer 7 health check for the port. By default, the ServerIron ADX uses the Layer 7 health check if the port is one of the types that are well known to the ServerIron ADX.
Health check interval By default, the ServerIron ADX performs the health checks every 5
seconds. You can change the interval to a value from 2 through 120 seconds.
Health retries By default, if a reply to a health check is not received, the ServerIron ADX will
attempt the health check two more times before concluding that the application has failed the health check. You can change the number of retries to a value from 1 through 5 retries.
Health check state By default, the health check is enabled as soon as you configure it. You
can disable or re-enable the health check from within the element-action expression for the check.
These commands change the CLI to the configuration level for an element-action expression, then specify the IP address of the real server and the application port on the server. Because the specified application is well-known to the ServerIron ADX, the ServerIron ADX automatically associates the default health check parameters for the port with the element-action expression. In this example, the port is HTTP (80), so the ServerIron ADX associates the default HTTP health check parameters with the element-action expression. By default, the ServerIron ADX sends a HEAD request for the default page, 1.0. You must specify the destination IP address before you can specify other health check parameters. The software creates the health check policy only after you specify the destination IP address. If you try to specify another parameter before the destination IP address, the CLI displays an error message such as the following: Error - check1: Health-check element is undefined.
NOTE
If you do not specify the application port, the ServerIron ADX will list the status of the health check as FALSE (failed). To configure an element-action expression for a port number that is not well-known to the ServerIron ADX, enter commands such as the following.
NOTE
214
ServerIronADX(config)# healthck check1 tcp ServerIronADX(config-hc-check1)# dest-ip 10.10.10.50 ServerIronADX(config-hc-check1)# port 8080 ServerIronADX(config-hc-check1)# protocol http
These commands configure an element-action expression for unknown port 8080 and associate the default health check parameters for port 80 with the unknown port. To customize the Layer 7 health check parameters for a port, add the information with the protocol command, as in the following example.
ServerIronADX(config)# healthck check1 tcp ServerIronADX(config-hc-check1)# dest-ip 10.10.10.50 ServerIronADX(config-hc-check1)# port 8080 ServerIronADX(config-hc-check1)# protocol http url "GET/sales.html"
The protocol command in this example changes the Layer 7 health check parameters for this HTTP port to a GET request for a page named "sales.html". Syntax: [no] healthck <string> tcp | udp This command begins configuration of the element-action expression. The <string> parameter specifies the name for the expression and can be up to 20 characters long. The tcp | udp parameter specifies whether you are configuring an expression for a TCP application port or a UDP application port. There is no default. Syntax: [no] dest-ip <ip-addr> This command specifies the IP address of the real server. Syntax: [no] port <tcp/udp-port> This command specifies the application port number.
NOTE
If you do not specify the server IP address and the application port, the ServerIron ADX will list the status of the health check as FALSE (failed). You can specify any valid number, or one of the following port names well-known to the ServerIron ADX:
dns port 53 ftp port 21. (Ports 20 and 21 both are FTP ports but in the ServerIron ADX, the name ftp
corresponds to port 21.)
http port 80 imap4 port 143 ldap port 389 nntp port 119 ntp port 123 pop2 port 109 pop3 port 110 radius port 1812 radius-old The ServerIron ADX name for UDP port 1645, which is used in some older RADIUS implementations instead of port 1812.
smtp port 25
215
snmp port 161 ssl port 443 telnet port 23 tftp port 69
If you enter the no port <tcp/udp-port> command to remove the port, the ServerIron ADX also removes the protocol <tcp/udp-port> command (see below) if the port is well-known to the ServerIron ADX. The reason is that the ServerIron ADX automatically uses the protocol that matches the well-known port. For ports that are not well-known types, the ServerIron ADX does not remove the protocol. You must remove it separately. Syntax: [no] protocol <tcp/udp-port> This command specifies a port whose health-check mechanism you want to use for the port specified by the port command. You need to use this command only if the port specified by the port command is not one of the ports listed above but the port is the same type as one of the ports listed above. For example, use this command if you want to use the DNS health-check mechanism for a port other than 53.
NOTE
NOTE
You must specify the port using the port command before you enter the protocol command. If the port command specified a port that is well-known to the ServerIron ADX, the ServerIron ADX automatically uses the protocol that matches the port; you do not need to specify it and cannot change it.
NOTE
If you remove the Layer 7 health check information (using a no protocol command), the application will fail the health check. If you want the ServerIron ADX to use a Layer 4 health check instead, enter the l4-check command to change the health-check type to Layer 4. If the port is not well-known to the ServerIron ADX and you do not specify a protocol for the Layer 7 health check, but Layer 7 health checking is enabled for the port, the port will fail the health check. Refer to the Changing the health-check type on page 219. For some ports, you also can customize the Layer 7 information sent with the health check. Here is the syntax. Syntax: [no] protocol http | 80 [url [GET | HEAD] [/]<URL-page-name> | port http status_code <range> [<range>[<range>[<range>]]] | content-match <matching-list-name>] This command changes one of the following HTTP health-check parameters. To change more than one of these parameters, enter a separate protocol http or protocol 80 command for each parameter.
url [GET | HEAD] [/]<URL-page-name> This parameter specifies whether the HTTP health
check performs a GET request or a HEAD request. For GET requests, you can specify the page that is requested. By default, a GET request asks for page 1.0.
216
addr_query "<name>" This parameter specifies a domain name to be requested from the
real server by the ServerIron ADX. If the server successfully responds with the IP address for the domain name, the server passes the health check. There is no default.
zone <zone-name> This parameter specifies a DNS zone name. The ServerIron ADX sends a
Source-of-Authority (SOA) request for the zone name. If the server is authoritative for the zone and successfully responds to the SOA request, the server passes the health check. There is no default. If you do not configure one of these parameters, the DNS port will fail the health check. Syntax: [no] protocol radius | 1812 [username <string>] | [password <string>] | [key <string>] This command changes one of the following RADIUS health-check parameters. The health check requests values that are configured on the RADIUS server. To change more than one of these parameters, enter a separate protocol radius or protocol 1812 command for each parameter.
NOTE
username <string> This parameter specifies an authentication username on the server. password <string> This parameter specifies an authentication password on the server. key <string> This parameter specifies an authentication key on the server.
Syntax: [no] protocol ldap | 389 [<num>] This command changes the LDAP version. The health check sent by the ServerIron ADX differs depending on the version. You can specify 2 or 3. The default is 3.
217
NOTE
Syntax: [no] interval <secs> You can specify from 2 through 120 seconds. The default is 5 seconds. To change the number of retries for a health check, enter a command such as the following at the configuration level for the element-action expression that contains the health check.
ServerIronADX(config-hc-check1)# retries 4
Syntax: [no] retries <num> You can specify from 1 through 5 retries. The default is 3 retries.
218
You also can globally change the interval and retries for an application port by editing its port profile. Refer to Configuring a port profile on page 203.
NOTE
The port is one of the following ports well-known to the ServerIron ADX: - FTP port 21. (Ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name
FTP corresponds to port 21.)
HTTP port 80 IMAP4 port 143 LDAP port 389 MMS port 1755 NNTP port 119 PNM port 7070 POP3 port 110 RTSP port 554 SMTP port 25 SSL port 443 TELNET port 23
The port is not well-known to the ServerIron ADX but you used the protocol command to specify
the protocol of one of the well-known ports. By specifying the protocol, you configure the ServerIron ADX to use the protocols Layer 7 health-check method for the port. If the TCP port is not one of the ports above or you did not specify a Layer 7 health-check method (using the protocol command), the ServerIron ADX uses the Layer 4 health check for TCP. Changing the health-check type for UDP application ports has no effect. If the application port is RADIUS (1812) or DNS (53) or uses the health-check method of one of these ports, the ServerIron ADX uses a Layer 7 health check. Otherwise, the ServerIron ADX uses the Layer 4 health check for UDP. The Layer 7 health-check methods differ depending on the application:
NOTE
TCP The ServerIron ADX attempts to engage in a normal three-way TCP handshake with the
port on the real server:
The ServerIron ADX sends a TCP SYN packet to the port on the real server. The ServerIron ADX expects the real server to respond with a SYN ACK. If the ServerIron ADX receives the SYN ACK, the ServerIron ADX sends a TCP RESET, satisfied that the TCP port is alive.
219
UDP The ServerIron ADX sends a UDP packet with garbage (meaningless) data to the UDP
port:
If the server responds with an ICMP Port Unreachable message, the ServerIron ADX concludes that the port is not alive. If the server does not respond at all, the ServerIron ADX assumes that the port is alive and received the garbage data. Because UDP is a connectionless protocol, the ServerIron ADX and other clients do not expect replies to data sent to a UDP port. Therefore, lack of a response is a good outcome.
ServerIronADX(config-hc-check1)# l4-check
The command in this example configures the ServerIron ADX to use the Layer 4 health check for the application port in the element-action expression. Because the application port in this element-action expression is HTTP, the ServerIron ADX will use the Layer 4 health check for TCP. Syntax: [no] l4-check | l7-check
Syntax: [no] disable | enable Health checking (keepalive) also must be enabled on the port profile level or the real server level. Otherwise, the health-check policy is used during initial bringup of the server but is not used for periodic health checks after the server is brought up.
NOTE
If the health check for an application on a server is disabled, the ServerIron ADX assumes that the server and application are healthy and continues to send client requests to the server.
NOTE
NOTE
If you change the health-check state from within the element-action expression, this state overrides the health-check state configured in the port profile for the application port or in the real server configuration.
You can globally enable or disable all health-check policies. Refer to Globally disabling all health-check policies on page 237.
NOTE
220
This command configures the ServerIron ADX to base the health of application port 80 on real server R1 on the results of the check1 health-check policy.
TABLE 19
Field
Total nodes Max nodes Name Value
NOTE: If the policy is disabled, this value is always TRUE, because the ServerIron ADX assumes a server is healthy unless its health check is enabled and the server has not responded appropriately to the health check. Enable
The state of the policy, which can be one of the following: YES The policy is enabled. NO The policy is disabled. na (not applicable) This field does not apply to the policy. This value indicates that the policy is not attached to a real server.
221
TABLE 19
Field
Type
Dest-IP
Port Proto
Layer
The type of health check, which can be one of the following: l4-chk Layer 4 TCP or UDP health check. l7-chk Layer 7 application-specific health check.
Syntax: show healthck statistics Table 20 displays the health-check policy statistics.
TABLE 20
Field
Sent Received
Invalid Replies
The number of replies that were received that had an invalid ID. The ServerIron ADX is sometimes able to resolve an invalid ID. If the ServerIron ADX cannot resolve the invalid ID, the device drops the reply and increments the Dropped Replies counter. The number of replies that the ServerIron ADX dropped.
Dropped Replies
222
The first match list m1 would cause the ServerIron ADX to mark the port failed if the text "404" is found at the beginning of the reply from the server. If the text is not found, the ServerIron ADX would mark the port UP, as the default configured is UP. In the second example above, for match-list m2, ServerIron ADX would mark the port UP, if the text "found' is present at the end of the reply from the server. An HTTP content verification health check is a type of Layer 7 health check in which the ServerIron ADX examines text in an HTML file sent by a real server in response to an HTTP keepalive request. The ServerIron ADX searches the text in the HTML file for user-specified selection criteria and determines whether the HTTP port on the real server is alive based on what it finds. The selection criteria used in HTTP content verification is contained in a matching list that is bound to one or more real servers. To configure a matching list, enter commands such as the following.
ServerIronADX(config)# http match-list m1 ServerIronADX(config-http-ml-m1)# down simple "404" ServerIronADX(config-http-ml-m1)# down simple "File Not Found" ServerIronADX(config-http-ml-m1)# exit
The first command sets the name of the matching list and enters the HTTP matching list CLI level. The first down statement looks for the text 404 in the HTML file sent from the real server in response to an HTTP keepalive request; the second down statement looks for the text File Not Found. If either of these text strings are found in the HTML file, the ServerIron ADX marks port 80 (HTTP) on the real server FAILED. If neither of the text strings are found, the ServerIron ADX marks the port ACTIVE. Syntax: http match-list <matching-list-name> Syntax: down I up simple <text> [log] The down simple and up simple statements specify the selection criteria in the matching list.
223
There is a limit of 200 selection criteria statements for all HTTP matching lists; that is, the total number of up and down statements in all HTTP matching lists on the ServerIron ADX must not exceed 200. When an HTML file meets more than one set of selection criteria in a matching list, the ServerIron ADX takes one of the following actions:
NOTE
If the strings that meet the selection criteria are different, the ServerIron ADX takes action
based on the string that comes first in the file. For example:
ServerIronADX(config)# http match-list m2 ServerIronADX(config-http-ml-m2)# down simple "monkey" ServerIronADX(config-http-ml-m2)# up simple "elephant" ServerIronADX(config-http-ml-m2)# exit
The selection criteria in the matching list above would cause the ServerIron ADX to mark the port FAILED if the text "monkey" is found and ACTIVE if the text "elephant" is found. If the HTML file has the text "monkey" at the beginning and "elephant" at the end, the ServerIron ADX would mark port 80 on the real server FAILED, because "monkey" occurs first in the file.
If a string that meets the selection criteria is a subset of another, the longer string takes
precedence, regardless of where it occurs in the file. For example:
ServerIronADX(config)# http match-list m3 ServerIronADX(config-http-ml-m3)# down simple "elephant" ServerIronADX(config-http-ml-m3) #up simple "elephantine" ServerIronADX(config-http-ml-m3)# exit
In this example, ServerIron ADX would mark the port FAILED if the text elephant is found and ACTIVE if the text elephantine is found. If the HTML file has the text elephant at the beginning and elephantine at the end, the ServerIron ADX would mark port 80 on the real server ACTIVE, because elephantine is longer than elephant. The following is an example of a matching list that uses compound selection criteria, in which the beginning and ending parts of selection criteria are specified.
ServerIronADX(config)# http match-list m4 ServerIronADX(config-http-ml-m4)# up compound "monkey see" "monkey do" log ServerIronADX(config-http-ml-m4)# down compound "500" "Internal Server Error" log ServerIronADX(config-http-ml-m4)# down compound "503" "Service Unavailable" log ServerIronADX(config-http-ml-m4)# default down ServerIronADX(config-http-ml-m4)# exit
In this example, the default down command causes port 80 on the real server to be marked FAILED if none of the selection criteria are found in the HTTP response message. Syntax: down | up compound <start> <end> [log] Syntax: default down | up In this matching list, the up and down commands include the compound parameter, which allows you to specify beginning and ending parts of a set of selection criteria. Text that begins with the first part and ends with the second part meets the selection criteria.
224
In this example, the up command specifies that if the HTML file sent from the real server in response to an HTTP keepalive request contains a text string that begins with the text monkey see and ends with the text monkey do, port 80 on the real server is marked ACTIVE. The down commands specify that if the HTML file contains a text string that begins with 500 and ends with Internal Server Error or begins with 503 and ends with Service Unavailable, the port is marked FAILED. The default command specifies what happens if none of the HTML text in the HTTP response message meets the selection criteria. You can specify either up or down; the default is up. If the real server responds to the health check with a RST, the port is marked ACTIVE or FAILED depending on what was specified in the default statement in the matching list. The log parameter causes the following warning message to be logged when the selection criteria is met. 00d00h00m00s:W:HTTP match-list <matching-list> with compound pattern1 <start> and pattern2 <end> Alert: bring server down and Extract message: <text-between-start-and-end-pattern> In the example, at the successful completion of an HTTP content verification health check, the following message would be logged; that is, if the HTML file sent from the real server in response to an HTTP keepalive request contains a text string that begins with the text monkey see and ends with the text monkey do.
ServerIronADX# show logging Syslog logging: enabled (0 messages dropped, 0 Buffer logging: level ACDMEINW, 1 messages level code: A=alert C=critical D=debugging I=informational N=notification flushes, 0 overruns) logged M=emergency E=error W=warning
Dynamic Log Buffer (50 entries): 02d04h47m12s:W:HTTP match-list m4 with compound pattern1 "monkey see" and pattern2 "monkey do" Alert: bring server up and Extract message: This web page is configured correctly
225
real-name rs1 192.168.1.1 port http content-match m4 port http url "GET/monkey.html" exit
Syntax: server real-name <real-server-name> <ip-addr> Syntax: port http content-match <matching-list-name> Syntax: port http url [GET | HEAD] [/]<URL-page-name> In this example, the port http content-match m4 command binds matching list m4 to real server rs1. HTTP response messages coming from real server rs1 are examined using the selection criteria in matching list m4. The port http url command sets the method used for HTTP keepalive requests and the URL of the page to be retrieved. This command is used in HTTP content verification health checks because the default method and URL page for HTTP keepalive requests used in HTTP health checks, HEAD /1.0, does not return an HTML file that the ServerIron ADX can search and verify. You can instead specify the GET method, which does return an HTML file that can be examined using the matching list.
226
Configuring a port profile Port profiles enable you to globally configure the attributes for individual TCP/UDP ports. A scripted health check will not work on a TCP port that does not have a profile, because the ServerIron ADX assumes any port without a profile is a UDP port, and will perform UDP health checking on the port. To use a scripted health check on a TCP port, you must create a port profile and explicitly identify the port as a TCP port. The following commands configure a port profile for port 12345 and specify that the port is a TCP port. The no-fast-bringup command is necessary because it prevents the ServerIron ADX from marking a port ACTIVE until it passes both Layer 4 and Layer 7 health checks.
ServerIronADX(config)# server port 12345 ServerIronADX(config-port-12345)# tcp ServerIronADX(config-port-12345)# no-fast-bringup
Syntax: server port <TCP/UDP-portnum> Syntax: tcp | udp [keepalive <interval> <retries>] Syntax: no-fast-bringup Configuring a matching list The selection criteria used in a content verification health check is specified in a matching list that is bound to one or more real servers. The syntax used for creating a matching list for scripted health checks is the same as that used for creating a matching list for HTTP content verification health checks. The following is an example of a matching list that will mark a port ACTIVE if the string FTP service is found in the response from the real server. If this text is not found, the port on the real server is marked FAILED.
ServerIronADX(config)# http match-list m1 ServerIronADX(config-http-m1-m1)# up simple "FTP service" ServerIronADX(config-http-m1-m1)# default down ServerIronADX(config-http-ml-m1)# exit
In this example, the default down command causes the port on the real server to be marked FAILED if the selection criteria is not found in the response from the server. For information on the command syntax, refer to Configuring HTTP content matching lists on page 223. Binding the matching list to the real server To enable the scripted health check on the ServerIron ADX, you bind the matching list to one or more real servers. For example, to bind matching list m1 to real server R, enter commands such as the following.
ServerIronADX(config)# server real R 10.10.10.50 ServerIronADX(config-rs-R)# port 12345 content-check m1
Syntax: port <portnum> content-check <matching-list-name> The <portnum> is a non-well-known port. You cannot specify a well-known port for a scripted health check. The <matching-list-name> is a previously configured matching list. If the <matching-list-name> does not refer to an existing matching list, the port on the real server is marked FAILED when the health check is performed.
227
The default down command causes the policy to be evaluated to false if the selection criteria is not found in the response from the server. If the real server responds to the health check with an RST, the policy is evaluated to true or false depending on what was specified in the default statement in the matching list. Configuring a health check policy The following commands create a health check policy for TCP port 1234 on VIP 10.10.10.10. Matching list m1 is bound to this policy.
ServerIronADX(config)# healthck check1 tcp ServerIronADX(config-hc-check1)# dest-ip 10.10.10.10 ServerIronADX(config-hc-check1)# port 1234 content-check m1 ServerIronADX(config-hc-check1)# l7-check
Syntax: [no] healthck <element-name> <protocol> Syntax: [no] dest-ip <ip-addr> Syntax: [no] port <portnum> content-check <matching-list-name> Syntax: [no] l7-check Note that the dest-ip <ip-addr> command must be the first command entered for a health-check policy. If this is not the first command entered for the policy, an error message is displayed. If the <matching-list-name> does not refer to an existing matching list, the policy is evaluated to false. The l7-check command is required to ensure that the ServerIron ADX performs a Layer 7 health check. If this command is omitted, the ServerIron ADX performs only a Layer 4 health check, and not the scripted health check.
228
In the following example, the ServerIron ADX sends a SYN packet to server 10.10.1.31, port 1234. On receiving a SYN-ACK from the server, the ServerIron ADX sends a TCP packet with the data "how are you". The ServerIron ADX then waits for the server. In the data of the TCP packets sent by the server, the ServerIron ADX will look for the pattern "good". If found, the ServerIron ADX marks the real server r1 port 1234 as UP; otherwise, it will mark the port as DOWN.
ServerIronADX(config)# server real r1 10.10.1.31 ServerIronADX(config-rs-r1)# port 1234 keepalive ServerIronADX(config-rs-r1)# port 1234 content-check m1 ServerIronADX(config-rs-r1)# port 1234 content-check send "how are you" ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# http match-list m1 ServerIronADX(config-http-ml-m1)# up simple good ServerIronADX(config-http-ml-m1)# default down
Syntax: [no] port <port-name> content-check <match-list-name> Syntax: [no] port <port-name> content-check send "<string>"
NOTE
The l7-check command must be enabled in order for the ServerIron ADX to send the script. If l4-check is configured, the ServerIron ADX will establish a TCP connection and then send an RST.
Syntax: [no] port <port-name> content-check-carray <match-list-name> The <port-name> variable defines the port where the binary scripted health check is performed. The <match-list-name> variable defines the name of the matching list used in the binary scripted health check. Syntax: [no] port <port-name> content-check-carray send <Carray-data> The <port-name> variable defines the port where the binary scripted health check is performed. The <Carray-data> variable defines the binary data in C array format used in the binary scripted health check. The maximum number of characters supported is 2000.
229
NOTE
In the above example, the ServerIron ADX will send and UDP packet containing the ASCII string "how are you." On receiving the reply, ServerIron ADX will search for the string "good." If found, it will mark port 1234 UP, otherwise it will mark the port DOWN.
230
Depending on the conditions you specify when you configure a health-check policy, the ServerIron ADX will bring the application port on a server down in one of the following cases:
Any one of the servers fails its health check (individual health checks combined using AND
condition) In this case, all servers in the policy must pass their health checks. Otherwise, the ServerIron ADX considers all of the servers to have failed the health checks and brings down the application on all servers that are checked by the policy.
All of the servers fail their health checks (individual health checks combined using OR
condition) In this case, an application port remains up as long as at least one of the servers checked by the policy passes its health check. For finer control, you can combine OR and AND conditions.
Health-check policy
Health-check policies consist of element-action expressions and logical expressions.
An Element-action expression consists of the IP address of the server, the Layer 4 protocol
(TCP or UDP), and the application port on the server. For some applications, the element-action expression can also include Layer 7 application-specific health check information.
To create a health-check policy that is successful if at least one of the applications passes its health check, use OR. To configure a health-check policy that is successful only if the ServerIron ADX receives a successful reply from all servers and application ports in the policy, use the operator AND. To configure a health-check policy that is successful if none of the elements responds to the health check, use the operator NOT.
You can use the same element-action expressions in multiple logical expressions if desired. You can configure up to 254 health-check policies. Follow the steps given below to use a health-check policy. 1. Configure the element-action expressions. 2. Configure the health-check policy using element-action expressions and logical expressions joined by the operators AND or OR or NOT. 3. Attach logical expressions to application ports on specific real servers. A health check policy does not take effect until you attach it to an application port on a server.
NOTE
A health-check policy does not take effect (begin sending health check packets) until you attach the policy to an application port on a real server.
231
These commands configure a health-check policy that uses the element-action expressions "check1" and "check2". Because the AND operator is used, the real servers in both "check1" and "check2" must reply successfully for the health check to be successful. If only one of the servers replies, the health check is unsuccessful and the ServerIron ADX stops using all the server application ports in the health-check policy "httpsrvr". Syntax: [no] healthck "<policy-name>" boolean Syntax: and | or "<element-name>" "<element-name>" The <policy-name> parameter specifies the name of the health-check policy. The name can be up to 20 characters long. The name cannot contain blanks. The and | or parameter specifies a logical operator in the health-check policy. You can enter two element-action expressions along with the logical operator and or or or not.
If you specify and, the policy evaluates to true only if all elements (IP addresses) respond to the
health check.
If you specify or, the policy is true if at least one of the elements responds to the health check. If you specify not, the policy is true if none of the elements responds to the health check.
If you are configuring a boolean UDP health check policy, define the static next hop MAC address along with a VLAN ID for on that link; otherwise, the ServerIron ADX cannot learn the next-hop-mac-address of that link. Enter commands such as the following to define a static next-hop-mac-address and a VLAN-ID.
ServerIronADX(config-link-link3)# next-hop-mac-address 00e0.5208.dd8e vlan-id 40
The address 00e0.5208.dd8e is the MAC address of Link3's access router interface. The vlan-id 40 is the ServerIron ADXs interface, that is used to connect Link3's access router is in VLAN 40 Syntax: next-hop-mac-address <mac-address> vlan-id <vlan#>
232
The commands above configure four element-action expressions, one for each of four servers. The following commands configure two health-check policies, each of which contains two of the element-action expressions.
ServerIronADX(config-hc-check4)# healthck nested1 boolean ServerIronADX(config-hc-nested1)# or check1 check2 ServerIronADX(config-hc-nested1)# healthck nested2 boolean ServerIronADX(config-hc-nested2)# or check3 check4
The following command creates a health-check policy that contains the two policies configured above. The result is a single health-check policy for all four IP servers.
ServerIronADX(config-hc-nested2)# healthck checkall boolean ServerIronADX(config-hc-checkall)# or nested1 nested2
In this example, the OR logical operator is used in all the policies. Therefore, the "checkall" health check is successful if at least one of the four servers responds. To create more restrictive policies, you can use the AND logical operator. For example, if the AND operator is used in this configuration instead of OR, the health check is successful only if all four servers respond. You also can combine policies that use AND with policies that use OR in nested health-check policies.
FTP port 21 (ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name FTP
corresponds to port 21)
HTTP port 80 IMAP4 port 143 LDAP port 389 MMS port 1755 NNTP port 119 PNM port 7070 POP3 port 110 RTSP port 554 SMTP port 25 SSL port 443 TELNET port 23
233
You cannot base an alias ports health on the health of a UDP port or a port that is not well-known to the ServerIron ADX. The health checks for the alias ports must be enabled. Otherwise, the ServerIron ADX will not check the master ports state, and the alias port will not go down when the master port goes down. To configure an alias ports health to be based on its master ports health, edit the alias ports profile by entering commands such as the following.
ServerIronADX(config)# server port 8080 ServerIronADX(config-port-8080)# tcp keepalive use-master-state
NOTE
Syntax: [no] tcp keepalive use-master-state The command is entered at the port profile level.
Syntax: [no] server use-master-port The command is entered at the Global configuration level.
DNS (port 53) FTP (port 21). Ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name FTP
corresponds to port 21.
HTTP (port 80) IMAP4 (port 143) LDAP (port 389) POP3 (port 110) NNTP (port 119) SMTP (port 25) TELNET (port 23)
To base a ports health on the health of another port, enter a command such as the following.
ServerIronADX(config-port-1234)# tcp keepalive port 80
234
The command in this example configures the ServerIron ADX to base the health of port 1234 on the health of port 80 (HTTP). If the health of port 80 changes, the ServerIron ADX applies the change to port 1234. You cannot base the health of a port well-known to the ServerIron ADX on the health of another port, whether the port is well-known or not well-known.
NOTE
Reassign threshold
The reassign threshold specifies the number of contiguous inbound TCP-SYN packets a real server can fail to respond to before the ServerIron ADX changes the application state to FAILED and the server state to TEST. The default reassign threshold is 21. The server and application states are described in Server and application port states on page 200. The value of an application's reassign counter is reset to 0 when the ServerIron receives a TCP SYN ACK from the application. No other type of traffic can clear this field. This reassign counter can be seen with the command show server real <name or ip> detail where <name or ip> is the real server's ASCII name or IP address. If a real server seems to be triggering the reassign threshold too frequently, you can increase the reassign threshold. To modify the reassign threshold to 215, enter a command such as the following:
ServerIronADX(config)#server reassign-threshold 215
Syntax: server reassign-threshold <threshold value> The threshold value must be between 6 and 254.. It is possible to take a service down without triggering the reassign threshold. For example, if no new TCP SYN packets are being sent to a real server that has its application disabled, the real server will not fail to respond to enough consecutive TCP SYNs to meet the reassign threshold. As a result, the ServerIron indicates the real server and the service are ACTIVE when in fact they may have been disabled.
NOTE
The reassign threshold does not apply to servers in SwitchBack (Direct Server Return) configurations. The reassign counter is not incremented in such configurations. In a SwitchBack configuration, traffic from the real server does not pass back through the ServerIron ADX. As a result, the ServerIron ADX cannot monitor the TCP SYN ACKs from the server. Refer to Direct Server Return on page 62.
NOTE
NOTE
The ServerIron ADX does not try to reassign the clients request to another server if you configure the application port to be sticky. The sticky option configures the ServerIron ADX to override load-balancing and send all client requests for the application to the same server during a given session.
If a real server seems to be triggering the reassign threshold too frequently, you can increase the reassign threshold. This is a global parameter.
NOTE
235
The range of values for the <threshold-value> variable is 6 through 4000. The default value is 20.
NOTE
The reassignment count applies to the total number of contiguous (back-to-back) unanswered SYNs from all clients who have sent SYNs to the server. To prevent state flapping caused by the reassignment counter, enter the following command.
ServerIronADX(config)# server no-reassign-count
When you enter this command, the ServerIron ADX will stop incrementing the reassignment counters for real server applications. Syntax: [no] server no-reassign-count
FastCache
In typical TCS configurations, the ServerIron ADX uses cache responses that flow back through the ServerIron ADX as a means to determine the health of the cache server. When the ServerIron ADX receives cache responses to client requests sent to the cache by the ServerIron ADX, the ServerIron ADX knows that the cache server is healthy. However, if the cache server does not respond to client requests, the ServerIron ADX assumes that the cache server is down and stops sending client requests to the cache server. Some configurations might require responses from a cache server to select a path that does not return through the ServerIron ADX. For example, if a cache server supports only one default path and that path is to a gateway router, not to the ServerIron ADX, the cache server might send responses to the clients through the default gateway instead of through the ServerIron ADX. In this case, the ServerIron ADX assumes that the cache server has stopped responding even though the cache server is still working normally. You can override health checking on an individual server basis by enabling FastCache. This feature allows the ServerIron ADX to continue using a cache server even if the server does not send responses to client requests back through the ServerIron ADX. When you enable FastCache on a cache server, the ServerIron ADX continues to send client requests to the cache server even if the server does not respond through the ServerIron ADX.
236
NOTE
This command also disables the TCP and UDP Layer 4 health checks for all applications that are not associated with a health-check policy. Syntax: [no] server l4-check To re-enable the health-check policies, enter the following command.
ServerIronADX(config)# server l4-check
The server l4-check command does not enable a policy if its element-action expressions contain the disable command. In this case, the policy remains disabled.
NOTE
NOTE
237
When the ServerIron ADX sends a health check to a remote server, the ServerIron ADX sends the health check through the default gateway, because the remote servers subnet is different from the subnet of the ServerIron ADXs management IP address. In some topologies, the ServerIron ADXs default gateway is not the most direct path to the remote server. Figure 25 shows an example.
FIGURE 25
Router R2
2. Default gateway forwards health check to next hop toward remote server.
Remote Server
In this example, the ServerIron ADX sends the health check through its default gateway. The default gateway sends the health check back to the ServerIron ADX, because Router R1s route to the remote server lists the ServerIron ADX as the next hop. Despite the unnecessary trip through the default gateway, the health check still reaches the remote server. However, if you want to eliminate unnecessary hops, you can enable the ServerIron ADX to learn the MAC address from which the remote servers health check reply is received, and send subsequent health checks directly through that MAC address. Figure 26 shows the simplified health check process.
FIGURE 26
R2
ServerIrons default gateway
SI
R1
2. ServerIron sends subsequent health checks through the learned MAC address. Remote Server
To enable the ServerIron ADX to use learned MAC addresses for sending health checks to remote servers, enter the following command.
ServerIronADX(config-rs-remote1)# use-learned-mac-address
Syntax: [no] use-learned-mac-address This command does not apply to local servers. Because local servers are attached at Layer 2, the ServerIron ADX does not need to use a gateway or otherwise route the health check to the server.
NOTE
238
As described in Many-to-one TCP/UDP port binding on page 452, to bind two VIPs to the HTTP port on the same real server, you create an alias for the HTTP port on one of the VIPs. To create an alias for the HTTP port, you configure the VIP to bind to an alternate port number on the real server, then disable port translation for that binding. The ServerIron ADX collects and presents information for the alias port number, but traffic from both VIPs actually goes to the HTTP port on the real server. The state of the master port is used for indicating the health of ports aliased to the master port. For example, if a VIP uses port 81 as an alias for the HTTP port, then the state information reported for the HTTP port is used as the state information for port 81. If the HTTP port is reported down, then port 81 is reported down. When a real server supports multiple websites, tying the alias port's state to the master port's state can cause incorrect information to be reported. For example, consider a real server hosting VIPs v1 and v2. VIP v1 is bound to the HTTP port on the real server, and VIP v2 uses port 81 as an alias for the HTTP port. The Layer 7 health check reports state information about the HTTP port. When VIP v1 is taken down for maintenance, the Layer 7 health check reports that the HTTP port is down. Because the state information reported for the HTTP port is also used as the state information for port 81, the ServerIron ADX considers port 81 to be down as well, incorrectly reflecting the state of VIP v2, which could be functioning normally. To eliminate this problem, you establish separate health checks for the alias ports. Health checks for the alias ports will continue to be performed regardless of the HTTP port's status. The following is an example of this kind of configuration.
ServerIronADX(config)# server virtual-name-or-ip v1 192.168.1.160 ServerIronADX(config-vs-v1)# port http ServerIronADX(config-vs-v1)# bind http rs32 http ServerIronADX(config-vs-v1)# exit ServerIronADX(config)# server virtual-name-or-ip v2 192.168.1.161 ServerIronADX(config-vs-v2)# port http ServerIronADX(config-vs-v2)#port http use-alias-port-state ServerIronADX(config-vs-v2)# no port http translate ServerIronADX(config-vs-v2)# bind http rs32 81 ServerIronADX(config-vs-v2)# exit ServerIronADX(config)# server real rs32 64.1.1.32 ServerIronADX(config-rs-rs32)# port http ServerIronADX(config-rs-rs32)# port http keepalive ServerIronADX(config-rs-rs32)# port http url "HEAD /" ServerIronADX(config-rs-rs32)# port 81 ServerIronADX(config-rs-rs32)# port 81 keepalive ServerIronADX(config-rs-rs32)# port 81 url "GET /81keepalive.htm" ServerIronADX(config-rs-rs32)# exit
In this configuration, two VIPs are bound to a single real server. VIP v2 uses port 81 as an alias for port 80; information the ServerIron ADX receives about port 81 is attributed to VIP v2. If VIP v1 is taken down for maintenance, the Layer 7 health check done for port 80 fails, and the ServerIron ADX marks the HTTP port FAILED. However, health checks continue to be performed for port 81. Port 81 (and thus VIP v2) will continue to be reported active as long as it passes its health check.
239
The VIP will not answer connections on port http until at least 2 of the real or remote servers bound to port http are UP.
ServerIron ADX will now bring port 80 up only after it has passed <num> number of health-checks. Previously port 80 would have been marked as up after the first time it passes a health-check.
Slow-start mechanism
When the ServerIron ADX begins sending client requests to a real server that has recently gone online, it allows the server to ramp up by using the slow-start mechanism. The slow-start mechanism allows a server (or a port on the server) to handle a limited number of connections at first and then gradually handle an increasing number of connections until the maximum is reached. The ServerIron ADX uses two kinds of slow-start mechanisms:
The non-configurable server slow-start mechanism applies to a real server that has just gone
online
The configurable port slow-start mechanism applies to individual TCP application ports that
have just been activated on a real server
Overview
The ServerIron ADX uses the server slow-start mechanism to adjust the maximum number of connections that can be established for a real server that has just gone online. The ServerIron ADX begins with a connection limit that is lower than the maximum configured value (which is one million by default) and gradually increases this connection limit until the maximum configured value is reached.
240
The server slow-start mechanism is especially useful when least connections is the distribution predictor. Without the server slow-start mechanism, a server that is just brought online could receive all the new connections in a flurry, which could bring the server down. Many servers cannot handle more than 2,000 new connections per second. The server slow-start mechanism is always applied to all real servers when they are brought online. Unlike the slow-start mechanism for individual ports, described in the next section, the server slow-start mechanism is not configurable. The two graphs in Figure 27 illustrate how the server slow-start mechanism ramps up the connections for a real server during the 30-second slow-start period. The graph on the left shows the rate at which the number of connections increases over the slow-start period. The graph on the right shows how the maximum number of connections that the ServerIron ADX allows for the real server increases over the slow-start period.
NOTE
FIGURE 27
50
500
40
400
30
300
20
200
10
100
10
20
30
10
20
30
The graph on the left shows the rate at which the ServerIron ADX allows connections for a given real server, as follows:
From the time the real server is brought online until 10 seconds afterwards, the ServerIron ADX
allows the real server up to 10 new connections every second.
From 10 seconds to 30 seconds, the ServerIron ADX allows up to 20 new connections every
second.
After 30 seconds, the connection flow control delivered by the slow-start mechanism ends, and
the ServerIron ADX allows up to the maximum number of connections to the server. The maximum number of allowed connections for a real server is set by the max-conn command and is one million connections by default.
241
The graph on the right shows how the maximum number of connections allowed for the real server increases over the 30-second slow-start period.Table 21 lists the maximum number of connections a real server can have during each second of the slow-start period.
TABLE 21
Seconds after going online
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Max. connections
220 240 260 280 300 320 340 360 380 400 420 440 460 480 500
When the slow-start period ends after 30 seconds, the maximum number of connections a real server can have is determined by the max-conn setting for the real server and is one million connections by default. When you disable and re-enable a real server, the ServerIron ADX will go through the slow-start mechanism for the server if it is not disabled. When you disable and re-enable a real-server port, the ServerIron ADX does not go through the port level slow-start mechanism.
NOTE
242
Default port slow-start mechanism By default, when a port is activated, the ServerIron ADX gives it 60 seconds of warm-up time. Over this period, the ServerIron ADX gradually increases the number of connections it allows for the port. The default slow-start mechanism is always applied to all ports when they are first brought online, unless they are configured to use a user-configured slow-start mechanism. The two graphs in Figure 28 illustrate how the default slow-start mechanism ramps up the connections for a port on a real server. The graph on the left shows the rate at which the number of connections increases over the slow-start period. The graph on the right shows how the maximum number of connections the ServerIron ADX allows for the port on the real server increases over the slow-start period.
FIGURE 28
100
2,500
90
80
70
60
1,500
50
40
1,000
10
The graph on the left shows the rate at which the ServerIron ADX allows connections for a given port on a real server, as follows:
From the time the port is activated until 10 seconds afterwards, the ServerIron ADX allows the
port up to 10 new connections every second.
From 10 seconds to 20 seconds, the ServerIron ADX allows up to 20 new connections every
second.
From 20 seconds to 30 seconds, the ServerIron ADX allows up to 30 new connections every
second.
From 30 seconds to 40 seconds, the ServerIron ADX allows up to 40 new connections every
second.
243
From 40 seconds to 50 seconds, the ServerIron ADX allows up to 50 new connections every
second.
From 50 seconds to 60 seconds, the ServerIron ADX allows up to 100 new connections every
second.
After 60 seconds, the connection flow control delivered by the slow-start mechanism ends, and
the ServerIron ADX allows up to the maximum number of connections for the port on the server. The maximum number of allowed connections for a real server is set by the max-conn command; this maximum is one million connections by default. The graph on the right shows how the maximum number of connections allowed for the port on the real server increases over the slow-start period. Table 22 lists the maximum number of connections a port can have at 10-second intervals.
TABLE 22
When the slow-start period ends after 60 seconds, the maximum number of connections that a port on a real server can have is determined by the max-conn setting for the real server and is one million connections by default. Setting up a user-configured port slow-start mechanism You can configure how quickly the ServerIron ADX ramps up a particular port on a particular real server by setting up a user-configured slow-start mechanism. Unlike the default port slow-start mechanism, which applies to all ports on all real servers, a user-configured slow-start mechanism is applied to a specific port on a specific real server. A user-configured slow-start mechanism sets the rate at which the ServerIron ADX allows connections for a port over two configurable intervals (which comprise the slow-start period), along with a limit for the total number of connections that the port on the real server can have during the time the server is active. Setting up a user-configured slow-start mechanism consists of the following two steps. 1. Setting up a slow-start list for a port 2. Applying the slow-start list to a port on a real server Setting up a slow-start list for a port To set up a slow-start list for port 80 (HTTP), enter commands such as the following.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-80)# slow-start 101 10 30 20 30 600 ServerIronADX(config-port-80)# exit
244
In the slow-start command, the <list-id> variable specifies the slow-start list. This variable can be a number from 1 through 1000000. When you apply the slow-start list to a port on a real server, you refer to the slow-start list by the variable specified here. You can create multiple slow-start lists for a given port and assign them each an ID number. The <rate1> variable specifies the number of connections per second allowed for the port during the first interval. This variable can be a number from 1 through 1000000. From the time the port is activated until the end of the first interval, the ServerIron ADX allows the port on the real server to receive up to this number of new connections every second. The <interval1> variable specifies the length of the first interval in seconds. This variable can be a number from 1 through 1000000. The <rate2> variable specifies the number of connections per second allowed for the port during the second interval. Allowed values are from 1 through 1000000. From the end of the first interval until the end of the second interval, the ServerIron ADX allows the port on the real server to receive up to this number of new connections every second. The <interval2> variable specifies the length of the second interval in seconds. This variable can be a number from 1 through 1000000. The number of seconds in the first interval plus the number of seconds in the second interval are equal to the slow-start period. In this example, value specified for the <interval1> variable is 30 seconds, and the value specified for the <interval2> value is 30 seconds, so the slow-start period is 60 seconds. The <max-connections> variable sets a ceiling for the number of concurrent connections allowed for the port during the time the server is active. This can be a number from 1 through 1000000. No more than this number of connections can be established for the port on the real server where this slow-start mechanism is applied. Applying the slow-start list to a port on a real server After you have created a slow-start list, you apply it to a port on a real server, by entering commands such as the following.
ServerIronADX(config)# server ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# ServerIronADX(config-rs-rs1)# real-name rs1 192.168.1.1 port http port http slow-start 101 exit
Syntax: port <port> slow-start <list-id> The port http slow-start 101 command binds slow-start list 101 (defined for port 80 above) to port 80 (HTTP) on real server rs1. Using the slow-start list defined above, the two graphs in Figure 29 illustrate how a user-configured slow-start mechanism ramps up the connections for a port on a real server. The graph on the left shows the rate at which the number of HTTP connections increases over the slow-start period. The graph on the right shows how the maximum number of HTTP connections the ServerIron ADX allows for real server rs1 increases over the slow-start period.
245
FIGURE 29
100
900
90
80
50
40
300
30
Rate 2
20
Rate 1
10
10
20
30
40
50
60
10
20
30
40
50
60
Interval 1
Interval 2
The graph on the left shows the rate at which the ServerIron ADX allows HTTP connections for real server rs1, as follows:
From the time port 80 (HTTP) on real server rs1 is activated until 30 seconds afterwards (until
the end of interval 1), the ServerIron ADX allows the real server up to 10 (rate 1) new HTTP connections every second.
From 30 seconds to 60 seconds (until the end of interval 2), the ServerIron ADX allows up to
20 (rate 2) new HTTP connections every second.
After 60 seconds (interval 1 plus interval 2), the slow-start period ends, and the ServerIron
ADX allows up to the maximum number of connections for the server set by the <max-connections> parameter in the slow start list. The graph on the right shows how the maximum number of possible HTTP connections for real server rs1 increases over the slow-start period:
Ten seconds after going online, the maximum number of HTTP connections real server rs1 can
have is 300: a maximum of 10 (rate 1) new HTTP connections per second for 30 (interval 1) seconds equals 300 total HTTP connections for real server rs1.
After 30 seconds, the maximum number of HTTP connections for real server rs1 increases by
20 (rate 2) connections per second, until 600 HTTP connections (the ceiling specified by the <max-connections> variable in the slow-start list) is reached. This ceiling of concurrent 600 HTTP connections applies for the entire time the server is active; the ServerIron ADX allows the server no more than this number of concurrent HTTP connections.
246
Applying a user-configured slow-start mechanism to multiple ports To apply a user-configured slow-start mechanism to more than one port, create slow-start lists for each port and apply them to ports on one or more real servers. For example, to configure a slow-start mechanism for HTTP (port 80) and SSL (port 443), enter commands such as the following.
ServerIronADX(config) #server port 80 ServerIronADX(config-port-80)#slow-start 100 10 30 20 30 600 ServerIronADX(config-port-80)# slow-start 101 20 30 40 30 1500 ServerIronADX(config-port-80)#exit ServerIronADX(config)# server port 443 ServerIronADX(config-port-80)# slow-start 101 20 60 40 120 2400 ServerIronADX(config-port-80)# exit ServerIronADX(config)# server real-name rs2 192.168.1.2 ServerIronADX(config-rs-rs2)# port http ServerIronADX(config-rs-rs2)# port http slow-start 100 ServerIronADX(config-rs-rs2)# exit ServerIronADX(config)# server real-name rs3 192.168.1.3 ServerIronADX(config-rs-rs3)# port http ServerIronADX(config-rs-rs3)#port http slow-start 101 ServerIronADX(config-rs-rs3)# port ssl ServerIronADX(config-rs-rs3)# port ssl slow-start 101 ServerIronADX(config-rs-rs3)# exit
The commands create two slow-start lists for port 80 (HTTP) and one for port 443 (SSL). Slow-start list 100 for port 80 is applied to the HTTP port on real server rs2. Slow-start list 101 for port 80 is applied to the HTTP port on real server rs3. Slow-start list 101 for port 443 is applied to the SSL port on real server rs3. Note that slow-start list 101 for port 80 has no relation to slow-start list 101 for port 443. In this configuration, port 80 on real server rs2 and ports 80 and 443 on real server rs3 are each subject to a user-configured slow-start mechanism. All other ports on the real servers are subject to the default slow-start mechanism described in Default port slow-start mechanism on page 243.
247
Health-check state
When you attach a health-check policy to a real servers application port, the ServerIron ADX uses the health-check policy for periodic health checks and also for the next initial bringup of the server. When a health-check policy is attached, the ServerIron ADX no longer uses the default health check methods for initial bringup and periodic health checks. For the ServerIron ADX to use a health-check policy, you must enable health checking (keepalive) at either the port profile level or the real server level for the server port. Otherwise, the state of the policy is FALSE, and the state of the server port remains in the state that it was before you attached the policy.
NOTE
Use the show healthck command to display the policy state. Use the show server real-name <name> command to show the real server port state. If health checking for a server port is disabled at the port profile level and at the real server level, the ServerIron ADX will continue to use whichever state is based on the health check during the initial server bringup. The ServerIron ADX will not be able to update the ports state if the state changes. To enable health checking at the port profile level, enter commands such as the following.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-80)# tcp keepalive enable
These commands enable health checking for TCP port 80. For a UDP port, enter commands such as the following.
ServerIronADX(config)# server port 53 ServerIronADX(config-port-53)# udp keepalive enable
To enable health checking at the real server level, enter commands such as the following.
ServerIronADX(config)# server real-name R1 10.10.10.10 ServerIronADX(config-rs-R1)# port 80 keepalive
You can enable health checking at the port profile level, at the real server level, or both. Health checking must be enabled on at least one of these levels for the ServerIron ADX to use the health-check policy you attach to the port.
248
server ports that are in the testing state. The ServerIron ADX performs Layer 2 and Layer 3 health checks, and if these are successful, it puts the port in a testing state. When it is time to send out bringup health checks, the ServerIron ADX collects all the server ports that are in the testing state, and sends them health checks. The actual number of health checks that are sent out at any given instance also depends on the number of server ports for which the ServerIron ADX has sent out the health-check request and is still waiting for response. For example, if there are 75 server ports configured on the ServerIron ADX, and at the first instance 30 of these have passed the Layer 2 and Layer 3 checks, the ServerIron ADX sends out bringup health-checks to these 30 server ports. In the next 100 ms, when it is time to send out health-checks again, if only 20 of the above 30 server ports have responded and are UP, then there are 10 ports that are still in the bringup process. Assuming that the remaining 45 server ports have all passed Layer 2 and Layer 3 checks, the ServerIron ADX can send bringup health-checks for 40 server ports, because it is waiting for response for the 10 previously sent. In the next 100 ms cycle, it is time to send the next round of health-checks. At this point, if the ServerIron ADX got responses from all the 50 server ports, it now sends bringup health-checks for the remaining 5 server ports. The ServerIron ADX can send 50 bringup health-checks at a time separately for TCP and UDP ports.
Overview
When a group of ports are configured as part of a track-port, ServerIron ADX can track the health of the master port (the port that is configured as the first port) and the rest of the ports in the list will follow the state of the master port. If the master port is down, the remaining ports in the list would have their master state as down and traffic will not get forwarded to any of the ports on the track port list, even though their individual health-checks state might be UP.
Configuration
The command to turn on this feature is under real server config.
ServerIron ServerIron ServerIron ServerIron ServerIron ADX(config)# server real r1 1.1.1.1 ADX(config-real-server-r1) port 80 ADX(config-real-server-r1) port ftp ADX(config-real-server-r1) port dns ADX(config-rsr1) hc-track-port 80 21 53
ServerIron ADX now tracks the health status of 80. If health-check state of 80 is DOWN, then all the other ports trackport. In this case, FTP and DNS have their master state as DOWN and traffic is not load balanced on these ports. Syntax: [no] hc-track-port <port> ...<port> The <port> variable specifies the secondary ports that will be tracked based on the health of the primary port. These secondary ports can be TCP or UDP ports.
249
Show Commands
Output from the show hc-track-port-state command displays when a primary port passed or failed a health check. In the, first example is when primary port passed health check, second is an example when primary port went down because of health check.
ServerIron ADX# show hc-track-port-state Real Server track-port state rs1 80 21 800 53 ACTIVE ServerIron ADX# show hc-track-port-state Real Server track-port state rs1 80 21 800 53 DOWN
In the first example the primary port passed the health check and in the second example the primary port went down because of a health check. Syntax: show hc-track-port-state
This example shows log entries for a real server named "danPC" with IP address 192.168.1.170. In this example, the real server passed a Layer 4 or Layer 7 health check ("up"), but then failed a Layer 4 or Layer 7 health check ("down") later. Syntax: show logging
NOTE
The log messages do not distinguish between Layer 4 and Layer 7 health checks. When the status changes based on either type of health check, the ServerIron ADX logs the event as shown in this example.
250
Syntax: [no] fw-health-check icmp <num> The <num> parameter specifies the maximum number of retries and can be a number from 3 through 31. The default is 3.
NOTE
UDP The ServerIron ADX sends and listens for path health check packets on the port you
specify. If you do not specify a port, the ServerIron ADX uses port 7777 by default. The port number is used as both the source and destination UDP port number in the health check packets.
TCP The ServerIron ADX listens for path health check packets on the port you specify, but
sends them using a randomly generated port number. If you do not specify a port, the ServerIron ADX uses port 999 as the destination port by default. You must configure the same Layer 4 health check parameters on all the ServerIrons in the FWLB configuration. Otherwise, the paths will fail the health checks. To configure a Layer 4 health check for firewall paths, enter a command such as the following at the firewall group configuration level.
NOTE
251
The command in this example enables Layer 4 health checks on UDP port 7777. This ServerIron ADX sends firewall path health checks to UDP port 7777 and listens for health checks on UDP port 7777. Syntax: [no] fw-health-check udp | tcp [<TCP/UDP-portnum> <num>] The variable specifies the TCP or UDP port. It can be a number in one of the following ranges:
For TCP, from 1 through 65535 For UDP, from 1 through 1032 or 2033 through 65535
NOTE
Do not use a number from 1033 through 2032 for UDP. Port numbers in this range are not supported for FWLB UDP health checks. The <num> variable specifies the maximum number of retries. It can be a number from 1 31. The default is 3.
Syntax: port [<port-type> | <port-number>] no-heath-check The <port-type> variable specifies the port type that you want to disable from Layer 4 health check. It can any of the following values:
dns This option disables port 53 from health check. ftp This option disables port 21 from health check. Ports 20 and 21 both are FTP ports
but in the ServerIron ADX, the name ftp corresponds to port 21.
http This option disables port 80 from health check. imap4 This option disables port 143 from health check. ldap This option disables port 389 from health check. nntp This option disables port 119 from health check. ntp This option disables port 123 from health check. pop2 This option disables port 109 from health check. pop3 This option disables port 110 from health check. radius This option disables UDP port 1812 from health check. radius-old This option disables UDP port 1645 from health check. UDP port 1645, is used in some older RADIUS implementations instead of port 1812.
252
snmp This option disables port 161 from health check. ssl This option disables port 443 from health check. telnet This option disables port 23 from health check. tftp This option disables port 69 from health check.
In addition, you can specify a port number in the <port-number> variable for ports other than those with name options.
Source IP address Source application port Destination IP address Destination application port Protocol (TCP or UDP)
A connection consists of two sessions, a send session and a receive session. For example, a TCP connection between a client and a server consists of two sessions, a client-to-server session and a server-to-client session. "Stateless" features such as stateless application ports and stateless health checks do not use session table entries. This section describes how to configure the following session table parameters:
NOTE
Maximum number of sessions Maximum age of TCP session entries Maximum age of UDP session entries Clock scale for TCP and UDP session age timers Logging of session table entries
server session-wsm-limit <value>For this change to take effect, you must save the change to the startup-config file, then reload the software using the following commands.
253
Fast-age thresholdWhen the number of free sessions drops below the fast-age threshold,
sessions older than a specified time are aged out.
Random thresholdWhen the number of free sessions drops below the random threshold,
sessions are aged out randomly, without regard to session age. The random threshold can be equal to or lesser than the fast-age threshold. For example, if the fast-age threshold is reached, sessions as old as or older than a specified amount of time (for example, 5 minutes) are aged out until the number of available sessions climbs above 150,000. If the random threshold is reached, sessions are aged out at random until the number of available sessions climbs above 150,000. ServerIron ADX Fast session aging is disabled by default. To configure fast session aging, enter a command such as the following.
ServerIronADX(config)# server session-max-idle 5 30 10
NOTE
Syntax: [no] session-max-idle <max-idle-time> [<fast-age-threshold> <random-threshold>] The <max-idle-time> variable specifies the number of minutes allowed for idle sessions when a <fast-age-threshold> variable is configured. When the value specified in the <fast-age-threshold> variable is reached, sessions that are the same as and older than the threshold are aged out until the number of free sessions exceeds the value specified in the <fast-age-threshold> variable. The value of the <max-idle-time> variable can be from 1 through 30 minutes. The default is 0 minutes (disabled). To enable fast session aging, you must specify a value for the <max-idle-time> variable that is greater than 0. When the number of available sessions drops below the value specified in the <fast-age-threshold> variable, sessions older than the value specified in the <max-idle-time> variable are aged out until the number of free sessions exceeds the threshold. The value of the <fast-age-threshold> variable is expressed as a percentage of the maximum number of sessions available on the ServerIron ADX. The value specified for the <fast-age-threshold> can be from 10 through 70 percent. The default is 33 percent.
254
When the number of available sessions drops below the value specified for the <random-threshold> variable, sessions are aged out randomly, without regard to session age, until the number of free sessions exceeds the threshold. The value specified for the <random-threshold> variable is expressed as a percentage of the maximum number of sessions available on the ServerIron ADX. The value specified for the <random-threshold> variable can be from 1 through 30 percent. The default is 0 percent (disabled). Even though the <max-idle-time> value is not used with the random-age threshold, you must still specify a value for the <max-idle-time> variable when configuring the random threshold to enable the fast session aging feature.
NOTE
Syntax: show server sessions If the fast-age threshold is configured, the command displays both the total number of sessions that were aged out because of the free sessions dropping below the fast-age threshold, and the number of sessions that were aged out in the last 60 seconds. If the random threshold is configured, the command also displays the total number of sessions that were aged out at random because the number of free sessions dropped below the random threshold, along with the number of sessions that were aged out randomly in the last 60 seconds.
Syntax: clear server fast-age-counters This command resets the "Fast-aged : total" counter and corresponding "last 60 sec" counter as displayed by the show server sessions command.
255
Syntax: clear server random-age-counters This command resets the "Random-aged : total" counter and corresponding "last 60 sec" counter as displayed by the show server sessions command.
NOTE
This parameter globally sets the age for all TCP ports. To override the setting for an individual TCP port, change that ports profile. Refer to Overriding the global TCP or UDP age on page 207. To modify the server TCP age, enter a command such as the following.
ServerIronADX(config)# server tcp-age 20
Syntax: server tcp-age <time> The <time> variable is a value from 2 through 60 minutes. The default is 30 minutes.
This parameter globally sets the age for all UDP ports. To override the setting for an individual TCP port, change that ports profile. Refer to Overriding the global TCP or UDP age on page 207. Syntax: [no] server udp-age <minutes> The <minutes> variable is a value from 2 through 60 minutes. The default is 5 minutes; the default age for DNS and RADIUS is 2 minutes. The ServerIron ADX immediately deletes a UDP DNS or RADIUS session table entry when it receives a reply for the application from a real server. You can configure the ServerIron ADX to age these ports like other UDP ports, using the UDP age timer. Refer to Enabling normal UDP aging for DNS and RADIUS on page 128. For DNS and RADIUS UDP load balancing, the age value does not follow the normal configuration and default value unless udp-normal-age is configured on the port, under the virtual server port definition, port dns udp-normal-age. (Refer to Enabling normal UDP aging for DNS and RADIUS on page 128.) The default UDP age will always be 2 minutes unless udp-normal-age is configured.
256
When you set the clock scale to 2, the TCP and UDP age timer values are multiplied by 2. As a result, a TCP age of 60 would then be equivalent to 120 minutes instead of 60 minutes. Syntax: [no] server clock-scale <multiplier> The <multiplier> variable can be a value from 1 through 20. The default is 1.
Source IP address Source TCP or UDP application port Destination IP address Destination TCP or UDP application port Layer 4 protocol (TCP or UDP) Message time (measured in units of 100 milliseconds, relative to system uptime) URL (optional) Cookie (optional) Internet (applies to TCS only)
You can enable TCP/UDP logging on a global basis for all TCP and UDP ports or for individual TCP or UDP ports. When you enable TCP/UDP logging, you can specify whether all new session table entries generate log messages or only the entries that are used for Source NAT. In addition, you can enable logging for URL or Cookie information. The URL logging option applies only when URL switching is enabled. The Cookie logging option applies only when Cookie switching is enabled. Here is an example of a Syslog message for a session.
src-ip = 192.168.002.032 src-port = 00197 dst-ip = 192.168.002.012 dst-port = 00080 protocol = TCP time =0000078656 Url = abcdefghijklmnop Cookie = qrstuvwxyz Internet
The "Internet" parameter at the end of the message applies only to TCS, and indicates that the ServerIron ADX sent the client request to the Internet instead of to a cache server. The time value in this example is in the format for devices on which the system time add date have not been set.
257
The feature description and command syntax use the terms session and connection. A connection consists of multiple sessions, for the send and receive directions.
NOTE
Because the log messages are generated when the software creates a session table entry, features that do not use session table entries do not result in log messages. For example, if you configure a TCP or UDP port to be stateless, the ServerIron ADX does not create session table entries for the port and therefore does not generate log messages for the port.
NOTE
To enable logging only for new sessions that are used for Source NAT, enter the following command.
ServerIronADX(config)# server connection-log src-nat
To enable session logging for a specific TCP or UDP port, enter the following command.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-80)# connection-log all url cookie
Syntax: [no] server connection-log all | src-nat [url] [cookie] The all option enables logging for all sessions.
NOTE
NOTE
The src-nat option enables logging only for sessions that are used for Source NAT.
NOTE
The url option enables logging of URL information for sessions that contain a URL.
The cookie option enables logging of cookie information for sessions that contain a cookie.
NOTE
The URL logging option applies only when URL switching is enabled. The cookie logging option applies only when cookie switching is enabled.
NOTE
258
Chapter
CSW enables Layer 7 application content based traffic direction for noon-HTTP protocols such as Financial Information Exchange (FIX) protocol. This chapter describes the Layer 7 Switching features in the ServerIron ADX. It contains the following major sections:
Layer 7 content switching on page 259 Layer 7 content switching on HTTP response on page 286 53-1002279-02
NOTE
You cannot use FWLB and the features described in this chapter on the same ServerIron ADX.
NOTE
You can define up to 255 policies and 1000 rules system wide. A maximum of 500 rules can be defined under a single policy.
NOTE
NOTE
Layer 7 content switching load balancing is not supported where both sticky connections and track group features are configured.
You cannot enable URL switching and Layer 7 content switching simultaneously on the same virtual server.
NOTE
Load balancing based on any specified HTTP header Load balancing based on XML content
259
Ability to make complex load-balancing decisions based on multiple HTTP headers or XML tags Support for redirecting requests to alternate URLs or domains Support for persisting requests to servers, along with simple forwarding actions. Support for content-rewrite functions, including cookie and HTTP header insertion and deletion.
To configure Layer 7 content switching, you define content switching rules and policies. A rule specifies the content that the ServerIron ADX looks for in the incoming traffic, and a policy associates rules with one or more actions that specify how the ServerIron ADX handles traffic matching the rule. The following sections explain how to configure Layer 7 content switching on a ServerIron ADX Chassis device and how to display information about a Layer 7 content switching configuration.
Enabling CSW
To enable Layer 7 content switching, you bind a content switching policy to a virtual server. For example, to enable Layer 7 content switching on a virtual server called cswVIP, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip cswVIP 192.168.20.254 ServerIronADX(config-vs-cswVIP)# port http csw-policy p1 ServerIronADX(config-vs-cswVIP)# port http csw
Syntax: [no] port <portnum> csw-policy <policy-name> Syntax: [no] port <portnum> csw The <policy-name> variable is a Layer 7 content switching policy. Refer to Creating a policy on page 265. You cannot enable URL switching and Layer 7 content switching on the same virtual server.
NOTE
Syntax: [no] port <portnum> csw-scan-depth <length> The <length> variable specifies the number of bytes the ServerIron ADX scans for content in a packet. You can specify up to 8192 bytes. By default, the ServerIron ADX scans to the end of the packet.
260
CSW rules
This section describes the rules available for Layer 7 content switching. You can define the following types of rules:
HTTP method rules Cause the ServerIron ADX to make a load balancing decision based on
the HTTP method in an incoming packet. Refer to Configuring an HTTP method rule on page 261.
HTTP version rules Cause the ServerIron ADX to make a load balancing decision based on
the HTTP version of an incoming packet. Refer to Configuring an HTTP version rule on page 261.
URL rules Cause the ServerIron ADX to make a load balancing decision based on the
contents of the URL string in an incoming packet. Refer to URL rules on page 262.
HTTP header rules Cause the ServerIron ADX to make a load balancing decision based on
the contents of an HTTP header field in an incoming packet. Refer to HTTP header rules on page 262.
XML tag rules Cause the ServerIron ADX to make a load balancing decision based on the
contents of an XML tag in an incoming packet. Refer to XML tag rules on page 263. In addition, you can combine rules with logical operators AND, OR, and NOT to create nested rules. Refer to Configuring the nested rules on page 249. For CSW rules that use the prefix or suffix method, the matching string will be the complete string and the offset is starts from the matching string.
NOTE
This example creates a rule called r1 that matches if an incoming packet contains the PUT method. Syntax: [no] csw-rule <rule-name> method eq <method-string> The <rule-name> value can be up to 80 characters in length. The <method-string> variable can be OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, or CONNECT.
This example creates a rule called r1 that matches if an incoming packet uses HTTP version 1.1. Syntax: [no] csw-rule <rule-name> version eq <http-version> The <rule-name> value can be up to 80 characters in length. The <http-version> variable can be 0.9, 1.0, or 1.1.
261
URL rules
URL rules cause the ServerIron ADX to make a load-balancing decision based on the contents of the URL string in an incoming packet. Table 23 lists the URL rules available for Layer 7 content switching.
TABLE 23
URL rule name
URL Exists
Syntax
[no] csw-rule <rule-name> url exists [no] csw-rule <rule-name> url prefix <value>
Example
csw-rule r1 url exists
URL Prefix
URL Suffix
URL Pattern
URL Equals
URL Search
[no] csw-rule <rule-name> Matches if the url search <value> URL string contains any one of up to five specified values. This type of rule can be used with the persist action.
r1 r1 r1 r1 r1
262
TABLE 24
HTTP header rule name
Header Exists
Syntax
[no] csw-rule <rule-name> header <header-name> exists
Example
csw-rule r1 header "host" exists
Header Prefix
Header Suffix
Header Pattern
Header Equals
Header Search
csw-rule r1 header "cookie" search "ServerId1" csw-rule r1 header "cookie" search "ServerId2"
263
TABLE 25
XML tag rule name
XML Tag Exists
Syntax
[no] csw-rule <rule-name> xml-tag <tag-name> exists
Example
csw-rule r1 xml-tag "name" exists
csw-rule r1 xml-tag "name" search "geo" csw-rule r1 xml-tag "name" search "edw"
Syntax: csw-rule <rule-name> url | header | method | xml-tag pattern <pattern-to-match> case-insensitive The optional case-insensitive keyword specifies the pattern match to be case insensitive. The following example shows how to configure a case-insensitive policy.
264
Syntax: csw-policy <policy-name> case-insensitive The optional case-insensitive keyword specifies that this policy is case-insensitive.
NOTE
You cannot mix case-insensitive policy and case sensitive-rules, or vice versa.
In this case, "/pages/0*" does not match on " /pages/0". It would only match on URLs such as "/pages/01" and "/pages/011119011", where the URL is at least one byte longer that the part of the rule before the asterisk.
CSW policies
A policy specifies the action to take when a rule is matched. You can specify the following actions in a policy:
Forward action Causes the ServerIron ADX to forward packets matching a specified rule to a
specified real server or server group. Refer to Configuring the forward action on page 266.
Reply-error action Causes the ServerIron ADX to send a 403 error code page back to the
client when the specified rule is matched. Refer to Configuring the reply-error action on page 268.
Log action Causes the ServerIron ADX to write a message to Syslog when the specified rule is
matched. You can optionally customize the format of the Syslog message. Refer to Configuring the log action on page 268.
Redirect action Causes the ServerIron ADX to redirect a request to an alternate domain, URL,
or port when the specified rule is matched. Refer to Configuring redirect on page 280.
Persist action causes the ServerIron ADX to send requests with similar content to the same
server when the specified rule is matched. Refer to Configuring the persist action on page 266.
NOTE
If no rule is matched, traffic is directed to the internet.
Creating a policy
To create a policy for Layer 7 content switching, enter a command such as the following.
ServerIronADX(config)# csw-policy policy1
Syntax: [no] csw-policy <policy-name> The <policy-name> variable can be up to 80 characters in length.
265
Syntax: [no] match <rule-name> forward <id> [cookie-name <name>] The <rule-name> variable is the name of a previously configured Layer 7 content switching rule. The <id> variable refers to a real server or server group ID. An <ID> between 0 and 1023 indicates a server group ID, and an is between 1024 and 2047 indicates a real server ID. If you specify a server group ID, you can optionally specify a cookie name. When you specify a cookie name, the ServerIron ADX performs cookie switching on packets matching the rule, which ensures that packets matching the rule go to the same real server within the server group. Refer to "Configuring Cookie Switching" in the ServerIron ADX for more information.
The persist action can then be used in conjunction with the above CSW rule. 2. The ServerIron ADX examines the matched content to determine the persist string. The persist string contains the portion after the matched string that the ServerIron ADX uses, (along with the persist method) to select a real server (or server group) to which to send the packet. For example, in CSW rule r1 defined above, the matched content could be something like: ServerID=2 Then, you may specify that the persist string be a segment of the matched content, starting from a specified offset from the matched string (ServerID) and lasting for a specified length. In the example above, if you specify an offset of 1 and a length of 1, the persist string would be 2. 3. The ServerIron ADX uses the persist string along with the configured persist method to select a real server or group. By default, the ServerIron ADX uses a hash-to-bucket persist method to select a real server. The hash-to--bucket persist method is illustrated in the following figure.
266
FIGURE 30
ServerID=1
The number corresponds to one of 256 internal hashing buckets on the ServerIron
10
...
255
4 5
Using its load balancing metric, the ServerIron allocates a real server to the hashing bucket The ServerIron sends the HTTP request to the real server allocated to the persist strings hashing bucket
rs3
For a given rule, you can configure a primary persist action and a secondary persist action. If the primary persist action does not return a valid persist string, or if the server indicated by the primary persist string is not available, the ServerIron ADX uses the secondary persist action to direct packets to a server. The following commands configure a CSW rule and policy that use the persist action.
ServerIronADX(config)# csw-rule r1 header host exists ServerIronADX(config)# csw-policy p1 ServerIronADX(config-csw-p1)# match r1 persist offset 0 length 0
In the above example, the csw-rule command creates a rule that matches if an incoming packet contains an HTTP host header field. The csw-policy command creates a policy called p1. The match r1 persist command associates the rule with the persist action. As a result, if an incoming packet has an HTTP host header field, the contents of the host header field are used as the persist string. The ServerIron ADX uses the persist string along with the default hashing-bucket persist method to calculate the real server to which to send the packet. Syntax: [no] match <rule-name> persist offset <offset> length <length> [[<persist-method>] [secondary]] or Syntax: [no] match <rule-name> persist offset <offset> terminator <string> [[<persist-method>] [secondary]] The <offset> variable specifies the offset in bytes from the end of the matched string, matched by the <rule-name> to be used as the persist string. If you specify 0 as the <offset>, the persist string begins right after the matched string. The <length> variable specifies the length in bytes of the persist string. If you specify 0 as the <length>, the persist string ends at the end of the matched content. The terminator <string> variable specifies the substring with which the persist string ends.
267
The <persist-method> variable specifies which of the following persist methods you want to use.
hash-to-bucket Hashes the persist string to a hashing bucket, as illustrated in Figure 30. This
is the default.
hash-to-group-id Hashes the persist string to a server group ID, instead of to a hashing
bucket.
group-or-server-id Translates the persist string to the ID of a real server or server group. server-name Translates the persist string to the name of a real server. alias-name Translates the persist string to the name of an alias.
The secondary keyword indicates that this is a secondary persist action for the rule. If the primary persist action does not return a valid persist string, or if the server indicated by the primary persist string is not available, the ServerIron ADX uses the secondary persist action to direct packets to a server.
To cause the ServerIron ADX to write a message to Syslog when rule r1 is matched, enter a command such as the following:
ServerIronADX(config-csw-policy1)# match r1 log
Syntax: [no] match <rule-name> log [<format>] By default, the format of the Syslog message is as follows. <source-ipaddr> <source-port> <protocol> Rule matched, <action-message> Additionally, you can change the format of the Syslog message using the following tokens:
$SIP Source IP address $DIP Destination IP address $SPT Source port $DPT Destination port $HST Host name
268
$URL URL $RUL Rule name $ACT Action $CNT Matched content, such as the matched method, URL, version, or HTTP header. THis option is only supported when using TCP/UDP Content Switching.
For example, the following command specifies an alternate format for the Syslog message:
ServerIronADX(config-csw-policy1)# match r1 log "$SIP:$SPT->$DIP:$DPT,ru $RUL hit $ACT"
In this example, when a packet matches rule r1, a message such as the following is written to Syslog.
192.168.9.210:80->10.10.10.10:80, ru r1 hit forward
Inserting a cookie
You can configure the ServerIron ADX to insert a cookie into an HTTP response when a specified rule is matched. When the rule is matched, a cookie is inserted in the response when any of the following occur:
No cookie header is found in the HTTP request, or a cookie header exists but it does not
contain the cookie name specified by the rewrite cookie-insert command.
The specified cookie name is found in the HTTP request, but the cookie value is out of the
range used for cookie switching. The cookie value must be between 1 and 2047.
The specified cookie name is found in the HTTP request, but the real server or server group
indicated by the cookie value is not available. For example, the following command causes the ServerIron ADX to insert the cookie indicated by the rewrite cookie-insert command into the HTTP response when rule r1 is matched.
ServerIronADX(config-csw-policy1)# match r1 rewrite insert-cookie
Deleting a cookie
Cookie deletion causes the ServerIron ADX to delete the cookies that it set. The ServerIron removes the cookie from the HTTP request prior to sending the request to the server. For example, the following command causes the ServerIron ADX to delete the cookie indicated by the rewrite cookie-insert command from the HTTP response when rule r1 is matched.
ServerIronADX(config-csw-policy1)# match r1 rewrite delete-cookie
Damaging a cookie
Cookie damage consists of altering the cookie header so that it does not contain any cookie that matches the name of the cookie inserted by the ServerIron ADX. For example, the following command causes the ServerIron ADX to damage the cookie indicated by the rewrite cookie-insert command in the HTTP response when rule r1 is matched.
ServerIronADX(config-csw-policy1)# match r1 rewrite destroy-cookie
269
Syntax: [no] match <rule-name> rewrite request-insert header <header> The <header> variable specifies the string that will be inserted. To cause the ServerIron ADX to insert the header "SI-ADX: proto=HTTP+MMS" into the HTTP responses (matching rule r1) that it sends from the virtual server, enter the following command.
ServerIronADX(config-csw-policy1)# match r1 rewrite response-insert header "SI-ADX: proto=HTTP+MMS"
Syntax: [no] match <rule-name> rewrite response-insert header <header> The <header> variable specifies the string that will be inserted.
270
The following configuration of CSW policy "p1" directs the ServerIron ADX to insert the entire certificate chain in HTTP requests it receives on a virtual server that match the "r1" CSW rule and to set the prefix header to "SSL".
ServerIronADX(config)# csw-policy p1 ServerIronADX(config-csw-p1)# match r1 rewrite request-insert client-cert entire-chain ServerIronADX(config-csw-p1)# match r1 rewrite request-insert client-cert cert-header-prefix "SSL"
Syntax: [no] match <rule-name> rewrite request-insert client-cert entire-chain | leaf-cert | wellknown-fields | cert-header-prefix <prefix-header> The entire-chain parameter directs the switch to insert the entire certificate chain. It is in PEM format and BASE64 encoded. The header name is Client-cert. Refer to Table 33 for details. The leaf-cert parameter directs the switch to insert only the leaf certificate in the certificate chain. It is in PEM format and BASE64 encoded. The header name is Client-cert. Refer to Table 33 for details. The wellknown-fields parameter directs the switch to insert only the well-known fields described in Table 27. These fields are in ASCII format. The certheader-prefix parameter directs the switch to set the header prefix of the header listed in Table 26 or Table 27 to the value specified by the <prefix-header> variable. For example, if you define the <prefix-header> variable to the well known prefix "SSL", the "Client-Cert" header becomes "SSL-Client-Cert".
TABLE 26
This field
Client-Cert
TABLE 27
Field
Client-Cert-Version Client-Cert-Serial Client-Cert-Start Client-Cert-End Client-Cert-Subject Client-Cert-Subject-CN Client-Cert-Subject-Alt-CN Client-Cert-Issuer Client-Cert-Issuer-CN Client-Cert-Data-Signature-Algorithm Client-Cert-Signature-Algorithm
The following example configures the CSW policy "p1" to insert the entire certificate chain in HTTP requests it receives on a virtual server and to insert the "SSL" as the certificate header prefix.
ServerIronADX(config)# csw-policy p1 ServerIronADX(config-csw-p1)# match r1 rewrite request-insert header entire-chain
271
Deleting a matched-string on page 272 Deleting content at positive offset on page 273 Deleting content at negative offset on page 274 Deleting a string on page 275
Deleting a matched-string To configure a request to delete a matched string in a CSW rule, follow these steps. 1. Define a CSW rule to search for a sub-string in a URL.
ServerIronADX(config)# csw-rule r11 url pattern "-sample"
Syntax: csw-policy <policy-name> 3. Specify a primary action to forward a request to a server with an ID of 1025 when rule r11 is matched.
ServerIronADX(config-csw-mypolicy)# match r11 forward 1025
Syntax: match <rule-name> forward <server-id> 4. Specify a dependent action to delete the sub-string -sample when it is found in the URL.
ServerIronADX(config-csw-mypolicy)#match r11 rewrite request-delete matched-string
Syntax: match <rule-name> rewrite request-delete matched-string 5. Specify a dependent log action.
ServerIronADX(config-csw-mypolicy)#match r11 log
Syntax: default forward <server-id> The following section assumes you have already completed the previous configuration. If the ServerIronADX were to receive a request for URL /abc/xyz-sample/index.html, it would take the following actions:
NOTE
272
Forward the request to Web Server 1. Log primary Forward action to the log server.
In this case, "-sample" is the deleted string that CSW rule r11 matches. The request is forwarded to the server with server ID 1025, which is defined by primary CSW action match r11 forward 1025. The URLs in the following two HTTP request messages show the difference between the original request and the rewritten request. If there is no sub-string "-sample" in the URL of the HTTP request, rule r11 is not hit, the request is sent to the server with server ID of 1026, which is defined by the default rule default forward 1026.
Example Original HTTP request:
GET /abc/xyz-sample/index.html HTTP/1.1\r\n Host: www.foo.com\r\n User-Agent: Mozilla/5.0 Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n Cookie: name=foundrynet; userid=12345\r\n \r\n
Deleting content at positive offset For more information about offsets, refer to Explanation of offsets on page 280. To configure a request to delete content at a positive offset, follow these steps. 1. Define a CSW rule to search for a prefix "/abc" in URL.
ServerIronADX(config)# csw-rule r12a url prefix "/abc"
NOTE
Syntax: match <rule-name> rewrite request-delete offset <offset> <length> The following section assumes you have already completed the previous configuration.
NOTE
273
The URL prefix "/abc" is matched, offset 0 is at the second "/", which is right after the matched prefix "/abc" in the URL, which is defined in CSW "r12a"; so offset 4 is number "1" which is 4 bytes away after the letter "c". The result is that the 2 bytes containing "12" are deleted in the URL.
Example Original HTTP request:
GET /abc/xyz12/index.html HTTP/1.1\r\n Host: www.foo.com\r\n User-Agent: Mozilla/5.0 Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n Cookie: name=foundrynet; userid=12345\r\n \r\n
Deleting content at negative offset For more information about offsets, refer to Explanation of offsets on page 280. To configure a request to delete content at a negative offset, follow these steps. 1. Define a CSW rule to search for the suffix ".html" at end of URL.
ServerIronADX(config)# csw-rule r12b url suffix ".html"
NOTE
Syntax: match <rule-name> rewrite request-delete neg-offset <offset> <length> The following section assumes you have configured the previous scenario. When ".html" is matched, offset 0 is the white space after letter "l", letter "l" is neg-offset 1, letter "m" is neg-offset 2, letter "t" is neg-offset 3 and so on. As a result, neg-offset 11 is "_". By counting 6 bytes from left to right starting with "_", you can see that "_index" is to be deleted.
Example Original HTTP request:
GET /abc/xyz/default_index.html HTTP/1.1\r\n
NOTE
274
Host: www.foo.com\r\n User-Agent: Mozilla/5.0 Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n Cookie: name=foundrynet; userid=12345\r\n \r\n
Deleting a string For more information about offsets, refer to Explanation of offsets on page 280. To configure a request to delete a sub-string in a CSW rule, follow these steps. 1. Define a CSW rule.
ServerIronADX(config)# csw-rule r13 url exists
NOTE
Syntax: match <rule-name> rewrite request-delete string <string-content> The following section assumes you have already completed the previous configuration. The url-exist matches any URL. If found, only string "123" is deleted; if no instance of "123" is found in the URL, the original URL is sent to the server.
Example Original HTTP request:
GET /abc/xyz123/index.html HTTP/1.1\r\n Host: www.foo.com\r\n User-Agent: Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n Cookie: name=foundrynet; userid=12345\r\n \r\n
NOTE
275
Host: www.foo.com\r\n User-Agent: Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n Cookie: name=foundrynet; userid=12345\r\n \r\n
NOTE
For more information about offsets, refer to Explanation of offsets on page 280. Inserting a string at positive offset To configure a request to insert a string after a CSW rule match, follow these steps. 1. Define a CSW rule for the HTTP prefix of the URL.
ServerIronADX(config)# csw-rule r21 url prefix "/abc"
Syntax: match <rule-name> rewrite request-insert <content> <offset> The following section assumes you have already completed the previous configuration.
NOTE
If no offset is defined, the ServerIronADX will always insert at offset 0. Offset 0 is at the second "/", which is right after matched prefix "/abc", as defined in CSW "r21". The result is that the string "/hello-world" is inserted at the default offset 0, which is after letter "c". The original URL becomes "/abc/hello-world/xyz/index.html". The highlighted URLs in the following two HTTP request messages show the difference between the original request and the one after being rewritten.
Example Original HTTP request:
GET /abc/xyz/index.html HTTP/1.1\r\n Host: www.foo.com\r\n User-Agent: Mozilla/5.0 Netscape/7.02\r\n
NOTE
276
Inserting a string at negative offset To configure a request to insert a string after a CSW rule match, follow these steps. 1. Define a CSW rule for HTTP URL content.
ServerIronADX(config)# csw-rule r22 url prefix /abc/
Syntax: match <rule-name> rewrite request-insert <content> neg-offset <offset> The following section assumes you have already completed the previous configuration.
NOTE
NOTE
If you want to insert a string at the beginning of a URL, make sure that the string always starts with a "/", or the server that receives the request returns a response of "bad request." This response indicates the format is invalid. The assumption is that the URL always starts with a "/". The highlighted URLs in the following two HTTP request messages show the difference between the original request and the rewritten request. Offset 0 is at the first "x," which is right after the matched prefix "/ abc/," as defined in CSW "r22". Therefore, negative offset 5 is at the first "/," which is 5 bytes away from and before the "x." The result is that string "/hello-world" is inserted at the first "/", which is the beginning of URL "/abc/xyz/index.html". The original URL becomes "/hello-world/abc/xyz/index.html".
Example Original HTTP request:
GET /abc/xyz/index.html HTTP/1.1\r\n Host: www.fool.com\r\n User-Agent: Mozilla/5.0 Netscape/7.02\r\n Accept-Charset: ISO-8859-1\r\n
277
When inserting a string in an HTTP request, make sure the negative offset is correctly specified. Incorrectly specifying the negative offset (out of range) may result in an improper HTTP request.
NOTE
Syntax: match <rule-name> rewrite request-replace matched-string <new-string> The <rule-name> variable defines the name of CSW rule. The matched-string keyword defines the matched string (defined by CSW rule), which is to be replaced. The <new-string> variable defines the new string that replaces the previous string. The following section assumes you have already completed the previous configuration. The url-exist matches the entire URL, so the matched string is the whole URL "/abc/xyz/index.html." It is replaced by the new string "/newabc/newxyz/newindex.html."
NOTE
278
Replace a defined string To configure a request to replace a specific string in a CSW rule match, follow these steps. 1. Define a CSW rule for HTTP URL content.
ServerIronADX(config)# csw-rule r32 url pattern "abc"
Syntax: match <rule-name> rewrite request-replace string <old-string> <new-string> The <rule-name> variable defines the name of the CSW rule. The <old-string> variable defines the string to be replaced, if it can be found in the URL defined by the CSW rule. If the <old-string> variable is not found, the replacement will not happen. The <new-string> variable defines the string with which the old string is to be replaced. The following section assumes you have already completed the previous configuration. Because the URL contains the pattern "abc," rule r32 will be hit. Then a search for string "xyz" also is positive, so "xyz" will be replaced with string "1234". The following two HTTP request messages show the difference between the original request and the rewritten request.
Example Original HTTP request:
GET /abc/xyz/index.html HTTP/1.1\r\n Host: www.fool.com\r\n User-Agent: Netscape/7.02\r\n
NOTE
279
Configuring redirect
The redirect action causes the ServerIron ADX to redirect a request to an alternate domain, URL, port, or Uniform Resource Identifier (URI) when the specified rule is matched. For example, the following command causes the ServerIron ADX to redirect a request to the domain fdry.com, URL /home/index.html, and port 8080 when rule r1 is matched.
ServerIronADX(config-csw-policy1)# match r1 redirect "fdry.com" "/home/index.html" 8080
Syntax: [no] match <rule-name> redirect <domain> [<url> | [<port> <status-code>] | [<url> <new-port>]] The <rule-name> variable can be up to 80 characters in length. The <domain> variable can be up to 255 characters. The <url> variable can be up to 255 characters. You can optionally specify * (asterisk) for either the <domain> or <url> variables. When you do this, the redirected request uses the same domain or URL as in the original request. For the <port> parameter, you can enter any well-known port name or port number. For the <status-code> parameter, enter any three-digit status code. For <url> <new-port>, enter the new URL and port number to which the request will be redirected. HTTP redirect status code The ServerIron ADX can be configured to use a temporary or permanent move to suit different application requirements:
301 - To redirect the HTTP request to a new, assigned permanent URI. 302 (the default) -To redirect HTTP requests to a temporary URI.
To redirect an HTTP request with redirect code 301, enter the following command.
ServerIronADX(config)# csw-policy p1 ServerIronADX(config-csw-p1)# match r1 redirect "fdry.com" HTTP 301
Explanation of offsets
NOTE
The offset or neg-offset keyword indicates that insertion or deletion starts after or before the offset of the interested content defined in the matched CSW rule.
280
The following examples show how the offsets work for various rules. Prefix matching csw-rule ruleA url prefix /abc/x Offset 0 points to "y", which is the next byte after "/abc/x" in the URL. Suffix matching csw-rule ruleB header Host suffix com Offset 0 points to "\r", which is the next byte after "com" in the value of "Host" header "www.foo.com". Pattern matching csw-rule ruleC header Host pattern foo. Offset 0 points to "c", which is the next byte after "foo." in the value of "Host" header "www.foo.com". Exist matching csw-rule ruleD1 url exist Offset 0 points to white space after the letter "l", which is right after the last byte of URL "/abc/xyz/index.html". Equal matching csw-rule ruleE header "Host" equal "www.foo.com" Offset 0 points to "\r", which is the next byte after "www.foo.com" in the value of "Host" header, "www.foo.com".
Sample configurations
The HTTP URL Rewrite feature allows the ServerIron to dynamically rewrite URL content in an HTTP request. Also, the HTTP URL Rewrite options allow you to insert, delete, and replace URL content at any offset in an HTTP request. Seamlessly integrated with ServerIron content switching (CSW), the HTTP URL Rewrite can be configured as a dependent action for primary CSW actions. However, only Forwards and Persists are typically used for HTTP URL Rewrite actions on HTTP requests, because the other actions do not pass requests to servers. Before you configure an HTTP URL Rewrite, you should be aware of the following benefits and restrictions for this feature:
You can configure HTTP URL Rewrite and CSW on HTTP, SSL, or any unknown port. HTTP URL Rewrite supports HTTP 1.1 Keepalive and TCP Offload.
281
Sample configurations
HTTP URL Rewrite is an extension of CSW. You define HTTP URL Rewrite actions under a CSW policy. Before you define an HTTP URL Rewrite action, you must define a primary CSW action. For each matched CSW rule, you can only define one primary action. An HTTP URL Rewrite action works only with a primary action that passes client requests to the servers, such as Forward or Persist actions.
You can define multiple dependent CSW actions that work together with a primary CSW action. Dependent CSW actions include HTTP URL Rewrite, log, client-ip insertion, header insertion,
cookie insertion, and deletion.
HTTP URL Rewrite supports nested CSW rules. To enable HTTP URL Rewrite under a VIP, you must enable CSW. HTTP URL Rewrite cannot be configured as a default action.
CSW topology
Figure 31 shows a simple CSW network topology.
FIGURE 31
Client
Internet
ServerIron VIP: 1.1.1.100
For the CSW configuration shown in Figure 31, the following rules apply:
The ServerIron receives incoming traffic on HTTP port, VIP 1.1.1.100. The ServerIron is configured with content switching (CSW) rules and policies. Policy 1 is
defined to rewrite URL content and forward the request to the Web server 1.
If a CSW rule is matched, the ServerIron rewrites the HTTP request and forwards it to Web
Server 1 with server ID 1025 and IP address 1.1.1.1.
If no CSW rule is matched, the ServerIron takes the default action, sending the HTTP request to
Web Server 2 with server ID 1026 and IP address 1.1.1.2.
282
Creating a policy with HTTP URL Rewrite on page 283 Configuring real and virtual servers on page 284 Enabling content switching on page 285 HTTP URL Rewrite configuration summary on page 285
Creating a policy with HTTP URL Rewrite To define a CSW rule and create a CSW policy with HTTP URL Rewrite options, follow these steps. 1. Define a CSW rule to match a URL pattern in an HTTP header.
ServerIronADX(config)# csw-rule r11 url pattern /xyz
Syntax: csw-rule <rule-name> url pattern <url-content> 2. Define a CSW rule to match a prefix string in an HTTP header.
NOTE
Syntax: csw-rule <rule-name> header <header-content> prefix <prefix-content> 3. Define a CSW policy.
ServerIronADX(config)# csw-policy mypolicy
Syntax: csw-policy <policy-name> 4. Specify a primary action to forward a request to a server ID when a rule is matched.
ServerIronADX(config-csw-mypolicy)# match r11 forward 1025
Syntax: match <rule-name> forward <server id> 5. Specify a dependent action and delete the matched string when a rule is matched.
ServerIronADX(config-csw-mypolicy)# match r11 rewrite request-delete matched-string
NOTE
The rewrite request-delete matched-string option is an HTTP URL Rewrite action. For more detailed command information, refer to rewrite request-delete on page 325.
283
Sample configurations
Syntax: match <rule-name> log 7. Specify a primary action to forward a request to a server ID when a rule is matched.
ServerIronADX(config-csw-mypolicy)# match r12a forward 1025
Syntax: match <rule-name> forward <server id> 8. Specify a dependent action and delete at an offset when a rule is matched.
ServerIronADX(config-csw-mypolicy)# match r12a rewrite request-delete offset 4 2
NOTE
NOTE
For more information about offsets, refer to Explanation of offsets on page 280. 9. Specify default action for client requests that do not match any other rules. Send such requests to the Web server with ID 1026.
ServerIronADX(config-csw-mypolicy)# default forward 1026
Syntax: default forward <server-id> Configuring real and virtual servers To configure the real and virtual servers, follow these steps. 1. Define a real server (1) with an IP address.
ServerIronADX(config)# server real web1 1.1.1.1
Syntax: server real <real-server> <ip-address> 2. Define a real HTTP port on the real server.
ServerIronADX(config-rs-web1)# port http
Syntax: server real <real-server> <ip-address> 4. Define a real HTTP port on the real server and exit.
ServerIronADX(config-rs-web2)# port http ServerIronADX(config-rs-web2)# exit
Syntax: port http Syntax: exit 5. Define a virtual server with an IP address.
ServerIronADX(config)# server virtual-name-or-ip csw-vip 1.1.1.100
284
Syntax: server virtual-name-or-ip <vip-name> <ip-address> 6. Define a virtual HTTP port on the virtual server.
ServerIronADX(config-vs-csw-vip)# port http
Syntax: port http 7. Bind HTTP ports on real servers web1 and web2 to the virtual port HTTP.
ServerIronADX(config-vs-csw-vip)# bind http web1 http web2 http
Syntax: bind http <real-server> http <vip-name> Enabling content switching To enable content switching, follow these steps. 1. Bind the policy to virtual HTTP port on virtual server.
ServerIronADX(config-vs-csw-vip)# port http csw-policy mypolicy
Syntax: port http csw-policy <policy-name> 2. Enable CSW on the virtual port.
ServerIronADX(config-vs-csw-vip)# port http csw
Syntax: port http csw HTTP URL Rewrite configuration summary The following example shows a summary of the configuration steps.
#csw-rule r11 url pattern /xyz #csw-rule r12a header Accept-Charset prefix ISO#csw-policy mypolicy #match r11 forward 1025 #match r11 rewrite request-delete matched-string #match r11 log #match r12a forward 1025 #match r12a rewrite request-delete offset 4 2 #default forward 1026 #server real web1 1.1.1.1 #port http #server real web2 1.1.1.2 #port http #server virtual-name-or-ip csw-vip 1.1.1.100 #port http #port http csw-policy mypolicy #port http csw #bind http web1 http web2 http
285
FIGURE 32
SI
Router Client
Internal Network
1.
Client sends request to: https://www.abc.com/index.html
2.
After SSL Offload, ServerIron sends real server: http://www.abc.com/index.html
Real Servers
4.
ServerIron sends the same content to client 302 - Redirect https://www.abc.com/login.asp
3.
Real server sends redirect using http as it is not aware of SSL - Offload 302 - Redirect http://www.abc.com/login.asp
A ServerIron can be programmed to modify such responses and replace "http://" with "https://". This feature can be applied selectively based on the response code and the embedded URL. For example, the ServerIron can be programmed to replace only response codes 301 and 302, and only for URLs matching "http://www.abc.com". In general, this feature is used for modifying the redirect URLs in response codes 301 and 302. However, it is not limited to modifying redirects and in theory can be configured to modify any other part of the HTTP-header in any other response code.
286
Syntax: [no] csw-rule <rule-name> response-header <header name> pattern <pattern to be found>
Syntax: port <port-type> response-rewrite-policy <policy-name> In this configuration, the ServerIron rewrites the HTTP response. Whenever response code 301 or 302 appears in the header, together with a redirect URL http://www.abc.com (signified by the Location header), the ServerIron replaces the URL with https://www.abc.com. In other words, "Location: http://www.abc.com" becomes "Location: https://www.abc.com."
287
csw-rule r1 response-status-code 301 302 csw-rule r11 response-header "Location" pattern "http://www.abc.com" csw-policy "p1" type response-rewrite match "r1" response-header-rewrite match "r11" rewrite response-header-replace "https://www.abc.com/" offset 0 length 19 server real rs1 100.1.1.101 port http port http url "HEAD /"
NOTE
Response body rewrite only works for uncompressed contend delivered from the real servers.
288
Syntax: [no] response-rewrite content-type <type-string> Users can use "*" as wildcard match, such as "*/*" for any type of content.
NOTE
Syntax: show csw-policy <policy-name> To show internal debug counters, enter a command such as the following on the BP console.
ServerIronADX# show appfw debug
289
Syntax: debug appfw-fsm <client-ip-address> To turn on debug information for a specific URL, enter a command such as the following on the BP console.
ServerIronADX# debug appfw-fsm url index.html
Configuration example
This configuration replaces all references to http://www.abc.com with https://www.abc.com in all response data. In other words, the data "href='http://www.abc.com/index.html" becomes "href=https://www.abc.com/index.html".
csw-rule r2 url exists csw-rule r21 response-body pattern http://www.abc.com/ csw-policy "p1" type response-rewrite match "r2" response-body-rewrite match "r21" rewrite response-body-replace "https://www.abc.com/" offset 0 length 19 server real rs1 100.1.1.101 port http port http url "HEAD /" server real rs2 100.1.1.102 port http port http url "HEAD /" server virtual-name-or-ip v1 100.1.1.10 port ssl port ssl response-rewrite-policy p1 bind ssl rs1 http rs2 http
290
NOTE
NOTE
Spoofing can be configured with the command port <port number> spoofing under the virtual server configuration. This can also be achieved by configuring l3-default-gateway.
NOTE
The <cookie-name> variable is required, while the <path>, <domain>, and <age> variables are optional.
Specifications
CLI commands on ServerIron have a limitation on the total length of each command, When a command includes many keywords or values, the attributes of <path> or <domain> can be too long.
291
The following are the internal system limitations for some attributes introduced by this command:
<cookie-name>: Maximum length is 80 bytes. <path>: Maximum length is 255 bytes. <domain>: Maximum length is 80 bytes. <age>:Integer between 0 and 0x1FFFFFFF.
Configuration guidelines
Cookie insertion is typically configured together with cookie switching. If a specific cookie with valid value is found and the associated action can be taken, the ServerIron will take action based on the cookie value; otherwise, it follows other matched rules, in which possibly a cookie insertion is triggered. The following are the steps to configure the cookie insertion with cookie switching:
Configure CSW rules and policy Bind the CSW policy to a VIP Enable CSW on the VIP
Example
The ServerIron does cookie switching based on the cookie value of "ServerID" or "biz" defined in either rule1 or rule2. If both rule1 and rule2 are not hit but rule3 is hit, it will forward the request to server group 10 and insert a cookie with name "biz", with path being "business". If no rule is hit, ServerIron will take the default action. It will forward the request to server group 1 and insert a cookie with name "ServerID", which expires in 60 minutes,.
csw-rule rule1 header "Cookie" search "ServerID=" csw-rule rule2 header "Cookie" search "biz=" csw-rule rule3 url prefix "/business" csw-policy policy1 match rule1 persist offset 0 length 0 group-or-server-id match rule2 persist offset 0 length 0 group-or-server-id match rule3 forward 10 match rule3 rewrite insert-cookie "biz" "*" "/business" default forward 1 default rewrite insert-cookie "ServerID" "*" "*" age 60 server virtual-name-or-ip test 2.2.2.222 port default disable port http port http csw-policy "policy1" port http csw port http keep-alive bind http rs1 http server real rs1 1.1.1.1 port http port http url "HEAD /" port http server-id 1100 port http group-id 1 1 port 8080
292
port 8080 server-id 1208 port 8080 group-id 10 10 server virtual-name-or-ip test 2.2.2.2 port default disable port http port http csw-policy "policy1" port http csw port http keep-alive bind http rs1 http rs1 8080
Make sure that the system time is configured when you configure cookie age.
NOTE
293
FIGURE 33
Client
ServerIron ADX
SI
192.168.9.100 Virtual Server IP address: 10.10.10.1 Port: HTTP
1.
Intiial Client Request generates the following normal session table entry: 192.168.9.100:PORT->10.10.10.1:80->172.16.0.5:80 Real Server IP address: 172.16.0.5
2.
The real server at IP address 172.16.0.5 sets a cookie named JSESSIONID to a value of 0123456789abcdefg012345643352256.
4.
Subsequent Client Requests from 192.168.9.100 are assigned to real server at IP address 172.16.0.5 port: 80.
Create a CSW rule to match the server response Create a CSW rule to match the client request Specify a CSW action to create persist Specify a CSW action to perform persistence lookup and retrieve real server information
294
Syntax: [no] csw-rule <rule-name> response-header <header-name> pattern <search-string> The <rule-name> value can be up to 80 characters in length. The <header-name> specifies HTTP header field to be matched in an HTTP response from a real server. The <search-string> specifies the string within the <header-name> variable that will be matched in the HTTP response from a real server.
Syntax: [no] csw-rule <rule-name> header <header-name> pattern <search-string> The <rule-name> value can be up to 80 characters in length. The <header-name> specifies the HTTP header field to be matched in an HTTP request from a client. The <search-string> specifies the string within the <header-name> variable that will be matched in an HTTP request from a client.
Syntax: [no] match <rule-name> passive-persist offset <persistence-string-offset> length <persistence-string-length> The <rule-name> is the name of a previously configured CSW rule that was defined to match a server response. The <persistence-string-offset> specifies the number of characters that will be skipped directly after the <search-string> matched in the specified CSW rule. Normally this value is 0 (zero) which places the start point at the character that is right after the string. As an example, you can configure a search string to JSESSIONID as specified for r1, with an offset of 0. Where the string found is JSESSIONID=0123456789abcdefg012345643352256", an offset of 0 will mean that the hash string will start with =. If the offset is 7 the string will be parsed beginning with the integer 6. Once the offset point is set by the <persistence-string-offset>, the system will parse the <search-string> matched in the specified CSW rule up-to the number of characters defined by the value of the <persistence-string-length> variable. The value of the <persistence-string-length> variable must be greater than 0 (zero). If the value of the <length> variable extends beyond the length of the <search-string>, the system will look to the end of the string to define the string used for hashing.
295
For example: if the search string is JSESSIONID as described in the preceding chapter, and the offset is 0, the string will be parsed beginning with the =. If the <persistence-string-length> is set to 7, the string used will be 0123456.
Specifying a CSW action to perform persistence lookup and retrieve real server information
To specify a CSW action to perform persistency information lookup and use stored real server information to forward requests, use the following command.
ServerIronADX(config)# csw-policy p1 ServerIronADX(config-csw-policy-p1)# match r2 persist offset 0 length 11 passive-persist
Syntax: [no] match <rule-name> persist offset <persistence-string-offset> length <persistence-string-length> passive-persist The <rule-name> is the name of a previously configured CSW rule that was defined to match a client request. The <persistence-string-offset> specifies the number of characters that will be skipped after the start point of the <search-string> matched in the specified CSW rule. Normally this value is 0 (zero) which places the start point at the beginning of the string. For example: if the search string is OutlookSession as specified in r1, and the offset is 0, the string will be parsed beginning with the capital O in OutlookSession. If the offset is 7 the string will be parsed beginning with the capital S in Session. Once the offset point is set by the <persistence-string-offset>, the system will parse the <search-string> matched in the specified CSW rule up-to the number of characters defined by the value of the <persistence-string-length> variable. The value of the <persistence-string-length> variable must be greater than 0 (zero). If the value of the <length> variable extends beyond the length of the <search-string>, the system will look to the end of the string to define the string used for hashing. For example: if the search string is OutlookSession as specified in r1, and the offset is 0, the string will be parsed beginning with the capital O in OutlookSession. If the <persistence-string-length> is set to 7, the string used will be Outlook.
Example
The following example operates in a configuration much like the example shown in Figure 33 with the following operation: 1. The Client request the following URL: www.test.com 2. The server responds with a page and performs Set-Cookie: PSrvrID=1234567 The page contains several URL such as: href=test/nextpage.html?PSrvrID=1234567" 3. The Client clicks on the link: www.test.com/test/nextpage.html?PSrvrID=1234567 If cookies are enabled, the Client sends: Cookie: PSrvrID=1234567 If cookies are disabled, NO cookie is sent back. 4. The load balancer analyzes the incoming request as described: If cookie is found in the header (Cookie:), the cookie value is looked up in the session table for the session bound to the same server.
296
If no cookie is found, the URL can be analyzed. the cookie name is also found after the ? value is found. It is also looked up in the session table for the session bound to the same server.
Sample configuration
The following can be used to configure the previous example.
ServerIronADX(config)# csw-rule "response-cookie" response-header "Set-Cookie" pattern "PSrvrID=" ServerIronADX(config)# csw-rule "uri" url pattern "PSrvrID=" ServerIronADX(config)# csw-rule "forward-cookie" header "Cookie" pattern "PSrvrID=" ServerIronADX(config)# csw-policy "passive1" ServerIronADX(config-csw-policy-passive1)# match "response-cookie" passive-persist offset 0 length 7 ServerIronADX(config-csw-policy-passive1)# match "forward-cookie" persist offset 0 length 7 passive-persist ServerIronADX(config-csw-policy-passive1)# match "uri" persist offset 0 length 7 passive-persist
Configuring server and server port persistence with CSW nested rules on page 297 Configuring persist on the nested rule on page 298 Configuring persist on the real port on page 298
NOTE
CSW nested rules are not supported in a csw response rewrite policy.
Configuring server and server port persistence with CSW nested rules
This section describes the support of CSW rewrite/persist on nested rule and persist on real server ports. Currently, CSW supports rewrite or persist action on simple rules. The rewrite or persist action on nested rules is not supported, because the place of rewrite or persist action can not be decided on nested rule. This new feature adds a new CLI to specify a base rule within nested one that rewrite or persist action can be based on. Also, the current CSW supports the persistence on the group or server ID. Support of persistence on the real server port gives you more granular control. This feature is to be used with persistence on the group or server ID and is useful when the customer has multiple ports configured on the same group or server, and also wants to direct the request to a particular port instead of load balancing among all the ports. Persist or rewrite actions can be performed when a nested rule matches, and the location of persistence or rewrite string is determined by a master rule within the nested rule.
297
Syntax: [no] csw-rule <rule-name> nested-rule <rule logic string> master-rule <rule-name> If a master rule is not specified, the default master in the first rule is the nested rule.
NOTE
NOTE
If a master rule is not present when the nested rule matches, the persist or rewrite action cannot be performed. It will be treated as nested rule not matched.
Syntax: [no] match <rule-name> persist offset <offset> length <offset> [[<persist-method> [real-port <port> [port-failover|fail-close]]] [secondary]]
NOTE
The real port and the failover modes can only be specified when the <persist-method> variable is group-or-server-id. The three modes when the specified real port is not available are:
Default: Layer 4 load balancing is performed. Port-failover: The ServerIron fails over to the same port number configured on the virtual port.
When there is no real port to be failed over, the client connection is closed.
Usage example
The customer needs the following request:
Two real servers, 192.168.1.100 and 192.168.1.101. Each server has a different application listening on different ports: 10500 and 10520. Each server is configured to a different group, 30 and 31. The request with pweb and jsession=<groupid>embedded in the URL is directed to the specified group
The configuration is as follows. For configuring the real server, enter the following commands:
ServerIronADX(config)# server real-name-or-ip rs1 192.168.1.100 ServerIronADX(config-rs-rs1)# port 10500 group-id 20 20 30 30
298
port 10520 group-id exit real-name-or-ip rs2 port 10500 group-id port 10520 group-id exit
21 21 30 30 192.168.1.101 20 20 31 31 21 21 31 31
The result: If the request has the string "pweb" and also string "/jsession=30" embedded in the url, Then the rule n1 will be matched and SI will choose to connect to the rs1 (group 30) and the port 10500 If the port 10500 on rs1 is not available, the client request fails over to the port 10500 on rs2.
299
ServerIronADX# show csw-hdr-info Unknown header list Name :Hdr Tab Ind :Ref Co -----------------------------------------------------------Cookie: :0 :1 Unknown header count: 1 Known header list Name :Hdr Tab Ind -----------------------------------------------------------Connection: :10 Transfer-Encoding: :11 Content-Length: :12 Host: :13 Cookie: :14 Pragma: :15 Cache-Control: :16 Known header count: 7 XML tag list Name :Tab Ind :Ref Co -----------------------------------------------------------banner1 :0 :4 banner2 :1 :1 banner3 :2 :1 banner4 :3 :1 banner5 :4 :1 banner6 :5 :1 banner7 :6 :1 banner8 :7 :1 volume :8 :9 XML tag count: 9
Syntax: show csw-hdr-info Table 28 describes the information displayed by the show csw-hdr-info command.
TABLE 28
Field...
Unknown header list Name Hdr Tab Ind Ref Co Unknown header count: Known header list Name Hdr Tab Ind Known header count: XML tag list Name Hdr Tab Ind The name of each XML tag encountered. The offset in the XML tag table. The name of each known header field encountered. The offset in the header table. The number of unknown headers encountered. The name of each unknown header field encountered. The offset in the header table. The reference count of the number of rules using this header. The number of unknown headers encountered.
300
TABLE 28
Field...
Ref Co
Rule Name |Rule Type |Data |Data |Data |Ref C|Prot --------------------------------------------------------------------------ban1 |xml-tag |banner1 |equals |1 |0 |http ban2 |xml-tag |banner1 |equals |2 |0 |http ban3 |xml-tag |banner1 |equals |3 |0 |http
Syntax: show csw-rule [<rule-name>] Table 29 describes the information displayed by the show csw-rule command.
TABLE 29
Field
Rule Count
Rules Allocated Rules Deleted Rule Name Rule Type Data fields Ref C Prot
To display detailed information for a specified rule, enter a command such as the following.
301
ServerIronADX# show csw-rule volume1 detail Rule Name :volume1 Rule Type :xml-tag Header :volume Operator :equals Value :Volume I case-insensitive:FALSE Ref cnt Sub Rule cnt Sub Rules :1 :1 :volume1
Before Minterm Reduction Min term mask :0x00000002 Min terms :1 After Minterm Reduction Min term cnt :1 Minterms :volume1 Hdr/Meth Ind :8
Syntax: show csw-rule <rule-name> detail The following table describes the information displayed by the show csw-rule detail command. Table 30 defines the fields shown in the screen display.
TABLE 30
Field
Rule Name Rule Type Header Operator Value Ref cnt Sub Rule cnt Sub Rules
Before Minterm Reduction Min term mask Min terms Number of minterms for the expression. List of minterms.
After Minterm Reduction Min term cnt Minterms Hdr/Meth Ind Number of minterms for the expression. List of minterms. Index into the header in the method table.
302
Syntax: show csw-policy server-sw Table 31 defines the fields shown in the screen display.
TABLE 31
Field
Policy Name
Reference Count Rule Name Act Data fields Flags Hit Cnt
To display detailed information about a policy, enter a command such as the following.
303
ServerIronADX# show csw-policy server-sw detail Policy Name :server-sw Reference Count :1 Action code description: fwd: forward rst: reset-client rdr: redirect err: reply-error
Flag description: A: insert-cookie B: delete-cookie C: destroy-cookie D: req-ins-hdr E: req-ins-client-ip F: resp-ins-hdr L: log Rule Name |Act|Offse|Data1 | Data2|Data3 |Flags |Hit Cnt --------------------------------------------------------------url1024 |fwd|0 |1024 | |N/A |_______ |0 url1025 |fwd|1 |1025 | |N/A |_______ |0 default |fwd|0 |1 | |N/A |_______ |0 --------------------------------------------------------------Total Rule Count Simple Rule Count Minterm Count Database Count XML Tag Count Parse Mask Parse Tags Vip Bindings :2 :2 :2 :2 :0 :0x00020000 :url :193.168.28.150 [80]
Syntax: show csw-policy <policy-name> detail In addition to the information shown in Table 31, the show csw-policy detail command displays the following information. Table 32 defines the fields shown in the screen display.
TABLE 32
Field
Offse
Total Rule Count Simple Rule Count Minterm Count Database Count XML Tag Count Parse Mask Parse Tags Vip Bindings
304
9 4
5 0
Content Rewritings Done in HTTP Requests: Cookie Deleted: 0 Cookie Destroyed: 1 Header Insertion: 2 Client IP Insertion: 2 Content Rewritings Done in HTTP Responses: Cookie Inserted: 1 Header Insertion: 0 Total Memory Already Consumed: 64 KB.
0 0 0 0
0 0
Syntax: show l7-rewrite-info Table 33 defines the fields shown in the screen display.
TABLE 33
Field
HTTP Content Rewrites Total Allocated Total Freed Used Now Allocation Failures Content Rewritings Done in HTTP Requests Cookie Deleted Cookie Deletion Err Cookie Destroyed Cookie Destroy Err Header Insertion Header Insertion Err Client IP Insertion
305
TABLE 33
Field
Client IP Insertion Err Content Rewritings Done in HTTP Responses Cookie Inserted Cookie Insertion Err Header Insertion Header Insertion Err Total Memory Already Consumed
Syntax: show server proxy Table 34 defines the fields in the screen display.
TABLE 34
Field
Slot alloc Curr free slot Slot freed Slot alloc fail Pkt freed Max slot alloc Pkt freed
306
TABLE 34
Field
Session del
Sess del pkt free DB cleanup cnt DB cleanup pkt free Serv RST to SYN Send RST to C URL not in 1st pkt URL not complete Cookie not in 1st pk Cookie not complete Sess T/O rev Sess 0 Sess T/O Sess diff Dup SYN Sess diff Curr slot used Curr pkt stored
Usage guidelines
When you define an offset or negative offset value to insert or delete a string, the value is not allowed to go beyond the URL value defined by the associated CSW rule. If it does exceed the boundary of the URL value, the ServerIron adjusts it to align with the beginning or the end of the URL. Similarly, the deletion action is not allowed to delete content beyond the URL value defined by its associated CSW rule. If the string to be deleted does exceed the start or end of the boundary of the URL or header value content, ServerIron limits the string to be deleted to the part within the boundary. Syntax: match <rule-name> rewrite request-insert <string> [offset | neg-offset <offset>] The <rule-name> variable defines the name of CSW rule. The <string> variable defines the string to be inserted. The <offset> variable defines the distance of bytes from the offset 0. By default, offset 0 is right after the interested string defined by matched CSW rule. The Keyword offset or neg-offset indicates that the insertion offset starting after or before the offset 0.
307
Understanding TCP/UDP content switching on page 308 Configuring TCP/UDP content switching on page 308 TCP/UDP content switching commands on page 313
Extends the current prefix-suffix-pattern matching function to generic TCP and UDP content. Provides load balancing based on any content specified in the configuration. Adds multiple levels to the policy search function. Allows you to provide a sub-string for the next level of policy matching, depending on the policy matching result at the current level.
Supports forwarding action, reset action (TCP only), and persisting request to server action. Supports content rewrite action, including insertion, deletion, and replacement. Supports pattern matching.
Specifications
TCP/UDP content switching has the following specifications:
Cannot be used with legacy content switching. You must activate csw. Does not work with fragmented packets. No cookie insert, rewrite, or delete; no request or respond insert; no client-ip insert; no tcp
off-load; no keepalive.
No out of sequence packets. All content matches must be ASCII; no hex match are allowed.
308
Define a policy (required) Configure a forward action (required) Configure a persist action (optional) Configure a log action (optional) Configure a reset-client action (optional) Configure a rewrite action (optional) Configure a goto action (optional) Enable TCP/UDP content switching (required)
Syntax: [no] csw-rule <rule-name> tcp-content [ prefix | pattern ] <string> [case-insensitive] This rule (rulea) specifies tcp-content of the pattern abcd and is case insensitive. 4. Set the parameter to specify the offset from where to begin scanning. depth specifies the depth of the content.
ServerIronADX(config-csw-rulea)# offset 10 depth 30
309
ServerIronADX(config-csw-policy1)#
Syntax: [no] csw-policy <policy-name> protocol any After you create a policy-name, you can specify the following kinds of actions in a policy:
Forward action Persist action Log action Reset-client Rewrite action Goto action
Syntax: [no] match <rule-name> forward <id> You must have previously created a real-server and assigned server-id 1029 to it.
NOTE
Syntax: [no] match <rule-name> persist offset <offset value> [length <length> | terminator <string>] [hash-to-bucket] The <length> variable specifies the length in bytes of the string to be hashed. The <offset value> variable specifies the start of the hash string.
NOTE
If you specify 0 as the <offset>, the string starts at the beginning of the matched content.
310
$SIPSource IP $DIPDestination IP $SPTSource Port $DPTDestination Port $RULRule name $ACTThe action taken e.g forward $CNTContent (The pattern that has been matched)
Example
ServerIronADX(config-csw-policy1)# match rulea log "source-ip = $SIP, dest-ip = $DIP, rule = $RUL matched"
The log rule is a secondary rule that assumes an action rule is already specified. It only logs the action taken.
NOTE
Configuring Rewrite request-delete on page 272 Configuring Rewrite request-insert on page 276
311
Syntax: [no] match <rule-name> goto <policy-name> Define a nested rule (optional) After you have defined the basic, standalone, rules, you can optionally bind them together to create more complex, nested, rules. You can combine rules with logical operators to create nested rules. Up to four rules can be combined in a single nested rule. The following operators are supported.
&& || ! NOT operator. AND operator.
The following procedure describes how to configure a nested rule. 1. Enable privileged EXEC mode.
ServerIronADX> enable
3. Configure a nested rule name and a rule called nestedrule1 that combines three other rules: ruleA, ruleB, and ruleC.
ServerIronADX(config)# csw-rule nestedrule1 nested-content-rule ruleA && (ruleB || (!ruleC))
Syntax: [no] csw-rule <rule-name> nested-content-rule <expression> The nested rule is matched when an incoming packet matches ruleA, and either matches ruleB or does not match ruleC.
NOTE
312
Syntax: [no] server virtual-name <virtual-name> <ip-address> Syntax: [no] port http csw-policy <policy-name> Syntax: [no] port http csw
csw-rule csw-policy match begin-delimitor end-delimitor forward goto log persist reset-client rewrite
csw-rule
Use the csw-rule command in the global configuration mode to configure a content switching rule for TCP/UDP content switching. Syntax: [no] csw-rule <rule-name> nested-content-rule <expression> | tcp-content [prefix | pattern] <tcp-content>| udp-content [prefix | pattern] <udp-content>| case-insensitive
csw-rule <rule-name> nested-content-rule <expression> Content switching rule command. Specifies the name of the rule. Can be up to 80 characters in length. Specifies a nested content rule (compound rule). Within the <expression>, you can include up to four rules, linked with logical operators. The following logical operators are supported: && = AND || = OR ! = NOT A nested rule cannot be specified within the <expression> of another nested rule. The <expression> must refer to more one rule, unless the ! (logical NOT) operator is used. Specifies TCP content for load balancing. Specify content to be matched.
tcp-content <tcp-content>
313
Specifies UDP content for load balancing. Specify content to be matched. Turns on the case-insensitive condition in the search.
Usage Guidelines The following options are available after you create a rule and enter the content switching rule configuration mode.
offset <offset> depth <depth> Specify the offset from where to begin scanning depth specifies the depth of the content. max-offset can be 65535 max-depth can be 32768 (or 65535).
csw-policy
Use the csw-policy command in the global configuration mode to configure a content switching policy for TCP/UDP content switching. Syntax: [no] csw-policy <policy-name> protocol any | case-insensitive
csw-policy <policy-name> protocol any case-insensitive Content switching policy. Policy name can be up to 80 characters in length. protocol any must be entered or the legacy content switching policy is used. Turns on the case-insensitive condition in the search.
Usage Guidelines After you create a policy and enter the TCP/UDP content switching policy-configuration mode, you must set a rule with the match sub-command.
match
Syntax: [no] match <rule-name> begin-delimitor | end-delimitor | forward | goto | log | persist | reset-client | rewrite
match <rule-name> Specifies match sub-command. Specify rule to be matched.
begin-delimitor
begin-delimitor Specifies to set this rule to be the beginning delimitor.
end-delimitor
end-delimitor Specifies to set this rule to be the ending delimitor.
314
forward
forward id Specifies to forward the packets. Group ID is from 0 to 1023. Server ID is from 1024 to 2047. Layer 4 Load Balancing is greater than 2047.
goto
Syntax: goto <policy-name>
goto <policy-name> Specifies to go to the next level. Name of the policy.
log
Syntax: log <log_format> Specifies the log action.
<log_format> The log_format can be a string that uses the following variables: $SIPSource IP $DIPDestination IP $SPTSource Port $DPTDestination Port $RULRule name $ACTThe action taken e.g forward $CNTContent (The pattern has been matched)
persist
Syntax: persist offset <offset value> [length <length> | terminator <string>] [hash-to-bucket]
persist offset <offset-value> length <length> terminator <string> hash-to-bucket Specifies the persist action for packets. Specifies offset of content to hash. Value for offset. Specifies the length in bytes of the string to be hashed. If you specify 0 as the <length>, the string ends at the beginning of the matched content. Value for length. Specifies the terminator for the search string. Value of the terminator. Specifies to persist by hashing.
reset-client
reset-client Specifies to send a reset message to a client.
rewrite
For instructions on how to use the rewrite action within a CSW policy, see the following sections:
315
Configuring Rewrite request-delete on page 272 Configuring Rewrite request-insert on page 276
Syntax: [no] server max-l7-connections <number> On ServerIron ADX Chassis devices, the number of concurrent Layer 7 switching connections can range from 100,000 to 512,000.
In this example, if server1 reaches its maximum-connection threshold, and if all the real servers in the server group to which server1 belongs also reach their maximum-connection thresholds, HTTP requests that would normally go to server1s server group are dropped. Syntax: [no] exceed-max-drop
316
Syntax: [no] server l7-hashing bucket-reassign This command also allows new connections to be forwarded to the server port that has just come up.
Modifying the TCP window size so that the client sends fewer packets before waiting for an ACK Configuring the ServerIron ADX not to send an ACK to the client after it has received enough
information to select a real server
Syntax: server l7-tcp-window-size <window size> The default TCP window size is 8000 bytes. Setting the TCP window size to 1460 bytes causes a client to send only one packet before waiting for the ServerIron ADX to send an ACK, assuming a Maximum Segment Size (MSS) of 1460 bytes. This setting applies only to SYN ACK and ACK packets sent from the ServerIron ADX to the client. The ServerIron ADX does not modify the TCP window size for traffic sent from real servers to clients by way of the ServerIron ADX.
317
318
Default settings
By default, HTTP 1.0 is the version of HTTP that comes enabled on ServerIron ADXs for any Layer 7 switching feature. However, HTTP 1.0 connections are non-persistent, and therefore persistent connections or keepalive connections are disabled by default. To support persistent connections, enable TCP connection offload mode or keepalive mode on a virtual port. These modes are enabled at the virtual server level.
Syntax: [no] port <port> tcp-offload [age <minutes>] or Syntax: [no] port <port> tcp-offload [transactions <trans-num>] The age <minutes> variable specifies how many minutes a connection on the server side can be kept alive. If it is not specified, by default, the keepalive time will be the same as the session age, which can be defined globally by entering the command server tcp-age <minutes> or locally under the virtual server level by entering the command port <port-num> tcp-age <minutes>. The transactions <trans-num> variable specifies the maximum number of HTTP transactions that can be completed on a connection on the server side. If the age or transaction limit is reached, the connection on the server side is closed and a reset packet will be sent to the server.
If the pipelined HTTP requests are within the same packet, ServerIronADX will make the
switching decision based on the first request and direct all the subsequent pipelined requests to the same server to which the first request was directed. Pipelining will disable Layer 7 switching on subsequent requests.
If a client sends pipelined HTTP requests in separate packets before the ServerIronADX can
send a response for the first request, ServerIronADX makes Layer 7 switching decisions based on the first request. All subsequent pipelined requests will be dropped until the response for the first request is successfully received by the client. This scenario can cause degradation, resulting in poor end-user experience.
319
If tcp-offload or keepalive enabled under virtual server port, when a reply comes back from a
real server in response to the pipelined request, the ServerIron drops this reply; therefore, the end-client does not receive the response. Beginning with release 11.0.00, ServerIron can be configured to handle the first request of a pipelined request correctly and optionally send reset to the subsequent requests. This feature helps prevent performance degradation. Reset can be enabled in keepalive mode or TCP offload mode. This feature works only when Content Switching is enabled on a virtual server port. if pipelined HTTP requests are sent in one connection, the ServerIronADX makes the switching decision based on the first request and forwards only the first request to the real server. When the real server sends a complete response to the first request, the ServerIronADX will forward the response to the client. After the client acknowledges the complete response, one of the following occurs:
For HTTP traffic, the ServerIronADX closes the connection by sending a RST to the client For SSL-terminate or SSL-proxy, the ServerIronADX closes the connection by sending a FIN to
the client.
NOTE
Resetting the HTTP connection can be done in either the keepalive mode or the TCP offload mode. To reset a pipelined HTTP request in the keepalive mode, first make sure Content Switching is enabled on a virtual server port that will be used for the pipeline reset request. Then, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip VS1 10.10.10.10 ServerIronADX(config-vs-VS1)# port http ServerIronADX(config-vs-VS1)# port http keep-alive reset-pipeline-request
Syntax: [no] port [portid] keep-alive [reset-pipeline-request] To reset pipelined HTTP request in the TCP offload mode, enter commands such as the following.
ServerIronADX(config)# server virtual-name-or-ip VS1 10.10.10.10 ServerIronADX(config-vs-VS1)# port http ServerIronADX(config-vs-VS1)# port http tcp-offload reset-pipeline-request
Syntax: [no] port <port> tcp-offload [age <minutes>] [reset-pipeline-request] or Syntax: [no] port <port> tcp-offload [reset-pipeline-request]
Syntax: [no] clear server keep-alive [virtual | real] [<server-name>] [<port>] Enter virtual if you want to delete all the keepalive connections associated with the virtual server, or real if they are to be deleted from the specified real server.
320
The optional <server-name> and <port> parameters specify the name or port of the virtual or real server from where you want to delete the keepalive server-side connections. When you enter this command, all the keepalive connections will be removed from the reuse pool. The ServerIron ADX sends reset packets to the real or virtual servers to close any open connections.
Total C->S Conn = 0 Total S->C Conn = 0 Total Reassign = 0 Unsuccessful Conn = 0 Server State - 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Real Server MyServer01 MyServer02 MyServer03 St CltConn:Cur/Tot SerConn:Cur/Tot CurrTrans IdleSerCon 1 11/46 3/5 2 1 1 0/0 0/0 0 0 1 0/0 0/0 0 0 TotTrans 147 0 0
Table 35 specifies the show server session keep-alive command fields and its description
TABLE 35
Field
CltConn:Cur/Tot: SerConn:Cur/Tot:
CurrTrans:
IdleSerCon:
TotTrans
In the example above, MyServer01 on WSM CPU ServerIron4/1 has 11 concurrent client-side connections and 3 concurrent server-side connections to the Real Server MyServer01. Two of the 3 server-side connections are processing different HTTP transactions and the third one is idle. In addition, clients made a total of 46 connections to the ServerIron; while the ServerIron only needs to create a total of 5 server-side reusable keep-alive connections to MyServer01 to serve all the requests sent on the 46 client-side connections. In those 46 client-side connections and 5 server-side connections, 147 HTTP transactions have been completed. Syntax: show server session keep-alive
321
NOTE
Configuration example
Figure 34 illustrates how the initial SSLHP messages exchanged between a client and server, client_hello and server_hello, establish an SSL Session ID.
322
FIGURE 34
Client
If session_id is zero, it means client wants to establish a new session If session_id is non-zero, client wants to use security parameters from a previous session
server_hello Confirms security parameters If session_id was zero, server sends a new value for session_id, establishing a new session If session_id from client was non-zero, server sends back same session_id if possible. (Otherwise server sends back new session_id) If the server sends back same session_id, the SSL session is resumed
If the value in the session_id field that the client sends to the server is non-zero, the ServerIron ADX can connect the client to the server that originally sent the Session ID value. Figure 35 illustrates how this function, called SSL Session ID switching, works.
NOTE
SSL Session ID switching is supported for SSL v3.0 and higher only. In SSL versions prior to 3.0, the session ID was established later in the handshaking process, after the client and server had started exchanging encrypted data. If the session ID is encrypted, the ServerIron ADX cannot make forwarding decisions based on this information.
FIGURE 35
1
How the ServerIron ADX uses an SSL Session ID to Select a Real Server
Client
Internet
Real server rs10 responds with server_hello message containing non-zero session_id
When client wants to resume session, it sends a client_hello message containing the session_id it received from the server
ServerIron stores session_id value in an internal database that maps session_id values to real servers
Real Server rs10 209.157.22.10 ServerIron looks up session_id value in its internal database, sees that this session_id value maps to real server rs10
323
1. The first time a client attempts to establish an SSL connection to the server, there is no history of a previous SSL session, so the session_id field in the client_hello message it sends to the server is empty. 2. The server (in this example, real server rs10) sees that the session_id field in the client_hello message is empty, indicating the client wants to establish a new SSL session. The server responds to the client with a server_hello message that contains a session_id field with a non-zero value. 3. The ServerIron ADX examines the value in the session_id field sent by the server. The ServerIron ADX adds this value to an internal database, associating it with the real server that sent it. This association between the session_id value and the real server resides in the ServerIron ADXs database for a user-specified amount of time (default 30 minutes), after which it is aged out. In this example, the ServerIron ADX would map the value in the session_id field to real server rs10. 4. When the client resumes the SSL connection to the server, it sends a client_hello message containing the session_id value sent by the server. 5. The ServerIron ADX examines the value in the session_id field sent by the client and looks it up in its internal database. 6. If the value in the session_id field maps to a real server, the ServerIron ADX initiates a TCP connection to the server and passes the client_hello message to it. The ServerIron ADX forwards subsequent packets between the client and server with modifications to the IP and TCP header for sequence number, acknowledgment number, and checksum adjustment.
Syntax: server real-name <real-server-name> <ip-addr> Syntax: port ssl The server real-name command defines the names and IP addresses of the real servers. The port ssl command adds port 443 (SSL) to the real servers.
Syntax: port ssl session-id-switching Syntax: port <port-number> session-id-switching Syntax: bind ssl <real-server-name> ssl
324
The port ssl session-id-switching command enables SSL Session ID switching on this virtual server. The bind ssl ssl command binds the virtual server to SSL services on the real servers. In this example, the commands associate real servers rs10 and rs20 with the virtual server. For clarity, the bindings in the example are shown as two separate entries. Alternatively, you can enter all the binding information as one command: bind ssl rs10 ssl rs20 ssl.
NOTE
Syntax: [no] server session-id-age <minutes> The <minutes> variable is defined in minutes within the range from 2 through 60.
Syntax: server max-ssl-session-id <number> The <number> variable specifies the number of database entries. This variable can range from 8,192 through 256,000.
Command reference
This section describes the following HTTP URL Rewrite options. These "options" are part of the match command.
rewrite request-delete
Use the rewrite request-delete option in the CSW policy configuration mode to delete content, as shown in the following.
ServerIronADX(config-csw-mypolicy)#match r11 rewrite request-delete offset 4 2
325
Command reference
Syntax: match <rule-name> rewrite request-delete {matched-string | neg-offset <offset> <length> | offset <offset> <length> | string <ASCII string> The matched-string parameter specifies the matched-string option for the request to delete a string defined by a rule. The neg-offset parameter specifies the negative-offset option for the delete request as defined by the following variables:
The <offset> variable is the value of the deletion offset. The <length> variable is the value of the length of content to be deleted.
The offset parameter specifies the positive-offset option for the delete request as defined by the following variables:
The <offset> variable is the value of the deletion offset. The <length> variable is the value of the length of content to be deleted.
The string parameter specifies the string option for the delete request as specified by the following variable: The <ASCII-string> variable, which specifies the value of the string to be deleted.
rewrite request-insert
Use the rewrite request-insert option in the CSW policy configuration mode to insert content, as shown in the following.
ServerIronADX(config-csw-mypolicy)# match r11 rewrite request-insert abc offset 4
Syntax: match <rule-name> rewrite request-insert {[<ASCii-string> [neg-offset <decimal> | offset <decimal>]] | client-ip | header} The <ASCII-string> variable specifies the value of the string for the offset options, listed below, in the insert request. The neg-offset parameter specifies the negative offset option for the insert request as the value specified in the <decimal> variable. The offset parameter specifies the positive offset option for the insert request as the value specified in the <decimal> variable. The client-ip parameter specifies the client IP option for the insert request.
NOTE
The value of the client-ip must be defined under the VIP command. The header parameter specifies the header option for the insert request.
NOTE
The value of the header must be defined under the VIP command.
rewrite request-replace
Use this option in the CSW policy configuration mode to replace content, as shown in the following.
ServerIronADX(config-csw-mypolicy)#match r11 rewrite request-replace matched-string
326
Syntax: match <rule-name> rewrite request-replace {matched-string <ASCII string> | string <ASCIIstring-old> <ASCIIstring-new> The matched-string parameter specifies the matched-string option for the request to replace a string defined by a rule that is specified by the <ASCII string> variable. The string parameter specifies that a string defined by the <ASCIIstring-old> variable must be replaced by a string of the <ASCIIstring-new> variable.
327
Command reference
328
Chapter
High Availability
Introduction
This chapter describes the High Availability feature in ServerIron. In high availability configurations, with Brocade hardware-based SSL acceleration in either SSL Termination or SSL Proxy mode, synchronization of proxied or terminated SSL sessions is not supported. High Availability (HA) for Server Load Balancing (SLB) consists of three ServerIronADX services: hot standby, symmetric-active standby, and symmetric active-active.
NOTE
Hot standby
One ServerIronADX is always active while the other ServerIronADX is always standby. Hot standby is supported on chassis systems. On chassis systems, hot standby is supported only in Switch (S) code, not Router (R) code. Refer to Hot standby SLB on page 330.
Symmetric-active
Symmetric-active is also called as active-standby VIP. Both ServerIronADXs can receive SLB traffic, but only the active VIP handles the L4-7 SLB, while the standby VIP functions as a standby. The VIP with the highest configured sym-priority handles the flow. Symmetric SLB is supported in both Switch (S) code and Router (R) code. Refer to Symmetric SLB on page 345.
Active-active
Active-active is also called as true active-active. Both ServerIronADXs can receive SLB traffic, and both are active for the same VIP. Configuring sym-active and sym-priority on the VIP enables a device to process traffic. Sym-Active is supported only on chassis systems in both Switch (S) code and Router (R) code. Refer to Sym-Active SLB on page 361. With Direct Server Return (DSR), return traffic is not processed by the ServerIronADX. Instead, the real server sends return traffic directly to the client. You can apply DSR to each of the HA scenarios (Hot Standby SLB, Symmetric SLB, and Sym-Active SLB).
NOTE
When a device is active, it responds to Address resolution Protocols (ARP) and processes all traffic for the VIP. When a device is acting as standby, it performs no processing functions for the specified VIP (other than session syncing with the active device, if enabled).
329
Standard Hot Standby - The ServerIronADXs management IP, VIPs, and real servers are all in
the same subnet.
330
FIGURE 36
ve interface
SI-A
Active Session Sync Standby
SI-B
Standby
L2S
Real Servers
When ServerIronADX A comes up in a Hot Standby configuration, it comes up in Standby state. When it sends Hello messages and sees that no other ServerIronADX is responding to those Hello messages, ServerIronADX A assumes the active state. When ServerIronADX-B comes up, it also goes through Hello-message processing. When ServerIronADX B sends Hello messages, ServerIronADX A responds to ServerIronADX B with ServerIronADX A's Active Status. ServerIronADX B assumes Standby status. ServerIronADX A in the Active State performs the following four stages of synchronization:
Port map synchronization MAC table synchronization Server information synchronization Session synchronization
When the entire synchronization process is complete, ServerIronADX B calculates to see if ServerIronADX A has a higher router-port plus server-port count or if ServerIronADX B has the higher count. If the count is equal for both ServerIronADX A and ServerIronADX B, then ServerIronADX B continues in the Standby state. If ServerIronADX A has a lesser count of router-port plus server-port, ServerIronADX B forces ServerIronADX A to go to Standby State, and ServerIronADX B assumes the Active state. From this point on, ServerIronADX A will be in the Active State and ServerIronADX B will be in the Standby State until some event forces a change in their status. Events leading to change can include:
FIGURE 37
ve interface
SI-A
Active Session Sync Standby
SI-B
Standby
L2S
Real Servers
Follow these steps to enable the minimum required configuration shown in Figure 37. Client connections and server connections must be on the same interfaces on both ServerIronADXs.
332
1. On ServerIronADX A, place the untagged hot standby port (sync-link) in its own port-specific VLAN and disable STP:
ServerIronADX-A(config)# vlan 2 by port ServerIronADX-A(config-vlan-2)# untagged ethe 2/1 ServerIronADX-A(config-vlan-2)# no spanning-tree
Placing the hot standby port in its own VLAN prevents unnecessary traffic from going over the directly connected backup link. With Hot Standby, you cannot have spanning-tree configured anywhere on any link connected between the two ServerIronADXs. By default, spanning tree is usually enabled on switches but disabled on routers. 2. To avoid system conflicts, globally disable spanning-tree on VLAN 1:
ServerIronADX-A(config)# vlan 1 name DEFAULT-VLAN by port ServerIronADX-A(config-vlan-1)# no spanning-tree
3. Configure the server backup port, shared chassis-MAC address between the ServerIronADXs, and any connected router-ports:
Must be same on both SIs. Came from one of the SIs. See show chassis.
! server backup ethe 2/1 00e0.5201.0c72 vlan-id 2 server router-ports ethernet 2/3 server router-ports ethernet 2/4 !
The server backup ethernet command must be configured exactly the same on both ServerIronADXs. It has three parameters. Syntax: server backup ethernet <portnum> <mac-addr> <vlan-id> The <portnum> variable specifies the port where the syn-link is connected. This port connects this ServerIronADX switch to its counterpart. In the example, 2/1 is the port number. The <mac-addr> variable specifies the chassis-MAC address of one of the ServerIronADXs. Be sure to use a chassis MAC from one of the two devices, not the MAC of one of the backup ports. Use show chassis to locate the chassis MAC. If both devices already have the same chassis MAC (because of a manufacturing error), then one of them must change.
SLB-chassis#show chassis power supply 1 not present power supply 2 ok power supply 1 to 2 from left to right fan 1 (left side panel, back fan) ok fan 2 (left side panel, front fan) ok fan 3 (rear/back panel, left fan) ok fan 4 (rear/back panel, right fan) ok Current temperature : 32.0 C degrees Warning level : 55 C degrees, shutdown level : 66 C degrees Boot Prom MAC: 00e0.5201.0c72
Chassis MAC
The <vlan-id> variable specifies a VLAN that you want to use for active-standby synchronization traffic. In this example, the sync-link Hot Standby port is in VLAN 2.
333
The server router-ports command enables the ServerIronADX to count the number of upstream (or downstream) router ports connected to the switch. Both ServerIronADXs must use the same router-ports numbers, such as 2/3 in this example. The reason is the standby ServerIronADX is a dummy device that learns nothing, such as MACs, on its own. 4. Save the configuration.
ServerIronADX-SLB-A #wr mem .Write startup-config in progress. .Write startup-config done. ServerIronADX-SLB-A# reload
NOTE
Be sure to reload the software after configuring or changing the server backup port number or MAC address. If you change the port number of the backup while the ServerIronADX is load balancing, clients will not be able to ping the VIP. 5. Configure the second ServerIronADX (ServerIronADX-B). On this system, port 2/1 is the hot standby port. Using the same port numbers and MAC address is a requirement. Notice the chassis-MAC address on each ServerIronADX matches.
ServerIronADX-B# server backup ethe 2/1 00e0.5201.0c72 vlan-id 2 ServerIronADX-B# server router-ports ethernet 2/3 ServerIronADX-B# server router-ports ethernet 2/4 ServerIronADX-B(config)# vlan 1 name DEFAULT-VLAN by port ServerIronADX-B(config-vlan-1)# no spanning-tree ServerIronADX-B(config-vlan-1)# vlan 2 by port ServerIronADX-B(config-vlan-2)# untagged ethe 2/1 ServerIronADX-B(config-vlan-2)# no spanning-tree ServerIronADX-B# write memory .Write startup-config in progress. .Write startup-config done. ServerIronADX-B# reload
NOTE
If you plan to configure real servers to use a source IP address configured on the ServerIronADX as a default gateway, use the source-standby-address or source-nat-address command rather than the source-ip or source-nat command. 6. Use show server backup and show log to obtain a clear picture of the ServerIronADXs status in the Hot Standby configuration. The following screen shots display the different stages of reload and show how a ServerIronADX comes up in a Hot Standby configuration.
334
SLB-SI-A#show server backup Sync-link port on this SI Server Backup port = 2/2 Switch state = Standby Starts the SLB sync. Five stages: 0>1>2>3>4>0 SLB state = 1 Peer sync state = 0 0 means the MAC shown below is not valid SLB Partner MAC valid= 0 SLB Partner MAC = 0000.0000.0000 Peer SI's chassis MAC SLB Partner VLAN ID = 2 VLAN used to perform the heartbeat between boxes SLB Backup preference = 0 minutes SLB Backup timer = 1000 milliseconds Transitions, activates = 0,standby = 0 Pdus sent = 0, Pdus recv = 0 Null Pdus sent = 0, Mac pdu sent = 0 No pdus = 0, no port maps = 0 Routers ports = 0, Server ports = 0 Partner Routers ports = 0, Partner Server ports= 0
335
SLB-SI-A#sh serv backup Server Backup port = 2/2 Switch state = Standby SLB state = 0 Peer sync state = 0 Goes from 0>1>2>3>4>0 SLB Partner MAC valid= 0 Peer SI-B's chassis MAC SLB Partner MAC = 0001.2345.6789 when SLB state goes to 0 SLB Partner VLAN ID = 2 SLB Partner port cnt = 255 SLB Backup preference = 0 minutes SLB Backup timer = 1000 milliseconds Transitions, activates = 0,standby = Pdus sent = 0, Pdus recv = Null Pdus sent = 244, Mac pdu sent = No pdus = 1, no port maps = Routers ports = 1, Server ports = Partner Routers ports = 0, Partner Server ports=
.
Table 36 describes the information displayed by the show server backup command.
TABLE 36
Field
Switch state
SLB state
336
Table 36 describes the information displayed by the show server backup (Continued) command.
TABLE 36
Field
SLB Partner port cnt Transitions, activates Transitions, standby Pdus sent Mac pdu sent No pdus no port maps
337
FIGURE 38
! server source-standby-ip 172.20.1.252/24 172.20.1.254 server source-ip 172.20.1.250/24 172.20.1.254 ! ! server virtual vs1 11.1.1.1 ... ve2 interface ! 172.20.1.254 SI-A
Active
SI-B
Standby
! server source-standby-ip 172.20.1.252/24 172.20.1.254 server source-ip 172.20.1.251/24 172.20.1.254 ! ! server virtual vs1 11.1.1.1 ... !
L2S
FIGURE 39
338
! server source-nat server source-standby-ip 172.20.1.252/24 172.20 ! server source-ip 172.20.1.251/24 172.20.1.254 server source-nat ! server source-standby-ip 172.20.1.252/24 172.20.1.254 ! server source-ip 172.20.1.250/24 172.20.1.254 server virtual vs1 11.1.1.1 ! ! ... server virtual vs1 11.1.1.1 !
... !
ve2 interface 172.20.1.254
Client
L2S
SI-A
! server source-nat server source-standby-ip 172.20.1.252/24 172.20.1.254 server source-ip 172.20.1.251/24 172.20.1.254 ! ! server virtual vs1 11.1.1.1 ... !
SI-B
Real Server 172.20. default gateway 172.20.1.252 (serve
L2S
FIGURE 40
339
SI-A
Active
Client
! server source-nat server source-nat-ip 172.20.1.250 255.255.255.0 172.2 ! ! server source-nat ! 172.20.1.254 port range 2 server source-nat-ip 172.20.1.250 255.255.255.0 server virtual vs1 11.1.1.1 ! ! ... server virtual vs1 11.1.1.1 ! ...
L2S
! SI-A
Active
SI-A
Standby
! server source-nat server source-nat-ip 172.20.1.250 255.255.255.0 172.20.1.254 ! ! server virtual vs1 11.1.1.1 ... !
port range 1
L2S
Syntax: [no] server backup-group <id> The <id> variable specifies the backup group ID, which can be a number from 1 to 7. The default value is 0. Enter the same ID on both ServerIronADXs in a hot-standby pair. Do not enter the same ID on a ServerIronADX that is not one of the ServerIronADXs in the hot-standby pair.
340
NOTE
This command sets the backup timer to 5 seconds (50 * 100 milliseconds). Syntax: [no] server backup-timer <time> The <time> variable specifies how long the ServerIronADX, when it is the backup ServerIronADX, will wait for a Hello message or synchronization data from the active ServerIronADX before assuming the active ServerIronADX is no longer available. You can specify a value from 5 (one half second) through 100 (10 seconds), in units of 100 milliseconds each. The default is 10 (one second).
341
The <wait-time> variable specifies how long the ServerIronADX waits before assuming the active role. The ServerIronADX does not immediately become the active ServerIronADX but instead waits the number of minutes you specify. You can specify from 5 through 30 minutes. This variable does not have a default.
If neither of the two nodes in the peer has any router ports, the one having more active-VIPs
will be the active node; no status change if the active-VIPs also tie.
If one node has no router ports, but another has at least one router port, the latter will be the
active node.
If both nodes have at least one router port, the one having more active-VIPs will be the active
node. If active-VIPs tie, the node with more router ports will be the active node. There is no status change if both active-VIPS and router ports tie. To enable this feature, enter the following command.
ServerIronADX(config)# server backup-vip-cnt
If neither of the two nodes in the peer has any router ports, the one having more active
VIP/VPORT counts will be the active node; no status change if the number active VIP/VPORT counts ties.
If one node has no router ports, but another has at least one router port, the latter will be the
active node.
If both nodes have at least one router port, the one having more active VIP/VPORT counts will
be the active node. if the number of active VIP/VPORT counts tie, the node with more router ports will be the active node. There is no status change if the number of both active virtual ports and router ports tie. To enable this feature, enter the following command.
ServerIronADX(config)# server backup-vport-cnt
Syntax: [no] server backup-vport-count This feature can be configured with or without the server backup-vip-cnt command as described:
If the server backup-vport-cnt command is not configured, only the number of active virtual
ports is compared. The node with more active virtual ports will be considered to have more VIP/VPORT counts, and a tie is called if they have an equal number of active virtual ports.
342
If both the server backup-vip-cnt and server backup-vport-cnt commands are configured, the
number of active virtual ports will have a higher precedence than the number of active virtual servers. Consequently, the node with a larger number of virtual ports will always be considered as having a higher VIP/VPORT count and in the case of a tie on the active virtual port count, the node with a larger number of active virtual servers will be considered as having a higher VIP/VPORT count. A tie condition occurs where both nodes have an equal number of both virtual servers and virtual ports. The server backup-vport-cnt command must be configured on both ServerIronADX switches in the pair. To avoid an unnecessary failover during configuration, we suggest that you enable this feature on the active switch first. Also, the feature should be disabled on the standby switch first.
NOTE
Delayed failover
With this feature configured, when a ServerIronADX switch detects a failover condition because of a VIP/VPORT count change, the failover will be delayed. At the end of the period of delay, the ServerIronADX switch examines the conditions that led to the failover condition and performs a failover if the conditions still apply. If they no longer apply, the failover will be cancelled. To enable this feature, enter the following command.
ServerIronADX(config)# server backup-delay-seconds 20
Syntax: [no] server backup-delay-seconds <backup-wait-seconds> The <backup-wait-seconds> variable specifies the number of seconds that the ServerIronADX will wait before performing a failover. Values can be specified from 0 through 1200 seconds. Specifying 0 disables this feature and causes failover to occur immediately without any delay. This feature applies only when configuring the server backup-vip-cnt or server backup-vport-cnt commands. The server backup-delay-seconds <backup-wait-seconds> command must be configured on both ServerIronADX switches in the active/standby pair.
NOTE
NOTE
Use the remain-standby command with caution because both ServerIrons can become standbys; thereby creating traffic loss. If the ServerIron is active when this command is configured, the ServerIron transitions to a backup state and remains as backup until the command is removed. The transition is logged as "Forced to turn standby" (remain-standby command.).
343
Once the remain-standby command is entered, every attempt the ServerIron makes to go into active state is recorded and suppressed. This information is available under the "Active attempts" field in the show server debug command. To force a ServerIron to remain in the standby state, enter the following command.
ServerIronADX(config)# server backup-remain-standby
Sample configuration
Suppose you want to configure a second switch, ServerIronADX2, to serve as the backup or standby switch for ServerIronADX1. Each switch will be configured with the same SLB configuration, supporting the following TCP/UDP ports: HTTP, SSL, FTP, and Telnet. The private link, which provides the connection between the active and standby switches, will be configured as a trunk group with ports 13 and 14 as members.
ServerIronADX# config term ServerIronADX(config)# trunk server ethernet 13 to 14
For non-HA trunk links connected to other Layer 2 switches, use the default trunk switch. For non-HA trunk links connected to Dual-NIC servers, use trunk server. On ServerIronADX devices, if you configure a trunk group, use the switch parameter if the traffic flowing through the trunk requires Layer 4-7 processing. Only use the server parameter if the traffic flowing through the trunk does not require Layer 4-7 processing. For traffic that does not require Layer 4-7 processing on ServerIronADX devices, the trunk type can be switch or server.
ServerIronADX(config)# vlan 2 ServerIronADX(config-vlan-2)# untag ethernet 13 to 14 ServerIronADX(config-vlan-2)# no spanning-tree ServerIronADX(config-vlan-2)# exit ServerIronADX(config)# server real web1 208.96.22.100 ServerIronADX(config-rs-web1)# port http
344
ServerIronADX(config-rs-web1)# port ssl ServerIronADX(config-rs-web1)# port ftp ServerIronADX(config-rs-web1)# port telnet ServerIronADX(config-rs-web1)# server real web2 208.96.22.101 ServerIronADX(config-rs-web2)# port http ServerIronADX(config-rs-web2)# port ssl ServerIronADX(config-rs-web2)# port ftp ServerIronADX(config-rs-web2)# port telnet ServerIronADX(config-rs-web2)# server virtual-name-or-ip www.alterego.com 208.96.6.254 ServerIronADX(config-vs-www.alterego.com)# port http ServerIronADX(config-vs-www.alterego.com)# port ssl sticky ServerIronADX(config-vs-www.alterego.com)# port ftp ServerIronADX(config-vs-www.alterego.com)# port telnet ServerIronADX(config-vs-www.alterego.com)# bind http web1 http web2 http ServerIronADX(config-vs-www.alterego.com)# bind ssl web1 ssl web2 ssl ServerIronADX(config-vs-www.alterego.com)# bind ftp web1 ftp web2 ftp ServerIronADX(config-vs-www.alterego.com)# bind telnet web1 telnet web2 telnet ServerIronADX(config-vs-www.alterego.com)# exit
To identify the router port, configure the trunk group, assign ports 13 and 14 as the backup ports, assign round robin as the predictor (load balancing metric), and disable Spanning Tree, enter the following commands.
ServerIronADX(config)# server router-ports 11 ServerIronADX(config)# server backup ethernet 13 00e0.5201.0c72 ServerIronADX(config)# server predictor round-robin ServerIronADX(config)# no span ServerIronADX(config)# exit ServerIronADX# write memory ServerIronADX# reload
The MAC address assigned is a MAC address that is resident on either ServerIronADX1 or ServerIronADX2. Notice that because port 13 is the lead port for the trunk group, you do not need to configure any other ports within that group.
Symmetric SLB
Symmetric SLB (SSLB) is active-standby VIP. Both ServerIronADXs handle traffic, but the active VIP handles the L4-7 and the standby VIP serves only as a standby. Each ServerIronADX is the active ServerIronADX for a specific set of VIPs, while the other ServerIronADX is the backup for the same set of VIPs. In SSLB, you determine which ServerIronADXs are active and backup for a VIP by associating a sym-priority with the VIP. You assign a different priority to the same VIP on each ServerIronADX. The ServerIronADX on which the VIP has the highest priority is the active ServerIronADX for that VIP, and the others are standbys. When all ServerIronADXs and associated links are available, the ServerIronADX with the highest priority for the VIP services the VIP. SSLB does not require any changes to the Spanning Tree configuration in the network. Regardless of whether the network is using Spanning Tree, SSLB provides redundancy for the VIPs and allows all the ServerIronADXs configured for SSLB to actively perform Server Load Balancing. In addition, you do not need to dedicate ServerIronADX links to SSLB. SSLB works within the networks topology.
345
Symmetric SLB
You cannot have a router hop between the ServerIronADXs. They must have Layer 2 connectivity. Additionally, you cannot use Hot Standby and SSLB features on the same ServerIronADX.
NOTE
If a ServerIronADX is running software with a router image and the ServerIronADXs are in an active-active configurations, you need to enable VRRP or VRRP-E on these ServerIronADXs; otherwise, FTP, RTSP, and MMS protocols might not work. Also, configure the IP address of the real servers default gateway IP address in VRRP-E configuration and the "owner" IP address in VRRP configuration. It is important that the default gateway should be defined. If it is not defined, then SI does not send the Gratuitous ARP immediately after the VRRP and VRRPE switchover.
NOTE
NOTE
System limitation. The ServerIronADX does not support symmetric SLB with shared source NAT IPs. The reason is that the VIP and the source IP might not be active on the same ServerIronADX, and as a result, the ServerIronADX would not know how to forward return traffic. Configure sym-active as a workaround.
346
FIGURE 41
L2S
ISP1 ISP2 VRRP1
VRRP2
SI-A
SI-B
Server virtual vip1 1.1.1.1 sym-priority 10 . . Server virtual vip2 1.1.1.2 sym-priority 20 . . Server virtual vip3 1.1.1.3 sym-priority 30
L2S
Real Server
Server virtual vip1 1.1.1.1 sym-priority 5 . . Server virtual vip2 1.1.1.2 sym-priority 25 . . Server virtual vip3 1.1.1.3 sym-priority 15
Enabled by default, any Layer 2 link can be used for automatic session synchronization between the ServerIronADXs. Unlike Hot Standby, the ServerIronADXs need not be directly connected. To specify a specific port (optional), use the session-sync server subcommand on both devices. Refer to Configuring VLAN option for active-active links on page 357. To correctly handle the return traffic in this scenario, apply Source-NAT or DSR to a Symmetric SLB configuration. Enable one or the other (not both) for a real server.
NOTE
347
Symmetric SLB
Figure 42 shows another common Symmetric topology, where the real servers are directly connected to the ServerIronADXs.
FIGURE 42
rs1
rs2
L2S rs3
ISP2
rs4
rs5
ISP1
VRRP1
VRRP2
SI-A
SI-B
rs1
rs2
rs3
rs4
rs5
rs6
To see the session sync, go to the BP and issue show session all 0.
NOTE
Failover conditions
Both ServerIronADXs are active with SSLB. Therefore, failover depends on which device has ownership of the VIP. If a link is broken, both ServerIronADXs are still active. In general, the only time a VIP can fai lover is during a reload or system crash. VIPs can fail over if they meet the conditions described on page 6-27 under "VIP Failover Following a Link Failure". Use show log and show server virtual-name-or-ip to gather failover information. The show server virtual-name-or-ip command displays state information (5 = active, 3 = standby, 2 = inactive, 1 = inactive).
NOTE
348
As an example, to enable session synchronization for port 80 (HTTP), enter the following commands.
ServerIronADX(config)# server port 80 ServerIronADX(config-port-80)# session-sync
The send interval is equal to 200 milliseconds multiplied by the send interval multiplier. The
default send-interval multiplier is 1, so the default send interval is 200 milliseconds. You can specify a multiplier from 1 60.
The total wait time interval is equal to 400 milliseconds multiplied by the wait time multiplier.
The default wait time multiplier is 20; therefore, the default wait time is eight seconds (20 x 400 milliseconds). The SSLB timer affects the rate at which the ServerIronADX sends SSLB protocol packets to its SSLB partners. The timer does not affect client or server traffic to or from a VIP. All the ServerIronADXs in your configuration must use the same SSLB send interval and wait time. If you change the interval and wait time on one ServerIronADX, make the same change on all the other ServerIronADXs in the SSLB configuration. To configure the interval and wait time for SSLB discovery packets, enter a command such as the following.
ServerIronADX(config)# server sym-pdu-rate 2 30
Changes the default send interval (200 ms) and wait interval (400 ms) by a factor of 2 Increases the wait time multiplier from the default 20 to 30
In effect, this command:
349
Symmetric SLB
Changes the interval at which the ServerIronADX sends SSLB discovery packets to once every
400 milliseconds
Changes the wait interval for discovery packet to once every 800 milliseconds Changes the maximum amount of time the ServerIronADX will wait for an SSLB discovery
packet from another ServerIronADX to 24 seconds (30 x 2 x 400 milliseconds). Syntax: [no] server sym-pdu-rate <send-wait-multiplier> <wait-time-multiplier> The <send-wait-multiplier> variable specifies the multiplier for the SSLB send and wait interval. You can specify a multiplier from 1 60. The default is 1. The <wait-time-multiplier> variable specifies how many multiples of the wait interval the ServerIronADX will wait for an SSLB discovery packet. You can specify a multiplier from 1 60. The default is 20.
Syntax: sym-priority <num> You can specify from 0 through 255. If you specify 0, the priority setting is removed.
350
Brocade recommends that you specify 2 (instead of 1) as a low priority or 254 (instead of 255) as a high priority. This way, you can easily force failover of the high priority ServerIronADX to the low priority ServerIronADX by changing the priority on just one of the ServerIronADXs. For example, you can force a failover by changing the priority on the high priority ServerIronADX from 254 to 1. Because the priority on the low priority ServerIronADX is 2, the low priority ServerIronADX takes over for the VIP. Likewise, you can force the low priority ServerIronADX to take over by changing its priority to 255, because the priority on the high priority ServerIronADX is only 254.
NOTE
NOTE
When you configure the decrement value, do not specify a value that will make the VIPs priority 0. For example, if the VIPs SSLB priority is 10, do not specify 10 as the decrement value. Specify a lower number. Priority value 0 disables SSLB, in which case the VIP becomes active on both ServerIronADXs.
NOTE
351
Symmetric SLB
Figure 43 shows an example of an SSLB configuration that uses the default priority handling (not the dynamic priority handling).
FIGURE 43
Without dynamic SSLB priority VIP1 fails over to ServerIron B only if the entire VIP or the ServerIron becomes unavailable. If a single application on VIP1 becomes unavailable, ServerIron A remains the active ServerIron for the VIP.
Internet
Router
Router
SI
SI
Real Server 1
Real Server 2
Using the default priority handling, the software fails over a VIP to the other ServerIronADX only of the entire VIP or the ServerIronADX itself becomes unavailable. If an application on the VIP becomes unavailable on all the real servers bound to the VIP, but the VIP itself is still available, the software continues using the same ServerIronADX for the VIP. As a result, clients are unable to access the unavailable application even if the application is available through the other ServerIronADX.
352
FIGURE 44
Without dynamic SSLB priority VIP1 fails over to ServerIron B only if the entire VIP or the ServerIron becomes unavailable. If a single application on VIP1 becomes unavailable, ServerIron A remains the active ServerIron for the VIP.
Internet
Router
Router
ServerIron A VIP1, priority 30 = Active Decrement value = 9 VIP2, priority 20 = Standby Decrement value = 9
SI
SI
ServerIron B VIP1, priority 20 = Standby Decrement value = 9 VIP2, priority 30 = Active Decrement value = 9
Real Server 1
Real Server 2
In this configuration, a ServerIronADX fails over a VIP to the other ServerIronADX if more than one application on the VIP becomes unavailable. If one application becomes unavailable, the software reduces the VIPs priority by 9 (the decrement value), in this case to 21. At this point, the ServerIronADX that is active by default for the VIP still has the higher priority, so failover does not occur. However, if a second application becomes unavailable, then the priority becomes 12, which is less than the priority for the VIP on the other ServerIronADX (20). When an application becomes available again (and passes a health check), the ServerIronADX increments the VIPs priority by the decrement amount, thus replacing the priority amount that the software removed when the application failed. If the increment makes the VIPs priority higher than the priority on the other ServerIronADX, the software fails back over to the ServerIronADX that originally had the higher priority for the VIP. If more than one ServerIronADX has the highest priority for a VIP, the ServerIronADX that has the highest value for the lowest four bytes of its base MAC address becomes the active ServerIronADX for the VIP. If all the applications that are configured for SSLB on the VIP become unavailable, the software sets the SSLB priority for that VIP to 1 (the lowest value). The following commands configure the SSLB priority parameters for the configuration in Figure 44.
NOTE
353
Symmetric SLB
Syntax: sym-mac <sym-mac-address> The <sym-mac-address> variable specifies the first 3 bytes of the chassis MAC address of one of the boxes in the HA setup. Considerations when using this command Consider the following when using the sym-mac command.
Addition or deletion of this command requires a reload. Once configured, it is required to write
memory and reload the box in order for the command to take effect.
When manually configuring symmetric mac, it is required to configure the same sym-mac
command on both the devices in the HA setup.
Manual configuration of symmetric mac overrides the auto detection. When manually
configured, the symmetric mac used will be the configured value only.
354
Displaying the symmetric mac The show server virtual command can be used to view the symmetric mac that the boxes use to derive the VIP and NAT IP MACs. The display from this command includes a field named symmetric mac, as shown in the following.
ServerIronADX# show server virtual Virtual Servers Info Name: vip441 State: Enabled IF UP IP:220.1.1.200: Pred: least-conn ACL-Id: 0 TotalConn: 240 Sym: group = 1 state = 5 priority = 200 keep = 0 dyn priority/factor = 200/ 0 Activates = 1, Inactive= 1 sym-active = 1 Sym Priority = Enabled Symmetric VIP state: Owner Symmetric MAC: 748e.f800.0000 Best-standby-mac: 748e.f800.245a VIP state: healthy Port ---default http dns ftp State ----enabled enabled enabled enabled Sticky -----NO NO NO NO Concur -----NO NO NO NO Proxy ----NO NO NO NO DSR --NO NO NO NO CurConn ------0 13 0 64 TotConn ------0 22 22 196 PeakConn -------0 14 0 156 1
355
Symmetric SLB
The <mins> variable specifies the number of minutes you want the recovered ServerIronADX to wait before becoming active again. You can specify from 2 through 120 minutes. The default is 60 minutes. You must enter the same command using the same number of minutes on both ServerIronADXs in the configuration.
NOTE
Failover occurs only if the entire link becomes unavailable. If the link is a trunk group or a virtual routing interface residing on multiple ports, failover occurs only if all the ports become unavailable. Under Layer 2 switching code, interfaces do not belong to individual subnets. As a result, under Layer 2 switching code Symmetric SLB VIP failover can only happen in the case of a reload or system crash. Configuring VIP failover in VRRP extended with Symmetric SLB In Symmetric SLB and Sym-Active configurations with VRRP-E, when the device switches from the Master router to a Backup router, there is a CLI command that guarantees simultaneous VIP failover in the event VRRP-E fails over to a Backup router. To enable this feature, first define a VIP group that includes VIP addresses, then bind the VIP group to a Virtual Router ID (VRID). Before defining and binding VIP groups, ensure that the standby VIP priority (sym-priority command) is not set to 1. This value is reserved for internal use.
NOTE
NOTE
In Symmetric SLB, the VIP is active on both ServerIronADXs if there is no default gateway configured, even though all clients, servers, and ServerIronADXs are on the same subnet. To enable the VIP failover in VRRP extended with Symmetric SLB, enter commands such as the following. 1. Define a VIP group.
ServerIronADX(config)# server vip-group 1 ServerIronADX(config-vip-group-[1])# vip 10.10.1.100 ServerIronADX(config-vip-group-[1])# exit
Each virtual IP address can belong to only one VIP group. Also, each VIP group can have only one VRID associated with it.
NOTE
356
Enhanced VIP group support The ServerIron VIP Group feature helps grouping of several virtual server addresses and associating them with the VRRP-E tracking mechanism. Syntax: [no] server vip-group <number> The <number> parameter is the VIP group number from 1 through 100. Syntax: [no] vip <ip address> The <ip address> parameter is the Virtual IP address to be included in the VIP group. There is not limit to the number of Virtual IP addresses in a VIP group; however, each virtual IP address can belong to only one VIP group. Syntax: [no] vip-group <number> The <number> parameter is the VIP group number (from 1 through 100) that you are binding to the VRID. Note that each VIP group can have only one VRID associated with it.
This command configures the active-active link on port 3/5 on VLAN 200 only. The active-active traffic is not forwarded to the other VLANs that port 3/5 is in. Syntax: [no] server active-active-port ethernet <portnum> [<vlan-id>]
357
Symmetric SLB
FIGURE 45
e 2/4
e 3/2
Router1
Router2
e 1/6
Primary IP: 192.53.5.1 Secondary IP: 192.53.5.2 VRID 1 IP address: 192.53.5.2 Priority: 255
e 1/5
IP: 192.53.5.3
NOTE
Associating the secondary IP with the VRID and other configuration mentioned above is a requirement only for VRRP. There is no such requirement for VRRP-E in order to support fast session synchronization feature. The following configuration examples below show how to configure the VRRP owner and backup with the primary and secondary IP addresses.
358
If all ports in the trunk are up, the VRID priority value is unchanged. If none of the ports in the trunk are up, the Track Priority is subtracted from the backup priority
to determine the current VRID priority value.
If any of the ports in the trunk fail, the following formula is used. A new Track Priority value is determined by the following formula: track priority x (number of
configured ports in trunk - the number of active ports in trunk) number of configured ports in trunk
The new Track Priority value is subtracted from the backup priority value to determine the
current VRID priority. Syntax: [no] track-trunk-port ethernet <slot/port>" Configuration considerations The following must be considered when configuring the Track Trunk port feature:
359
Symmetric SLB
This feature only applies to VRRP-E Only ports that are members of a static trunk or are LACP enabled can be configured as track
trunk ports
If a port that is not a member of a trunk group or LACP is configured as a track trunk port, it will
behave like a track port
If different ports with the same trunk group are configured as track port and track trunk port,
they will all behave as if configured as track trunk ports
Before removing a static trunk or LACP configuration, a port should be removed from the track
trunk port list.
Co-existence of track-port and track-trunk-port within the same trunk should be avoided. Co-existence of track-trunk-port and track-port ve with in the same trunk should be avoided. If you are using track-trunk-port, it is preferable to configure all the ports with in the trunk as
track-trunk-ports
Where Track-trunk-port and Track-port VE pertaining to same trunk exists, the ServerIron ADX
takes both into consideration when calculating VRRP-E Master and Backup selection. Add "track-port" before you add "track-trunk-port" for the same trunk. Configuring tracking trunk ports with VRRP-E To configure the tracking ports with the VRRP-E, enter the following commands.
ServerIronADX(config)# trunk switch e 4/9 to 4/10 Trunk will be created in next trunk deploy. ServerIronADX(config-)# trunk deploy ServerIronADX(config)# int ve 1 ServerIronADX(config-vif-1)# ip vrrp-extended vrid 1 ServerIronADX(config-vif-1-vrid-1)# backup priority 200 track-priority 100
The backup priority must be a decimal of 6 through 255 for vrrp-extended. The track-priority must be a decimal from 1 through 254.
ServerIronADX(config-vif-1-vrid-1)# track-trunk-port e 4/9
NOTE
Optionally, you can specify track priority for the track-port. This overrides the track-priority specified in "backup priority x track-priority y".
ServerIronADX(config-vif-1-vrid-1)# track-trunk-port e 4/9 priority 80
NOTE
NOTE
The track-port and track-trunk-port must be trunk primary, otherwise an error will be prompted.
ServerIronADX(config-vif-1-vrid-1)# track-port e 4/10 Error - track port must be the first port of a trunk. ServerIronADX(config-vif-1-vrid-1)# track-trunk-p e 4/10 Error - track trunk port must be the trunk primary.
Sample configuration
ServerIronADX#sh run | i trunk server ethe 4/1 to trunk server ethe 4/5 to trunk switch ethe 4/9 to trunk 4/4 4/6 4/10
360
ServerIronADX#sh run int ve 1 !Building configuration... !Current configuration : 346 bytes interface ve 1 ip address 2.2.2.21 255.255.255.0 ip vrrp-extended vrid 1 backup priority 200 track-priority 100 advertise backup ip-address 2.2.2.30 vip-group 1 track-trunk-port e 4/1 track-port e 4/5 track-trunk-port e 4/5 track-port e 4/9 track-trunk-port e 4/9 enable
NOTE
To remove trunk, track-trunk-port must be removed first.
ServerIronADX(config-vif-1-vrid-1)# no trunk swi e 4/9 to 4/10
You must remove the track-port in the VRRP-E configuration first. To configure this feature, follow these steps. 1. The following command can ONLY be configured for trunk primary.
ServerIronADX(config-vif-13-vrid-1)# track-trunk-port ethernet 4/34 Error - track trunk port must be the trunk primary. ServerIronADX(config-vif-13-vrid-1)#
3. Add "no track-trunk-port" before adding "no track-port" for the same trunk.
ServerIronADX(config-vif-13-vrid-1)#no track-port e 4/33 Must disable track-trunk-port before track-port ServerIronADX(config-vif-13-vrid-1)#
Sample configuration In the following configuration, both SI-A and SI-B share a trunk with a FastIron switch. The trunk has two ports (e4/33-34) and the primary trunk is e4/33. VRRP-E vrid 1 is configured in interface e4/17.
Sym-Active SLB
Sym-Active SLB is true active-active. Both ServerIronADXs handle traffic (active-active), and both ServerIronADXs are active for the same VIP on both ServerIronADXs.
361
Sym-Active SLB
FIGURE 46
SI-A
SI-B
Server
When sym-active is enabled on both ServerIronADXs, both boxes handle traffic equally for each VIP. A box with sym-active configured is enabled to process and forward traffic to and from the client, regardless of an assigned lower VIP priority.
This example configures VIP1 by adding port 80, enabling Symmetric SLB, then enabling Sym-Active. With Sym-Active, you still need to configure the sym-priority command. Whichever ServerIronADX has the higher priority will own the VIP address, MAC, and ARP responses. If someone pings the VIP for example, only the active VIP will reply. Syntax: [no] sym-active
362
Source-NAT and DSR are usually not applied a Sym-Active SLB configuration. The return traffic is correctly handled in this scenario. The active and standby ServerIronADXs are constantly sharing information.
NOTE
When using a pair of ServerIrons in an HA setup, configure Sym-Active in addition to Symmetric SLB, VRRPE, and VIP groups. This is because VRRPE failover and Symmetric SLB failover are two separate events. First, VRRPE failover occurs, followed by Symmetric SLB failover. Configuring Sym-Active allows the ServerIron to cope with the miniscule window between those two events.
NOTE
Additional variations
Multiple high availability SLB pairs in the same VLAN
Hot standby topology
Hot-standby redundancy enables a ServerIronADX to serve as an automatic backup for another ServerIronADX. Each hot-standby pair consists of two ServerIronADXs. You can configure up to 127 hot-standby pairs within a single broadcast domain in a hot-standby topology. To do this, configure a backup group ID on each of the ServerIronADXs. Both ServerIronADXs in a given pair have the same ID. The ID uniquely identifies the pair. When you configure a backup group ID, both ServerIronADXs in a hot-standby pair use the ID when exchanging backup information. If a ServerIronADX receives a backup information packet but the packet's backup group ID does not match the ServerIronADX's backup group ID, the ServerIronADX will not process this packet for hot standby. If the broadcast domain contains multiple hot-standby pairs, you must configure backup group IDs on all pairs. If the broadcast domain contains only one hot-standby pair, you do not need to configure a backup group ID.
Configuring a backup-group ID
Use the [no] server backup-group <id> command to configure a backup-group ID. Enter the same ID on both ServerIronADXs in a hot-standby pair. Do not enter the same ID on a ServerIronADX that is not one of the ServerIronADXs in the hot-standby pair. The default value is 0. This feature is turned on by default. To configure a backup-group ID, enter the following command.
ServerIronADX(config)# server backup-group 1
Syntax: [no] server backup-group <id> The <id> variable specifies the backup-group ID and can be a number from 0 through 7. Use the show server backup command in a hot standby topology to display the backup ID information. If there is a group-ID mismatch, both ServerIronADXs will become active (instead of one standby and one active).
363
Additional variations
Symmetric topology
Symmetric SLB increases performance and simplifies a redundant topology. It provides these benefits by allowing you to implement redundancy on an individual VIP basis. Unlike a conventional hot-standby configuration, you can actively use all the ServerIronADXs in a Symmetric SLB configuration simultaneously. You can configure up to seven symmetric SLB pairs within a single broadcast domain in a symmetric topology. To do this, configure a symmetric group ID on each of the ServerIronADXs. Both ServerIronADXs in a given pair must have the same ID. The ID uniquely identifies the pair. When you configure a symmetric group ID, both ServerIronADXs in a symmetric SLB pair use the ID when exchanging symmetric protocol information. If a ServerIronADX receives a symmetric protocol information packet but the packet's symmetric group ID does not match the ServerIronADX's symmetric group ID, the ServerIronADX discards the packet. If the broadcast domain contains multiple symmetric pairs, you must configure symmetric group IDs on all pairs. If the broadcast domain contains only one symmetric pair, you do not need to configure a symmetric group ID.
Syntax: [no] server symmetric-group <id> The <id> variable specifies the symmetric group ID and can be a number from 1 through 7. Enter the same ID on both ServerIronADXs in a symmetric pair. Do not enter the same ID on a ServerIronADX that is not one of the ServerIronADXs in the symmetric pair. The default value is 1, and the group-id range is from 1 through7. This feature is turned on by default. Use the show server virtual-name-or-ip <name> command in a symmetric topology to display the backup ID information. If there is a group-ID mismatch, both ServerIronADXs will have state=5 and both become active (instead of one in state=5 and one in state=3).
NAT in HA environments
The ServerIronADX supports NAT in High Availability (HA) environments using VRRP or VRRP-E. Inside source NAT translates the private source IP address of a host into a public IP address before forwarding the hosts packet onto a public network.
NOTE
364
Virtual Router Redundancy Protocol (VRRP) and a Brocade-enhanced implementation of VRRP called VRRP Extended (VRRP-E) enable a pair of ServerIronADXs in a high-availability configuration to provide redundant support for an IP address. If one of the ServerIronADXs becomes unavailable, the redundant IP address continues to be available on the other ServerIronADX. For example, you can use VRRP-E in an active-active SLB configuration to provide redundancy for a ServerIronADX IP address used as clients or servers connected to the ServerIronADXs as their default gateway. You can use either VRRP or VRRP-E in your redundant configurations. The primary difference between the two protocols is that VRRP requires the backed up address to be owned by one of the devices. This means the address is physically configured on one of the interfaces used for the backed up address. VRRP-E does not have this requirement. The following examples assume the ServerIronADX is in the same subnet as the source and destination address of the translated traffic.
NOTE
Once NAT pools are defined as members of a VIP group, the VIP group must be added to a VRRP-E configuration, under the VRID. It must be added to the outside interface (the interface having ip nat outside configured).
interface eth <x/x> ip vrrp-extended vrid <n> vip-group <n>
365
Additional variations
FIGURE 47
10.10.20.102
10.10.20.2
L2 Switch
SI-A
Port 1/13 Port 1/13
SI-B
Active-active link
Inside Source NAT translates client addresses on the internal network (10.10.10.x) into 10.10.20.x addresses before forwarding client traffic to the external server network.
L2 Switch
10.10.10.2
10.10.10.103
Client
The ServerIronADXs are each configured to translate the source IP addresses of clients in the private network (10.10.10.x) into IP addresses in the external network (10.10.20.x). For simplicity, this example uses another private subnet as the external subnet. However, the external IP addresses would normally be Internet addresses.
366
To provide additional redundancy, each ServerIronADX is connected to the Layer 2 switches by four ports. The ports are all members of the same VLAN and share a virtual routing interface. As a result, if an individual port becomes unavailable, the link remains intact. If the entire link becomes unavailable, VRRP-E fails over to the ServerIronADX, to maintain availability of the backed up IP address. The IP addresses that are backup by VRRP-E are the addresses used by the hosts in the 10.10.10.x and 10.10.20.x sub-nets as their default gateways. For example, VRRP-E is configured on both ServerIronADXs to back up IP address 10.10.20.1, which is used by the hosts in 10.10.20.x as the default gateway. Notice that each backed-up address is configured on a virtual routing interface, which is associated with all the ports connecting the ServerIronADX to the address subnet. Normally, an IP address can be associated with only one physical port. To associate the address with all the ports in the trunk group, this configuration places all the ports into a separate port-based VLAN, adds a virtual routing interface to the VLAN, then configures the backed up IP address on the virtual routing interface. By default, the ServerIronADX on which you configure the higher VRRP-E priority for the backed up IP address is the master for the address and handles the routing for the address. The other ServerIronADX is a backup. If the master ServerIronADX is unable to continue routing for the address, the backup ServerIronADX performs the routing for the address. ServerIronADX-A configuration
ServerIronADX> enable ServerIronADX# configure terminal ServerIronADX(config)# hostname ServerIronADXA
The following commands configure two virtual interfaces, for the ServerIronADXs interfaces with the internal and external networks. Each interface is configured on a port-based VLAN consisting of four ports. Notice that an IP address is configured on each virtual routing interface. VRRP and VRRPE require the interface on which you configure a virtual router ID (VRID) to have an IP interface that is in the same subnet as the VRID address. In this example, virtual routing interface 1 has IP address 10.10.20.1 and its VRID address (configured later in this example) is 10.10.20.10. Virtual routing interface 2 has IP address 10.10.10.1 and VRID address 10.10.10.10.
ServerIronADXA(config)# vlan 100 ServerIronADXA(config-vlan-100)# untagged ethernet 1/1 to 1/4 ServerIronADXA(config-vlan-100)# router-interface ve 1 ServerIronADXA(config-vlan-100)# exit ServerIronADXA(config)# interface ve 1 ServerIronADXA(config-ve-1)# 10.10.20.1 255.255.255.0 ServerIronADXA(config-ve-1)# exit ServerIronADXA(config)# vlan 200 ServerIronADXA(config-vlan-200)# untagged ethernet 1/5 to 1/8 ServerIronADXA(config-vlan-200)# router-interface ve 2 ServerIronADXA(config-vlan-200)# exit ServerIronADXA(config)# interface ve 2 ServerIronADXA(config-ve-2)# 10.10.10.1 255.255.255.0 ServerIronADXA(config-ve-2)# exit
The following commands configure the source NAT parameters. The access-list command configures a standard IP ACL to identify the source IP addresses that are eligible for translation. These are the addresses of the hosts on the internal network. The ip nat pool command configures an IP address pool for use during translation. The source IP address of an internal hosts packet will be translated to one of the addresses in the pool before being forwarded to the external network. The ip nat inside source command enables inside source NAT and identifies the ACL containing the
367
Additional variations
source addresses to be translated and the pool containing the translation addresses. The ip nat outside command on virtual routing interface 1 indicates that this is the NAT interface connected to the external network. Likewise, the ip nat inside command on virtual routing interface 2 indicates it is the NAT interface connected to the inside network.
ServerIronADXA(config)# access-list 1 permit 10.10.10.0 0.0.0.255 ServerIronADXA(config)# ip nat pool actnat 10.10.20.10 10.10.20.20 prefix-len 24 ServerIronADXA(config)# ip nat inside source list 1 pool actnat ServerIronADXA(config)# interface ve 1 ServerIronADXA(config-ve-1)# ip nat outside ServerIronADXA(config-ve-1)# exit ServerIronADXA(config)# interface ve 2 ServerIronADXA(config-ve-2)# ip nat inside ServerIronADXA(config-ve-2)# exit
The following commands configure the active-active link between the ServerIronADXs. The port used for the link must be in its own port-based VLAN, separate from the other ports. The static-mac-address command indicates the MAC address of the port at the other end of the link. If the link is a trunk group, specify the MAC address of the groups primary port. The server active-active-port command specifies the active-active port and the VLAN used for the active-active traffic.
ServerIronADXA(config)# vlan 13 ServerIronADXA(config-vlan-13)# untagged ethernet 1/13 ServerIronADXA(config-vlan-13)# static-mac-address 00e0.52ee.6900 ethernet 1/13 ServerIronADXA(config-vlan-13)# exit ServerIronADXA(config)# server active-active-port ethernet 1/13 vlan-id 13
The following commands configure the VRRP-E parameters. For each virtual routing interface, the address indicated by the ip-address command is the address that will be backed up by VRRP-E. The track-port commands identify the interfaces on the other side of the ServerIronADX that complete the link for the VRID. For example, traffic that is addressed to VRID 1 enters the ServerIronADX through virtual routing interface 1 and leaves the ServerIronADX through virtual routing interface 2. Normally, if virtual routing interface 2 goes down, VRID 1 remains active. When you track interfaces for a VRID, if the state of one of the tracked interfaces changes, the software associates the change with the VRID interface. For example, if virtual routing interface 2 goes down, the software associates this state change with VRID 1 and causes VRRP-E to fail over the VRID to the other ServerIronADX. For each virtual routing interface, the track-port commands in this example configure the other virtual routing interface and all the physical ports in the VLAN on which the other virtual routing interface is configured as track ports.
ServerIronADXA(config)# router vrrp-extended ServerIronADXA(config)# interface ve 1 ServerIronADXA(config-ve-1)# ip vrrp-extended vrid 1 ServerIronADXA(config-ve-1-vrid-1)# backup ServerIronADXA(config-ve-1-vrid-1)# ip-address 10.10.20.10 ServerIronADXA(config-ve-1-vrid-1)# enable ServerIronADXA(config-ve-1-vrid-1)# track-port ethernet 1/5 ServerIronADXA(config-ve-1-vrid-1)# track-port ethernet 1/6 ServerIronADXA(config-ve-1-vrid-1)# track-port ethernet 1/7 ServerIronADXA(config-ve-1-vrid-1)# track-port ethernet 1/8 ServerIronADXA(config-ve-1-vrid-1)# track-port ethernet ve 2 ServerIronADXA(config-ve-1-vrid-1)# exit ServerIronADXA(config-ve-1)# exit ServerIronADXA(config)# interface ve 2 ServerIronADXA(config-ve-2)# ip vrrp-extended vrid 2 ServerIronADXA(config-ve-2-vrid-2)# backup ServerIronADXA(config-ve-2-vrid-2)# ip-address 10.10.10.10 ServerIronADXA(config-ve-2-vrid-2)# enable
368
ServerIronADX-B configuration The following commands configure ServerIronADX-B. Notice the NAT and VRRP-E configurations are the same as the ones on ServerIronADX-A.
ServerIronADX# configure terminal ServerIronADX(config)# hostname ServerIronADXB ServerIronADXB(config)# vlan 100 ServerIronADXB(config-vlan-100)# untagged ethernet 1/1 to 1/4 ServerIronADXB(config-vlan-100)# router-interface ve 1 ServerIronADXB(config-vlan-100)# exit ServerIronADXB(config)# interface ve 1 ServerIronADXB(config-ve-1)# 10.10.20.3 255.255.255.0 ServerIronADXB(config-ve-1)# exit ServerIronADXB(config)# vlan 200 ServerIronADXB(config-vlan-200)# untagged ethernet 1/5 to 1/8 ServerIronADXB(config-vlan-200)# router-interface ve 2 ServerIronADXB(config-vlan-200)# exit ServerIronADXB(config)# interface ve 2 ServerIronADXB(config-ve-2)# 10.10.10.3 255.255.255.0 ServerIronADXB(config-ve-2)# exit ServerIronADXB(config)# access-list 1 permit 10.10.10.0 0.0.0.255 ServerIronADXB(config)# ip nat pool actnat 10.10.20.10 10.10.20.20 prefix-len 24 ServerIronADXB(config)# ip nat inside source list 1 pool actnat ServerIronADXB(config)# interface ve 1 ServerIronADXB(config-ve-1)# ip nat outside ServerIronADXB(config-ve-1)# exit ServerIronADXB(config)# interface ve 2 ServerIronADXB(config-ve-2)# ip nat inside ServerIronADXB(config-ve-2)# exit ServerIronADXB(config)# vlan 13 ServerIronADXB(config-vlan-13)# untagged ethernet 1/13 ServerIronADXB(config-vlan-13)# static-mac-address 00e0.52ee.d600 ethernet 1/13 ServerIronADXB(config-vlan-13)# exit ServerIronADXB(config)# server active-active-port ethernet 1/13 vlan-id 13 ServerIronADXB(config)# router vrrp-extended ServerIronADXB(config)# interface ve 1 ServerIronADXB(config-ve-1)# ip vrrp-extended vrid 1 ServerIronADXB(config-ve-1-vrid-1)# backup ServerIronADXB(config-ve-1-vrid-1)# ip-address 10.10.20.10 ServerIronADXB(config-ve-1-vrid-1)# enable ServerIronADXB(config-ve-1-vrid-1)# track-port ethernet 1/5 ServerIronADXB(config-ve-1-vrid-1)# track-port ethernet 1/6 ServerIronADXB(config-ve-1-vrid-1)# track-port ethernet 1/7 ServerIronADXB(config-ve-1-vrid-1)# track-port ethernet 1/8 ServerIronADXB(config-ve-1-vrid-1)# track-port ethernet ve 2 ServerIronADXB(config-ve-1-vrid-1)# exit ServerIronADXB(config-ve-1)# exit ServerIronADXB(config)# interface ve 2 ServerIronADXB(config-ve-2)# ip vrrp-extended vrid 2 ServerIronADXB(config-ve-2-vrid-2)# backup ServerIronADXB(config-ve-2-vrid-2)# ip-address 10.10.10.10
369
Additional variations
It provides the real servers with a default gateway address. The ServerIronADX uses the address for source NAT. To keep track of the flows for which source
NAT has been performed, the ServerIronADX allocates a port to each flow. For each source IP address, up to 54,000 ports can be allocated to flows. In a hot-standby configuration, the active ServerIronADX owned the source NAT IP address, responding to ARP requests and performing source NAT with the configured source IP address. When failover occurred, the standby ServerIronADX, also configured with the same source NAT IP address, took over these duties. However, the source NAT sessions were not synchronized between the peers. In an active-active SSLB configuration, where both peer ServerIronADXs are active for the same application port and VIP at the same time, it was not possible for both peer ServerIronADXs to perform source NAT using the same source IP address, because a conflict could occur if both ServerIronADXs allocated the same port to different flows. You can divide the ports used for source NAT for a given source IP address into two equal groups, or port ranges. One peer controls the lower port range, and the other peer controls the upper port range. When performing source NAT, each peer allocates ports belonging only to its port range, thus avoiding port conflicts. In Symmetric SLB configurations, ownership of the source IP address is based on the port range. The peer controlling the upper port range for the source IP address is the owner of the address and responds to ARP requests. If the owner of the source IP address fails, the peer takes over ownership of the source IP address. When this feature is enabled, the two ServerIronADXs report and receive the ownership of the source IP address using a variation of the SSLB protocol. When the ports used for source NAT for a given source IP address are divided in this way, it allows the same source IP address to be configured on both peers in all supported high-availability configurations, including active-standby and active-active SSLB.
370
In hot-standby SLB configurations, the active ServerIronADX is the owner of the source IP address. However, you must still define each ServerIronADXs port range in order to prevent port conflicts between different flows. The ServerIronADX does not support symmetric SLB with shared source NAT IPs. The reason is because the VIP and the source IP may not be active on the same ServerIronADX, and as a result, the ServerIronADX will not know how to forward return traffic. Configure sym-active as a workaround.
NOTE
FIGURE 48
Internet
e 3/1
e 3/1
SI-A
Shared Source IP addresses for Source NAT: 10.10.1.10 10.10.1.11 10.10.1.12
SI-B SISI-A
ServerIronADX-A configuration
The following commands configure ServerIronADX-A in Figure 48.
ServerIronADX-A(config)# ip address 10.10.1.1 255.255.0.0 ServerIronADX-A(config)# ip default-gateway 10.10.1.254 ServerIronADX-A(config)# server port 80 ServerIronADX-A(config-port-http)# session-sync ServerIronADX-A(config-port-http)# tcp
371
Additional variations
ServerIronADX-A(config-port-http)# exit ServerIronADX-A(config)# server port 21 ServerIronADX-A(config-port-ftp)# session-sync ServerIronADX-A(config-port-ftp)# exit ServerIronADX-A(config)# server port 23 ServerIronADX-A(config-port-telnet)# session-sync ServerIronADX-A(config-port-telnet)# exit ServerIronADX-A(config)# server source-nat-ip 10.10.1.10 255.255.0.0 0.0.0.0 port-ra 1 ServerIronADX-A(config)# server source-nat-ip 10.10.1.11 255.255.0.0 0.0.0.0 port-ra 1 ServerIronADX-A(config)# server source-nat-ip 10.10.1.12 255.255.0.0 0.0.0.0 port-ra 1 ServerIronADX-A(config)# server router-ports ethernet 3/1 ServerIronADX-A(config)#server real rs1 10.10.1.30 ServerIronADX-A(config-rs-rs1)# port http ServerIronADX-A(config-rs-rs1)# port http url "HEAD /" ServerIronADX-A(config-rs-rs1)# port ftp ServerIronADX-A(config-rs-rs1)# port rtsp ServerIronADX-A(config-rs-rs1)# port telnet ServerIronADX-A(config-rs-rs1)# exit ServerIronADX-A(config)# server ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config-rs-rs2)# ServerIronADX-A(config)# server ServerIronADX-A(config-rs-rs3)# ServerIronADX-A(config-rs-rs3)# ServerIronADX-A(config-rs-rs3)# ServerIronADX-A(config-rs-rs3)# ServerIronADX-A(config-rs-rs3)# ServerIronADX-A(config)# server ServerIronADX-A(config-rs-rs4)# ServerIronADX-A(config-rs-rs4)# ServerIronADX-A(config-rs-rs4)# ServerIronADX-A(config-rs-rs4)# ServerIronADX-A(config-rs-rs4)# real port port port port port exit real port port port port exit real port port port port exit rs2 10.10.1.31 http http url "HEAD /" ftp rtsp telnet
ServerIronADX-A(config)# server virtual-name-or-ip test 10.10.1.100 ServerIronADX-A(config-vs-test)# sym-priority 200 ServerIronADX-A(config-vs-test)# sym-active ServerIronADX-A(config-vs-test)# port http ServerIronADX-A(config-vs-test)# port ftp ServerIronADX-A(config-vs-test)# port telnet ServerIronADX-A(config-vs-test)# bind http rs1 http rs2 http rs3 http rs4 http ServerIronADX-A(config-vs-test)# bind ftp rs1 ftp rs2 ftp rs3 ftp rs4 ftp ServerIronADX-A(config-vs-test)# bind telnet rs1 telnet rs2 telnet rs3 telnet rs4 telnet ServerIronADX-A(config-vs-test)# exit
372
ServerIronADX-B configuration
The following commands configure ServerIronADX-B in Figure 48. The commands are identical to those for ServerIronADX-A except for the ServerIronADXs IP address.
ServerIronADX-B(config)# ip address 10.10.1.2 255.255.0.0 ServerIronADX-B(config)# ip default-gateway 10.10.1.254 ServerIronADX-B(config)# server port 80 ServerIronADX-B(config-port-http)# session-sync ServerIronADX-B(config-port-http)# tcp ServerIronADX-B(config-port-http)# exit ServerIronADX-B(config)#server port 21 ServerIronADX-B(config-port-ftp)#session-sync ServerIronADX-B(config-port-ftp)#exit ServerIronADX-B(config)# server port 23 ServerIronADX-B(config-port-telnet)# session-sync ServerIronADX-B(config-port-telnet)# exit ServerIronADX-B(config)# port-ra 2 ServerIronADX-B(config)# port-ra 2 ServerIronADX-B(config)# port-ra 2 ServerIronADX-B(config)# server source-nat-ip 10.10.1.10 255.255.0.0 0.0.0.0 server source-nat-ip 10.10.1.11 255.255.0.0 0.0.0.0 server source-nat-ip 10.10.1.12 255.255.0.0 0.0.0.0 server router-ports ethernet 3/1 real port port port port port exit real port port port port port exit real port port port port exit real port port port port exit rs1 10.10.1.30 http http url "HEAD /" ftp rtsp telnet
ServerIronADX-B(config)# server ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config-rs-rs1)# ServerIronADX-B(config)# server ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config-rs-rs2)# ServerIronADX-B(config)# server ServerIronADX-B(config-rs-rs3)# ServerIronADX-B(config-rs-rs3)# ServerIronADX-B(config-rs-rs3)# ServerIronADX-B(config-rs-rs3)# ServerIronADX-B(config-rs-rs3)# ServerIronADX-B(config)# server ServerIronADX-B(config-rs-rs4)# ServerIronADX-B(config-rs-rs4)# ServerIronADX-B(config-rs-rs4)# ServerIronADX-B(config-rs-rs4)# ServerIronADX-B(config-rs-rs4)#
rs2 10.10.1.31 http http url "HEAD /" ftp rtsp telnet
373
Additional variations
ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# ServerIronADX-B(config-vs-test)# telnet ServerIronADX-B(config-vs-test)#
sym-priority 100 sym-active port http port ftp port telnet bind http rs1 http rs2 http rs3 http rs4 http bind ftp rs1 ftp rs2 ftp rs3 ftp rs4 ftp bind telnet rs1 telnet rs2 telnet rs3 telnet rs4 exit
Syntax: [no] router vrrp | vrrp-extended Syntax: [no] ip vrrp vrid<vrid number> Syntax: [no] vip-group <number> The <number> parameter is the VIP group number (from 1 through 10) that you are binding to the VRID. Note that each VIP group can have only one VRID associated with it. Each virtual IP address can belong to only one VIP group. Also, each VIP group can have only one VRID associated with it. Use these commands with the server vip-group command to guarantee simultaneous VIP failover in the event VRRP-E fails over to a Backup router.
It provides the real servers with a default gateway address. The ServerIronADX uses the address for source NAT. To keep track of the flows for which source
NAT has been performed, the ServerIronADX allocates a port to each flow. For each source IP address, up to 54,000 ports can be allocated to flows.
374
In a hot-standby configuration, the active ServerIronADX owned the source NAT IP address, responding to ARP requests and performing source NAT with the configured source IP address. When failover occurred, the standby ServerIronADX, also configured with the same source NAT IP address, took over these duties. However, the source NAT sessions were not synchronized between the peers. In an active-active SSLB configuration, where both peer ServerIronADXs are active for the same application port and VIP at the same time, it was not possible for both peer ServerIronADXs to perform source NAT using the same source IP address, because a conflict could occur if both ServerIronADXs allocated the same port to different flows. You can divide the ports used for source NAT for a given source IP address into two equal groups, or port ranges. One peer controls the lower port range, and the other peer controls the upper port range. When performing source NAT, each peer allocates ports belonging only to its port range, thus avoiding port conflicts. In Symmetric SLB configurations, ownership of the source IP address is based on the port range. The peer controlling the upper port range for the source IP address is the owner of the address and responds to ARP requests. If the owner of the source IP address fails, the peer takes over ownership of the source IP address. When this feature is enabled, the two ServerIronADXs report and receive the ownership of the source IP address using a variation of the SSLB protocol. When the ports used for source NAT for a given source IP address are divided in this way, it allows the same source IP address to be configured on both peers in all supported high-availability configurations, including active-standby and active-active SSLB. In hot-standby SLB configurations, the active ServerIronADX is the owner of the source IP address. However, you must still define each ServerIronADXs port range in order to prevent port conflicts between different flows. The ServerIronADX does not support symmetric SLB with shared source NAT IPs. The reason is because the VIP and the source IP may not be active on the same ServerIronADX, and as a result, the ServerIronADX will not know how to forward return traffic. Configure sym-active as a workaround.
NOTE
Miscellaneous options
Displaying VIP owner in HA setup
The show server bind and show server virtual-name-or-ip <virtual-server> commands display the "owner" for active VIP in HA configuration.
375
This command shows the Owner for sym_state=5, non-Owner for sym_state=3, or nothing for others.
Example
ServerIronADX#show server bind Bind info Virtual server: xpanvirtual Status: enabled IP: 22.22.22.17 symmetric VIP state: Owner http -------> xpanserver: 22.22.22.33, http (Active) ssl -------> xpanserver: 22.22.22.33, ssl (Active) ServerIronADX#show server virtual-name-or-ip xpanvirutal-switch Virtual Servers Info Name: xpanvirtual-switch State: Enabled IP:22.22.22.17: 1 Pred: least-conn ACL-Id: 0 TotalConn: 0 Sym: group = 1 state = 5 priority = 100 keep = 0 dyn priority/factor = 100/ 0 Activates = 1, Inactive= 0 sym-active = 0 Sym Priority = Enabled Symmetric VIP state: Owner Best-standby-mac: 0000.0000.0000 VIP state: healthy Port State Sticky Concur Proxy DSR CurConn TotConn PeakConn ---- ----- ------ ------ ----- --- ------- ------- -------default enabled NO NO NO NO 0 0 0 http enabled NO NO NO NO 0 0 0
NOTE
Syntax: [no] server router-port <portnum> To define multiple router ports on a switch, enter the port numbers, separated by blanks. You can enter up to eight router ports in a single command line. To enter more than 8 ports, enter the server router-port command again with the additional ports.
376
Dampening Terms
penalty: The penalty value for VRRP-E VRID or VRID group failover transition (Active Standby
and Standby Active) and the cutoff values must be scaled according to the scaling factor. The initial value is 0.
half-life: Time (in seconds) after which a penalty is decreased. Once the VRID or VRID group
has been assigned a penalty, the penalty is decreased by half after the half-life period expires. The default value is 30 seconds.
reuse-threshold: Reuse value based on the number of penalties. When the accumulated
penalty decreases enough to fall below this value, the VRID or VRID group failover is unsuppressed. The default value is 750.
suppress-threshold: Value of the accumulated penalty that triggers the router to dampen a
flapping failover transition of VRID or VRID group is suppressed when its penalty exceeds the limit. The default value is 2500.
max-suppress-time: Maximum time (in seconds) a VRID or VRID group failover transition can
be suppressed. The default value is 120 seconds.
incremental-penalty: The penalty increased when the VRID or VRID group is failover. The
default value is 1000.
state: The state could be "damped" or "no-damped". "damped" means that the failover
transition of the VRID or VRID group is suppressed.
ceiling: The maximum penalty value allowed. max-decay-array-size: The maximum number of decay array size. decay-array: The decay array. delta-t: This is the time granularity in seconds used to perform all decay computations. t-updated: The last decay updated timestamp.
377
Damped
Ceiling
Damped
Suppress Threshold
Damped or No Damped
Reuse Threshold
No Damped 0
No Damped
to Active), incremental-penalty (1000) is added to the penalty. Once the penalty is not 0, decay is started according to the half-life time. When the failover transition keeps going, the penalty may exceed suppress-threshold (2500) and goes to damped state. If the failover stops, the penalty is decayed. It goes to no-damped state if the penalty decreases below reuse-threshold (750). The maximum suppression time could not exceed max-suppress-time.
Damped State
In damped state, the failover of the VRID and VRID group is suppressed. The state Active or Backup is forced according to the configuration and the default state is Active. You need to calculate the potential failover and update the penalty. In VRID, the penalty is added according to the percentage of the loss of VRRP message. For example, if you expect 30 VRRP messages in one time period, but you only get 20 messages. The penalty 1000 * 20/30 is added to the current penalty value. If the ServerIron cannot receive VRRP message for a period (T), it stops Loss Message Penalty. It applies to all VRRP-E VRID and VRID group configuration. VRRP Flap Dampening follows BGP route flap dampening mechanism to damp the transition between Active and Backup.
378
Dampening
Syntax: [half-life-period <half-life-seconds>] [reuse-threshold <reuse-threshold>] [suppress-threshold <suppressthreshold>] [max-suppress <max-suppress-seconds>] The default values are half-life-period (30 seconds), reuse-threshold (750), suppress-threshold(3000), max-suppress (120 seconds). Log an event when VRRP-E VRID and VRID group changes the dampening state. Syntax: dampening-state {active | backup} The formats are as follows, Syntax: VRRPE intf <interface-name>, vrid <vrid-id>,damp state damped/no-damped Syntax: VRRPE vrid group <vrid-group-id>, damp state damped/no-damped VRRP-E dampening damps the flap of VRRP-E VRID and VRID group failover.
Dependency
VRRP-E dampening interacts with "VRRP-E VRID Group Failover". VRRP-E VRID group dampening needs "VRRP-E VRID Group Failover" support.
VRRP-E and VRRP-E must be enabled before enabling VRRP-E dampening. It depends on "VRRP-E group failover". VRRP-E dampening on VRID group must have "VRRP-E
group failover" enabled.
v1
SI-A
SI-B
ve1
Configuration
SI-A: (MAC: 000c.db77.6800)
healthck test1 icmp dest-ip 4.4.4.121 healthck test2 icmp dest-ip 4.4.4.122 healthck test3 icmp
379
dest-ip 4.4.4.123 vlan 1 name DEFAULT-VLAN by port router-interface ve 1 ! vlan 2 by port untagged ethe 8/4 router-interface ve 2 ! router vrrp-extended ! ip vrrp-extended vrid-group 1 backup priority 200 track-priority 20 track-port ve 1 track-port ve 2 healthck test1 healthck test2 priority 10 dampening ---- for dampening feature dampening-state backup ---- optional enable !! interface ve 1 ip address 4.4.4.70 255.255.255.0 ip address 14.14.14.70 255.255.255.0 ip address 24.24.24.70 255.255.255.0 ip vrrp-extended vrid 1 backup advertise backup ip-address 4.4.4.71 vip-group 1 vrid-group 1 ip vrrp-extended vrid 2 backup advertise backup ip-address 14.14.14.71 vrid-group 1 ! interface ve 2 ip address 5.5.5.70 255.255.255.0 ip address 15.15.15.70 255.255.255.0 ip address 25.25.25.70 255.255.255.0 ip vrrp-extended vrid 11 backup advertise backup ip-address 5.5.5.71 vrid-group 1 ip vrrp-extended vrid 12 backup advertise backup ip-address 15.15.15.71 vrid-group 1 !!
380
vlan 1 name DEFAULT-VLAN by port ! vlan 2 by port router-interface ve 10 !! router vrrp-extended auto-cam-repaint pram-write-retry !! ip vrrp-extended vrid-group 1 backup track-port e 4/17 track-port e 4/18 priority 15 healthck test1 healthck test2 priority 10 priority-threshold 7 (110) ---- optional dampening ---- for dampening feature dampening-state backup ---- optional enable !! interface ethernet 4/1 ip address 172.26.44.1 255.255.255.0 ! interface ethernet 4/2 ip address 2.2.2.2 255.255.255.0 ip vrrp-extended vrid 2 backup ip-address 2.2.2.12 vrid-group 1 ip vrrp-extended vrid 3 backup ip-address 2.2.2.13 vrid-group 1 ! interface ethernet 4/3 ip address 30.0.0.2 255.255.255.0 ! interface ethernet 4/4 ip address 40.0.0.2 255.255.255.0 ! interface ve 10 ip address 1.1.1.2 255.255.255.0 ip vrrp-extended vrid 1 backup ip-address 1.1.1.10 vrid-group 1
381
VRID Dampening
FIGURE 50
VRID Group Failover Topology
v1
SI-A
SI-B
ve1
Configuration
SI-A: (MAC: 000c.db77.6800)
! vlan 1 name DEFAULT-VLAN by port ! vlan 2 by port untagged ethe 4/10 router-interface ve 10 ! ! router vrrp-extended auto-cam-repaint pram-write-retry ! ! interface ve 10 ip address 1.1.1.1 255.255.255.0 ip vrrp-extended vrid 2 backup ip-address 1.1.1.12 track-port e 4/17 track-port e 4/18 priority 15 dampening dampening-state backup---- optional ! SI-B: (MAC: 00e0.5200.0001) ! vlan 1 name DEFAULT-VLAN by port ! vlan 2 by port untagged ethe 4/10 router-interface ve 10 ! ! router vrrp-extended
382
auto-cam-repaint pram-write-retry ! ! interface ve 10 ip address 1.1.1.2 255.255.255.0 ip vrrp-extended vrid 2 backup ip-address 1.1.1.12 track-port e 4/17 track-port e 4/18 priority 15 dampening dampening-state backup----- optional
383
384
Chapter
Overview
The commands to configure Server Load Balancing, including configuration of virtual servers, real servers, VIP groups, health check parameters, and others are the same for IPv6 as they are for IPv4. The existing commands have been enhanced to accept either IPv6 or IPv4 addresses. Other than IPv6 addressing, no new commands are necessary for configuring SLB for IPv6 on the ServerIron. The following shows the configuration steps for a IPv6 SLB configuration. 1. Defining IPv6 real servers. 2. Defining IPv6 virtual servers. 3. Defining IPv4 real servers. 4. Defining IPv4 real servers. 5. Define port characteristics using port profile. 6. Define IP routes. 7. VLAN, tagging and trunk definitions. 8. VRRP-E and VIP group definitions. 9. Miscellaneous . 10. Saving the configuration.
http dns http rs3 http rs4 http http rs7 http dns rs5 dns rs6 dns rs7 dns rs3 dns dns rs4 dns
Defining IP routes
ServerIronADX(config)# ip route 0.0.0.0 0.0.0.0 40.40.40.5 ServerIronADX(config)# ipv6 route 700::/64 400::212:f2ff:fea8:1400 ServerIronADX(config)# exit
386
387
Miscellaneous
Miscellaneous
ServerIronADX(config)# ServerIronADX(config)# ServerIronADX(config)# ServerIronADX(config)# ServerIronADX(config)# ServerIronADX(config)# aaa authentication web-server default local no enable aaa console exit telnet server username admin password ..... snmp-server
ServerIron ADX does not support an IPv4 VIP bound to an IPv6 Real Server. The IPv6 and IPv4 service definitions can co-exist on the same system.You can define IPv4 VIPs with IPv4 real servers and IPv6 VIPs with IPv6 real servers on the same system.
NOTE
388
an IPv6 real server an IPv4 real server. a combination of IPv4 and IPv6 real servers
These configurations are shown in Figure 51.
FIGURE 51
IPv6 Client
IPv6 Client
Access from the IPv6 client to an IPv6 real server is straight forward and doesnt require any special processing from the ServerIron ADX. For an IPv6 client to access an IPv4 server however requires intervention from the ServerIron ADX as shown in
FIGURE 52
IPv6 Client
Source IP Address: 130.130.130.5 from Source NAT configuration Destination IP Address: 130.130.130.1 from Real Server IP configuration
389
As shown in this example, the IPv6 client sends its request to the ServerIron ADX with its own IPv6 address as the source address. The destination address is an IPv6 address assigned in the VIP configuration of the ServerIron ADX. Layer 4 - 7 processing is then applied to the packets. After processing, IP source NAT is used to exchange the Source and destination IPv6 addresses for IPv4 addresses configured for the ServerIron ADX. The packets are then forwarded to the IPv4 server. The packet flow of how the IPv4 server replies to the IPv6 is shown in Figure 53. In this example, the IPv4 server sends its IPv4 address as the source address and the destination address is the IPv4 address specified in the IP NAT configuration for the VIP. IP source Nat is used to exchange the source and destination IPv4 addresses for the IPv6 source address configured for the VIP and the destination address of the IPv6 client.
FIGURE 53
Source IP Address: 130.130.130.1 from Real Server IP configuration Destination IP Address: 130.130.130.5 from Real Server IP configuration
390
1. If the frag-664-reverse-full-sized-pkt command is configured, the packet will be split and no further actions will be performed. 2. If the condition in step 1 isnt met, and the DF bit is set at the server, the frag needed ICMP error message will be sent. 3. If the conditions in steps 1 and 2 arent met, the packet will be split. The frag-664-reverse-full-sized-pkt command is configured as shown in the following.
ServerIronADX(config)# frag-664-reverse-full-sized-pkt
ICMPv6 error messages from the client side are translated to ICMP messages and sent to the
server
ICMP error messages from the server are translated to ICMPv6 messages and sent to the
client
ICMP and ICMPv6 echo request messages are processed by the management module (MP)
TABLE 37
Type Dest Unreachable code protocol unreachable Type param prob code 0
391
TABLE 38
Type Dest Unreachable code protocol unreachable Type param prob code 0
The format for all HA messages that do not contain IP address remain the same for IPv4 and
IPv6. (for example: hot-standby heart beat.
Session synchronization messages (which contain IP addresses) send IPv6 addresses for the
forward sessions and IPv4 addresses for the reverse sessions for IPv6 traffic.
392
Enable Source NAT (either globally or on the IPv4 Real Servers) Configure IPv4 Source Nat IP address Configure an IPv4 Real Server Configure an IPv6 VIP
Sample configuration
The following example provides a sample configuration for the ServerIron ADX in Figure 52 and Figure 53. The following commands enable Source NAT globally and configure an IPv4 Source NAT IP address
ServerIronADX(config)# server source-nat ServerIronADX(config)# server source-nat-ip 130.130.130.5 255.255.255.0 0.0.0.0 port-range 2
393
IPv6 Client IP address: 4000::1 IPv6 VIP: 4000::4 IPv4 Server IP: 30:30:30:1 IPv4 Source NAT IP: 30.30.30.5
ServerIronADX# rconsole 1 1 ServerIronADX1/1# show session all 0 Session Info: Flags - 0:UDP, 1:TCP, 2:IP, 3:INT, 4:INVD, H: sessInHash, N: sessInNextEntry Index ===== 0 1 Src-IPDst-IP S-port D-port Age Server Flags ============ ====== ====== === ====== ========= 4000::14000::4 53421 80 34 rs1-ipv4 SLB1 H 30.30.30.1 30.30.30.5 80 17430 34 rs1-ipv4 SLB1 H
The show ipv6 map-statistics command displays the number of client and real server packets. The following example displays memory mapping statistics for a IPv6 to IPv4 gateway (IPv6-6-4) forward (Client packets) and reverse (real server packets).
ServerIronADX# rconsole 1 1 ServerIronADX1/1 #show ipv6 map-statistics ************************ V6-V4 Gateway STATISTICS ************************* Memory Allocation Statistics: ----------------------------Tables memory(bytes) = 16799984 Static map memory (bytes) = 448 <snip> IPv6-6-4: 664 fwd = 25 664 rev = 55 <snip>
394
Appendix
Overview
You can configure loopback addresses on some common types of real servers. The information in this appendix is based on information from the vendors of these servers. For more information, please consult your real server vendor.
NOTE
Solaris
To configure a loopback address on Solaris, enter the following command. ifconfig lo0:1 <vip-addr> netmask <net-mask> up You might need to plumb the interface first. In this case, enter the following commands. ifconfig lo0:1 plumb ifconfig lo0:1 <vip-addr> netmask <net-mask> up
NOTE
The above specified commands applies to the current running configuration only. To make the address permanent so that it is reconfigured following a reboot or power cycle, create the file /etc/hostname.lo0:1.
For Hewlett-Packard (HP) version 11.x, use the May 2000 or later patch.
NOTE
Linux
To configure a loopback interface on Linux, enter a command such as the following. ifconfig lo:0 <vip-addr> netmask <net-mask> up The ifconfig lo:0 <vip-addr> netmask <net-mask> up command applies to the current running configuration only. To make the address permanent so that it is reconfigured following a reboot or power cycle, go to /etc/sysconfig/network-scripts and make a file called ifcfg-lo:0 using ifcfg-lo as a template.
NOTE
395
Windows NT
Windows NT
To configure a loopback interface on Windows NT, you need to configure a new network adapter. Use the following procedure. This procedure applies to the following products:
Microsoft Windows 2000 Professional Microsoft Windows 2000 Server Microsoft Windows 2000 Advanced Server Microsoft Windows 2000 Datacenter Server
When you add a loopback interface to Windows NT, it sometimes creates a route that has the same address as the loopback interface. You need to delete this route. In come cases, the procedure for deleting the route can include deleting the correct route to the servers default gateway. When this is the case, you need to add this route back to Windows NT.
NOTE
Manual installation
1. Click Start, point to Settings, click Control Panel, and then double-click Add/Remove Hardware. 2. Click Add/Troubleshoot a device, and then click Next. 3. Click Add a new device, and then click Next. 4. Click No, I want to select the hardware from a list, and then click Next. 5. Click Network adapters, and then click Next. 6. In the Manufacturers box, click Microsoft. 7. In the Network Adapter box, click Microsoft Loopback Adapter, and then click Next. 8. Click Finish. After the adapter is installed successfully, you can configure its options manually, as with any other adapter. If the TCP/IP properties are configured to use DHCP (the default), the adapter will eventually use an autonet address (169.254.x.x/16) because it is not actually connected to any physical media.
NOTE
Unattended installation
Modify the Unattend.txt file using the following example as a guide to install the Microsoft Loopback adapter.
[NetAdapters] Adapter01=Params.Adapter01 [Params.Adapter01] InfID="*msloop" ; Microsoft Loopback Adapter ConnectionName = "MS Loopback Adapter" [NetProtocols] MS_TCPIP=Params.MS_TCPIP ; TCP/IP parameters ; Use parameter values specific to your network
396
[Params.MS_TCPIP] AdapterSections=params.TCPIP.Adapter01 DNS=yes DNSSuffixSearchOrder=mycorp.com EnableLMHosts=No ; Adapter Specific TCP/IP parameters ; Use parameter values specific to your network [params.TCPIP.Adapter01] SpecificTo=Adapter01 DNSDomain=mycorp.com DNSServerSearchOrder=192.168.5.251 WINS=no DHCP=no IPAddress=192.168.5.10 SubnetMask=255.255.255.0 DefaultGateway=192.168.5.254
NOTE
Simple method
The simple method requires you to delete the route that Windows NT creates when you add the loopback interface. The route you need to delete is the one that has the same IP address as the loopback interface. 1. Enter the route print command to display the servers route table. In this example, the loopback interface has address 192.168.200.106.
.
C:\>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.0 192.168.200.0 192.168.200.106 192.168.200.251 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.204.254 127.0.0.1 192.168.200.106 192.168.200.251 127.0.0.1 127.0.0.1 192.168.200.251 192.168.200.106 192.168.200.251 192.168.200.251 Interface 192.168.200.251 127.0.0.1 192.168.200.106 192.168.200.251 127.0.0.1 127.0.0.1 192.168.200.251 192.168.200.106 192.168.200.251 192.168.200.251 Metric 1 1 1 1 1 1 1 1 1 1
2. Delete the route that has the same address as the loopback interface.
397
Windows NT
3. Display the route table again to verify that the unwanted route is gone
.
C:\>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.0 192.168.200.106 192.168.200.251 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.204.254 127.0.0.1 192.168.200.251 127.0.0.1 127.0.0.1 192.168.200.251 192.168.200.106 192.168.200.251 192.168.200.251 Interface 192.168.200.251 127.0.0.1 192.168.200.251 127.0.0.1 127.0.0.1 192.168.200.251 192.168.200.106 192.168.200.251 192.168.200.251 Metric 1 1 1 1 1 1 1 1 1
Long method
The long method, like the short method, requires you to delete the route that Windows NT creates when you add the loopback interface. However, what makes this method is long is that in some cases, when the route table has more than one route in the network that contains the loopback interface, the route delete command deletes the wrong route. In this case, you need to enter the command again to delete the route that has the loopback address, then re-add the other route. 1. Enter the route print command to display the servers route table. In this example, the loopback interface has address 192.168.200.106. Notice that the route table also contains another route (192.168.200.250) in the same network. The 192.168.200.250 route is the gateway route and needs to stay in the route table.
.
C:\users\default>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.0 192.168.200.0 192.168.200.106 192.168.200.250 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.200.254 127.0.0.1 192.168.200.250 192.168.200.106 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Interface 192.168.200.250 127.0.0.1 192.168.200.250 192.168.200.106 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Metric 1 1 1 1 1 1 1 1 1 1
2. Enter the route delete command to delete the unwanted 192.168.200.106 route.
C:\users\default>route delete 192.168.200.0 mask 255.255.255.0 192.168.200.106
3. Display the route table again to verify the results. In this example, Windows NT deletes the first 192.168.200.x route in the table instead of deleting the route you want to delete. If this occurs when you are performing this procedure, go to step 4. Otherwise, you are finished with this procedure.
398
C:\users\default>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.0 192.168.200.106 192.168.200.250 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.200.254 127.0.0.1 192.168.200.106 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Interface 192.168.200.250 127.0.0.1 192.168.200.106 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Metric 1 1 1 1 1 1 1 1 1
4. Enter the route delete command again to delete the unwanted route.
C:\users\default>route delete 192.168.200.0 mask 255.255.255.0 192.168.200.106
5. Display the route table again to verify the results. In this example, none of the 192.168.200.x routes remain in the table.
C:\users\default>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.106 192.168.200.250 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.200.254 127.0.0.1 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Interface 192.168.200.250 127.0.0.1 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Metric 1 1 1 1 1 1 1 1
7.
Display the route table again to verify that the table contains the gateway route but does not contain a route with the loopback address.
C:\users\default>route print Active Routes: Network Address 0.0.0.0 127.0.0.0 192.168.200.0 192.168.200.106 192.168.200.250 192.168.200.255 224.0.0.0 224.0.0.0 255.255.255.255 Netmask 0.0.0.0 255.0.0.0 255.255.255.0 255.255.255.255 255.255.255.255 255.255.255.255 224.0.0.0 224.0.0.0 255.255.255.255 Gateway Address 192.168.200.254 127.0.0.1 192.168.200.250 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Interface 192.168.200.250 127.0.0.1 192.168.200.250 127.0.0.1 127.0.0.1 192.168.200.106 192.168.200.250 192.168.200.106 192.168.200.106 Metric 1 1 1 1 1 1 1 1 1
399
Windows NT
400
Appendix
Overview
Consider the example where VIP 10.1.1.10 is configured on three ServerIrons ADXs(A, B and C). The following is the step-by-step VIP RHI configuration for ServerIron ADX A. 1. Ensure a routing protocol is running, such as OSPF.
ServerIronADXA(config)# vlan 9 ServerIronADXA(config-vlan-9)# untagged ethernet 4/1 to 4/5 ServerIronADXA(config-vlan-9)# router-interface ve 9 ServerIronADXA(config-vlan-9)# exit ServerIronADXA(config)# router ospf ServerIronADXA(config-ospf-router)# area 0 ServerIronADXA(config-ospf-router)# redistribution static ServerIronADXA(config-ospf-router)# exit ServerIronADXA(config)# interface ve 9 ServerIronADXA(config-ve-9)# ip address 186.211.21.11 255.255.255.0 ServerIronADXA(config-ve-9)# ip ospf area 0 ServerIronADXA(config-ve-9)# exit
4. Set the VIP, bind VIP ports to real server ports, and enable VIP RHI.
ServerIronADXA(config)#server virtual-name-or-ip vip-si-A 10.1.1.10 ServerIronADXA(config-vs-vip-si-A)#port http ServerIronADXA(config-vs-vip-si-A)#bind http rs1 http rs2 http ServerIronADXA(config-vs-vip-si-A)#advertise-vip-route ServerIronADXA(config-vs-vip-si-A)#exit
The configuration is similar for ServerIron ADX B and C (with relevant interface IP addresses).
401
Router #3
Client #1
Client #2
C
OSPF or BGP
Router #1
Ve1: 40.40.1.120 /24 OSPF or RIP V2 Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise subnets Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise Web1 to Web10 Servers: subnets 60.60.1.40 - 60.60.1.49
Router #2
Ve1: 140.140.1.120 / 24 OSPF or RIP V2
PC
Site #1 ServerIron
S L2 S
S L2 S
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 120.120.1.120 /24 OSPF or RIP V2 or Static Routes
Site #2 ServerIron
PC
S
RS1 & RS2 Servers: 20.20.1.40 & 20.20.1.41
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 20.20.1.120 /24 OSPF or RIP V2 or Static Routes
Internal Router #1
Internal Router #2
S
Rem1 & Rem2 servers: 80.80.l.40 & 80.80.1.41
Virtual Servers for which VIP RHI is enabled: VIP60: 60.60.1.10 (Web1 to web10) & Prefix: /30 VIP50: 50.50.1.10 (Wr1 to wr10) & Prefix: /30 VIP70: 70.70.1.10 (test) & Prefix: /30 VIP90: 90.90.1.10 (Rem1 & Rem2) & Prefix: /28
Site 1 configuration
ver 09.3.00b265TD4 ! module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! server predictor round-robin server global-advertise-vip-route server global-vip-route-mask-length 30 server rhi-active-bindings-threshold 80 server port 21
402
tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 20.20.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 20.20.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 30.30.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real Web1 60.60.1.40 port 8601 ! server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601 ! server real Web4 60.60.1.43 port 8601
403
! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 80.80.1.40
404
8601 ftp smtp ssl dns dns zone "satish.com" snmp mms rtsp
! server remote-name rem2 80.80.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp
405
! server virtual-name-or-ip vip20 20.20.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site1-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.100 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output !
406
interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 40.40.1.120 255.255.255.0 ip address 40.40.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 20.20.1.120 255.255.255.0 ip address 20.20.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! ! end
Site 2 configuration
ver 09.3.00b265TD4 module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! !
407
server port 21 tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! ! server real rs1 120.120.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 120.120.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 130.130.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms
408
port rtsp ! server real Web1 60.60.1.40 port 8601 ! server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601 ! server real Web4 60.60.1.43 port 8601 ! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" !
409
server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 180.180.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 180.180.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp
410
bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp ! server virtual-name-or-ip vip120 120.120.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site2-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static
411
! interface loopback 1 ip address 100.100.100.101 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 140.140.1.120 255.255.255.0 ip address 140.140.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 120.120.1.120 255.255.255.0 ip address 120.120.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
412
Router #3
Client #1
Client #2
C
OSPF or BGP
Router #1
Ve1: 40.40.1.120 /24 OSPF or RIP V2 Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise subnets Ve3: 60.60.1.120 /24 Ve4: 50.50.1.120 /24 Don't advertise Web1 to Web10 Servers: subnets 60.60.1.40 - 60.60.1.49
Router #2
Ve1: 140.140.1.120 / 24 OSPF or RIP V2
PC
Site #1 ServerIron
S L2 S
S L2 S
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 120.120.1.120 /24 OSPF or RIP V2 or Static Routes
Site #2 ServerIron
PC
S
RS1 & RS2 Servers: 20.20.1.40 & 20.20.1.41
Wr1 to Wr10 Servers: 50.50.1.40 - 50.50.1.49 Ve2: 20.20.1.120 /24 OSPF or RIP V2 or Static Routes
Internal Router #1
Internal Router #2
S
Rem1 & Rem2 servers: 80.80.l.40 & 80.80.1.41
Virtual Servers for which VIP RHI is enabled: VIP60: 60.60.1.10 (Web1 to web10) & Prefix: /30 VIP50: 50.50.1.10 (Wr1 to wr10) & Prefix: /30 VIP70: 70.70.1.10 (test) & Prefix: /30 VIP90: 90.90.1.10 (Rem1 & Rem2) & Prefix: /28
Site 1 configuration
The following configuration is only for virtual server vip60 (60.60.1.10).
! ver 09.3.00b269TD4 ! module 1 bi-0-port-wsm2-management-module module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! server predictor round-robin server global-advertise-vip-route server global-vip-route-mask-length 30 server rhi-active-bindings-threshold 80
413
server port 21 tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 20.20.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 20.20.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 30.30.1.40 source-nat port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real Web1 60.60.1.40 port 8601 !
414
server real Web2 60.60.1.41 port 8601 ! server real Web3 60.60.1.42 port 8601 ! server real Web4 60.60.1.43 port 8601 ! server real Web5 60.60.1.44 port 8601 ! server real Web6 60.60.1.45 port 8601 ! server real Web7 60.60.1.46 port 8601 ! server real Web8 60.60.1.47 port 8601 ! server real Web9 60.60.1.48 port 8601 ! server real Web10 60.60.1.49 port 8601 ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" ! server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48
415
port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 80.80.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 80.80.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28
416
dns snmp http ftp dns rem1 dns rem2 dns snmp rem1 snmp rem2 snmp http rem1 8601 rem2 8601 ftp rem1 ftp rem2 ftp
! server virtual-name-or-ip vip20 20.20.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7 router-interface ve 4 ! ! hostname Site1-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.100 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1
417
mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 40.40.1.120 255.255.255.0 ip address 40.40.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 20.20.1.120 255.255.255.0 ip address 20.20.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
Site 2 configuration
! ver 09.3.00b269TD4 ! module 1 bi-0-port-wsm2-management-module
418
module 2 bi-jc-8-port-gig-module module 3 bi-jc-16-port-gig-copper-module module 4 bi-jc-16-port-gig-copper-module ! global-protocol-vlan ! ! healthck Site1-chk icmp dest-ip 40.40.1.120 healthck Site1-NOT boolean not Site1-chk healthck Web1-8601-chk tcp dest-ip 60.60.1.40 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web2-8601-chk tcp dest-ip 60.60.1.41 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web3-8601-chk tcp dest-ip 60.60.1.42 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web4-8601-chk tcp dest-ip 60.60.1.43 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web5-8601-chk tcp dest-ip 60.60.1.44 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web6-8601-chk tcp dest-ip 60.60.1.45
419
port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web7-8601-chk tcp dest-ip 60.60.1.46 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web8-8601-chk tcp dest-ip 60.60.1.47 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web9-8601-chk tcp dest-ip 60.60.1.48 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web10-8601-chk tcp dest-ip 60.60.1.49 port 8601 protocol http protocol http url "HEAD /" interval 20 retries 4 l7-check healthck Web1-chk boolean and Site1-NOT Web1-8601-chk healthck Web2-chk boolean and Site1-NOT Web2-8601-chk healthck Web3-chk boolean and Site1-NOT Web3-8601-chk healthck Web4-chk boolean and Site1-NOT Web4-8601-chk healthck Web5-chk boolean and Site1-NOT Web5-8601-chk healthck Web6-chk boolean and Site1-NOT Web6-8601-chk
420
healthck Web7-chk boolean and Site1-NOT Web7-8601-chk healthck Web8-chk boolean and Site1-NOT Web8-8601-chk healthck Web9-chk boolean and Site1-NOT Web9-8601-chk healthck Web10-chk boolean and Site1-NOT Web10-8601-chk ! server predictor round-robin server global-advertise-vip-route server global-vip-route-mask-length 30 server rhi-active-bindings-threshold 80 server port 21 tcp server port 80 tcp server port 53 udp server port 161 udp server port 25 tcp server port 443 tcp server port 8601 tcp ! ! server real rs1 120.120.1.40 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server real rs2 120.120.1.41 port http port http url "HEAD /" port ftp port smtp port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name test 130.130.1.40 source-nat port http port http url "HEAD /"
421
! server real Web1 60.60.1.40 port 8601 port 8601 healthck Web1-chk ! server real Web2 60.60.1.41 port 8601 port 8601 healthck Web2-chk ! server real Web3 60.60.1.42 port 8601 port 8601 healthck Web3-chk ! server real Web4 60.60.1.43 port 8601 port 8601 healthck Web4-chk ! server real Web5 60.60.1.44 port 8601 port 8601 healthck Web5-chk ! server real Web6 60.60.1.45 port 8601 port 8601 healthck Web6-chk ! server real Web7 60.60.1.46 port 8601 port 8601 healthck Web7-chk ! server real Web8 60.60.1.47 port 8601 port 8601 healthck Web8-chk ! server real Web9 60.60.1.48 port 8601 port 8601 healthck Web9-chk ! server real Web10 60.60.1.49 port 8601 port 8601 healthck Web10-chk ! server real wr1 50.50.1.40 port http port http url "HEAD /" ! server real wr2 50.50.1.41 port http port http url "HEAD /" ! server real wr3 50.50.1.42 port http port http url "HEAD /" !
422
server real wr4 50.50.1.43 port http port http url "HEAD /" ! server real wr5 50.50.1.44 port http port http url "HEAD /" ! server real wr6 50.50.1.45 port http port http url "HEAD /" ! server real wr7 50.50.1.46 port http port http url "HEAD /" ! server real wr8 50.50.1.47 port http port http url "HEAD /" ! server real wr9 50.50.1.48 port http port http url "HEAD /" ! server real wr10 50.50.1.49 port http port http url "HEAD /" ! server remote-name rem1 180.180.1.40 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! server remote-name rem2 180.180.1.41 port 8601 port ftp port smtp port ssl port dns port dns zone "satish.com" port snmp port mms port rtsp ! ! server virtual-name-or-ip vip60 60.60.1.10 port http bind http Web1 8601 Web2 8601 Web3 8601 Web4 8601 bind http Web5 8601 Web6 8601 Web7 8601 Web8 8601 bind http Web9 8601 Web10 8601 ! server virtual-name-or-ip vip50 50.50.1.10 port http bind http wr1 http wr2 http wr3 http wr4 http
423
bind http wr5 http wr6 http wr7 http wr8 http bind http wr9 http wr10 http ! server virtual-name-or-ip vip70 70.70.1.10 port http port smtp port ftp port dns port snmp port mms port rtsp bind http test http bind smtp test smtp bind ftp test ftp bind dns test dns bind snmp test snmp bind mms test mms bind rtsp test rtsp ! server virtual-name-or-ip vip90 90.90.1.10 vip-route-subnet-mask-length 28 port dns port snmp port http port ftp bind dns rem1 dns rem2 dns bind snmp rem1 snmp rem2 snmp bind http rem1 8601 rem2 8601 bind ftp rem1 ftp rem2 ftp ! server virtual-name-or-ip vip120 120.120.1.10 disable-advertise-vip-route port http port dns port snmp port ftp bind http rs1 http rs2 http bind dns rs1 dns rs2 dns bind snmp rs1 snmp rs2 snmp bind ftp rs1 ftp rs2 ftp ! ! vlan 1 name DEFAULT-VLAN by port ! vlan 10 by port untagged ethe 2/1 to 2/4 router-interface ve 1 ! vlan 20 by port untagged ethe 4/1 to 4/16 router-interface ve 2 ! vlan 30 by port tagged ethe 2/5 untagged ethe 2/8 router-interface ve 3 ! vlan 40 by port tagged ethe 2/5 untagged ethe 2/6 to 2/7
424
router-interface ve 4 ! ! hostname Site2-SI logging buffered 1000 mirror ethernet 4/12 ! server session-debug 100000 auto-cam-repaint pram-write-retry ! router ospf area 0 metric-type type1 redistribution connected redistribution static ! interface loopback 1 ip address 100.100.100.101 255.255.255.255 ip ospf area 0 ! interface ethernet 2/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 2/5 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 3/12 ip address 70.70.1.120 255.255.255.0 ip dont-advertise 70.70.1.120 255.255.255.0 ip address 90.90.1.120 255.255.255.0 ip dont-advertise 90.90.1.120 255.255.255.0 ! interface ethernet 4/1 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/2 mon ethe 4/12 input mon ethe 4/12 output ! interface ethernet 4/16 mon ethe 4/12 input mon ethe 4/12 output ! interface ve 1 ip address 140.140.1.120 255.255.255.0 ip address 140.140.1.121 255.255.255.0 secondary ip ospf area 0 ! interface ve 2 ip address 120.120.1.120 255.255.255.0 ip address 120.120.1.121 255.255.255.0 secondary ip ospf area 0
425
! interface ve 3 ip address 60.60.1.120 255.255.255.0 ip dont-advertise 60.60.1.120 255.255.255.0 ip address 60.60.1.121 255.255.255.0 secondary ip dont-advertise 60.60.1.121 255.255.255.0 ! interface ve 4 ip address 50.50.1.120 255.255.255.0 ip dont-advertise 50.50.1.120 255.255.255.0 ip address 50.50.1.121 255.255.255.0 secondary ip dont-advertise 50.50.1.121 255.255.255.0 ! end
426
Appendix
Example
ServerIronADX# show source-ip 4.4.4.101 all Source IP information ********************* Source IP: 4.4.4.101 flt: Yes standby: No intf ip: No Real server: real-rs-8.10 (8.8.8.10) MMS: h: 0 t: 0 m: 23b4fb3c T: 642 f: 642 RTSP: h: 0 t: 0 m: 23b51b54 T: 384 f: 384 NORM: h: 0 t: 0 m: 23b34b24 T: 9216 f: 9216 Real server: real-rs-8.11 (8.8.8.11) MMS: h: 0 t: 0 m: 23b53b6c T: 642 f: 642 RTSP: h: 0 t: 0 m: 23b55b84 T: 384 f: 384 NORM: h: 0 t: 0 m: 280c1d08 T: 9216 f: 9216 Real server: real-rs-8.12 (8.8.8.12) MMS: h: 0 t: 0 m: 23b58114 T: 642 f: 642 RTSP: h: 0 t: 0 m: 23b5a12c T: 384 f: 384 NORM: h: 0 t: 0 m: 280dcd20 T: 9216 f: 9216
NOTE
If show source-ip displays that the IP is a per-real-srcip, then you should use the show source-ip <source-ip><real-server ip> command to view the port allocation and usage information, because the port allocation will be from the real server pool.
427
ServerIronADX# show server real rest Real Servers Info ======================== State(St) - ACT:active, ENB:enabled, FAL:failed, TST:test, DIS:disabled, UNK:unknown, UNB:unbind, AWU:await-unbind, AWD:await-delete Name: rest State: Active Cost: 0 IP:1.1.1.15: 1 Mac: 0002.b34c.50f2 Weight: 0 MaxConn: 2000000 SrcNAT: cfg, op DstNAT: not-cfg, not-op Serv-Rsts: 0 tcp conn rate:udp conn rate = 0:0, max tcp conn rate:max udp conn rate = 1:0 BP max local conn configured No: 0 0 0 0 0 0 Max local conn = 0 BP max conn percentage configured No: 0 0 0 0 0 0 Max conn by weight = 0 Effective max conn = 2000000 Use local conn : No Port ---default http Server St -UNB ACT Ms -0 0 CurConn ------0 1 1 TotConn ------0 2 2 Rx-pkts ------0 47 47 Tx-pkts ------0 50 50 Rx-octet -------0 2824 2824 Tx-octet -------0 3004 3004 Reas ---0 0 0
Total
Src IP mem alloc per real info: Index = 0 Global index = 0 Src IP = 1.1.1.79
ServerIronADX# rconsole 1 1 ServerIronADX 1/1# show session all 0 Session Info: Flags0:UDP, 1:TCP, >:fwdSess, +:userCntFlgSet, D:sessInDelQ, F:fin_setFlg, A:acked * before age indicates that the static bit is set Index Src-IP ===== ====== 0 0.0.0.5 1 0.0.0.5 2 1.1.1.15 3 1.1.1.15 4 1.1.1.42 5 1.1.1.42 6 1.1.1.15 7 1.1.1.66 Dst-IP ====== 1.1.1.36 1.1.1.99 1.1.1.79 1.1.1.79 1.1.1.99 1.1.1.99 0.0.0.1 0.0.0.1 S-port D-port Age Serv Flags ====== ====== === ==== ========== 5 80 *0 n/a SLB1 # 5 80 *0 n/a SLB1 # 80 10242 32 n/a OPT1 # 80 10242 rest SLB1 A 1333 80 33 n/a OPT1> # 1333 80 rest SLB1>+ 1 1 *60 n/a SLB1 # 1 1 *60 n/a SLB1 #
In the above example, 1.1.1.42 is the client and 1.1.1.99 is the VIP address. The IP address 1.1.15 is the real server and 1.1.1.79 is the source NAT IP.
428
In the reverse session, the port 10242 has been allocated from the pool of real server 1.1.1.15. You can verify the information by using the show source-ip command.
.
NOTE
ServerIronADX# show source-ip 1.1.1.79 1.1.1.15 Source IP information ********************* Source IP: 1.1.1.79 Real server: rest (1.1.1.15) flt: Yes standby: No intf ip: No port-range: 1 for ssl: No per-real-srcip: Yes MMS: h: 0 t: 0 m: 23b4eb3c T: 1922 f: 1922 RTSP: h: 0 t: 0 m: 23b50b54 T: 1024 f: 1024 NORM: h: 3 t: 2 m: 23b33b24 T: 27648 f: 27647
The output shows that of a total of 27648 ports, one port has been allocated and 27467 are still available.
NOTE
429
TABLE 39
Field
Symmetric SLB Parameters You also can display this information separately. Server Symmetric port Group_id Candidate cnt Port Priority No-rx SLB Parameters Predictor The load balancing metric in effect on the ServerIron ADX. The predictor can be one of the following: least-conn (least connections) round-robin weighted-round-robin weighted enhanced-weighted least-local-conn (least local connections) least-local-sess (least local sessions) The default is least-conn. You can assign these metrics on a global basis and an individual virtual server basis. For more information, refer to Load-Balancing predictor on page 16. To change the predictor (globally or locally), refer to Changing the Load-Balancing Predictor Method on page 28. The state of the force shutdown option. This option immediately shuts down a server or service instead of waiting for existing connections to end before shutting the server or service down. The state can be one of the following: 0 Disabled 1 Enabled The number of contiguous inbound TCP-SYN packets sent to the server that the server has not responded to. The TCP SYN-ACK counter increments only when acknowledgments are not received. Each time an expected TCP SYN-ACK is received, the counter is cleared. The default reassign threshold is 21 unacknowledged TCP SYN-ACKs. The value can be from 6 through 254. To change the reassign threshold, refer to Reassign threshold on page 235 NOTE: You can modify this parameter to help minimize vulnerability to TCP SYN attacks. Reassign-limit The number of missed TCP SYN packets the ServerIron ADX will accept before moving an inbound connection attempt to another server. The ServerIron ADX port number on which the ServerIron ADX perceives other ServerIron ADXs running Symmetric SLB. The Symmetric SLB group ID. The group ID is always 1 in the current release. The number of ports on which the ServerIron ADX perceives a partner ServerIron ADX running Symmetric SLB. The TCP/UDP port for which Symmetric SLB is enabled. The priority for the VIP. Information used by Brocade technical support to help resolve Symmetric SLB configuration issues.
Force-deletion
Reassign-threshold
430
TABLE 39
Field
Layer 3 Health Check Parameters Ping-interval How often the ServerIron ADX sends a Layer 3 IP ping to test the basic health and reachability of the real servers. When enabled, this parameter specifies the interval for the pings. To change the interval, refer to Modifying the ping interval and ping retries on page 180. The number of times that the ServerIron ADX resends a ping to a real server that is not responding. Allowed values are from 2 through 10, and the default is 4. To change this parameter, refer to Modifying the ping interval and ping retries on page 180. If the server still does not respond after the last retry, the ServerIron ADX marks the server FAILED and removes it from the load balancing rotation.
Ping-retries
Global TCP/UDP Parameters TCP-age The number of minutes the ServerIron ADX allows a TCP connection to remain unused before closing the connection. The default is 30. To change this parameter, refer to Configuring TCP age on page 256. The value shown here is the global value. You can override this value for an individual TCP/UDP port by modifying its port profile. Refer to Overriding the global TCP or UDP age on page 207. The number of minutes the ServerIron ADX allows a UDP connection to remain unused before closing the connection. The default is 5. To change this parameter, refer to Configuring UDP age on page 256. The value shown here is the global value. You can override this value for an individual TCP/UDP port by modifying its port profile. Refer to Overriding the global TCP or UDP age on page 207. The number of minutes a sticky server connection can remain inactive before aging out. The default is 5. The maximum number of TCP SYN connections per second the ServerIron ADX is allowed to send to the real server. The default is 65535. You can guard against TCP SYN attacks by changing this parameter to a lower value. Refer to Limiting the maximum number of TCP SYN requests on page 115.
UDP-age
Sticky-age TCP-syn-limit
TCP Connections Counters TCP-total conn Unsuccessful conn The total number of TCP connections the ServerIron ADX is currently managing. The number of client requests for a TCP port that the ServerIron ADX could not fulfill because the server was busy or down, or because the port was not configured on the server.
431
TABLE 39
Field
ICMP Message Feature State ICMP-message The state of the ICMP message feature. The state can be one of the following: Disabled The ServerIron ADX does not send ICMP Destination Unreachable messages to a client that requests an HTTP port that is on a busy or down server or that is not configured on the server. This is the default. Enabled The ServerIron ADX sends ICMP Destination Unreachable messages to clients when the requested HTTP port is not available or not configured. To change the state of this feature, refer to Sending ICMP Port Unreachable or Destination Unreachable Messages on page 119.
Reas ---0 0 0 0
Total
The information for the remaining real servers has been omitted for brevity. Syntax: show server real Table 40 lists the displayed information.
TABLE 40
Field
Server State Codes Server State General Server Parameters Name The name of the real server. This is the name you assigned to the server when you configured it on the ServerIron ADX. The possible values for the server state. The state of each real server is shown by the State field, described in this table.
432
TABLE 40
Field
IP
State
Wt
The weight assigned to this server. The weight applies only if the predictor (load balancing method) is weighted. Refer to Unbinding all application ports from virtual servers on page 126. The maximum number of client connections that the ServerIron ADX will manage for the server. A connection consists of two sessions, the client-to-server session and the server-to-client session. By default, the ServerIron ADX allows up to 500,000 connections (one million sessions) on a server. If you need to lower the maximum number of connections the ServerIron ADX will manage, refer to Configuring the maximum number of active sessions on page 253. The configured and operational states of the source NAT feature. The two states are separated by a colon (:). The configured state is shown first, followed by the operational state. Each state can have one of the following values: 0 Disabled 1 Enabled The configured and operational states of the destination NAT feature. The two states are separated by a colon (:). The configured state is shown first, followed by the operational state. Each state can have one of the following values: 0 Disabled 1 Enabled Indicates whether the server is configured on the ServerIron ADX as a remote server or a local server. The ServerIron ADX uses remote servers as failovers if all the local servers are down. This field can have one of the following values: No The server is not a remote server. Yes The server is a remote server.
Max-conn
Src-nat
Dest-nat
Remote server
433
TABLE 40
Field
Dynamic
TCP/UDP Port Statistics The following fields apply to all the TCP/UDP ports on the real servers. NOTE: For DNS, HTTP, and RADIUS ports, the server-specific health check information for the port is listed under the ports statistics. For information about the health check parameters, refer to Changing HTTP keepalive method, value, and status codes on page 193. Port The TCP/UDP port name or number. This field can have one of the following values: default dns The well-known name for port 53 ftp The well-known name for port 21. (Ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name ftp corresponds to port 21.) http The well-known name for port 80 imap4 The well-known name for port 143 ldap The well-known name for port 389 nntp The well-known name for port 119 ntp The well-known name for port 123 pop2 The well-known name for port 109 pop3 The well-known name for port 110 radius The well-known name for udp port 1812 smtp The well-known name for port 25 snmp The well-known name for port 161 ssl The well-known name for port 443 telnet The well-known name for port 23 tftp The well-known name for port 69 <number> The port number, if the port is not one of those listed above
State
The state of the port. The state can be one of the following: enabled failed test suspect graceful shutdown active unbnd
NOTE: If the state is unbnd, you have not bound the port to a virtual server port.
434
TABLE 40
Field
Ms
CurConn
TotConns
435
Server Name: v100 IP : 209.157.23.100 : 4 Status: enabled Predictor: least-conn TotConn: 4233 Dynamic: No Sym: group = 1 state = 5 priority = 2 keep = 0 Activates = 4, Inactive= 3 Port State Sticky Concur CurConn TotConn radius-oenabled NO NO 0 0 http enabled NO NO 0 4233 ftp enabled NO NO 0 0 telnet enabled NO NO 0 0 ssl enabled YES NO 0 0 smtp enabled NO NO 0 0 nntp enabled NO NO 0 0 ntp enabled NO NO 0 0 dns enabled NO NO 0 0 pop2 enabled NO NO 0 0 pop3 enabled NO NO 0 0 tftp enabled NO NO 0 0 imap4 enabled NO NO 0 0 snmp enabled NO NO 0 0 ldap enabled NO NO 0 0 default enabled NO NO 0 0
PeakConn 0 39 0 0 0 0 0 0 0 0 0 0 0 0 0 0
TABLE 41
Field
General Server Parameters Server Name IP The name of the virtual server. This is the name you assigned to the server when you configured it on the ServerIron ADX. The IP address of the virtual server. If you configured a host range of VIPs on the server, the number following the IP address (after the colon) is the number of hosts on the server. In the example above, the VIP has a host range of 4 addresses.
Status
The status of the virtual server. The status can be one of the following: enabled disabled
436
TABLE 41
Field
Predictor
Tot-Conn
Dynamic Sym
437
TABLE 41
Field
TCP/UDP Port Information and Statistics Port The TCP/UDP port name or number. This field can have one of the following values: default dns The well-known name for port 53 ftp The well-known name for port 21. (Ports 20 and 21 both are FTP ports but on the ServerIron ADX, the name ftp corresponds to port 21.) http The well-known name for port 80 imap4 The well-known name for port 143 ldap The well-known name for port 389 nntp The well-known name for port 119 ntp The well-known name for port 123 pop2 The well-known name for port 109 pop3 The well-known name for port 110 radius The well-known name for udp port 1812 radiuso UDP port 1645, which is used in some older RADIUS implementations instead of port 1812 smtp The well-known name for port 25 snmp The well-known name for port 161 ssl The well-known name for port 443 telnet The well-known name for port 23 tftp The well-known name for port 69 <number> The port number, if the port is not one of those listed above
State
The state of the port. The state can be one of the following: enabled failed test suspect graceful shutdown active unbnd
NOTE: If the status is unbnd, you have not bound the port to a real server port. Sticky Whether the port is sticky. When a port is sticky, the ServerIron ADX uses the same real server for multiple requests from the same client for the port. For non-sticky ports, the ServerIron ADX load balances the requests and thus does not necessarily send them all to the same real server. This parameter can have one of the following values: NO YES For more information, refer to TCP/UDP application groups on page 453. Whether the port is configured for concurrent connections. A port configured to allow concurrent connections can have more than one connection open to the same client at the same time. For more information, refer to TCP/UDP application groups on page 453. The number of client connections currently on the server. A connection consists of two sessions, the client-to-server session and the server-to-client session. The number of client connections on the server since the ServerIron ADX was booted. A connection consists of two sessions, the client-to-server session and the server-to-client session. The highest number of connections the VIP has had at the same time.
Concur
CurConn TotConn
PeakConn
438
PeakConn -------0
Bound Port Information: ======================== Port State Ms CurConn TotConn Rx-pkts --------- ------- ------- ------dns-ns: 1.1.1.15 http active 0 dns-fs: 1.1.1.16 rtsp failed 0
Tx-pkts -------
Rx-octet --------
Tx-octet --------
Reas ----
688
2060
2748
431614
173798
Syntax: show server virtual-name-or-ip [<virtual-server-name> [<TCP/UDP-port>]] Table 42 lists the displayed information for bound ports.
TABLE 42
Field
Binding Information <port>-------> <real-server-name>: <ip-addr> <port> (<state>) The virtual server port. The name and IP address of the real server to which the port is bound. The state of the application port on the real server. The state can be one of the following: Enabled Failed Test Suspect Graceful shutdown Active For information about these states, refer to the "Application Port States" section in the "Configuring Port and Health Check Parameters" chapter of the ServerIron ADX.
Bound Port Information Note: This information is the same as the application information displayed by the show server real command.
439
TABLE 42
Field
Port State Ms
CurConn
TotConn
440
failed servers: 3 MyServer01 IP:192.168.160.91 State: Enabled MyServer02 IP:192.168.160.92 State: Enabled MyServer03 IP:192.168.160.93 State: Enabled
Syntax: show server bind The display lists the port bindings for each virtual server configured on the ServerIron ADX. The first row of information for each virtual server lists the virtual server name and VIP. The following rows list the TCP/UDP ports configured on the virtual server and the real servers and port names or numbers to which each port is bound.
441
In the example, two virtual servers are configured on the ServerIron ADX, v100 and v105. The first set of rows in the example output is for virtual server v100, with VIP 209.157.23.100. The rows below the first row list the real servers and ports to which the virtual servers ports are bound. The rows are grouped by port type. The first two rows after the first row in the example above list the port bindings for the virtual servers HTTP port. In this case, the virtual server is bound to an HTTP port on two real servers, s43 and s60. The port name or number on the real server is listed after the real servers IP address. In this example, the HTTP port to which v100 is bound on s43 is "http", which is the well-known name for the port. The virtual servers HTTP port is bound to port 8080 on real server s60. You can also display port-binding information by entering the show server session command.
SLB-chassis# rconsole 1 1 SLB-chassis1/1#show server session
= =
1999998 200001
Total Sessions
2000000
Total C->S Conn = 0 Total S->C Conn = 0 Total Reassign = 0 Unsuccessful Conn = 0 Server State - 0: diasbled, 1:enabled, 2:failed, 3:test, 4:suspect, 5:grace_dn, 6:active Real Server rs1 St CurrConn 1 0/0/0 TotConn 0 TotRevConn CurrSess 0 0 PeakConn 0
Syntax: show server session Table 43 lists the displayed information for bound ports.
TABLE 43
Field
Global Statistics Avail. Sessions The number of sessions that are still available for use. By default, the ServerIron ADX is configured to allow the maximum number of sessions it can support. If you need to decrease the number of sessions supported, refer to Configuring the maximum number of active sessions on page 253. The number of sessions that are currently in use. The number of connections initiated by clients. The number of connections initiated by servers. Generally this value is 0 unless the client is using FTP or another application that causes the server to initiate connections.
442
TABLE 43
Field
Total Reassign
The number of connection attempts by clients or servers that were unsuccessful. If the fast-age threshold is configured, the total number of sessions that were aged out because the number of free sessions dropped below the fast-age threshold, in addition to the number of these sessions that were aged out in the last 60 seconds. If the random threshold is configured, the total number of sessions that were aged out at random because the number of free sessions dropped below the random threshold, in addition to the number of sessions that were aged out randomly in the last 60 seconds. Refer to Configuring fast session aging on page 254 for more information on the fast-age and random thresholds.
Random-aged: total
Statistics for Individual Real Servers Server State Real Server St The possible values for the server state. The state of each real server is shown by the State field. The name of the real server. This is the name you gave the server when you configured it. The state of the real server. The state can be one of the states listed by "Server State" at the top of the display. NOTE: The value in this field is based on the results of Layer 3 health checks. To display the server state based on Layer 4 or Layer 7 health checks, refer to the State field in the show server real display. (Refer to Displaying real server configuration statistics on page 432.) CurConn The number of client connections currently on the server. A connection consists of two sessions, the client-to-server session and the server-to-client session. The number of client connections on the server since the ServerIron ADX was last booted or restarted. A connection consists of two sessions, the client-to-server session and the server-to-client session. The total number of connections initiated by the server to a client. The number of sessions currently open on the ServerIron ADX. The highest number of simultaneous connections the ServerIron ADX has managed since it was last booted or restarted.
TotConn
443
= = = = = = = = = = = =
0 0 0 0 0 0 0 0 0 0 0 0
0 TCP reverse FIN = 0 0 Fast path REV FIN = 0 0 Dup SYN after FIN = 0 0 Duplicate sessions = 0 0 TCP ttl reset recvd = 0 0 Sess force deleted = 0 0 sess already in delQ = 0 0 0 Incoming TCP cksum e = 0 0 New sess sync recvd = 0 0 L4 msg recvd = 0 0 ipc packet sent = 8 0 TCP SYN dropped = 0 0 TCP SYN ACK to MP = 0 0 TCP SYN ACK dropped = 0 0 TCP pkt dropped = 0 0 PBSLB tftp status = In progres
Syntax: show server traffic Table 44 lists the displayed information for bound ports.
TABLE 44
Field
Client->Server Server->Client
444
TABLE 44
Field
Drops
Aged
Fw_drops
Rev_drops
FIN_or_RST
old-conn fast vport found Duplicate SYN Number of successful virtual-port searches using an improved (faster) method. When the ServerIron ADX receives a SYN packet for a session that is already listed in the session table (show server sessions), the ServerIron ADX has received a Duplicate SYN. The counter is then incremented by 1. Total (ttl) number of resets received in both the forward and reverse direction. This counter applies to both optimized (FPGA assisted) and non optimized traffic paths. Number of packets the ServerIron ADX dropped because they were sent by a client to a VIP port that is bound to a real server port that is currently disabled. Number of packets dropped by the ServerIron ADX because the TCP SYN limit on the real servers had been reached. The TCP SYN limit is a configurable parameter that allows you to protect servers against TCP SYN attacks by limiting the number of TCP SYN requests the ServerIron ADX can send to the server each second. For more information, refer to Configuring the maximum number of active sessions on page 253. Number of TCP SYN packets the ServerIron ADX dropped because they matched a stale session entry.
Disable_drop
Exceed_drop
Stale_drop
445
TABLE 44
Field
Unsuccessful
Rate of TCP traffic per second. This counter includes all TCP traffic, including TCP SYN DoS attacks. This field displays in releases 09.0.00S and later. Peak rate of TCP traffic (per second) encountered on this device. This field displays in releases 09.0.00S and later. Rate of TCP Dos attacks per second. This rate is delayed by 1 to 2 minutes. This field displays in releases 09.0.00S and later. Peak rate of TCP DoS attacks (per second) encountered on this device. This rate is delayed by 1 to 2 minutes. This field displays in releases 09.0.00S and later.
max conn rate last TCP attack rate max TCP attack rate
Showing aggregate health of tracked ports on page 446 Auto repeat of show command output on page 447 The repeat-show commands are very similar to the traceroute and stop-traceroute
commands. When you end a Telnet session, this command cleans up the Telnet session and issues the stop-repeat-show command. on page 448
This command displays the state of all configured track groups on the ServerIron ADX, as shown in the following example.
ServerIronADX# show track-group-state Virtual Server track-group v1 v2 v3 80 3030 21 443 80 80 443 state SUSPECT UP SUSPECT
NOTE
The state can be either UP or SUSPECT, depending on the state of the real server ports that are bound to track-group ports. The track-group state is never in a DOWN state.
446
The show track-group-state output above is based upon the following configuration.
server real r1 10.10.1.101 port http port http url "HEAD /" port ftp port 3030 ! server real r2 10.10.1.102 port http port http url "HEAD /" port ssl ! server real r3 10.10.1.103 port ssl port http port http url "HEAD /" ! server virtual-name-or-ip v1 10.10.1.151 port http sticky port ftp sticky port 30303 sticky port 3030 sticky track-group http 21 bind http r1 http bind ftp r1 ftp bind 3030 r1 3030 ! server virtual-name-or-ip v2 10.10.1.153 port ssl sticky port http sticky track-group ssl 80 bind ssl r2 ssl bind http r2 http ! server virtual-name-or-ip v3 10.10.1.154 port ssl sticky port http sticky track-group http 443 bind ssl r3 ssl bind http r3 http !
This example displays the results of a show server session command every 8 seconds. Syntax: repeat-show <cmd to show><interval> The <cmd to show> parameter is the actual command display to be shown repeatedly. The double quotes allow the command to accommodate white space.
447
The <interval> parameter specifies the interval for repeated displays (range from 1 to 60 seconds). To stop the repeat-show command in the current session, use the following command (on MP only).
ServerIronADX# stop-repeat-show
Syntax: stop-repeat-show
NOTE
The stop-repeat-show command stops all the repeat-show commands issued in the session. The repeat-show commands are very similar to the traceroute and stop-traceroute commands. When you end a Telnet session, this command cleans up the Telnet session and issues the stop-repeat-show command.
448
Example
ServerIronADX(config)# no server real rs1 ServerIronADX(config)# show server real rs1 Real Servers Info Name : rs1 IP:1.2.3.4 Range:1 State:await_delete Least-con Wt:0 Resp-time Wt:0 Port ---8080 default State ----unbnd unbnd Ms -0 0 CurConn ------0 0 TotConn ------0 0 Rx-pkts ------0 0
Tx-pkts ------0 0
Rx-octet -------0 0 0
Tx-octet -------0 0 0
Reas ---0 0 0
The no server real command deletes real server "rs1". The show server real command displays the states of the real servers. Notice that rs1 is still listed as a valid real server, and has the state "await_delete". If the no server real command does not list the deleted server, the server has been completely deleted. If the server continues to be listed with the "await_delete" state after several minutes, enter the clear server session command to finish deleting the server. The clear server session command deletes the remaining sessions for rs1, after which the ServerIron ADX can finish deleting the server. You can enter this command immediately after entering the no server real command. You do not need to wait for any sessions to end normally.
NOTE
The clear server session <real server> command is used to clear sessions for a specific real server, regardless of the server in "await_del" or "await_u" state. The clear server all-session <real server> is an enhancement to the clear server session command. If the command is executed from MP, it clears all the session in MP and BP and it clears only the BP sessions if it is executed from BP. The paramater <real server> is an optional in clear server all-session command specific to the real server.
449
450
Appendix
Web hosting with multiple virtual servers mapped to one real server
Suppose an ISP administrator wants to use one real server to accommodate three premium users, all of which are Web sites. Each of these premium users is assigned its own website URL:
451
FIGURE 56
SI
ServerIron
Requests for: www.fox.com www.horse.com www.tiger.com are forwarded to one physical (real) server that hosts multiple web sites (virtual) server
Real Server
IP address 10.84.4.5
Web Sites hosted (virtual addresses) www.fox.com 206.84.4.100 www.horse.com 206.84.4.101 www.tiger.com 206.84.4.102
452
To map multiple virtual IP addresses to the same real server, disable HTTP port translation for all but one of the virtual IP addresses, then bind the virtual IP addresses to an alias HTTP port. Disabling HTTP port translation enables the virtual IP addresses to use the same actual HTTP port number on the real server while the ServerIron ADX collects and displays separate statistics for the alias HTTP port number associated with each virtual IP address. Figure 57 shows an example of this type of configuration.
FIGURE 57
SI
Two virtual servers configured to each map to the same real servers: VIP1, 209.157.22.88, TCP port 80 VIP2, 209.157.22.99, alias TCP port 180 Web requests forwarded among multiple servers unseen by end users
Each real server uses only one TCP port for both virtual IP addresses. An alias is configured on the ServerIron for VIPss TCP port.
TABLE 45
TCP Port
80 80
Real IP
S1: 10.0.1.5 S2: 10.0.2.200 S1: 10.0.1.5 S2: 10.0.2.200
TCP Port
80 180
453
Sticky connections When you add a TCP/UDP port to a virtual server, if you specify that the
port is sticky, a client request for that port always goes to the same real server unless the sticky age timer has expired. The sticky age timer ages out inactive sticky server connections. Possible values are from 2 through 60 minutes. The default is 5 minutes. Refer to Setting the sticky age on page 47 for information.
TCP/UDP application groups (using the track port function) A primary TCP/UDP port is
grouped with up to four additional TCP/UDP ports. After the ServerIron ADX sends a client request for the primary port to a real server, subsequent requests from the client for ports grouped with the primary port go to the same real server.
TCP/UDP application groups (using the track group function) Up to eight TCP/UDP ports are
grouped together. After the ServerIron ADX sends a client request for any of the grouped ports to a real server, subsequent requests from the client for ports in the group go to the same real server.
NOTE
You must configure all the ports in a TCP/UDP application group to be sticky.
Concurrent connections The real server can open additional ("concurrent") TCP/UDP
sessions with the client using arbitrary TCP/UDP port numbers.
NOTE
Although the concurrent connections attribute is similar to application groups, application groups apply to specific TCP/UDP ports that you configure on the virtual server. Concurrent connections enable the real server to arbitrarily determine the TCP/UDP ports and assign them to the client.
NOTE
For servers that use passive FTP *in DSR configuration*, configure the FTP ports to be both sticky and concurrent. Figure 58 shows an example of servers configured with sticky ports and an application group. In this example, the content on each real server is identical. However, some applications on the server require that clients use the same server for subsequent requests to the application. The virtual server is configured to make the ports sticky and to group the TFTP and Telnet ports under the HTTP port.
FIGURE 58
Sticky ports and application group (using the track-port function) used to group TCP/UDP applications
Internet
SI
Remote Access Server (RAS) Local Real Web Server 2 10.0.2.200 Applications replicated on both real servers: Primary port, HTTP (port 80) Ports grouped with primary: TFTP (port 69) Telnet (port 23)
To implement an application group for this example, enter the following commands.
454
ServerIronADX(config)# server real-name r1 10.0.1.5 ServerIronADX(config-rs-r1)# port http ServerIronADX(config-rs-r1)# port tftp ServerIronADX(config-rs-r1)# port telnet ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# server real-name r2 10.0.2.200 ServerIronADX(config-rs-r2)# port http ServerIronADX(config-rs-r2)# port tftp ServerIronADX(config-rs-r2)# port telnet ServerIronADX(config-rs-r2)# exit
After you enter information for the real servers, you are ready to create the virtual server. To create the virtual server, enter the following commands.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 sticky ServerIronADX(config-vs-v1)# port 69 sticky ServerIronADX(config-vs-v1)# port 23 sticky ServerIronADX(config-vs-v1)# track 80 69 23 ServerIronADX(config-vs-v1)# bind 80 r1 80 r2 80 ServerIronADX(config-vs-v1)# bind 23 r1 23 r2 23 ServerIronADX(config-vs-v1)# bind 69 r1 69 r2 69 ServerIronADX(config-vs-v1)# exit
The commands above illustrate the track port function. The sticky parameter makes the TCP/UDP ports sticky. The track command groups the Telnet port (23) and the TFTP port (69) under the HTTP port (80); the HTTP port is established as the primary port. After the ServerIron ADX sends a client to a real server for the HTTP port, subsequent requests from that client for the HTTP, TFTP, or Telnet port go to the same real server. Up to four ports can be grouped with the primary port.
NOTE
Because ports 23 and 69 track port 80, state information for the tracking ports (23 and 69 in this example) are based on the tracked ports state (port 80 in this example). The state is shown in the Ms (Master port state) field of the display produced by the show server real command. Refer to Displaying real server configuration statistics on page 432. The track group function works similarly to the track port function. With the track port function, the client uses the same server for applications associated with the grouped ports, as long as the primary port is active. In contrast, with the track group function, the client uses the same server for applications associated with the grouped ports, as long as all the ports in the group are active. After the ServerIron ADX sends a client to a real server for any of the grouped ports, subsequent requests from that client for any of the grouped ports go to the same real server. The following commands illustrate the track group function.
ServerIronADX(config)# server virtual-name-or-ip v1 209.157.22.1 ServerIronADX(config-vs-v1)# port 80 sticky ServerIronADX(config-vs-v1)# port 69 sticky ServerIronADX(config-vs-v1)# port 23 sticky ServerIronADX(config-vs-v1)# track-group 80 69 23 ServerIronADX(config-vs-v1)# bind 80 r1 80 r2 80 ServerIronADX(config-vs-v1)# bind 23 r1 23 r2 23 ServerIronADX(config-vs-v1)# bind 69 r1 69 r2 69 ServerIronADX(config-vs-v1)# exit
In this example, the track-group command groups the HTTP port (80), Telnet port (23), and TFTP port (69) together. Whenever a client attempts to connect to a port within the group, the ServerIron ADX ensures all ports in the group are active before granting the connection.
455
Web hosting with ServerIron ADX and real servers in different subnets
The sticky parameter makes the TCP/UDP ports sticky. The sticky parameter must be set for all ports in the group. After the ServerIron ADX sends a client to a real server for any of these three ports, subsequent requests from that client for the HTTP, TFTP, or Telnet port go to the same real server. Up to eight ports can be grouped together using the track group function. A port can be part of only one group. The track-group and track commands for a port are mutually exclusive.
Web hosting with ServerIron ADX and real servers in different subnets
The ServerIron ADX allows you to easily deploy its services in a multinetted environment, without the overhead of configuring routing protocols. Normally, the ServerIron ADX requires only one IP address, which you use for management access to the device. However, when the ServerIron ADX and real servers are on different subnets, you need either a multiple subnets configured on the router, or source NAT-enabled and source IP addresses (up to eight) configured on the ServerIron ADX. Figure 59 shows an example of a multinetted environment, in which the ServerIron ADX is on one sub-net, but the real servers are on another subnet. The ServerIron ADX is on subnet 141.149.65.x, and the real servers are on subnet 10.10.10.x.
FIGURE 59
ServerIron ADX and real servers in multinetted environment router configured to route between subnet
SI
-management IP address 141.149.65.10 -VIP 141.149.65.2 - source IP address 10.10.10.5 - source IP address 10.10.10.6 - source IP address 10.10.10.7 - source IP address 10.10.10.8 - source NAT enabled rs2 10.10.10.3
In this example, the ServerIron ADX and the real servers are on different subnets but can still communicate, because the router is configured with interfaces in both subnets. Traffic from the ServerIron ADX to the real servers goes to the router, which routes the traffic to the real servers subnet. (The traffic passes back through the ServerIron ADX to reach the real servers, but still must be routed by the router.) Traffic from the real servers to the ServerIron ADX passes through the ServerIron ADX to the router. The ServerIron ADX acts like a Layer 2 bridge in this case and passes the traffic to the router. The router then routes the traffic to the ServerIron ADXs sub-net. If you have network topology similar to the example in Figure 59, but you do not want to configure the router with multiple subnets, you can instead enable source NAT and configure a source IP address on the ServerIron ADX. The source IP address allows the ServerIron ADX to be in multiple subnets, in addition to the sub-net of the ServerIron ADXs management IP address. Source NAT enables the ServerIron ADX to perform IP address translation on the source address in packets
456
addressed to the real servers. When source NAT is enabled, the ServerIron ADX changes the source address in the IP packets addressed to the real server and alters it to match the source IP address configured on the ServerIron ADX. Figure 60 shows an example of the topology shown in Figure 59, although in this case the ServerIron ADX is configured for multiple subnets instead of the router.
FIGURE 60
ServerIron ADX and real servers in multinetted environment ServerIron ADX configured for source NAT
SI
-management IP address 141.149.65.10 -VIP 141.149.65.2 - source IP address 10.10.10.5 - source IP address 10.10.10.6 - source IP address 10.10.10.7 - source IP address 10.10.10.8 - source NAT enabled rs2 10.10.10.3
In this example, the ServerIron ADX is configured with source IP addresses in the real servers subnet, and source NAT is enabled. The configuration requires five CLI commands. No reconfiguration of the router is required. The ServerIron ADX supports a maximum of 64,000 simultaneous connections on each source IP address. This maximum value is based on the architectural limits of IP itself. As a result, if you add only one source IP address, the ServerIron ADX can support up to a maximum of 64,000 simultaneous connections to the real servers. You can configure up to eight source IP addresses, for even more simultaneous connections to the real servers. To implement the configuration shown in Figure 60, enter commands such as the following.
ServerIronADX(config)# server source-ip 10.10.10.5 255.255.255.0 0.0.0.0 ServerIronADX(config)# server source-ip 10.10.10.6 255.255.255.0 0.0.0.0 ServerIronADX(config)# server source-ip 10.10.10.7 255.255.255.0 0.0.0.0 ServerIronADX(config)# server source-ip 10.10.10.8 255.255.255.0 0.0.0.0 ServerIronADX(config)# server source-nat ServerIronADX(config)# server real-name R1 10.10.10.2 ServerIronADX(config-rs-r1)# port http ServerIronADX(config-rs-r1)# exit ServerIronADX(config)# server real-name R2 10.10.10.3 ServerIronADX(config-rs-r2)# port http ServerIronADX(config-rs-r2)# exit ServerIronADX(config)# server virtual-name-or-ip VIP 209.157.22.88 ServerIronADX(config-vs-VIP1)# port http ServerIronADX(config-vs-VIP1)# bind http R1 http R2 http ServerIronADX(config-vs-VIP1)# exit
If a real server is not reachable from the ServerIron ADX at Layer 2 (does not respond to ARP requests), and if the router connecting the ServerIron ADX to the real server is not running proxy ARP, use the following command instead.
NOTE
457
server remote-name <name> <ip-addr> This command adds the server as a remote server. Alternatively, enable proxy ARP on the router connecting the ServerIron ADX to the real server.
Basic SLB with one VLAN and one virtual routing interface on page 458 Basic SLB with multiple subnets and multiple virtual routing interfaces on page 461
Basic SLB with one VLAN and one virtual routing interface
Figure 61 illustrates an SLB configuration with one VLAN and one virtual routing interface.
FIGURE 61
Basic SLB configuration with one VLAN and one virtual routing interface
Client Systems Remote Servers 10.2.24.26, 27 HTTP, SSL, FTP, DNS Gateway: 10.2.24.1 rs26 rs27
10.2.24.1/24
Router Port e1
206.65.1.1
OSPF AREA 0
SLB VIPs: HTTP: 206.65.1.100 SSL: 206.65.1.100 FTP: 206.65.1.101 MMS: 06.65.1.102 DNS: 206.65.1.103
Port 3/1
ve 1: 206.65.1.254/24
Port 4/5
ve 1: 164.128.1.254/24
Layer 2 Switch Real Servers 68.1.1.23, 24, 25 HTTP, SSL, FTP, DNS, MMS Gateway: 68.1.1.254 rs23 rs24 rs25
The following commands configure a virtual routing interface on VLAN 1 (the default VLAN), then configure IP addresses on the virtual routing interface.
ServerIronADX(config)# vlan 1 name DEFAULT-VLAN by port ServerIronADX(config-vlan-1)# router-interface ve 1 ServerIronADX(config-vlan-1)# exit
458
ServerIronADX(config)# interface ve 1 ServerIronADX(config-ve-1)# ip address 68.1.1.254 255.255.255.0 ServerIronADX(config-ve-1)# ip address 164.128.1.254 255.255.255.0 ServerIronADX(config-ve-1)# ip address 206.65.1.254 255.255.255.0 ServerIronADX(config-ve-1)# ip ospf area 0 ServerIronADX(config-ve-1)# exit ServerIronADX(config)# ip l4-policy 1 cache tcp 0 global ServerIronADX(config)# ip l4-policy 2 cache udp 0 global
The following list of commands configures OSPF and enables redistribution of static and connected routes into OSPF.
ServerIronADX(config)# router ospf ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# area 0 redistribution connected redistribution static exit
459
port ssl port http port http url "HEAD /" exit
460
Basic SLB with multiple subnets and multiple virtual routing interfaces
Figure 62 illustrates an SLB configuration with three VLANs and three virtual routing interfaces.
FIGURE 62
Basic SLB configuration with three VLANs and three virtual routing interfaces
Client Systems Remote Servers 10.2.24.26, 27 HTTP, SSL, FTP, DNS Gateway: 10.2.24.1 rs26 rs27
10.2.24.1/24
Router Port e1
206.65.1.1 OSPF AREA 0
SLB VIPs: HTTP: 206.65.1.100 SSL: 206.65.1.100 FTP: 206.65.1.101 MMS: 06.65.1.102 DNS: 206.65.1.103
VLAN 1 Default
Layer 2 Switch Real Servers 68.1.1.23, 24, 25 HTTP, SSL, FTP, DNS, MMS Gateway: 68.1.1.254 rs23 rs24 rs25
The following commands configure virtual routing interfaces on VLAN 1 (the default VLAN), VLAN 2, and VLAN 4 and configure IP addresses on the virtual routing interfaces.
ServerIronADX(config)# vlan 1 name DEFAULT-VLAN by port ServerIronADX(config-vlan-1)# router-interface ve 1 ServerIronADX(config-vlan-1)# exit ServerIronADX(config)# interface ve 1 ServerIronADX(config-ve-1)# ip address 206.65.1.254 255.255.255.0 ServerIronADX(config-ve-1)# ip ospf area 0 ServerIronADX(config-ve-1)# exit ServerIronADX(config)# ip l4-policy 1 cache tcp 0 global ServerIronADX(config)# ip l4-policy 2 cache udp 0 global ServerIronADX(config)# vlan 2 by port ServerIronADX(config-vlan-2)# untagged ethe 3/7 to 3/12 ethe 4/3 to 4/4 ServerIronADX(config-vlan-2)# router-interface ve 2 ServerIronADX(config-vlan-2)# exit ServerIronADX(config)# interface ve 2 ServerIronADX(config-ve-2)# ip address 68.1.1.254 255.255.255.0 ServerIronADX(config-ve-2)# ip ospf area 0 ServerIronADX(config-ve-2)# exit
461
Basic SLB with multiple subnets and multiple virtual routing interfaces
ServerIronADX(config)# vlan 4 by port ServerIronADX(config-vlan-4)# untagged ethe 3/13 to 3/24 ethe 4/5 to 4/8 ServerIronADX(config-vlan-4)# ip-subnet 164.128.1.0 255.255.255.0 name PrivateNet ServerIronADX(config-vlan-4)# static ethe 3/13 to 3/24 ethe 4/5 to 4/8 ServerIronADX(config-vlan-4)# router-interface ve 4 ServerIronADX(config-vlan-4)# exit ServerIronADX(config)# interface ve 4 ServerIronADX(config-ve-4)# ip address 164.128.1.254 255.255.255.0 ServerIronADX(config-ve-4)# ip ospf area 0 ServerIronADX(config-ve-4)# exit
The following list of commands configures OSPF and enables redistribution of static as well as connected routes into OSPF.
ServerIronADX(config)# router ospf ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# ServerIronADX(config-ospf-router)# area 0 redistribution connected redistribution static exit
462
port ssl port http port http url "HEAD /" exit
463