A P P E N D I X  B

Tutorial and Examples

This appendix provides a tutorial for configuring the Sun Fire B10n blade. It includes the following sections:


Exporting and Importing a Configuration

A maximum of two load balancing configurations can be stored in the B10n blade. You can export any or all of this configuration to a remote host. You can also import a configuration residing on a remote host onto the B10n blade.

Exporting a Configuration

Before exporting a configuration directory, the right directory needs to be compressed using the tar command. The following table shows the files or directories to be compressed and exported as needed.

TABLE B-1 Files and Directories to be Compressed and Exported

Configuration to Export

File or Directory to Compress

All

/RFA0/CONFIG

LB Config 1

/RFA0/CONFIG/config_1

LB Config 2

/RFA0/CONFIG/config_2

Failover Config

/RFA0/CONFIG/FAILOVER

Boot Options

/RFA0/CONFIG/boot_options.conf

Users

/RFA0/CONFIG/users.conf

Aliases

/RFA0/CONFIG/aliases.conf



procedure icon  To Export the Entire Configuration

1. As admin, type the following command:

puma{admin}# cd /RFA0

2. Compress the file:

puma{admin}# tar B10nconfig.tar CONFIG

3. Enter the export file command and respond to the prompts:

puma{admin}# export file 
The FTP server address: <ftp_server_ip>
The source directory path: type [cr] to use current 
directory:
(null) source path, using current directory
The source file name: B10nconfig.tar
The destination directory path: <path_on_ftp_server>
The destination file name: B10nconfig.tar
The user name: <user_name_for_ftp_server>
The user password: <user_password_for_ftp_server>
 
export file succeed!


procedure icon  To Import the Entire Configuration

1. As admin, type the following command:

puma{admin}# cd /RFA0

2. Enter the import file command and respond to the prompts:

puma{admin}# import file
The FTP server address: <ftp_server_ip>
The source directory path: type [cr] to use current 
directory:
(null) source path, using current directory
The source file name: B10nconfig.tar
The destination directory path: <path_on_ftp_server>
The destination file name: B10nconfig.tar
The user name: <user_name_for_ftp_server>
The user password: <user_password_for_ftp_server>
 
import file succeed!

3. Uncompress the file:

puma{admin}# untar B10nconfig.tar 

4. Reboot the system for the new configurations to take effect.



Caution - Do not do a commit before reboot because that would overwrite the imported configuration in flash with the one in memory.




Configuring Layer 4 and Layer 7 Load Balancing

Setting the Networking Configurations

Use the following procedures to set up the networking configurations.


procedure icon  To Configure the IP Addresses

1. As admin in config mode, configure the IP address on interface 0:

puma(config){admin}# ip interface 0 192.50.50.134 mask 255.255.255.0

2. As admin in config mode, configure the IP address on interface 1:

puma(config){admin}# ip interface 1 192.50.50.135 mask 255.255.255.0


procedure icon  To Configure the Default Gateway

single-step bulletAs admin in config mode, configure the default gateway:

puma(config){admin}# default gateway 192.50.50.200


procedure icon  To Configure the DNS Server

single-step bulletAs admin in config mode, configure the primary DNS server:

puma(config){admin}# dns server 192.50.50.100 primary


procedure icon  To Configure DNS Suffix

single-step bulletAs admin in config mode, configure the DNS suffix:

puma(config){admin}# dns suffix mycompany.com

Configuring a Basic Layer 4 Service Without Rules


procedure icon  To Create a Layer 4 Service

1. As admin in config mode, configure a Layer 4 service:

puma(config){admin}# service name svcL4 vip 199.99.9.1:80:tcp interface 0

2. Verify that the service is configured:

puma(config){admin}# show service svcL4 


procedure icon  To Add Two blade servers to the Default Load Balancing Group for the Service

1. As admin in config mode, configure the default server:

puma(config){admin}# service lb-group default svcL4 server 192.50.50.10:80:tcp:5:1 192.50.50.11:80:tcp:2:0

2. Set the standby server to active:

puma(config){admin}# modify service lb-group server svcL4:default server 192.50.50.11:80:tcp mode active

3. Verify that the servers are configured in the service:

puma(config){admin}# show service-lb-group svcL4 default

4. Enable this service:

puma(config){admin}# enable service name svcL4

5. Configure the VIP 199.99.9.1 on the loopback interface of the blade servers 192.50.50.10 and 192.50.50.11. Install the blade server load balancing packages and configure the blade server for load balancing. Refer to Configuring the Blade Servers.



Note - Now you can run traffic from clients to the Layer 4 service 199.99.9.1 and it is going to be load balanced between the 2 blade servers 192.50.50.10 and 192.50.50.11 in a round-robin (default load balancing scheme) fashion.




procedure icon  To Add Another Server to the Default Load Balancing Group

1. As admin in config mode, add another server to the default load balancing group:

puma(config){admin}# service lb-group server svcL4:default server 192.50.50.12:80:tcp:1:1

2. Verify that the server was added:

puma(config){admin}# show service-lb-group svcL4 default

3. Configure the VIP 199.99.9.1 on the loopback interface of the blade servers 192.50.50.12.



Note - Now you can run traffic from clients to the Layer 4 service 199.99.9.1 and it is going to be load balanced between the 3 blade servers 192.50.50.10, 192.50.50.11 and 192.50.50.12 in a round-robin (default load balancing scheme) fashion.




procedure icon  To Remove a Server From the Default Load Balancing Group

1. As admin in config mode, remove a server from the default group:

puma(config){admin}# remove service lb-group server svcL4:default server 192.50.50.10:80:tcp

2. Verify that the server has been removed:

puma(config){admin}# show service-lb-group svcL4

Configuring a Basic Layer 4 Service With Rules


procedure icon  To Configure a Layer 4 Service with Layer 4 (IP) Rule

1. As admin in config mode, add a Layer 4 rule to the system:

puma(config){admin}# ip-rule IP1 rule 192.50.50.200:3442 mask 255.255.255.240:0

2. Verify that the rule was added:

puma(config){admin}# show rule

3. Create a Layer 4 service:

puma(config){admin}# service name svcL4-r vip 199.99.9.2:80:tcp interface 0

4. Verify that the service was created:

puma(config){admin}# show service svcL4-r 

5. Add two blade servers to the default load balancing group for the service:

puma(config){admin}# service lb-group default svcL4-r server 192.50.50.10:80:tcp:1:1 192.50.50.11:80:tcp:1:1

6. Configure the VIP 199.99.9.2 on the loopback interface of the blade servers 192.50.50.10 and 192.50.50.11.

7. Associate the Layer 4 service with a rule and a group of servers:

puma(config){admin}# service lb-group name IP-GRP service svcL4-r server 192.50.50.13:80:tcp:5:1 192.50.50.14:80:tcp:5:1 rule IP scheme wt-round-robin

8. Configure VIP 199.99.9.2 on loopback interfaces of server 192.50.50.13 and 192.50.50.14.

9. Verify that the service is configured:

puma(config){admin}# show service svcL4-r

10. Enable the service:

puma(config){admin}# enable service name svcL4-r

11. Build the rules:

puma(config){admin}# build rules



Note - Don't run traffic to this service yet, wait for the build to return with completion status.



12. Check the build status:

puma(config){admin}# show build status

When the build is completed, the completion message is printed out. Once you receive the completion message, you are ready to run traffic.

You can now run traffic from clients to the Layer 4 service 199.99.9.2 and the load is balanced between the blade servers in the following fashion depending on the source IP address and Layer 4 port.

Configuring a Basic Layer 7 Service


procedure icon  To Configure a Basic Layer 7 Service Without Rules

1. As admin in config mode, create a Layer 7 service:

puma(config){admin}# service name svcL7 vip 199.99.9.3:80:tcp interface 0 lb-layer 7 L7-proto http

2. Add 2 servers to the default group

puma(config){admin}# service lb-group default svcL7 server 192.50.50.15:80:tcp:10:1 192.50.50.16:80:tcp:10:1 scheme wt-round-robin

3. Enable the service:

puma(config){admin}# enable service name svcL7

4. Configure the VIP 199.99.9.3 on the loopback interface of the blade servers 192.50.50.15 and 192.50.50.16.

 



Note - You can now run traffic from client(s) to the Layer 7 service 199.99.9.3. The service is load balanced between the two blade servers 192.50.50.15 and 192.50.50.16 in the default load balancing group in a weighted round-robin fashion.




procedure icon  To Configure a Layer 7 Service with Layer 7 Rules

1. As admin in config mode, add a Layer 7 rule to the system:

puma(config){admin}# http-rule HTML dynamic string *.html

2. Verify that the rule was added:

puma(config){admin}# show rule 

3. Create a Layer 7 service:

puma(config){admin}# service name svcL7-r vip 199.99.9.4:80:tcp interface 0 lb-layer 7 L7-proto http

4. Add two servers to the default group:

puma(config){admin}# service lb-group default svcL7 server 192.50.50.10:80:tcp:1:1 192.50.50.13:80:tcp:1:1

5. Associate the Layer 7 service with a rule and a group of servers:

puma(config){admin}# service lb-group name URL-GRP service svcL7-r server 192.50.50.11:80:tcp:5:1 192.50.50.12:80:tcp:5:1 rule HTML scheme wt-round-robin

6. Verify that the service was configured:

puma(config){admin}# show service svcL7-r

7. Enable the service:

puma(config){admin}# enable service name svcL7-r

8. Configure the VIP 199.99.9.4 on the loopback interface of the blade servers 192.50.50.10, 192.50.50.13, 192.50.50.11 and 192.50.50.12.

9. Build the rules:

puma(config){admin}# build rules



Note - Don't run traffic to this service yet, wait for the build to return with completion status.



10. Check the build status:

puma(config){admin}# show build status

When the build is completed, the completion message is printed out. Now we are ready to run traffic.

You can now run traffic from client(s) to the Layer 7 service 199.99.9.4. The service is load balanced between the blade servers in the following fashion depending on the URL of the HTTP request:

11. Add a CGI rule to the system:

puma(config){admin}# http-rule CGI cgi string server=*1

12. Associate the Layer 7 service with the CGI rule and a group of servers:

puma(config){admin}# service lb-group name CGI-GRP service svcL7-r server 192.50.50.14:80:tcp:5:1 192.50.50.15:80:tcp:5:1 rule CGI scheme wt-round-robin

13. Configure the VIP 199.99.9.4 on the loopback interface of the blade servers 192.50.50.14 & 192.50.50.15.

14. Add a Cookie rule to the system:

puma(config){admin}# http-rule COOKIE cookie string server=server1

15. Associate the Layer 7 service with the Cookie rule and a group of servers:

puma(config){admin}# service lb-group name CK-GRP service svcL7-r server 192.50.50.16:80:tcp:5:1 192.50.50.17:80:tcp:5:1 rule COOKIE scheme wt-round-robin

16. Configure the VIP 199.99.9.4 on the loopback interface of the blade servers

Rules do not take effect until you issue a build rules command.

17. Build the rules:

puma(config){admin}# build rules

After the build returns with the completion message, you can run traffic to this service in the following manner:


Configuring a Layer 7 Service with SSL



Note - If you plan to load balance SSL traffic using one or more SSL proxy blades with the Sun Fire B10n content load balancing blade, you MUST use VLANs on the Sun Fire B10n blade, the Sun Fire B100s, and the SSL proxy blades. Also note that a router is also required for the SSL proxy blade setup. Please refer to Setting Up VLAN and The Role of VLANs.




procedure icon  To Create SSL Devices

1. Add an SSL Device.

puma(config){admin}# ssl name ssl_dev1 192.50.50.100

2. Add a Port Pair to the SSL Device.

puma(config){admin}# ssl port-pair ssl_dev1 secureport 443 clearport 880
 

3. Enable the SSL Device.

puma(config){admin}# enable ssl name ssl_dev1

4. Check the SSL device configuration.

puma{admin}# show ssl ssl_dev1
SSL Device Name                      : ssl_dev1
Enabled/Disabled                     : Enabled
Port pairs (Secure / Clear)          : 443:880
 
Interface Table:
==============================================================================
If     Host Name/IP                              Status  MAC              
------------------------------------------------------------------------------
0      192.50.50.100                             Up      00:50:c2:0b:1c:18
==============================================================================

If you have an additional SSL device that needs to be created, repeat steps 1 to 4.

5. List SSL devices.

puma(config){admin}# show ssl
 
SSL Device Table:
==============================================================================
SSL Device Name                           Port Pair    Status    Ifs  
------------------------------------------------------------------------------
ssl_dev1                                  443:880      Enabled   0     
==============================================================================

If more than 1 SSL devices was created, the additional SSL devices should be listed under this command also.


procedure icon  To Create a Load Balancing Service with SSL

1. As admin in config mode, create a Layer 7 service with SSL:

puma(config){admin}# service name svcL7-SSL vip 199.99.9.4:443:tcp ssl 880 interface 0 LB-layer 7 L7-proto http 

2. Add servers to default group:

puma(config){admin}# service lb-group default svcL7-SSL server 
192.50.50.17:443:tcp:10:1 192.50.50.18:443:tcp:10:1 scheme wt-round-robin


procedure icon  To Add SSL Device to Service

1. Add the SSL device to the service:

puma(config){admin}# service ssl svcL7-SSL ssl ssl_dev1:active

2. Check the service to see if the SSL device has been added.

puma(config){admin}# show service svcL7-SSL
 
