Sub-interface Management
This section provides the configuration model of sub-interface management and provides samples of XML packets.
Data Model
The configuration model file matching sub-interface management is huawei-vlan-termination.yang and huawei-interfaces.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/ietf-interfaces:interfaces/interface/huawei-vlan-termination:vlan-termination-list/termination-type |
Indicates the termination sub-interface type. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-vlan-termination:vlan-termination-list/dot1q-termination-list |
Indicates the termination function for packets with a single VLAN tag on a Dot1q termination sub-interface. |
A maximum of eight rules can be configured for user packets on a sub-interface, and the maximum number of VLANs that can be configured in each rule is 128. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-vlan-termination:vlan-termination-list/qinq-termination-mode |
Indicates the attribute of a QinQ termination sub-interface. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-vlan-termination:vlan-termination-list/qinq-termination-list |
Indicates the termination function for packets with two VLAN tags on a QinQ termination sub-interface. |
A maximum of eight rules can be configured for user packets on a sub-interface, and the maximum number of VLANs that can be configured in each rule is 128. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-interfaces:common/statistics-enable |
Indicates whether traffic statistics collection is enabled on a sub-interface. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-interfaces:common/statistics-direction |
Indicates the direction of traffic statistics collection on a sub-interface. |
The value is of the enumerated type:
|
N/A |
Configuring a Dot1q Termination Sub-interface
This section provides a sample of configuring a Dot1q termination sub-interface using the Config method.
Operation |
XPATH |
---|---|
Config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Sub-interface name |
XGigabitEthernet1/0/1.2 |
- |
Type of a termination sub-interface |
dot1q |
Set the type of a sub-interface to Dot1q termination. |
Terminated VLAN tag of a sub-interface |
3333..3334 |
Set the terminated VLAN tag of a sub-interface.
|
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<hw-vlan-termination:vlan-termination-list xmlns:hw-vlan-termination="urn:huawei:params:xml:ns:yang:huawei-vlan-termination">
<hw-vlan-termination:termination-type>dot1q</hw-vlan-termination:termination-type>
<hw-vlan-termination:dot1q-termination-list>
<hw-vlan-termination:dot1q-termination>3333..3334</hw-vlan-termination:dot1q-termination>
</hw-vlan-termination:dot1q-termination-list>
</hw-vlan-termination:vlan-termination-list>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Deletion Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<hw-vlan-termination:vlan-termination-list xmlns:hw-vlan-termination="urn:huawei:params:xml:ns:yang:huawei-vlan-termination">
<hw-vlan-termination:termination-type>dot1q</hw-vlan-termination:termination-type>
<hw-vlan-termination:dot1q-termination-list xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<hw-vlan-termination:dot1q-termination>3333..3334</hw-vlan-termination:dot1q-termination>
</hw-vlan-termination:dot1q-termination-list>
</hw-vlan-termination:vlan-termination-list>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response Example
Sample of successful response
##### Ok Reply or Operation Successful ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
Sample of failed response
##### Error Reply or Operation Failed ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Dot1q termination vlan range exceeds 128.</error-message> <error-info>Error on node /ietf-interfaces:interfaces/interface[name="XGigabitEthernet1/0/1.2"]/huawei-vlan-termination:vlan-termination-list/dot1q-termination-list</error-info> </rpc-error> </rpc-reply>
Configuring a QinQ Termination Sub-interface
This section provides a sample of configuring a QinQ termination sub-interface using the Config method.
Operation |
XPATH |
---|---|
Config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Sub-interface name |
XGigabitEthernet1/0/1.2 |
- |
Type of a termination sub-interface |
qinq |
Set the type of a sub-interface to QinQ termination sub-interface. |
Attribute of a QinQ termination sub-interface |
asymmetry |
Set the QinQ termination sub-interface to access the PWE3/VLL and VPLS in asymmetry mode. |
Outer VLAN ID of packets on a QinQ termination sub-interface |
3333..3333 |
Set the outer VLAN ID of packets on a QinQ termination sub-interface to 3333. |
Inner VLAN ID of packets on a QinQ termination sub-interface |
3334..3335 |
Set the inner VLAN ID of packets on a QinQ termination sub-interface.
|
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<hw-vlan-termination:vlan-termination-list xmlns:hw-vlan-termination="urn:huawei:params:xml:ns:yang:huawei-vlan-termination">
<hw-vlan-termination:termination-type>qinq</hw-vlan-termination:termination-type>
<hw-vlan-termination:qinq-termination-mode>
<hw-vlan-termination:termination-mode>asymmetry</hw-vlan-termination:termination-mode>
</hw-vlan-termination:qinq-termination-mode>
<hw-vlan-termination:qinq-termination-list>
<hw-vlan-termination:qinq-termination>
<hw-vlan-termination:pe-vid>3333..3333</hw-vlan-termination:pe-vid>
<hw-vlan-termination:ce-vid>3334..3335</hw-vlan-termination:ce-vid>
</hw-vlan-termination:qinq-termination>
</hw-vlan-termination:qinq-termination-list>
</hw-vlan-termination:vlan-termination-list>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Deletion Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<hw-vlan-termination:vlan-termination-list xmlns:hw-vlan-termination="urn:huawei:params:xml:ns:yang:huawei-vlan-termination">
<hw-vlan-termination:termination-type>qinq</hw-vlan-termination:termination-type>
<hw-vlan-termination:qinq-termination-mode xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<hw-vlan-termination:termination-mode>asymmetry</hw-vlan-termination:termination-mode>
</hw-vlan-termination:qinq-termination-mode>
<hw-vlan-termination:qinq-termination-list xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<hw-vlan-termination:qinq-termination>
<hw-vlan-termination:pe-vid>3333..3333</hw-vlan-termination:pe-vid>
<hw-vlan-termination:ce-vid>3334..3335</hw-vlan-termination:ce-vid>
</hw-vlan-termination:qinq-termination>
</hw-vlan-termination:qinq-termination-list>
</hw-vlan-termination:vlan-termination-list>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response Example
Sample of successful response
##### Ok Reply or Operation Successful ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <ok/> </rpc-reply>
Sample of failed response
##### Error Reply or Operation Failed ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="7"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Qinq termination ce-vid range exceeds 128.</error-message> <error-info>Error on node /ietf-interfaces:interfaces/interface[name="XGigabitEthernet1/0/1.2"]/huawei-vlan-termination:vlan-termination-list/qinq-termination-list</error-info> </rpc-error> </rpc-reply>
Configuring Flow Control on a Sub-interface
This section provides a sample of configuring flow control on a sub-interface using the Config method.
Operation |
XPATH |
---|---|
Config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Sub-interface name |
XGigabitEthernet1/0/1.2 |
- |
Whether traffic statistics collection is enabled on a sub-interface |
true |
Enable traffic statistics collection on a sub-interface. |
Direction of traffic statistics collection on a sub-interface |
inbound |
Collect traffic statistics in the inbound direction of the sub-interface. |
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<huawei-interfaces:common xmlns:huawei-interfaces="urn:huawei:params:xml:ns:yang:huawei-interfaces">
<huawei-interfaces:statistics-enable>true</huawei-interfaces:statistics-enable>
<huawei-interfaces:statistics-direction>inbound</huawei-interfaces:statistics-direction>
</huawei-interfaces:common>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Deletion Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1.2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<huawei-interfaces:common xmlns:huawei-interfaces="urn:huawei:params:xml:ns:yang:huawei-interfaces">
<huawei-interfaces:statistics-enable>true</huawei-interfaces:statistics-enable>
<huawei-interfaces:statistics-direction xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">inbound</huawei-interfaces:statistics-direction>
</huawei-interfaces:common>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response Example
Sample of successful response
##### Ok Reply or Operation Successful ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <ok/> </rpc-reply>
Sample of failed response
##### Error Reply or Operation Failed ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="7"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Qinq termination ce-vid range exceeds 128.</error-message> <error-info>Error on node /ietf-interfaces:interfaces/interface[name="XGigabitEthernet1/0/1.2"]/huawei-vlan-termination:vlan-termination-list/qinq-termination-list</error-info> </rpc-error> </rpc-reply>