• No results found

dest_addr

In document AlteonOS-30.1.0-AppShape++-Ref (Page 58-68)

hash

Description Implements persistency for a source IP address.

Input source IP address timeout (optional)

Full Syntax persist source_addr <IPv4 mask> | <IPv6 prefix> [<timeout>]

Valid Events All client-side events that run before LB_SELECTED.

Notes The command searches the persistency table for an entry that matches the provided session ID string, the current virtual service, and the selected group ID.

If found, traffic is forwarded to the server mentioned in the persistence entry.

If not found, an entry is created for future requests belonging to that session. The entry creation must take place after the server is selected.

Description Implements persistency for a destination IP address.

Input destination IP address timeout (optional)

Full Syntax persist dest_addr <IPv4 mask> | <IPv6 prefix> [<timeout>]

Valid Events All client-side events that run before LB_SELECTED.

Notes The command searches the persistency table for an entry that matches the packet destination address subnet (taking into consideration the provided subnet mask/prefix), the current virtual service, and the selected group ID.

If found, traffic is forwarded to the server mentioned in the persistence entry.

If not found, an entry is created for future requests belonging to that session. The entry creation must take place after the server is selected.

Description Implements persistency by performing hashing on the specified session ID string.

Input session ID

timeout (optional)

Full Syntax persist hash <session id> [<timeout>]

Document ID: RDWR-ALOS-SDK-V3010_RG1502 59

none

add

Valid Events All client-side events that run before LB_SELECTED.

Notes The command performs hashing on the provided string, and searches the persistency table for an entry that matches the hash result, the current virtual service and the selected group ID.

If found, traffic is forwarded to the server mentioned in the persistence entry.

If not found, an entry is created for future requests belonging to that session. The entry creation must take place after the server is selected.

Since hashing is performed on the session ID, multiple sessions result in the same hash value and use the same server.

Description Disables persistency for the current session.

Full Syntax persist none

Valid Events All client-side events that run before LB_SELECTED.

Description Adds a new persistency entry with the specified parameters and the currently selected server. Valid in server-side events.

Options Any group—Adds a session ID entry that can be used for all groups of the current virtual service.

Any service—Adds a session ID entry that can be used for all services of the current virtual server.

Any virtual—Adds a session ID entry that can be used for all virtual servers.

Group—Adds a session ID entry for the specified group.

-o—Outbound

Input mode (usid, hash, source_addr, dest_addr) value

timeout (optional) group id (optional)

Full Syntax persist add <mode> <value> | {<value> any virtual | any service | any group | group <group>}] [-o [-gid <group id>] [-pr

<port1,port2-port3>] ] [<timeout>]

Alias without -o—Server-side events without HTTP_CACHE_RESPONSE.

LB_SELECTED, LB_FAILED.

with -o—All transport events without HTTP_CACHE_RESPONSE.

Notes This command can be used only when group and server are already selected.

lookup

delete

Description Searches for the specified session entry, and returns the selected server.

Options All—Retrieves the group ID, server, and port.

Server—Retrieves the server ID.

Port—Retrieves the server port.

Group—Retrieves the group ID.

Any group—Retrieves the session ID for the current virtual service, irrespective of the group ID to which the entry belongs.

Any service—Retrieves the session ID for the current virtual server, irrespective of the service and group ID to which the entry belongs.

Any virtual—Retrieves the session ID irrespective of any virtual service and group parameter.

Group—Retrieves the session ID for the entries for the current virtual service and specified group.

Input mode (usid, hash, source_addr, dest_addr) value

timeout (optional) group id (optional)

Output Depending on the output option specified, one of the following:

Group ID, server, and port

Server only

Port only

Group ID only

Full Syntax persist lookup <mode> <value> | {<value> any virtual | any service

| any group | group <group>}] [all | server | port | group]

Valid Events All transport events without HTTP_CACHE_RESPONSE.

Description Deletes the specified session entry.

Options Any group—Retrieves the session ID for the current virtual service, irrespective of the group ID to which the entry belongs.

Any service—Retrieves the session ID for the current virtual server, irrespective of the service and group ID to which the entry belongs.

Any virtual—Retrieves the session ID irrespective of any virtual service and group parameter.

Group—Retrieves the session ID for the entries for the current virtual service and specified group.

Input mode (usid, hash, source_addr, dest_addr)

value

Document ID: RDWR-ALOS-SDK-V3010_RG1502 61

timeout

Full Syntax persist delete <mode> <value> | {<value> any virtual | any service

| any group | group <group>}]

Valid Events All transport events without HTTP_CACHE_RESPONSE.

Description Updates the timeout of the specified persistency entry.

Options notouch—When specified, the entry timestamp must not be updated.

Any group—Retrieves the session ID for the current virtual service, irrespective of the group ID to which the entry belongs.

Any service—Retrieves the session ID for the current virtual server, irrespective of the service and group ID to which the entry belongs.

Any virtual—Retrieves the session ID irrespective of any virtual service and group parameter.

Group—Retrieves the session ID for the entries for the current virtual service and specified group.

Input mode (usid, hash, source_addr, dest_addr)

value

group id (optional)

timeout

Output Timeout is updated if update succeeds; otherwise 0.

Full Syntax persist timeout [-notouch] <mode> <value> [any virtual | any service | any group | group <group>] <timeout>

Valid Events All transport events without HTTP_CACHE_RESPONSE.

service

Description

Provides access to service properties.

Input

The specified message.

Full Syntax

log [debug | info | warning | error] <message>

Valid Events

First Implemented Version

29.0.0

Description Returns the name of the current virtual service as defined in the configuration. If no name is configured, returns an empty string.

Output The name of the current virtual service (VIP) in string format.

Full Syntax service name

Document ID: RDWR-ALOS-SDK-V3010_RG1502 63

ip

port

Description Returns the IP address of the current virtual service (VIP) in string format.

Output The IP address of the current virtual service.

Full Syntax service ip

Description Returns the service port of the current virtual service.

Output The port of the current virtual service (integer).

Full Syntax service port

table

Description

Provides access to generic persistent memory. The generic persistent memory can be used to provide storage for dynamic variables that must be shared between services and sessions.

First Implemented Version

29.4.0

Sub-commands

add

append

delete

increment

lookup

replace

set

timeout

add

Description Creates a new entry in the table. Returns an error if the entry already exists.

Options -subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

value

timeout (default value is 600 seconds, use “indefinite” for entries without expiration)

subtable name (optional)

Full Syntax table add [-subtable <name>] [--] <key> <value> [<timeout>]

Notes This command is a private case of table set command with flag -excl present

Document ID: RDWR-ALOS-SDK-V3010_RG1502 65

append

delete

increment

Description Appends a new string to the value already present in the table. If the entry does not exist in the table, the command creates a new entry with the value set to the appended string. The original value is an empty string.

Options -mustexist—When specified, no append is performed and the command returns a null string if the table entry does not exist.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

append value

subtable name (optional)

Output new value

Full Syntax table append [-notouch] [-subtable <name>] [-mustexist] [--]

<key> < append value> [<timeout>]

Description Deletes the specified entry in the table or subtable.

Input key

subtable name (optional)

Output new value

Full Syntax table delete [-subtable <name>] [--] <key>

Description Adds a specified increment to the value of the entry. If the entry does not exist in the table, the command creates a new entry with the value set to the increment value. The original value is 0. The default increment is 1.

Options -notouch—When specified, the entry timestamp must not be updated.

-mustexist—When specified, no increment is performed and the command returns a null string if the table entry does not exist.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

increment (optional) subtable name (optional) Output new value (after increment)

Full Syntax table increment [-notouch] [-subtable <name>] [-mustexist] [--]

<key> <increment> [<timeout>]

lookup

replace

set

Description Performs lookup on the table or subtable for the specified key, and returns its value.

Options -notouch—When specified, the entry timestamp must not be updated.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

subtable name (optional)

Output value

Full Syntax table lookup [-notouch] [-subtable <name>] [--] <key>

Description Replaces the value of the specified entry, if it exists.

Options -notouch—When specified, the entry timestamp must not be updated.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

value

timeout (default value is 600 seconds, use “indefinite” for entries without expiration)

subtable name (optional)

Full Syntax table replace [-notouch] [-subtable <name>] [--] <key> <value>

[<timeout>]

Description Creates or updates the specified entry.

Options -notouch—When specified, the entry timestamp must not be updated.

-mustexist—When specified, no increment is performed and the command returns a null string if the table entry does not exist. Mutually exclusive with -excl.

-excl—When specified, if the table entry already exists, the entry is not updated and the command returns null string. Mutually exclusive with –mustexist.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Document ID: RDWR-ALOS-SDK-V3010_RG1502 67

timeout

Input key

value

timeout (default value is 600 seconds, use “indefinite” for entries without expiration)

subtable name (optional)

Full Syntax table set [-notouch] [-subtable <name>] [-mustexist|-excl] [--]

<key> <value> [<timeout>]

Description Sets the timeout of the specified entry.

Options -notouch—When specified, the entry timestamp must not be updated.

-mustexist—When specified, no increment is performed and the command returns a null string if the table entry does not exist. Mutually exclusive with -excl.

-excl—When specified, if the table entry already exists, the entry is not updated and the command returns null string. Mutually exclusive with –mustexist.

-subtable—When specified, allows an additional key that groups entries of a certain type.

Input key

timeout (default value is 600 seconds, use “indefinite” for entries without expiration)

subtable name (optional)

Full Syntax table timeout [-notouch] [-subtable <name>] [--] <key> <timeout>

In document AlteonOS-30.1.0-AppShape++-Ref (Page 58-68)

Related documents