The rule command configures a terminal type identification rule.
The undo rule command deletes a terminal type identification rule.
By default, a terminal type identification rule is not configured.
This function is supported only by S5730-HI, S5731-H, S5731S-H, S6730-H, S6730S-H, S5732-H, S6720-HI, and S5720-HI.
rule rule-id { mac mac-address mask { mask-length | mask } | dhcp-option option-id { sub-match | all-match } { ascii option-text | hex option-hex-string } | user-agent { sub-match | all-match } user-agent-text }
undo rule rule-id
Parameter |
Description |
Value |
---|---|---|
rule-id |
Specifies the ID of a terminal type identification rule. |
The value is an integer that ranges from 0 to 7. |
mac mac-address |
Specifies a terminal MAC address. |
The value is in H-H-H format. An H is a hexadecimal number of 4 digits. |
mask { mask-length | mask } |
Indicates the mask or mask length of a terminal MAC address. |
The value of mask is in H-H-H format. An H is a hexadecimal number of 4 digits. The value of mask-length is an integer that ranges from 1 to 48. |
dhcp-option option-id |
Identifies the terminal type using a DHCP option. option-id specifies the ID of a DHCP option. |
The value is an integer that ranges from 1 to 254. NOTE:
Currently, the identification rule takes effect only when the value is set to 12, 55, or 60. |
sub-match |
Indicates partial match. The UA or Option information detected by the AC must be the same as or contain the value of option-text or user-agent-text. |
- |
all-match |
Indicates exact match. The UA or Option information detected by the AC must be the same as the value of option-text or user-agent-text. |
- |
ascii option-text |
Specifies the Option information that a terminal must match as an ASCII string. |
The value is a string of 1 to 247 case-sensitive characters without spaces. |
hex option-hex-string |
Specifies the Option information that a terminal must match as a hexadecimal string. |
The value is a string of 1 to 254 case-insensitive characters without spaces. |
user-agent |
Identifies the terminal type using UA information. |
- |
user-agent-text |
Specifies the UA information that a terminal must match. |
The value is a string of 1 to 247 case-sensitive characters. |
Usage Scenario
Match the first 24 bits of a terminal's MAC address, which is known as the Organizationally Unique Identifier (OUI), to identify the corresponding manufacturer.
Use the UA information carried in HTTP packets from a terminal to identify the operating system and its version, the CPU type, browser type, and browser version.
Use the manufacturer information carried in Option12, Option55, and Option60 in DHCP packets from a terminal to identify the terminal's host name and manufacturer type.
A terminal type can be identified by checking whether the terminal information matches the identification rule configured. Once the identification is performed, user rights can be delivered or access control can be implemented based on terminal types.
Precautions
To match an identification rule, the terminal information must be the same as all the configuration items in the rule.
If the specified rule-id already exists and the new rule conflicts with the original rule, the new rule replaces the original one in the conflicting part, which is the same as editing an existing rule.
To modify a rule that already contains rule-id, delete the old rule and create a rule. Otherwise, the configuration result may be incorrect.