Service Information:
	Name                                     : svcL7-SSL
	VIP:port:protocol                        : 199.99.9.4:443:TCP
	Load Balancing Layer/Protocol            : L7/(http)
	Status                                   : Enabled
	Active                                   : Yes
	VLAN ID and Status                       : 
	QoS Class                                : Not Supported
	IP persistence                           : Not configured
 
	TCP Timestamp option                     : No
	TCP SACK option                          : No
	TCP MSS option                           : 1460
	TCP Window scale factor                  : 0
	TCP Starting Window                      : 1460
	TCP handoff max OPEN retries             : 5
	DoS Defense                              : Not Supported
	Service Tracking                         : Not Configured
	SSL                                      : Configured
	Cookie Persistence                       : Not Configured
 
End Points Table:
==============================================================================
VIP                                      Port  Protocol   If    Type       
------------------------------------------------------------------------------
199.99.9.4                           		 443   TCP        0     SSL        
199.99.9.4                           	 880   TCP        0     Decrypted  
==============================================================================
 
 
*----------*----------*----------*----------*----------*----------*----------*
 
SSL Group:
==========
Name                                     : ssl
Scheme                                   : static
Total and Active servers                 : 1 / 1
Decrypted Port                           : 880
 
Group Server Table:
==============================================================================
SSL Device Name                           If     Status         
------------------------------------------------------------------------------
ssl_dev1                                  0      UP/EN/ACT      
==============================================================================
 
 
*----------*----------*----------*----------*----------*----------*----------*
 
Server Group:
=============
Name                                     : default
Scheme                                   : wt-round-robin
Total and Active servers                 : 2 / 2
Rules in group                           : 0
 
Group Server Table:
==============================================================================
Server Name                               Port   Wt   Status      App     Conf
------------------------------------------------------------------------------
192.50.50.17                              0     10    UP/EN/ACT   UP/EN   Done
192.50.50.18                              0     10    UP/EN/ACT   UP/EN   Done
==============================================================================

3. Enable the service:

puma(config){admin}# enable service name svcL7-SSL


procedure icon  To Configure a Service for IP Persistence

1. As admin in config mode, add IP persistence to a service:

puma(config){admin}# service ip-persist svcL4-r mask 8 timeout 20

This adds IP persistence to the service where the source IP mask is specified as 8 bits and the inactivity timeout is specified as 20 minutes.

You can now run traffic from client 192.50.50.200, and depending on the rules, it is load balanced to a particular blade server, for example, server 192.50.50.13.

Any subsequent traffic from any client in the subnet 192.50.50.0 is sent back to the same server, that is, 192.50.50.13, without any load balancing. Thus the service is now "persistent" for the subnet 192.50.50.0. If no traffic is received from the 192.50.50.0 subnet for svcL4-r for 10 minutes, then the persistence expires. Now the first connection from a client in the 192.50.50.0 subnet, say 192.50.50.185, is load balanced again and it goes to server 192.50.50.11.



Note - Short timeout values do not have the expected result. Timeout values should be at least 15-20 minutes, and the granularity of timing out entries is in the order of 10 minutes.




procedure icon  To Remove IP Persistence From a Service

single-step bulletAs admin in config mode, remove IP persistence from a service:

puma(config){admin}# no service ip-persist svcL4-r


procedure icon  To Configure a Service for Tracking

single-step bulletAs admin in config mode, add port tracking to a service:

puma(config){admin}# service tracking svcL7-r track 0:443:tcp timeout 20

This example adds port tracking to the service where the tracking port is specified as 443 and the inactivity timeout is specified as 20 minutes.

Now when you run traffic from client 192.50.50.200, depending on the request, it is load balanced to a particular back end server, for example, server 192.50.50.13. Any subsequent traffic from the same client destined to the VIP 199.99.9.4 and port 443 is sent back to the same server, that is, 192.50.50.13, without any load balancing. Thus the traffic to port 443 now tracks the primary service. If no traffic is received from 192.50.50.200 for svcL7-r on port 443 for 20 minutes, then the tracking expires. Now the first connection from 192.50.50.200 to the VIP 199.99.9.4 and port 80 will be load balanced to say server 192.50.50.10 and any subsequent connections from the same client, destined to either 199.99.9.4:80 or 199.99.9.4:443 go back to the same server.


procedure icon  To Remove Port Tracking

single-step bulletAs admin in config mode, remove port tracking:

puma(config){admin}# remove service tracking svcL7-r track 0:443:tcp


procedure icon  To Add an End Point Tracking to a Service

1. As admin in config mode, add an end point tracking to a service:

puma(config){admin}# service tracking svcL7-r track 199.99.9.5:8080:tcp timeout 30

This example adds end point tracking to the service where the tracking end point is specified with IP 199.99.9.5, port 8080 and protocol TCP, and the inactivity timeout is specified as 30 minutes.

2. Configure the end point VIP 199.99.9.5 on the loopback interface of all the blade servers.

Now when you run traffic from client 192.50.50.200, depending on the request, it is load balanced to a particular blade server, for example server 192.50.50.13. Any subsequent traffic from the same client destined to the vip 199.99.9.5 and port 8080 is sent back to the same server, that is, 192.50.50.13, without any load balancing. Thus the traffic to end point 199.99.9.5:8080:tcp now tracks the primary service. If no traffic is received from 192.50.50.200 for end point 199.99.9.5:8080:tcp for 30 minutes, then the tracking expires.

Now the first connection from 192.50.50.200 to the VIP 199.99.9.4 and port 80 will be load balanced to say server 192.50.50.10 and any subsequent connections from the same client, destined to either 199.99.9.4:80 or 199.99.9.5:8080 go back to the same server.


procedure icon  To Remove End Point Tracking

single-step bulletAs admin in config mode, remove end point tracking:

puma(config){admin}# remove service tracking svcL7-r track 199.99.9.5:8080:tcp

Port tracking and end point tracking can also be added to a service configured with IP persistence in which case the tracking will be valid for any client from the subnet (as specified by the persistence mask) instead of one particular client.


procedure icon  To Configure a Service for Cookie-Based Persistence

single-step bulletAs admin in config mode, enter the following command:

puma(config){admin}# service cookie-persist svcL7-r cookie PERSIST offset 3 delim : 

The cookie is set by the server on the client using the header
Set-cookie: PERSIST=xyzc03232axyz;\r\n

The client when it makes the next request sends this cookie in the header
Cookie: PERSIST=xyzc032320axyz;\r\n

If the cookie persistence is set as shown above, then the content load balancing blade parses and finds the string 'c032320a' in the cookie. The name is PERSIST and the offset is 3. The offset specifies how many bytes into the value to look for to find the start of the cookie. If the cookie matches the server the request is sent to server 192.50.50.10.

Currently, the delimiter value is ignored. If this configuration is saved and retrieved, the delimiter value is always set to ':'.


procedure icon  To Remove Cookie Persistence from a Service

single-step bulletAs admin in config mode, enter the following command:

puma(config){admin}# remove service cookie-persist svcL7-r PERSIST 


procedure icon  To Configure a UDP Service

The following restrictions apply to a UDP services:



Note - A UDP end point can be added for port/end-point tracking to a TCP service



1. As admin in config mode, create a Layer 4 service:

puma(config){admin}# service name svcudp vip 199.99.9.1:90:udp interface 0

2. Verify that the service was created:

puma(config){admin}# show service svcudp 

3. Add two blade servers to the default load balancing group for the service:

puma(config){admin}# service lb-group default svcudp server 192.50.50.18:90:udp:1:1 192.50.50.19:90:udp:1:1 scheme static

4. Enable this service:

puma(config){admin}# enable service name svcudp

You can now run UDP traffic from clients to the UDP service 199.99.9.1 on port 90 and it is load balanced between the two blade servers 192.50.50.18 and 192.50.50.19 in a static fashion. With the current implementation of the static load balancing algorithm, all UDP traffic from the same client IP will go to the same server, as long as the server is available. If the server becomes unavailable, then the new traffic goes to the next available server.



Note - It is possible to add Layer 4 IP rules to a UDP service just like any other Layer 4 service.




procedure icon  To Configure an FTP Service

FTP service configuration on the Sun Fire B10n blade has the following restrictions:

When configuring an FTP service ensure the following:

1. As admin in config mode, create an FTP service:

puma(config){admin}# service name svcftp vip 199.99.9.1:21:tcp interface 0 lb-layer 4 L7-proto ftp

2. Verify that the service was created:

puma(config){admin}# show service svcftp 

3. Add two blade servers to the default load balancing group for the service:

puma(config){admin}# service lb-group default svcftp server 192.50.50.14:21:tcp:1:1 192.50.50.15:21:tcp:1:1 scheme wt-round-robin

4. Configure the VIP 199.99.9.1 should be configured on the loopback interface of the blade servers 192.50.50.14 and 192.50.50.15.

5. Add IP persistence with mask length 0:

puma(config){admin}# service ip-persist svcftp mask 0 timeout 20



Note - Short timeout values do not have the expected result. Timeout values should be at least 15-20 minutes, and the granularity of timing out entries is in the order of 10 minutes.



6. Enable this service:

puma(config){admin}# enable service name svcftp

You can now run FTP client(s) from client machine(s) to the FTP service on 199.99.9.1 and the FTP sessions will be load balanced between the 2 blade servers 192.50.50.14 and 192.50.50.15 in a weighted round robin fashion (for different client IPs as client persistence is set).



