The default-user-name command configures the creation mode for the pure user names of IPoE or PPPoE users.
The undo default-user-name command resets the creation mode for pure user names of IPoE or PPPoE users to the original one.
By default, the system generates the user name of an IPoE user using the original method. The original user names of PPPoE users remain unchanged.
This command is supported only on the NetEngine 8000 F1A.
default-user-name [ template template-name ] include { sysname [ seperator ] | gateway-address seperator [ username-seperator ] | ip-address seperator [ username-seperator ] | ipv6-address { compressed | preferred seperator } [ username-seperator ] | delegation-prefix [ username-seperator ] | mac-address { seperator | noseparator } [ username-seperator ] | { option82 [ username-seperator | { sub-option suboption-id1 [ offset offset1 ] parse-mode { auto-identify [ length ] | string [ length ] | binary length | hex [ length ] { class1 | class2 | class3 } } [ username-seperator ] } &<1-4> ] | access-line-id [ seperator | { circuit-id [ offset offset1 ] parse-mode { auto-identify [ length ] | string [ length ] | binary length | hex [ length ] { class1 | class2 | class3 } } username-seperator | remote-id [ offset offset1 ] parse-mode { auto-identify [ length ] | string [ length ] | binary length | hex [ length ] { class1 | class2 | class3 } } [ username-seperator ] } * ] } | { option60 | vendor-class } [ cn | [ offset offset2 ] { length length2 | sub-option suboption-id2 [ sub-offset offset2 ] [ sub-length length2 ] } ] [ username-seperator ] | { option61 | client-id } [ username-seperator ] | option12 [ username-seperator ] | pevlan [ username-seperator ] | cevlan [ username-seperator ] | port [ username-seperator ] | slot [ username-seperator ] | subslot [ username-seperator ] } *
undo default-user-name [ template template-name ]
Parameter | Description | Value |
---|---|---|
template template-name |
Specifies user template names of users. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
include |
Include. |
- |
sysname |
Indicates that the system uses the host name as the user name. The host name is configured through the sysname host-name command in the system view. |
- |
seperator |
This parameter specifies the separator between usernames, for example, the separator between the system name and IP address. |
The value is a string of characters. The length of the character string is 1. The unsupported characters are letters, question mark (?), and double quotation marks ("). |
gateway-address seperator |
Indicates that the system uses the gateway address contained in the access request packet as the user name. This parameter is applicable to only Layer 3 DHCP users. |
The value is a string of characters. The length of the character string is 1. The unsupported characters are letters, question mark (?), and double quotation marks ("). |
username-seperator |
This parameter specifies the separator between user names, for example, the separator between the system name and IP address. |
The value is a string of characters. The length of the character string is 1. The unsupported characters are letters, question mark (?), and double quotation marks ("). |
ip-address seperator |
Indicates that the system uses the IP address contained in the access request packet as the user name. This method is applicable to only the access users whose packets contain IP addresses, such as the Layer 3 users and static users. |
The value is a string of characters. The length of the character string is 1. The unsupported characters are letters, question mark (?), and double quotation marks ("). |
ipv6-address |
Indicates that the system uses the IPv6 address contained in an access request packet as the username. This method is applicable only to static users. |
- |
compressed |
Configures the compressed mode of the IPv6 address for user name. |
- |
preferred seperator |
Configures the preferred mode of the IPv6 address for user name. |
The value is a string of characters. The length of the character string is 1. The unsupported characters are letters, question mark (?), and double quotation marks ("). |
delegation-prefix |
Indicates that the system uses the PD address contained in an access request packet as the username. This method is applicable only static users. |
- |
mac-address |
Indicates that the system uses the MAC address contained in the access request packet as the user name. |
- |
noseparator |
No set mac address separator. |
- |
option82 |
Indicates that the system uses access-line-id (dhcpv4 option82/dhcpv6 option18+37) contained in the access request packet as the user name. If the system uses DHCPv6 option18+37, access-network devices that are connected to the system must support LDRA. specifies the number of sub-options of Option82. The value is 1 or 2. |
- |
sub-option suboption-id1 |
Specifies the number of sub-options of Option82. The value is 1 or 2. |
The value is an integer that ranges from 1 to 2. |
sub-option suboption-id2 |
Configures the suboption code of the vendor-class attribute for user name. |
The value is an integer ranging from 1 to 255. |
offset offset1 |
Specifies the offset value of the sub-option of dhcpv4 option82 or dhcpv6 option18+37. |
The value is an integer that ranges from 0 to 127. |
offset offset2 |
Specifies the offset value of the sub-option of dhcpv4 option60 or dhcpv6 option16. |
The value is an integer that ranges from 1 to 254. |
parse-mode |
Indicates the parse mode of the sub-option of dhcpv4 option82 or dhcpv6 option18+37. |
- |
auto-identify |
Auto identify mode. |
- |
length length2 |
Specifies the length-value of the sub-option of dhcpv4 option60 or dhcpv6 option16. |
The value is an integer that ranges from 1 to 254. |
string length |
Indicates that the system parses Option82 in string. length-value specifies the length of the sub-option of dhcpv4 option82 or dhcpv6 option18+37. |
The value is an integer that ranges from 1 to 64. |
binary length |
Indicates that the system parses the sub-option of dhcpv4 option82 or dhcpv6 option18+37 in binary. length-value specifies the length of the sub-option of dhcpv4 option82 or dhcpv6 option18+37. |
The value is 1, 2, or 4. |
hex length |
Indicates that the system parses Option82 in hex. length-value specifies the length of the sub-option of dhcpv4 option82 or dhcpv6 option18+37. |
The value is an integer that ranges from 1 to 64. |
class1 |
Indicates that the option information is printed in the format of HHHHHHHHHHHH during the parsing of hexadecimal codes. |
- |
class2 |
Indicates that the option information is printed in the format of HH-HH-HH-HH-HH-HH during the parsing of hexadecimal codes. |
- |
class3 |
Indicates that the option information is printed in the format of HHHH-HHHH-HHHH during the parsing of hexadecimal codes. |
- |
access-line-id |
Indicates that the system uses access-line-id (dhcpv4 option82/dhcpv6 option18+37) contained in the access request packet as the user name. |
- |
circuit-id |
Indicates that the system uses dhcpv6 option18 contained in the access request packet as the user name. |
- |
remote-id |
Indicates that the system uses dhcpv6 option37 contained in the access request packet as the user name. |
- |
option60 |
Indicates that the system uses vendor-class (dhcpv4 option60/dhcpv6 option16) contained in the access request packet as the user name. |
- |
vendor-class |
User's vendor-class(dhcpv4 option60/dhcpv6 option16). |
- |
cn |
Indicates that the system uses the vendor-class attribute of the cn-telecom format as the user name. |
- |
sub-offset offset2 |
Configures the offset of a vendor-class sub-option code for the user name. |
The value is an integer ranging from 1 to 254. |
sub-length length2 |
Configures the field length of a vendor-class sub-option for the user name. |
The value is an integer ranging from 1 to 254. |
option61 |
Indicates that the system uses Client-id (dhcpv4 option61/dhcpv6 option1) contained in the access request packet as the user name. |
- |
client-id |
Indicates that the system uses client-id (dhcpv4 option61/dhcpv6 option1) contained in the access request packet as the user name. |
- |
option12 |
Indicates that the system uses Option 12 contained in the access request packet as the user name. |
- |
pevlan |
Indicates that the system uses the PE-VLAN ID contained in the access request packet as the user name. |
- |
cevlan |
Indicates that the system uses the CE-VLAN ID contained in the access request packet as the user name. |
- |
port |
Indicates that the number of the interface that users access is used as a pure user name. |
- |
slot |
Indicates that the number of the slot that users access is used as a pure user name. |
- |
subslot |
Indicates that the slot number of the subcard that users access is used as a pure user name. |
- |
Usage Scenario
If you select multiple keywords among ip-address, mac-address, option82, and sysname, the user name contains multiple values mapping the keywords. The sequence of the values in the user name is the same as the sequence of the keywords in the command.
If the user needs to have the sub-option information in Option82 printed in the format of a string of characters, ensure that the Option82 field does not contain 00 or invisible characters; otherwise, anomalies occur during the generation of the user name. When configuring the method of generating the user name for an IPoE user, pay attention to the following points:Precautions
In VS mode, this command is supported only by the admin VS.
When default-user-name command is executed, if the generated user name contains domain name delimiters, the correct domain name may not be obtained based on the user name. For example:
When default-user-name include sysname command is executed, huawei@domain1 is configured as the system name, domain2 is configured on the user interface, and the complete user name is huawei@domain1@domain2. The system uses domain1@domain2 following the first @ as the domain name. You can run the domainname-parse-direction command to configure the domain name resolution direction. Take huawei@domain1@domain2 as an example. If the domain name resolution direction is from left to right, the first @ symbol from the left is the domain name delimiter. When the domain name resolution direction is from right to left, the first @ symbol from the right is the domain name delimiter, and other @ symbols are considered as a part of the user name or domain name.<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] default-user-name include ipv6-address compressed
<HUAWEI> system-view [~HUAWEI] aaa [~HUAWEI-aaa] default-user-name include ip-address . option82