The session persistence source-ip mask command configures the source subnet mask length for sticky sessions of intelligent uplink selection.
The session persistence destination-ip mask command configures the destination subnet mask length for sticky sessions of intelligent uplink selection.
The undo session persistence { source-ip | destination-ip } mask command restores the source and destination subnet mask lengths to the default settings (the default source subnet mask length is 32 bits, and default destination subnet mask length is 16 bits).
session persistence source-ip mask mask-length
session persistence destination-ip mask mask-length
undo session persistence { source-ip | destination-ip } mask
| Parameter | Description | Value |
|---|---|---|
| mask-length | Specifies the subnet mask length. |
The value is an integer ranging from 1 to 32. |
The default source subnet mask length is 32 bits, and default destination subnet mask length is 16 bits.
When the intelligent uplink selection mode is set to load balancing by link quality, the destination subnet mask length and the mask length for link quality detection must be consistent.
When the sticky session mode is configured to session persistence mode source-ip, the FW creates a sticky session entry based on the source IP address, outbound interface, and matched intelligent route selection policy ID. If the source IP address of the new traffic matching the same policy is on the same subnet as the source IP address recorded in the sticky session entry, the FW forwards the traffic from the outbound interface recorded in the sticky session entry.
When the sticky session mode is configured to session persistence mode destination-ip, the FW creates a sticky session entry based on the destination IP address, outbound interface, and matched intelligent route selection policy ID. If the destination IP address of the new traffic matching the same policy is on the same subnet as the destination IP address recorded in the sticky session entry, the FW forwards the traffic from the outbound interface recorded in the sticky session entry.
When the sticky session mode is configured to session persistence mode source-ip destination-ip, the FW creates a sticky session entry based on the source IP address, destination IP address, outbound interface, and matched intelligent route selection policy ID. If the source and destination IP addresses of the new traffic matching the same policy are on the same subnets as the source and destination IP address recorded in the sticky session entry, the FW forwards the traffic from the outbound interface recorded in the sticky session entry.
For example, the sticky session mode is set to source IP address-based, the source subnet mask length is 24, the source IP address of a session is 10.1.1.1, the outbound interface is GigabitEthernet 0/0/1, the source IP address of new traffic is 10.1.1.2, which is on the same subnet as the source IP address recorded in the sticky session entry, therefore, the FW forwards the traffic from GigabitEthernet 0/0/1.
After you modify the source or destination subnet mask length, the FW deletes all existing sticky session entries, which may cause link switchover for some users. Therefore, exercise with caution.