Client IP address in TCP option
-
final ACK packet of the three-way handshake
-
first data packet.
-
Learning original client IP address
-
Selecting a language for a website
-
Block listing the selected IP addresses
-
Insert. In insert mode, the appliance adds the client details in the TCP option 28 (configurable but the preferable value is 28) field and sends it to the back-end server.
-
Forward. In forward mode, the virtual server receives the client IP details in the TCP option from a proxy device. For the virtual server, you must configure the same TCP option, which the proxy device has used to send the client IP details.The appliance then sends the client details in the TCP option field to the back-end server. For the service representing the back-end server, you can set any TCP option but the preferable value is 28.
-
Multiplexing is not supported for the received traffic on a virtual server if the Client IP TCP option is enabled on the bound TCP profile.
-
For a TCP or HTTP virtual server, the TCP option number is forwarded with or without this feature enabled in transparent mode.
Limitations
How TCP option configuration in a NetScaler appliance
-
A client sends a request to NetScaler.
-
In the Insert operation, the NetScaler appliance inserts the client IP address and port in the configured TCP option of the following packets to the back-end server.
-
final ACK packet of the three-way handshake
-
first data packet
Note:If the incoming traffic is HTTPS, the client IP address and the client port in the TCP option is sent in the SSL client hello message, which is the first data packet at the TCP level. -
-
A client sends a HTTP/HTTPS request to the NetScaler appliance.
-
For the Forward operation, the TCP option is enabled on a load balancing virtual server or a content switching virtual server and also enabled on the service. The appliance receives the client details in the TCP option number specified in the virtual server.
-
The NetScaler appliance then inserts the client IP address and port in the configured TCP option (for the service) of the following packets to the back-end server.
-
final ACK packet of the three-way handshake
-
first data packet
-
Configure TCP option for Insert operation
-
Configure a TCP profile. Enable the Client IP TCP option (
clientIpTcpOption), and specify the TCP option number (clientIpTcpOptionNumber). Optionally, enable thesendClientPortInTcpOptionto send the client port in the TCP option header.Note:Citrix® recommends configuring TCP option number as 28 in the TCP profile. -
Bind the TCP profile to a service
-
add tcpprofile <name> -clientIpTcpOption (ENABLED | DISABLED) -clientIpTcpOptionNumber <positive_integer> -sendClientPortInTcpOption (ENABLED | DISABLED) -
show tcpprofile <name>
-
set service <name> –tcpprofileName <name> -
show service <name>
Sample configuration
add tcpprofile TCP-PROFILE-1 -clientIpTcpOption ENABLED -clientIpTcpOptionNumber 28 -sendClientPortInTcpOption ENABLED
set service SERVICE-1 –tcpprofileName TCP-PROFILE-1
Configure the TCP option for Forward operation
-
Configure a TCP profile. Enable the Client IP TCP option (
clientIpTcpOption), and specify the TCP option number (clientIpTcpOptionNumber). -
Bind the TCP profile to a load balancing or content switching virtual server
-
Bind the TCP profile to the services.
-
add tcpprofile <name> -clientIpTcpOption (ENABLED | DISABLED) -clientIpTcpOptionNumber <positive_integer> -
show tcpprofile <name>
-
set lb vserver <name> -tcpprofileName <name> -
show lb vserver <name>
-
set service <name> -tcpprofileName p1 -
show service <name>
Sample configuration
add tcpprofile TCP-PROFILE-2 -clientIpTcpOption ENABLED -clientIpTcpOptionNumber 29
set lb vserver LBVS-2 –tcpprofileName TCP-PROFILE-2
set service SERVICE-2 -tcpprofileName TCP-PROFILE-2
Configure TCP option by using NetScaler GUI
-
Navigate to System > Profiles.
-
In the TCP Profile tab page, click Add.
-
In the Configure TCP profile page, configure the following parameters:
-
clientIptcpoption. Enables the TCP option to send or receive client IP address.
-
clientiptcpoptionnumber. Sets TCP option number.
-
sendClientPortInTcpOption Sends client port in the TCP option for insert mode configuration.
-
-
Click OK and Close.