The portal free-rule command configures the Portal authentication-free rule for users.
The undo portal free-rule command restores the default configuration.
By default, no Portal authentication-free rule is configured.
portal free-rule rule-id { destination { any | ip { ip-address mask { mask-length | ip-mask } [ tcp destination-port port | udp destination-port port ] | any } } | source { any | { interface interface-type interface-number | ip { ip-address mask { mask-length | ip-mask } | any } | vlan vlan-id } * } } *
portal free-rule rule-id source ip ip-address mask { mask-length | ip-mask } [ mac mac-address ] [ interface interface-type interface-number ] destination user-group group-name
undo portal free-rule { rule-id | all }
Parameter | Description | Value |
---|---|---|
rule-id | Specifies the ID of the Portal authentication-free rule. |
The value is an integer of which the range depends on product models. |
destination | Specifies the destination network resources that the authentication-free users can access. |
- |
source | Specifies the source information of the authentication-free users. |
- |
any | Specifies any condition. When any is used together with different keywords, the effect of the command is different. |
- |
ip ip-address | Specifies the IP address in the rule. This parameter can specify the source or destination address depending on the keyword. |
The value is in dotted decimal notation. |
mask mask-length | Specifies the mask length of an IP address. This parameter can specify the source or destination address mask depending on the keyword. |
The value is an integer that ranges from 1 to 32. |
mask ip-mask | Specifies the IP address mask. This parameter can specify the source or destination address mask depending on the keyword. |
The value is in dotted decimal notation. |
tcp destination-port port | Specifies the TCP destination port number. |
The value is an integer that ranges from 1 to 65535. |
udp destination-port port | Specifies the UDP destination port number. |
The value is an integer that ranges from 1 to 65535. |
interface interface-type interface-number | Specifies the type and number of the source interface in the rule.
|
- |
vlan vlan-id | Specifies the VLAN ID of the source packet in the rule. |
The value is an integer that ranges from 1 to 4094. |
all | Specifies all rules. |
- |
mac mac-address | Specifies the MAC address of the Portal authentication user who is allowed to access destination network resources without authentication. |
The value is in H-H-H format. An H is a hexadecimal number of 1 to 4 digits. |
user-group group-name | Allows Portal authentication users to access the network resources in the user group. |
It is a string of 1 to 64 case-sensitive characters without spaces. |
Usage Scenario
A user cannot access the network before being authenticated successfully. You can configure an authentication-free rule for specified users to access certain network resources without passing the Portal authentication. An authentication-free rule can be determined by parameters such as the IP address, MAC address, interface, and VLAN. An authentication-free rule can also be determined by ACL rules. The destination IP address that users can access without authentication can be specified in an authentication-free rule defined by either of the two methods. In addition, the destination domain name that users can access without authentication can be specified in an authentication-free rule defined by ACL.
For example, some authentication users who do not have an authentication account must first log in to the official website of a carrier and apply for a member account, or log in using the account of a third party such as Twitter or Facebook. This requires that the users can access specified websites before successful authentication. The domain name of a website is easier to remember than the IP address; therefore, the authentication-free rule defined by ACL can be configured to enable the users to access the domain names of websites without authentication.
Precautions
If a user fails built-in Portal authentication on a Layer 2 interface of the device (excluding the S5730-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6720-HI, and S5720-HI), the user cannot obtain network access rights defined by the Portal authentication-free rule.
# Enable all Portal users to access the network 10.1.1.1/24 without authentication.
<HUAWEI> system-view [HUAWEI] portal free-rule 1 destination ip 10.1.1.1 mask 24 source ip any
<HUAWEI> system-view [HUAWEI] acl number 3100 [HUAWEI-acl-adv-3100] rule 5 permit ip source 10.2.100.0 255.255.255.0 [HUAWEI-acl-adv-3100] quit [HUAWEI] user-group static-user [HUAWEI-user-group-static-user] acl-id 3100 [HUAWEI-user-group-static-user] quit [HUAWEI] user-group static-user enable [HUAWEI] portal free-rule 0 source ip 10.2.100.0 mask 24 destination user-group static-user