- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 01-APN6 commands | 117.14 KB |
APN6 commands
apn
Use apn to enable Application-aware Networking (APN) and enter APN view.
Use undo apn to disable APN and delete the configuration in APN view.
Syntax
apn
undo apn
Default
APN is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Application-aware networking (APN) is a new network architecture that enables the network devices to provide application-aware network services. The edge devices in an APN network encapsulate application attributes (APN ID and APN parameters) in packets. These encapsulated packets are then tunneled across the APN network.
The transit nodes (APN-Midpoint nodes) on an APN network provide application-aware services based on the application attributes in packets. The data plane for tunneling application workloads can be based on IPv6 or MPLS. APN6 uses IPv6 in the data plane to provide application-aware services. It offers greater scalability and better suits the development trend of future SDN networks than MPLS-based APN.
To configure the device for APN, you must first execute the apn command to enter APN view.
Examples
# Enable APN and enter APN view.
<Sysname> system-view
[Sysname] apn
[Sysname-apn]
apn-field
Use apn-field to assign a value to an APP-Group-ID or User-Group-ID field in the APN ID template applied to an APN ID instance.
Use undo apn-field to delete the value for an APP-Group-ID or User-Group-ID field from the APN ID template applied to an APN ID instance.
Syntax
apn-field field-name field-value
undo apn-field field-name field-value
Default
No values are assigned to the APP-Group-ID or User-Group-ID fields in the APN ID template applied to an APN ID instance.
Views
APN ID instance view
Predefined user roles
network-admin
Parameters
field-name: Specifies the name of an APP-Group-ID or User-Group-ID field. It is a case-sensitive string of 1 to 31 characters.
field-value: Assigns a value to the specified APP-Group-ID or User-Group-ID field. The value range depends on the length set for the field.
Usage guidelines
Operating mechanism
To generate an APN ID for a service flow, you must apply an APN ID template to an APN ID instance, and then execute the apn-field command to assign values to the APP-Group-ID and User-Group-ID fields in the APN ID template.
Restrictions and guidelines
· To execute the apn-field command successfully, you must make sure the specified APP-Group-ID or User-Group-ID field name already exists in the APN ID template applied to the APN ID instance.
· The value assigned to the APP-Group-ID or User-Group-ID field cannot exceed the length specified for it in the APN ID template. For example, if you set the length of an APP-Group-ID field to 4, the maximum value you can assign to it will be 2 to the power of 4 minus 1, which is 15.
· If you do not assign a value to an APP-Group-ID or User-Group-ID field in the APN ID template, the value for that field will be set to 0.
Examples
# Apply APN ID template tmplt1 to APN ID instance ins1. Assign a value of 300 to the APP-Group-ID field named app-group1.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id template tmplt1 length 64 app-group 48 user-group 16
[Sysname-apn-ipv6-template-tmp1] app-group index 1 app-group1 len 32
[Sysname-apn-ipv6-template-tmp1] quit
[Sysname-apn-ipv6] apn-id instance ins1
[Sysname-apn-ipv6-instance-ins1] template tmplt1
[Sysname-apn-ipv6-instance-ins1] apn-field app-group1 300
Related commands
apn-id template
app-group index
user-group index
apn-id inherit
Use apn-id inherit to configure APN ID inheritance.
Use undo apn-id inherit to restore the default.
Syntax
apn-id inherit { enable | disable }
undo apn-id inherit
Default
By default, the device uses the following APN ID inheritance mechanism:
· When the device decapsulates an APN packet, it does not copy the APN ID to the new packet.
· When the device encapsulates an APN packet, it copies the APN ID from the inner packet header to the new outer header. For example, you can configure the device to take this action if it acts as the stitching node to connect SRv6 TE policies based on the BSID.
Views
APN6 view
Predefined user roles
network-admin
Parameters
enable: Specifies inheritance mode. In this mode, the device copies the APN ID from the inner packet header to the outer packet header when it encapsulates an APN packet. When it decapsulates an APN packet, the device copies the APN ID from the outer packet header to the inner packet header.
disable: Specifies non-inheritance mode. In this mode, the device does not copy the APN ID from the inner packet header to the outer packet header, or vice versa.
Usage guidelines
Enable inheritance mode on the APN-midpoint nodes on the APN6 network. This configuration ensures that the APN attribute can be transported to the APN-endpoint nodes for them to provide application-aware services.
Use non-inheritance mode on APN-edge and APN-endpoint nodes. The downstream devices attached to these nodes do not need the application attribute for identification of application requirements.
Examples
# Enable APN ID inheritance mode.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id inherit enable
apn-id instance
Use apn-id instance to create an APN ID instance and enter its view, or enter the view of an existing APN ID instance.
Use undo apn-id instance to delete an APN ID instance.
Syntax
apn-id instance instance-name
undo apn-id instance instance-name
Default
No APN ID instances exist.
Views
APN6 view
Predefined user roles
network-admin
Parameters
instance-name: Specifies an APN ID instance by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
Operating mechanism
To generate an APN ID for an application workload, you must first create an API ID instance. Then, you perform the following tasks:
· Execute the template command to apply an APN ID template to the APN ID instance.
· Execute the apn-field command to assign values to the APP-Group-ID and User-Group-ID fields in the APN ID template.
Restrictions and guidelines
You cannot delete an APN ID instance if it is used by any objects. To delete that APN ID instance, you must first remove the APN ID instance from the objects that use it.
Examples
# Create APN ID instance ins1 and enter its view.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id instance ins1
Related commands
apn-field
template (APN ID instance view)
apn-id template
Use apn-id template to create an APN ID template and enter its view, or enter the view of an existing APN ID template.
Use undo apn-id template to delete an APN ID template.
Syntax
apn-id template template-name [ length total-length { app-group app-group-length | user-group user-group-length } * ]
undo apn-id template template-name
Default
No APN ID templates exist.
Views
APN6 view
Predefined user roles
network-admin
Parameters
template-name: Specifies an APN ID template name, a case-sensitive string of 1 to 31 characters.
length total-length: Specifies the total length of the APN ID space, in bits. The value for the total-length argument is fixed at 64. You must specify the total length of the APN ID space when you create an APN ID template.
app-group app-group-length: Specifies the length of the APP-Group-ID space. The value range is 1 to 64. If you do not specify a length for the APP-Group-ID space, the APN ID space will not include the APP-Group-ID space.
user-group user-group-length: Specifies the length of the User-Group-ID space. The value range is 1 to 64. If you do not specify a length for the User-Group-ID space, the APN ID space will not include the User-Group-ID space.
Usage guidelines
Operating mechanism
As shown in Figure 1, use apn-id template to define a structured APN ID template.
An APN ID typically contains the following segments:
· APP-Group-ID—Variable-length identifier for an application group.
· User-Group-ID—Variable-length identifier for a user group.
· Reserved—Field reserved for future use. Its length equals the length of the APN ID space minus the lengths of the APP-Group-ID and User-Group-ID spaces.
The APP-Group-ID and User-Group-ID spaces can be subdivided into multiple variable-length fields, each uniquely identified by a field name in the APN ID template.
· A field in the APP-Group-ID space represents an application or service and is called an APP-Group-ID field. You can use one APN ID to identify a group of applications or services that have the same quality assurance requirements.
· A field in the User-Group-ID space represents a user and is called a User-Group-ID field.
Figure 1 Structured APN ID template
To generate a concrete APN ID, you must apply an APN ID template to an APN ID instance, and then assign values to the APP-Group-ID and User-Group-ID fields in the APN ID template.
Restrictions and guidelines
· The total APN ID length is fixed at 64 bits for APN ID templates on the device.
· In an APN ID template, the total length of the APP-Group-ID and User-Group-ID spaces cannot exceed the length of the APN ID space.
· You cannot add, modify, or delete the total length of the APP-Group-ID space in an APN ID template if you have created User-Group-ID fields by using the user-group index command in that template. To add, modify, or delete the total length of the APP-Group-ID space in this situation, you must first execute the undo user-group index command to delete all the User-Group-ID fields in the APN ID template.
· To successfully modify the total length of the APP-Group-ID or User-Group-ID space in an APN ID template, make sure the new length is higher than the combined length of all existing APP-Group-ID or User-Group-ID fields, respectively.
· You cannot delete an APN ID template if it has been applied to an APN ID instance. To delete that APN ID template, you must first remove the APN ID template from the APN ID instance.
Examples
# Create an APN ID template named aaa and enter its view. Set the total length of the APN ID space to 64 bits, the total length of the APP-Group-ID space to 24 bits, and the total length of the User-Group-ID space to 24 bits.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id template aaa length 64 app-group 24 user-group 24
Related commands
app-group index
user-group index
template (APN ID instance view)
app-group index
Use app-group index to configure an APP-Group-ID field in an APN ID template.
Use undo app-group index to delete an APP-Group-ID field from an APN ID template.
Syntax
app-group index index-value field-name length field-length
undo app-group index index-value
Default
An APN ID template does not contain APP-Group-ID fields.
Views
APN ID template view
Predefined user roles
network-admin
Parameters
index-value: Specifies an index value for an APP-Group-ID field. This index value represents the location of the APP-Group-ID field in the User-Group-ID space. The value range is 1 to 4294967294.
field-name: Specifies a name to uniquely identify the APP-Group-ID field, a case-sensitive string with 1 to 31 characters.
length field-length: Sets the length of the APP-Group-ID field. The value range is 1 to 32.
Usage guidelines
Operating mechanism
The APP-Group-ID and User-Group-ID spaces in an APN ID template can be subdivided into multiple variable-length fields, each uniquely identified by a field name.
· A field in the APP-Group-ID space represents an application or service and is called an APP-Group-ID field. You can use one APN ID to identify a group of applications or services that have the same quality assurance requirements.
· A field in the User-Group-ID space represents a user and is called a User-Group-ID field.
When you use the app-group index command to create APP-Group-ID fields, assign each field an index to identify their order in the APP-Group-ID space, with the lowest index for the leftmost field. If user-defined APP-Group-ID fields do not use up the APP-Group-ID space, the idle bits in the space are set to 0.
To generate an APN ID for a service flow, you must apply an APN ID template to an APN ID instance, and then execute the apn-field command to assign values to the APP-Group-ID and User-Group-ID fields identified by their names in the APN ID template.
Restrictions and guidelines
· You can specify the same APP-Group-ID field name in different APN ID templates.
· The total length of all APP-Group-ID fields must not exceed the total length of the APP-Group-ID space in the APN ID template.
· The combined number of APP-Group-ID and User-Group-ID fields in an APN ID template cannot exceed eight.
· The name of an APP-Group-ID or User-Group-ID field must be unique among all APP-Group-ID and User-Group-ID fields in the same APN ID template.
· The index for an APP-Group-ID field must be unique among all APP-Group-ID fields in the same APN ID template.
· You cannot delete, rename, or change the length of an APP-Group-ID field in an APN ID template after you perform the following steps:
a. Apply the template to an APN ID instance.
b. Assign a value to that field by using the apn-field command.
Examples
# Configure an 8-bit APP-Group-ID field in APN ID template tmplt1. Set its index value to 1 and field name to app-group1.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id template tmplt1 length 64 app-group 48
[Sysname-apn-ipv6-template-tmp1] app-group index 1 app-group1 length 8
Related commands
user-group index
apn-field
display apn-id-ipv6 brief
Use display apn-id-ipv6 brief to display the global configuration for APN.
Syntax
display apn-id-ipv6 brief
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
Display the global APN configuration.
<Sysname> display apn-id-ipv6 brief
APN ID info:
Tunnel mode : IPv6
Inherit mode : Disabled
Table 1 Command output
|
Field |
Description |
|
APN ID info |
APN global configuration. |
|
Tunnel Mode |
APN tunnel mode. The value is fixed at IPv6. |
|
Inherit mode |
APN ID inheritance method. |
Related commands
apn-id inherit
apn-id mode
ipv6 (APN view)
display apn-id-ipv6 instance
Use display apn-id-ipv6 instance to display information about APN ID instances.
Syntax
display apn-id-ipv6 instance [ name instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name instance-name: Specifies an APN ID instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify an APN ID instance, this command displays information about all APN ID instances.
Examples
# Display information about all APN ID instances.
<Sysname> display apn-id-ipv6 instance
Instance name : aaa
Instance ID : 1 APN ID length : 64
APN ID : 0x01000000 0x00000000
APN mask : 0xff000000 0x00000000
Instance name : bbb
Instance ID : 2 APN ID length : 64
APN ID : 0x02000000 0x00000000
APN mask : 0xff000000 0x00000000
Instance name : ccc
Instance ID : 3 APN ID length : 64
APN ID : 0x03000000 0x00000000
APN mask : 0xff000000 0x00000000
Table 2 Command output
|
Field |
Description |
|
Instance name |
Name of an APN ID instance. |
|
Instance ID |
Index automatically allocated by the system to the APN ID instance. |
|
APN ID length |
Length of the APN ID space. This space typically contains the APP-Group-ID and User-Group-ID spaces and a reserved space. |
|
APN ID |
The hexadecimal values for the APP-Group-ID and User-Group-ID spaces in the APN ID. The first value is for the APP-Group-ID space and the second value is for the User-Group-ID space. |
|
APN mask |
Masks for the APP-Group-ID and User-Group-ID spaces. The first value is the mask for the APP-Group-ID space, and the second value is the mask for the User-Group-ID space. For example, if the APP-Group-ID value is 0x02000000 with a mask of 0xff000000, it indicates that only the field that spans the highest 8 bits of the APP-Group-ID space is assigned a value, and that value is set to 2. |
Related commands
apn-id instance
ipv6 (APN view)
Use ipv6 to enable APN6 and enter APN6 view.
Use undo ipv6 to disable APN6 and delete the configuration in APN6 view.
Syntax
ipv6
undo ipv6
Default
APN6 is disabled.
Views
APN view
Predefined user roles
network-admin
Usage guidelines
To configure APN6 for application-aware traffic service based on IPV6, you must first execute the ipv6 command in APN view to enable APN6 and enter APN6 view.
Examples
# Enable APN6 and enter APN6 view.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6]
template (APN ID instance view)
Use template to apply an APN ID template to an APN ID instance.
Use undo template to restore the default.
Syntax
template template-name
undo template template-name
Default
No APN ID template applies to an APN ID instance.
Views
APN ID instance view
Predefined user roles
network-admin
Parameters
template-name: Specifies an APN ID template name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
Operating mechanism
An APN ID template define a structured APN ID format.
To generate an APN ID for a service flow, you must perform the following tasks:
1. Apply an APN ID template to an APN ID instance.
2. Execute the apn-field command in APN ID instance view to assign values to the APP-Group-ID and User-Group-ID fields in the APN ID template.
Restrictions and guidelines
· You must create an APN ID template first before you can apply it to an APN ID instance.
· You can apply only one APN ID template to an APN ID instance.
· You cannot delete the APN ID template applied to
an APN ID instance if you have executed the apn-field
command to assign a value to one of the APP-Group-ID or User-Group-ID fields
defined in the template. To delete that template:
Execute the undo apn-fieldcommand
to remove the APP-Group-ID or User-Group-ID fields from the APN ID instance.
Execute the undo template command
to delete the APN ID template.
Examples
Apply APN ID template tmplt1 to APN ID instance ins1.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id template tmplt1 length 64 app-group 48
[Sysname-apn-ipv6-template-tmp1] app-group index 1 app-group1 len 32
[Sysname-apn-ipv6-template-tmp1] quit
[Sysname-apn-ipv6] apn-id instance ins1
[Sysname-apn-ipv6-instance-ins1] template tmplt1
Related commands
apn-field
apn-id template
user-group index
Use user-group index to configure a User-Group-ID field in the APN ID template.
Use undo user-group index to delete a User-Group-ID field from an APN ID template.
Syntax
user-group index index-value field-name length field-length
undo user-group index index-value
Default
An APN ID template does not contain User-Group-ID fields.
Views
APN ID template view
Predefined user roles
network-admin
Parameters
index-value: Specifies an index value for the User-Group-ID field. This index value represents the location of this field in the User-Group-ID space. The value range is 1 to 4294967294.
field-name: Specifies a name to uniquely identify the User-Group-ID field. The value is a case-sensitive string of 1 to 31 characters.
length field-length: Specifies the length of the User-Group-ID field. The value range is 1 to 32.
Usage guidelines
Operating mechanism
The APP-Group-ID and User-Group-ID spaces in an APN ID template can be subdivided into multiple variable-length fields, each uniquely identified by a field name.
· A field in the APP-Group-ID space represents an application or service and is called an APP-Group-ID field. You can use one APN ID to identify a group of applications or services that have the same quality assurance requirements.
· A field in the User-Group-ID space represents a user and is called a User-Group-ID field.
When you use the user-group index command to create User-Group-ID fields, assign each field an index to identify their order in the User-Group-ID space, with the lowest index for the leftmost field. If the user-defined User-Group-ID fields do not use up the User-Group-ID space, the idle bits in the space are set to 0.
To generate an APN ID for a service flow, you must apply an APN ID template to an APN ID instance, and then execute the apn-field command to assign values to the APP-Group-ID and User-Group-ID fields identified by their names in the APN ID template.
Restrictions and guidelines
· You can specify the same User-Group-ID field name in different APN ID templates.
· The total length of all User-Group-ID fields must not exceed the total length of the User-Group-ID space in the APN ID template.
· The combined number of APP-Group-ID fields and User-Group-ID fields in an APN ID template cannot exceed eight.
· The name of an APP-Group-ID or User-Group-ID field must be unique among all APP-Group-ID and User-Group-ID fields in the same APN ID template.
· The index for a User-Group-ID field must be unique among all User-Group-ID fields in the same APN ID template.
· You cannot delete, rename, or change the length of a User-Group-ID field in an APN ID template after you perform the following steps:
a. Apply the template to an APN ID instance.
b. Assign a value to that field by using the apn-field command.
Examples
# Configure an 8-bit User-Group-ID field in APN ID template tmplt1. Set its index value to 1 and field name to user-group1.
<Sysname> system-view
[Sysname] apn
[Sysname-apn] ipv6
[Sysname-apn-ipv6] apn-id template tmplt1 length 64 app-group 16 user-group 16
[Sysname-apn-ipv6-template-tmp1] user-group index 1 user-group1 length 8
Related commands
user-group index
apn-field