Note - It is possible to add L4 (IP) rule(s) to an FTP service just like any other Layer 4 service.




procedure icon  To Add an End Point to a Service to Make it Multi-homed

1. As admin in config mode, add an end point to a service:

puma(config){admin}# service point svcL4 point 199.99.9.30:80:tcp:0:0:0

This command adds an end point with VIP 199.99.9.30, port 80 and protocol TCP to the service svcL4. This end point inherits all properties of the service.

2. Configure the VIP for the new end point, that is, 199.99.9.30 in this case, on the loopback interface of all the blade servers included in the service (svcL4 in this case).

3. If your service has an SSL device (B10p), add another service with the VIP for the new end point.

CLI# create service

Enter a new service name when prompted and the VIP for the new end point.


Setting Up VLAN

For this example, assume the following:

Set Up on the Switch

The Sun Fire B10n blade and all servers for the service must be members for all three VLANs mentioned above. The ports must be set up to forward traffic on these VLANs tagged.

Refer to the Sun Fire B1600 Blade System Chassis Software Setup Guide for the mechanism to set up the switch.

First, the VLAN database must be edited to include the VLANs to be used in the service.

Then, the port membership rules are set using the interface switch port setup.



Note - By default, VLAN 1 is forwarded on the ports untagged. In this example, the client side VLAN is forwarded tagged.




procedure icon  To Set Up VLAN on the Server

The server must also be a member of all VLANs mentioned above. The management VLAN is used to exchange configuration messages between the content load balancing blade and the blade server. VLAN is also used for server health monitoring.

The service VLAN is used for all data plane traffic between the content load balancing blade and the blade server.

The route from the server to the client network must use the client side VLAN. For security reasons, the server cannot bind any services to its IP address on this interface.

1. Configure the client side VLAN interface:

# ifconfig ce21000 plumb 10.10.10.10 netmask 255.255.255.0 up


2. Configure the management VLAN interface:

# ifconfig ce22000 plumb 192.50.50.201 netmask 255.255.255.0 up

3. Configure the service VLAN interface:

# ifconfig ce25000 plumb 110.10.10.10 netmask 255.255.255.0 up

4. Configure the VIP on the loopback interface:

# ifconfig lo0:1 plumb 199.99.9.1 netmask 255.255.255.0 up

The IP address on the service VLAN is never used in any traffic, however, a valid IP address must be configured.

5. Add all three interfaces to the load balanced interfaces:

# /opt/SUNWclb/bin/clbconfig add ce21000
# /opt/SUNWclb/bin/clbconfig add ce22000
# /opt/SUNWclb/bin/clbconfig add ce25000

6. Verify that the route to the default gateway uses interface ce21000.

# netstat -r

The netstat -r command displays the routing table, including the default route.

7. Set the default route:

# route add default 10.10.10.10 0

Remove any other default route shown by netstat -r. Note that there are other ways to set the default route to use this interface. See the Solaris Administration Guide.



Note - If the physical interface used were connected to SSC1, the virtual interfaces would be ce21001, ce22001, and ce25001, respectively.



The interface number for VLAN n on physical interface i is determined by the following formula: 1000 * n + i

Hence, the interface name for VLAN 123 on physical interface ce0 is ce123000


procedure icon  To Set Up VLAN on a Load Balancing Blade

First, set up a service as described in (relevant chapters). Assume that the name of the service is SVC1.

1. As admin, in config mode, set the service VLAN:

puma(config){admin}# management vlan 22

2. Enable the VLAN service:

puma(config){admin}# enable vlan management

3. Set the client side (default) VLAN:

puma(config){admin}# data vlan 21

4. Enable the client side VLAN:

puma(config){admin}# enable vlan data

5. Set the service VLAN:

puma(config){admin}# service vlan SVC1 vlan 25

6. Enable the service VLAN:

puma(config){admin}# enable service vlan SVC1

7. Enable the service:

puma(config){admin}# enable service name SVC1


Configuring Failover

This section provides a tutorial for configuring the blade failover and describes how to verify the basic failover functionality.

Preparation of Load Balancing Blades

Before starting any of the failover commands, verify that there are no service configurations on the load balancer that require to run on the standby blade. See List of Configuration Commands for service configurations that must be local to the standby blade.

On the load balancer to be configured as local, you might want to configure the service related configurations prior to enabling failover, so that all configurations will be propagated to the standby load balancer once the failover synchronization is complete. Alternately, the commit or the failover config-sync commands can be used later.

Configuring Basic Path Failover


procedure icon  To Add a Path Failover Target Address to Interface 0

single-step bulletAs admin, use the following command:

puma{admin}# config path-failover target interface 0 192.168.101.240


procedure icon  To Add a Path Failover Target Address to Interface 1

single-step bulletAs admin, use the following command:

puma{admin}# config path-failover target interface 1 192.168.101.241


procedure icon  To Enable Path Failover Monitoring

single-step bulletAs admin, use the following command:

puma{admin}# config enable path-failover


procedure icon  To Configure Path Failover Monitoring Parameters

single-step bulletAs admin, use the following command:

puma{admin}# config path-failover-monitor interval 5 max-try 5

In the preceding example, the path failover monitoring packet will be sent to the target address once in 5 seconds and will be retried 5 times before marking the interface as down.


procedure icon  To Show the Path Failover Status

single-step bulletAs admin, use the following command:

puma{admin}# show network
 
Default Gateway                          : Not Configured
Hostname                                 : puma
DNS Primary                              : Not Configured
DNS Secondary                            : Not Configured
DNS Suffix                               : Not Configured
Server monitor interval                  : 3
Server monitor max-try                   : 5
Path Failover Status                     : Enabled
Path Failover Target on interface 1      : 192.168.101.240 (Path Up)
Path Failover Target on interface 0      : 192.168.101.241 (Path Up)
Path Failover monitor interval           : 3
Path Failover monitor max-try            : 5
 
Network Interface Table:
==============================================================================
If     IP Address       Mask             MAC Address        Status  Link
------------------------------------------------------------------------------
0      192.168.101.251  255.255.255.0    00:03:ba:2c:73:a0  Up      Up  
1      192.168.101.254  255.255.255.0    00:03:ba:2c:73:a1  Up      Up  
==============================================================================
 
System VLAN Table:
==============================================================================
VLAN Type                                  VLAN ID      Status      
------------------------------------------------------------------------------
Management                                 18            Enabled     
Data                                       28            Enabled     
==============================================================================


procedure icon  To Disable Path Failover Monitoring

single-step bulletAs admin, use the following command:

puma{admin}# config no enable path-failover


procedure icon  To Remove a Path Failover Target Address on Interface 0

single-step bulletAs admin, use the following command:

puma{admin}# config remove path-failover interface 0


procedure icon  To Remove a Path Failover Target Address on Interface 1

single-step bulletAs admin, use the following command:

puma{admin}# config remove path-failover interface 1

Configuring Basic Blade Failover

Minimum Required Commands

The following set of minimum failover commands initially starts the failover. Each command must be entered from each load balancer in sequence in order for the failover monitoring and synchronization to work. The show failover command may be used to list the information about the current failover configuration, status, and state.

1. config failover peer {IP_address_0} {IP_address_1}

2. config enable failover-monitor

3. config failover start {local | remote}

Use the failover-monitor command to modify the default monitoring parameters.


procedure icon  To Set Up the Peer IP Addresses on Both Blades

single-step bulletUse the failover peer command:

puma-140(config){admin}# failover peer 192.50.50.142 192.50.50.143

puma-142(config){admin}# failover peer 192.50.50.140 192.50.50.141

 

procedure icon  To Enable Failover Monitoring on Both Blades

single-step bulletUse the enable failover-monitor command:

puma-140(config){admin}# enable failover-monitor

puma-142(config){admin}# enable failover-monitor

 

procedure icon  To Start Failover Synchronization on Both Blades

single-step bulletUse the failover start command:

puma-140(config){admin}# failover start local

puma-142(config){admin}# failover start remote

 

On each load balancer, Synchronizing Failover State ... will be displayed. Once the failover state is determined, Failover state is set to standby or Failover state is set to active will be printed.



Note - Enter the commit command if you want to save the failover configuration.





Note - The above three commands, failover peer, enable failover-monitor and failover start local (failover start remote) must be entered in sequence to ensure that the failover state synchronization will be started properly.




procedure icon  To Show the Configured Failover Information on Both Sides

single-step bulletUse the show failover command on the active peer:

puma-140(config){admin}# show failover
Failover Information
==============================================================================
 
Peer IP address                          : 192.50.50.142 192.50.50.143
Peer Mac address                         : 00:03:ba:2c:73:6e 00:03:ba:2c:73:6f
Failover monitor interval                : 5
Failover monitor max-try                 : 5
Number of times state changed to Active  : 1
Number of times state changed to Standby : 0
 
==============================================================================
State      Config Number Config Sync  Monitoring   Start/Stop   If0:If1   
------------------------------------------------------------------------------
Active     1             Sync         Enabled      Start        Up:Up     
==============================================================================
 
Peer Failover Information
==============================================================================
State      Config Number Config Sync  Monitoring   Start/Stop   If0:If1   
------------------------------------------------------------------------------
Standby    1             Sync         Enabled      Start        Up:Up     
==============================================================================
 
puma1{admin}# 

single-step bulletUse the show failover command on the standby peer:

puma-142(config){admin}# show failover
  
Failover Information
==============================================================================
 
Peer IP address                          : 192.50.50.140 192.50.50.141
Peer Mac address                         : 00:03:ba:2c:73:9c  00:03:ba:2c:73:9d
Failover monitor interval                : 5
Failover monitor max-try                 : 5
Number of times state changed to Active  : 0
Number of times state changed to Standby : 1
 
==============================================================================
State      Config Number Config Sync  Monitoring   Start/Stop   If0:If1   
------------------------------------------------------------------------------
Standby    1             Sync         Enabled      Start        Up:Up     
==============================================================================
 
Peer Failover Information
==============================================================================
State      Config Number Config Sync  Monitoring   Start/Stop   If0:If1   
------------------------------------------------------------------------------
Active     1             Sync         Enabled      Start        Up:Up     
==============================================================================
 
puma-142(config){admin}# 



Note - Config number -1, means failover state-file does not exist, or invalid state. Config number 0, means no configuration has been sync-ed up or initial state. Config number 1 (or higher), means both peers are sync-ed up.




procedure icon  To Disable Failover Monitoring on Either Blade

single-step bulletUse the no enable failover-monitor command:

puma-140(config){admin}# no enable failover-monitor



Note - To enable monitoring, enable failover-monitor must be entered on each blade.




procedure icon  To Stop Failover Synchronization on Both Blades

single-step bulletUse the failover stop command:

puma-140(config){admin}# failover stop

puma-142(config){admin}# failover stop

 

procedure icon  To Set Up the Failover Monitoring Parameters on the Active Blade

single-step bulletUse the failover-monitor command:

puma-140(config){admin}# failover-monitor interval 10 max-try 10


procedure icon  To Force the Standby to Active on the Active Blade

single-step bulletUse the failover force-failover command:

puma-140(config){admin}# failover force-failover


procedure icon  To Sync Up the Configurations on the Active Blade

single-step bulletUse the failover config-sync command:

puma-140(config){admin}# failover config-sync


procedure icon  To Remove the Failover State File on Either Blade

single-step bulletUse the erase failover state-file command:

puma-140(config){admin}# erase failover state-file

This command can be used to remove the failover state file if the two load balancer blades configured for failover goes out of sync for some reason. Erasing the state-file will initiate a synchronization process between the two blades. This command will not be allowed when both the load balancers are in sync. Also removing the failover configuration will remove this file automatically.

When removing the failover state-file, the Config number becomes -1 in the
show failover command output. Config number -1 indicates that the failover state-file does not exist. The following is an example:

puma-140{admin}#  config erase failover state-file 
erase : Are you sure to continue? [yes|no] yes
 
Failover State will be resynchronized. Do you want to continue? [yes/no] yes
Failover state file does not exist.
Success!


procedure icon  To Remove the Running Load Balancing Configuration on Either Blade

single-step bulletUse the erase failover config-lb-mem command:

puma-140(config){admin}# erase failover config-lb-mem


procedure icon  To Remove the Failover Configuration on Either Blade

single-step bulletUse the remove failover-config command:

puma-140(config){admin}# remove failover-config

Failover Synchronization and the commit Command

Use the show failover command on both load balancers to check the failover state and configuration file synchronization. If everything is configured properly, one blade should have a state of active while the other blade is set to standby. Both load balancers should have identical load balancing configurations.

You may run commands such as show service and show rule to confirm that both blades are configured identically.

If the commit command is executed on the active load balancer, the synchronization between these two active and standby load balancers will be done automatically.

If any of load balancing service related commands are issued on the active load balancer without being followed by the commit command, the standby load balancer will not be updated with any of those configurations.

Displaying Failover Module Information

Use the dump module failover command to dump the information regarding the failover module to the screen.

Use the dump module task command to dump information regarding the failover synchronization task and the failover monitoring task.


procedure icon  To Dump Monitoring Information

single-step bulletUse the dump module failover 1 command:

puma-140{admin}# dump module failover 1


procedure icon  To Dump the Ramdisk Directory

single-step bulletUse the dump module failover 2 command:

puma-140{admin}# dump module failover 2


procedure icon  To Dump Failover Information

single-step bulletUse the dump module failover 3 command:

puma-140{admin}# dump module failover 3


procedure icon  To Dump the Failover Synchronization Task

single-step bulletUse the dump module task 9 command:

puma-140{admin}# dump module task 9


procedure icon  To Dump the Failover Monitoring Task

single-step bulletUse the dump module task 10 command:

puma-140{admin}# dump module task 10