tcptr Command

Purpose

Configures or displays TCP Traffic Regulation (TR) policy information to control the maximum incoming socket connections for ports.

Syntax

tcptr -add < start port > < end port > < max connection > [ divisor ]

tcptr -delete < start port > < end port >

tcptr -show

Description

The tcptr command assigns a maximum limit of incoming TCP connections to a given network port or a range of ports. You can run this command to add new pools of connection resources to be shared collectively by incoming socket requests remotely accessing the AIX® TCP-layer.

The system automatically ensures that resources are shared across multiple remote IP addresses that are attempting to connect through TCP to a specific port. Root users can control system resources related to TCP Traffic Regulation (TR).

Note: Any TCP TR policies that are added using the tcptr command will not be activated unless the tcptr_enable network attribute is set to the value of 1 using the no command. These policies automatically persists after a system reboot, but they are not activated unless the network flag is enabled using the -p flag as shown in the following command:
no -p -o tcptr_enable=1

Flags

Item Description
-add Adds new TCP TR policies to the system. You should specify the maximum allowable connections for the current policy, the start port, and the end port with the -add flag. The start port and the end port can be the same port when a port range is not specified. Optionally, you can specify a divisor to allow a greater diversity of resource sharing on the pool of available TCP connections.
-delete Deletes existing TCP TR policies that are defined for the system. This flag requires the user specify the maximum allowable connections for the current policy, the start port, and the end port (can be the same as start port if not specifying a port-range).
-show Displays all existing TCP TR policies defined on the system. You might use the -show flag to see the active policies before you use the -delete flag.

Parameters

Item Description
max connection Specifies the maximum incoming TCP connections for the given TR policy.
start port Specifies the beginning port for the current TR policy.
end port Specifies the end port for the current TR policy. If the port is a range, the value specified must be larger than the start port. If the TR policy is for a single port, the value specified must be equal to the value specified for the start port.
divisor Specifies a divisor to compare the number of available incoming TCP connections with the number of consumed incoming TCP connections for an IP, and corresponds to a division of the overall available connections by a power of two. The divisor is the power of two that is used in the division. This parameter is optional, and if it is not specified, the default value is one. In that case, half of the number of available connections are used.

Examples

  1. To add a TCP Traffic Regulation Policy that covers only TCP port 23, and to set a maximum incoming connection pool of 256 with an available connections divisor of 3, enter the following command:
    # tcptr -add 23 23 256 3
  2. To add a TCP Traffic Regulation Policy that covers a TCP port that ranges from 5000 to 6000, and to set a maximum incoming connection pool of 5000 with an available connections divisor of 2, enter the following command:
    # tcptr -add 5000 6000 5000 2
  3. To show TCP Traffic Regulation Policies set for the system, enter the following command:
    # tcptr -show
  4. To delete the TCP Traffic Regulation Policy that covers a TCP port that ranges from 5000 to 6000, enter the following command:
    # tcptr -delete 5000 6000