< Home

url-parameter

Function

The url-parameter command sets parameters in a URL.

The undo url-parameter command deletes parameters in a URL.

By default, a URL does not carry any parameters.

Format

url-parameter { device-ip device-ip-value | device-mac device-mac-value | ap-ip ap-ip-value | ap-mac ap-mac-value | ssid ssid-value | login-url url-key url | redirect-url redirect-url-value | sysname sysname-value | user-ipaddress user-ipaddress-value | user-mac user-mac-value | user-vlan user-vlan-value | ap-group-name ap-group-name-value | ap-location ap-location-value | ap-name ap-name-value } *

undo url-parameter

Only the S5730-HI, S5731-H, S5731S-H, S6730-H, S6730S-H, S5732-H, S6720-HI, and S5720-HI support the following parameters: ap-ip ap-ip-value, ap-mac ap-mac-value, ssid ssid-value, user-vlan user-vlan-value, ap-group-name ap-group-name-value, ap-location ap-location-value, and ap-name ap-name-value.

Parameters

Parameter

Description

Value

device-ip device-ip-value

Specifies the IP address of the device carried in the URL and sets the parameter name displayed in the URL.

In the wireless access scenario, the value of device-ip carried in the URL is the CAPWAP gateway address.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

device-mac device-mac-value

Specifies the MAC address of the device carried in the URL and sets the parameter name displayed in the URL.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

ap-ip ap-ip-value

Specifies the AP IP address carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

NOTE:

When this parameter is specified in the AC + Fit central AP + RU scenario, the URL carries the name of the Fit central AP.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

ap-mac ap-mac-value

Specifies the AP MAC address carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

NOTE:

When this parameter is specified in the AC + Fit central AP + RU scenario, the URL carries the name of the Fit central AP.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

ssid ssid-value

Specifies the users' associated SSID carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

login-url url-key url

Specifies the login URL of an access device.

  • url-key: specifies the identification keyword for the login URL sent to the Portal server during redirection.
  • url: is a specified URL on the access device.
  • url-key: The value is a string of 1 to 16 case-sensitive characters without spaces, question marks (?), ampersands (&), and equal signs (=).
  • url: The value is a string of 1 to 247 case-sensitive characters without spaces.

redirect-url redirect-url-value

Specifies the original URL that a user accesses carried in the URL and sets the parameter name displayed in the URL.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

sysname sysname-value

Specifies the device system name carried in the URL and sets the parameter name displayed in the URL.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

user-ipaddress user-ipaddress-value

Specifies the user IP address carried in the URL and sets the parameter name displayed in the URL.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

user-mac user-mac-value

Specifies the user MAC address carried in the URL and sets the parameter name displayed in the URL.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

user-vlan user-vlan-value

Specifies the user VLAN carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wired users.

The value is a string of 1 to 16 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

ap-group-name ap-group-name-value

Specifies the AP group name carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

The value is a string of 1 to 16 case-sensitive characters without spaces or the following special characters: =, ?, &.

ap-location ap-location-value

Specifies the AP location carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

The value is a string of 1 to 16 case-sensitive characters without spaces or the following special characters: =, ?, &.

ap-name ap-name-value

Specifies the AP name carried in the URL and sets the parameter name displayed in the URL.

This parameter is valid only for wireless access users.

NOTE:

When this parameter is specified in the AC + Fit central AP + RU scenario, the URL carries the name of the Fit central AP.

The value is a string of 1 to 16 case-sensitive characters without spaces or the following special characters: =, ?, &.

Views

URL template view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a URL template is created using the url-template name command and URL is configured using the url command, you can use the url-parameter command to set the parameters in the URL. When a user accesses the Portal server according to the URL, the Portal server obtains user terminal information through the parameters in the URL. The Portal server then provides the corresponding web authentication page for the user according to user terminal information.

In addition, when users are redirected to a website rather than the Portal server according to the pushed URL, the website provides different web pages for the users according to user terminal information carried in the URL.

Precautions

In the wired access scenario, the device-ip parameter must be carried in a URL. In addition, you need to run the url-parameter set device-ip ip-address command to configure the value of device-ip, which is typically set to a WAN interface address.

In the policy association scenario, ASs do not support the device-mac and sysname parameters.

In policy association and SVF scenarios, the device does not support the user-vlan parameter.

URL parameter names configured on the device must be the same as those supported by the server. In this example, the device is connected to Agile Controller-Campus or iMaster NCE-Campus.

URL Parameter

URL Parameter Name Supported by Agile Controller-Campus or iMaster NCE-Campus

device-ip

ac-ip

ap-mac

apmac

ssid

ssid

redirect-url

url

user-ipaddress

userip

user-mac

usermac

user-vlan

uservlan

Example

# Set the user MAC address and access device's system name in the URL.

<HUAWEI> system-view
[HUAWEI] url-template name huawei
[HUAWEI-url-template-huawei] url-parameter user-mac usermac sysname huawei
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >