< Home

referer

Function

The referer command creates a referer matching rule.

The undo referer command deletes a referer matching rule.

Format

referer pattern-string mode { prefix | suffix | exact | any }

undo referer pattern-string mode { prefix | suffix | exact | any }

Parameters

Parameter Description Value
pattern-string Specifies the matching string. The value is a string of 2 to 128 characters.
mode Indicates the matching mode. -
prefix Indicates the prefix matching mode. -
suffix Indicates the suffix matching mode. -
exact Indicates the exact matching mode. -
any Indicates the any matching mode. -

Views

HTTP scheduling policy profile view

Default Level

2: Configuration level

Usage Guidelines

In an HTTP server cluster, different referers correspond to different real servers. Load balancing is based on the referers.

For referer-based SLB:
  • When an HTTP request packet matches a sticky session entry, the packet is distributed based on the entry.
  • When selecting a new real server for load balancing, select the real server associated with the HTTP requested referer.

Example

# Create HTTP scheduling policy file abc, add a referer rule, and set the matching mode to any.

<sysname> system-view
[sysname] slb
[sysname-slb] httpclass abc
[sysname-slb-httpclass-0] referer http://192.168.1.1/ mode any
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >