default-user-name

Function

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.

Format

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 ]

Parameters

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.

-

Views

AAA view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
aaa-access write

Usage Guidelines

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:

  • The option82 keyword is valid only when the access request packet of the user contains access-line-id, and the BAS interface is configured to trust access-line-id on the client.
  • If ip-address, option82, or both of them are selected but this method is invalid, the system generates the user name by using the original method. This method is invalid in some cases. For example, ip-address is selected but the access request packet does not contain an IP address, or option82 is selected but the access request packet does not contain Option82 or the BAS interface does not trust access-line-id.
  • If this command is used multiple times, the later configuration overwrites the previous configuration, and the last configuration takes effect.
  • If the string generated by Option 82 contains more than 64 characters, the first 64 characters are taken as the user name.

    When configuring the creation mode for the pure user names of PPPoE users, note the following:
  • In creation modes for user names, only Option82 is effective to PPPoE users.
  • If you need to generate a PPPoE user name in Option82 mode, the following conditions must be met: 1. PADR packets carry Option 105 information. 2. The client-option82 version1 command is configured on the BAS interface and the Option82 attribute is configured to be in the version 1 format.
  • If you specify the Option82 mode to generate a PPPoE user name and configure the client-option82 version1 command on a BAS interface, but a connection request packet does not carry access-line-id information, the device generates a PPPoE user name in version1 format. If you specify the Option82 mode to generate a PPPoE user name and configure the client-option82 version1 command on a BAS interface, and a connection request packet carries access-line-id information, the device uses the access-line-id information to generate a PPPoE user name. If you specify the Option82 mode to generate a PPPoE user name but do not configure the client-option82 version1 command on a BAS interface, the device does not change the original user name.

    NOTE:
  • The original user name of an IPoE user is generated based on the physical interface to which the user connected. The format of the user name is configured through the vlanpvc-to-username command.
  • The default-user-name include and vlanpvc-to-username commands configure only the method of generating a user name. The method of generating a user account also depends on the domain name delimiter and position of the domain name. If the domain name is on the right of the domain name delimiter, the user account is in the format of user name + domain name delimiter + domain name. If the domain name is on the left of the domain name delimiter, the user account is in the format of domain name + domain name delimiter + user name. The domain name is the name of the pre-authentication domain or default authentication domain configured on the BAS interface.

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.

Example

# Configure the system to generate the IPoE user name based on the compressed IPv6 address.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] default-user-name include ipv6-address compressed
# Configure the system to generate the user name based on the IP address and Option82 information in the access request packet of an IPoE user.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] default-user-name include ip-address . option82
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >