The rserver rip command adds a real server to a real server group.
The undo rserver rip command deletes a real server from a real server group.
rserver [ start-rserver-id [ to end-rserver-id ] ] rip rip-address [ max-connections max-connections-value | port port-number | status { inactive | health-check } | weight weight-value | description description-text ] *
rserver start-rserver-id { max-connections max-connections-value | port port-number | status { inactive | health-check } | weight weight-value | description description-text } *
undo rserver start-rserver-id [ to end-rserver-id ]
| Parameter | Description | Value |
|---|---|---|
| start-rserver-id | Specifies the ID of a start real server. |
The value is an integer ranging from 0 to 31. |
| end-rserver-id | Specifies the ID of an end real server. |
The value is an integer ranging from 0 to 31, and must be no less than the ID of the start real server. |
| rip rip-address | Specifies the IP address of a real server. |
The IP address is in dotted decimal notation. |
| max-connections max-connections-value | Specifies the maximum number of connections on a real server. |
The value is an integer ranging from 0 to 65535. |
| port port-number | Specifies the port number of a real server. |
The value is an integer ranging from 0 to 65535. If the port number is 0, no port translation is performed. In this case, the real server port is the same as the port of the virtual server by default. |
| inactive | Indicates the inactive status of a real server. |
- |
| health-check | Indicates health check for a real server. |
- |
| weight weight-value | Specifies the weight of a real server. |
The value is an integer ranging from 1 to 8192. The default value is 1. The sum of the weights of all real servers in a real server group must not exceed 8192. NOTE:
The weighted algorithm must be configured before the weights for real servers. |
| description-text | Specifies the description of a real server. |
The value is a string of 1 to 31 characters. |
If you do not set an ID for a real server when adding it to a real server group, the FW assigns an ID to the real server. When you modify the IP address, port number, weight, or status of a real server, specify the ID of the server. To check the ID of a real server, run the display slb command.
The rserver start-rserver-id to end-rserver-id rip rip-address command is used to add real servers in batch and set IDs for them. The IDs and IP addresses of the real servers increase in sequence, and the port numbers, weights, and server status are the same. For example, if the IP addresses of 10 real servers are 10.10.10.1 to 10.10.10.10, run the rserver 1 to 10 rip 10.10.10.1 command to add these servers in batch. The IP address of the real server with the ID of 1 is 10.10.10.1, the IP address of the real server with the ID of 2 is 10.10.10.2, and so on.
If the real server and virtual server have different port numbers, the FW changes the destination port number from the port number of the virtual server to the port number of the real server when processing service request packets. If the real server and virtual server have the same port number, the FW does not perform port conversion. In an unusual case, if the port number of the real server is set to 0, the FW does not perform port conversion, and the port number of the real server is that of the virtual server by default.
If a real server supports multiple types of services, set different port numbers for it when you add it to different real server groups.
If the service health check function needs to be configured and the protocol type of probe packets is not ICMP, you must run the rserver rip or rserver command to configure a port for the real server. Otherwise, the service health check result is inaccurate. If the probe protocol is TCP, configure a port for the real server based on the port number used to provide services. If the probe protocol is HTTP, DNS, or RADIUS (port number 1812), configure the port of the real server to a well-known port number.
By default, the weight of a real server is 1 and service health check is performed for the server (health-check). If you set a real server to inactive state (inactive), the FW does not check its health status and the server does not participate in traffic distribution. You can configure a real server to work in inactive state when it needs to perform an operation, such as system software upgrade. After the operation is complete, restore the server to health-check state.
# Add a real server to real server group grp1. The IP address of the real server is 10.10.10.1, and the port number is 10001.
<sysname> system-view [sysname] slb [sysname-slb] group 1 grp1 [sysname-slb-group-1] rserver rip 10.10.10.1 port 10001
# Add 10 real servers to real server group grp1. The IP addresses of the real servers are 10.10.10.1 to 10.10.10.10, and the port number is all 10001.
<sysname> system-view [sysname] slb [sysname-slb] group 1 grp1 [sysname-slb-group-1] rserver 1 to 10 rip 10.10.10.1 port 10001