acct-session-id-version

Function

The acct-session-id-version command sets the version for generating the accounting session ID.

The undo acct-session-id-version command restores the default version for generating the accounting session ID.

By default, the version for generating the accounting session ID is version 1.

Format

acct-session-id-version { version1 | version2 | version3 | version4 | version5 | version6 }

acct-session-id-version { version1 | version4 | version5 } nas-logic-sysname host-name

undo acct-session-id-version [ version6 ]

Parameters

Parameter Description Value
version1

Indicates that the accounting session ID of the user is generated by version 1.

-

version2

Indicates that the accounting session ID of the user is generated by version 2.

-

version3

Indicates that the accounting session ID of the user is generated by version 3.

-

version4

Indicates that the accounting session ID of the user is generated by version 4.

-

version5

Indicates that the accounting session ID of the user is generated by version 5.

-

version6

Indicates that the accounting session ID of the user is generated by version 6.

-

nas-logic-sysname host-name

Indicates that the accounting session ID of the user is generated by the host name.

The value is a string of 1 to 7characters.

Views

AAA view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
aaa-access write

Usage Guidelines

Usage Scenario

The device supports six versions:

  • version1

    This is the default version. The accounting session ID is a string of 27 to 37 bytes. On the Ethernet interface, the format of the accounting session ID is: Host name (1 to 7) + slot ID (2) + card ID (1 to 2) + port number (2 to 5) + outer VLAN ID (4) + inner VLAN ID (5) + CPUTICK (6) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding, and the other values are decimal numerals.The card ID is 1 or 2 bytes. If the port number has only 1 byte, a zero is added ahead to supplement the length; otherwise, the actual port number is used in the accounting session ID. If the host name has more than 7 bytes, only the leftmost 7 bytes are used in the accounting session ID; otherwise, the actual host name is used.
  • version2

    The accounting session ID of this version consists of 16 bytes. On the Ethernet interface, the format of the accounting session ID is: Outer VLAN ID (4) + CPUTICK (6) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding, and the other values are decimal numerals.
  • version3

    The accounting session ID of this version consists of 8 bytes. On the Ethernet interface, the format of the accounting session ID is: CPUTICK (2) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding.
  • version4

    The accounting session ID is 15 bytes long, the format of the accounting session ID is: host name(7)+sequence number(2)+user index(6). The user index is Base62 encoding.

    7-byte host name: If the length of the host name is less than 7 bytes, 0s are added to supplement the length; if the length of the host name is more than 7 bytes, only the first 7 bytes are used.

    2-byte sequence number: The value is an accumulative value and is a string of two visible ASCII characters {'!'-'~'} except '?'. The last two bytes of the random number is used as the original value.
  • version5

    The accounting session ID of this version consists of a maximum of 44 bytes. The format of the accounting session ID is: Host name (7 bytes) + space + interface information (separated by a slash) + a period (.) + CPUTICK (4 bytes) + VLAN/PVC IDs (separated by a period) + a colon (:) + CID.

    For example, the format of the accounting session ID of an Ethernet interface is:

    R7 eth0/4/0/4.72F1:4094.4093:123456

    For example, the format of the accounting session ID of a tunnel interface is:

    R7 tunnel1/15/16383.2d3b:0.0:152576
  • version6

    The accounting session ID of this version consists of a maximum of 44 bytes. The format of the accounting session ID is: Host name (7 bytes) +> + slot number (2 bytes) +> + card number (1 to 2 bytes) + port number (2 to 5 bytes) +> + outer VLAN ID (4 bytes) +> + inner VLAN ID (5 bytes) +> + CPUTICK (6 bytes) +> + user index (6 bytes).

    The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding.

    Note:

    If a logical host name has been configured in the interface view or the remote backup profile view, this logical host name takes precedence over the one specified in this command.

The device supports six versions:

  • version1

    This is the default version. The accounting session ID is a string of 27 to 37 bytes. On the Ethernet interface, the format of the accounting session ID is: Host name (1 to 7) + slot ID (2) + card ID (1 to 2) + port number (2 to 5) + outer VLAN ID (4) + inner VLAN ID (5) + CPUTICK (6) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding, and the other values are decimal numerals.The card ID is 1 or 2 bytes. If the port number has only 1 byte, a zero is added ahead to supplement the length; otherwise, the actual port number is used in the accounting session ID. If the host name has more than 7 bytes, only the leftmost 7 bytes are used in the accounting session ID; otherwise, the actual host name is used.
  • version2

    The accounting session ID of this version consists of 16 bytes. On the Ethernet interface, the format of the accounting session ID is: Outer VLAN ID (4) + CPUTICK (6) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding, and the other values are decimal numerals.
  • version3

    The accounting session ID of this version consists of 8 bytes. On the Ethernet interface, the format of the accounting session ID is: CPUTICK (2) + user index (6). The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding.
  • version4

    The accounting session ID is 15 bytes long, the format of the accounting session ID is: host name(7)+sequence number(2)+user index(6). The user index is Base62 encoding.

    7-byte host name: If the length of the host name is less than 7 bytes, 0s are added to supplement the length; if the length of the host name is more than 7 bytes, only the first 7 bytes are used. When nas logic-sysname is configured on the BAS interface, the name of the BAS interface is used.

    2-byte sequence number: The value is an accumulative value and is a string of two visible ASCII characters {'!'-'~'} except '?'. The last two bytes of the random number is used as the original value.
  • version5

    The accounting session ID of this version consists of a maximum of 44 bytes. The format of the accounting session ID is: Host name (7 bytes) + space + interface information (separated by a slash) + a period (.) + CPUTICK (4 bytes) + VLAN/PVC IDs (separated by a period) + a colon (:) + CID.

    For example, the format of the accounting session ID of an Ethernet interface is:

    R7 eth0/4/0/4.72F1:4094.4093:123456

    For example, the format of the accounting session ID of a tunnel interface is:

    R7 tunnel1/15/16383.2d3b:0.0:152576
  • version6

    The accounting session ID of this version consists of a maximum of 44 bytes. The format of the accounting session ID is: Host name (7 bytes) +> + slot number (2 bytes) +> + card number (1 to 2 bytes) + port number (2 to 5 bytes) +> + outer VLAN ID (4 bytes) +> + inner VLAN ID (5 bytes) +> + CPUTICK (6 bytes) +> + user index (6 bytes).

    The CPUTICK value is a hex numeral, whereas the user index is Base62 encoding.

    Note:

    If a logical host name has been configured in the interface view or the remote backup profile view, this logical host name takes precedence over the one specified in this command.

    The accounting session ID format configured by this command does not take effect for EDSG services. The EDSG services use the accounting session ID in the following format: Host name(7)+ slot ID (2)+ card ID (1)+ port number (2)+ SSG(3)+ Service ID(6)+CPUTICK(6)+user index(6).

Precautions

  • In VS mode, this command is supported only by the admin VS.
  • version3 is the format compatible with earlier versions. The algorithm for generating the accounting ID is too simple and may lead to conflicts in complex scenarios. Therefore, this format is not recommended in all scenarios. In RUI scenarios, if the accounting ID of a user who goes online from the RUI backup device conflicts with that of an online common user, the common user will be forcibly logged out. When common users on the RUI backup device with the same accounting ID attempt to go online, user login fails.

Example

# Set the version to version 2.
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] acct-session-id-version version2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >