Port Management
This section describes the configuration model of port management and provides examples of XML packets.
- Data Model
- Configuring Basic Attributes of an Interface
- Querying Interface Status Information
- Querying the Bandwidth Usage of an Interface
- Querying the Name of an Eth-Trunk into Which an Interface Is Added
- Enabling Port Isolation
- Enabling IPSG on Interface
- Configuring Interface Speed
- Configuring the Duplex Mode
- Querying the Interface Description
- Configuring VCT on an Interface
- Reporting a Port Status Change Alarm
Data Model
The configuration model files matching interface management are ietf-interfaces.yang, huawei-traffic-security.yang, huawei-ethernet.yang, huawei-interface.yang and huawei-interfaces.yang.
Object |
Description |
Value Range |
Remarks |
---|---|---|---|
/ietf-interfaces:interfaces/interface/huawei-traffic:traffic-security/isolate |
Indicates that port isolation is enabled. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-traffic-security:security/binding-config/binding-check-enable |
Indicates that IPSG is enabled. Indicates that Dynamic ARP inspection (DAI) is enabled. |
The value is as follows:
|
When IPv4 IPSG is enabled, configure ipv4-check. When IPv6 IPSG is enabled, configure ipv6-check. When DAI is enabled, configure only arp-check. |
/ietf-interfaces:interfaces/interface/hw-ethernet:physical-config/speed |
Indicates the interface rate. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/hw-ethernet:physical-config/duplex |
Indicates the duplex mode. |
The value is of the enumerated type:
|
X1E, X6E, X2E, and X2H series cards do not support the duplex mode configuration. |
/ietf-interfaces:interfaces-state/interface/huawei-interfaces:common/description |
Indicates the interface description. |
The value is a string of 1 to 242 case-sensitive characters. |
N/A |
/ietf-interfaces:interfaces-state/interface/name |
Indicates the interface name. |
The value is a string of 1 to 64 characters. It consists of the interface type and interface number. |
The interface type varies according to the device models. |
/ietf-interfaces:interfaces-state/interface/type |
Indicates the interface type. |
The value is of the enumerated type:
|
The value of this parameter must contain iana-if-type. |
/ietf-interfaces:interfaces-state/interface/admin-status |
Indicates the administrative status of an interface. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces-state/interface/oper-status |
Indicates the interface running status. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces-state/interface/last-change |
Indicates the time of the latest status change. |
For details, see the definition in RFC 3339. |
N/A |
/ietf-interfaces:interfaces-state/interface/if-index |
Indicates the interface index. |
The value is an integer that ranges from 1 to 2147483647. |
N/A |
/ietf-interfaces:interfaces-state/interface/phys-address |
Indicates the physical address of an interface. |
The format is H:H:H:H:H:H, where H is a 2-digit hexadecimal number. |
N/A |
/ietf-interfaces:interfaces-state/interface/speed |
Indicates the interface rate. |
The value is an integer that ranges from 1 to 18446744073709551615. |
NA |
/ietf-interfaces:interfaces-state/interface/statistics |
Indicates port traffic statistics. |
- |
NA |
/ietf-interfaces:interfaces-state/interface/huawei-interfaces:common/description |
Indicates the interface description. |
The value is a string of 1 to 242 case-sensitive characters. |
NA |
/ietf-interfaces:interfaces-state/interface/hw-ethernet:physical-state/speed |
Indicates the interface rate. |
The value is of the enumerated type:
|
NA |
/ietf-interfaces:interfaces-state/interface/hw-ethernet:physical-state/duplex |
Indicates the duplex mode. |
The value is of the enumerated type:
|
NA |
/ietf-interfaces:interfaces-state/interface/statistics/in-octets |
Indicates the number of incoming packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/in-unicast-pkts |
Indicates the number of incoming unicast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/in-broadcast-pkts |
Indicates the number of incoming broadcast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/in-multicast-pkts |
Indicates the number of incoming multicast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/in-discards |
Indicates the number of discarded incoming packets on an interface. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/in-errors |
Indicates the number of incoming error packets on an interface. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-octets |
Indicates the number of outgoing packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-unicast-pkts |
Indicates the number of outgoing unicast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-broadcast-pkts |
Indicates the number of outgoing broadcast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-multicast-pkts |
Indicates the number of outgoing multicast packets on an interface. |
The value is an integer that ranges from 1 to 18446744073709551615. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-discards |
Indicates the number of discarded outgoing packets on an interface. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/out-errors |
Indicates the number of outgoing error packets on an interface. |
The value is an integer that ranges from 1 to 4294967295. |
N/A |
/ietf-interfaces:interfaces/interface/name |
Creates an interface or displays the interface view. |
The value is a string of 1 to 64 characters. It consists of the interface type and interface number. |
N/A |
/ietf-interfaces:interfaces-state/interface/huawei-interface:common/description |
Indicates the interface description. |
The value is a string of 1 to 242 case-sensitive characters. |
N/A |
/ietf-interfaces:interfaces/interface/type |
Indicates the interface type. |
The value is of the enumerated type:
|
The value of this parameter must contain iana-if-type. |
/ietf-interfaces:interfaces/interface/enabled |
Indicates that the interface is enabled. |
The value is of the Boolean type:
|
You cannot configure an Eth-Trunk interface that is bound to a cascade port. |
/ietf-interfaces:interfaces/interface/link-up-down-trap-enable |
Indicates whether the SNMP trap function is enabled. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces-state/interface/statistics/huawei-ethernet:ethernet-statistics/in-bandwidth |
Indicates the inbound bandwidth usage. |
The value is an integer that ranges from 0 to 100. |
Only statistics on the bandwidth usage of a physical interface can be collected. |
/ietf-interfaces:interfaces-state/interface/statistics/huawei-ethernet:ethernet-statistics/out-bandwidth |
Indicates the outbound bandwidth usage. |
The value is an integer that ranges from 0 to 100. |
Only statistics on the bandwidth usage of a physical interface can be collected. |
/ietf-interfaces:interfaces-state/interface/hw-eth-trunk:eth-trunk/trunk-name |
Indicates the name of the Eth-Trunk to which the interface is added. |
The value is a string of 1 to 32 characters. |
NA |
/huawei-ethernet:virtual-cable-test/input/ifname |
Configures virtual cable test (VCT) on the interface. |
The value is a string of 1 to 64 characters. It consists of the interface type and interface number. |
N/A |
/huawei-interfaces/interface-status-change/name |
Indicates the interface name. |
The value is a string of 1 to 64 characters. It consists of the interface type and interface number. |
The interface type varies according to the device models. |
/huawei-interfaces/interface-status-change/admin-status |
Indicates the administrative status of an interface. |
The value is of the enumerated type:
|
When the port status changes, the device reports the change to the controller. |
/huawei-interfaces/interface-status-change/oper-status |
Indicates the interface running status. |
The value is of the enumerated type:
|
When the port status changes, the device reports the change to the controller. |
/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/huawei-ip:unnumbered-interface |
Indicates the IP address of another interface that is borrowed by the local interface. |
Only tunnel interfaces can borrow IP addresses of loopback interfaces. For example, Tunnel1 borrows the IP address of LoopBack0. |
N/A |
Configuring Basic Attributes of an Interface
This section provides a sample of configuring basic attributes of an interface using the rpc method.
Operation |
XPATH |
---|---|
rpc |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Interface name |
XGigabitEthernet1/0/10 |
- |
Interface description |
port 001 |
- |
Interface type |
ethernetCsmacd |
The interface is a physical interface. |
Interface status |
true |
The interface is enabled. |
Trap sending function |
disabled |
Disable the function of sending a trap when the interface protocol status changes. |
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/10</if:name>
<if:description>port 001</if:description>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<if:enabled>true</if:enabled>
<if:link-up-down-trap-enable>disabled</if:link-up-down-trap-enable>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response example
<?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>
<?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>Wrong interface type.</error-message>
<error-info>Error on node /ietf-interfaces:interfaces/interface[name="XGigabitEthernet1/0/10"]/type</error-info>
</rpc-error>
</rpc-reply>
Querying Interface Status Information
This section provides a sample of querying interface status information using the get method.
Operation |
XPATH |
---|---|
get |
|
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/3</if:name>
</if:interface>
</if:interfaces-state>
</filter>
</get>
</rpc>
Response example
##### 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="6">
<data>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>XGigabitEthernet1/0/3</name>
<type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>
<oper-status>down</oper-status>
<if-index>201</if-index>
<phys-address>00:0b:09:47:5c:23<//phys-address>
<speed>10000000000</speed>
<statistics>
<in-octets>0</in-octets>
<in-unicast-pkts>0</in-unicast-pkts>
<in-broadcast-pkts>0</in-broadcast-pkts>
<in-multicast-pkts>0</in-multicast-pkts>
<in-discards>0</in-discards>
<in-errors>0</in-errors>
<out-octets>0</out-octets>
<out-unicast-pkts>0</out-unicast-pkts>
<out-broadcast-pkts>0</out-broadcast-pkts>
<out-multicast-pkts>0</out-multicast-pkts>
<out-discards>0</out-discards>
<out-errors>0</out-errors>
<description xmlns="urn:huawei:params:xml:ns:yang:huawei-interface">
<in-bandwidth>0</in-bandwidth>
<out-bandwidth>0</out-bandwidth>
</ethernet-statistics>
</statistics>
<description xmlns="urn:huawei:params:xml:ns:yang:huawei-interface">toN10</description>
<common xmlns="urn:huawei:params:xml:ns:yang:huawei-interfaces">
<description>toN10</description>
</common>
<ethernet xmlns="urn:huawei:params:xml:ns:yang:huawei-interface">
<speed>10Gbps</speed>
<duplex>full</duplex>
</ethernet>
<physical-state xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet">
<speed>10Gbps</speed>
<duplex>full</duplex>
</physical-state>
</interface>
</interfaces-state>
</data>
</rpc-reply>
Querying the Bandwidth Usage of an Interface
This section provides a sample of querying the bandwidth usage of an interface using the get method.
Operation |
XPATH |
---|---|
get |
|
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1</if:name>
<if:statistics>
<hw-ethernet:ethernet-statistics xmlns:hw-ethernet="urn:huawei:params:xml:ns:yang:huawei-ethernet"/>
</if:statistics>
</if:interface>
</if:interfaces-state>
</filter>
</get>
</rpc>
Response example
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<data>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>XGigabitEthernet1/0/1</name>
<statistics>
<ethernet-statistics xmlns="urn:huawei:params:xml:ns:yang:huawei-ethernet">
<in-bandwidth>0</in-bandwidth>
<out-bandwidth>0</out-bandwidth>
</ethernet-statistics>
</statistics>
</interface>
</interfaces-state>
</data>
</rpc-reply>
Querying the Name of an Eth-Trunk into Which an Interface Is Added
This section provides a sample of obtaining the name of an Eth-Trunk into which an interface is added using the get method.
Operation |
XPATH |
---|---|
get |
/ietf-interfaces:interfaces-state/interface/hw-eth-trunk:eth-trunk/trunk-name |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/1</if:name>
<hw-eth-trunk:eth-trunk xmlns:hw-eth-trunk="urn:huawei:params:xml:ns:yang:huawei-eth-trunk">
<hw-eth-trunk:trunk-name/>
</hw-eth-trunk:eth-trunk>
</if:interface>
</if:interfaces-state>
</filter>
</get>
</rpc>
Response example
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<data>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>XGigabitEthernet1/0/1</name>
<eth-trunk xmlns="urn:huawei:params:xml:ns:yang:huawei-eth-trunk">
<trunk-name>Eth-Trunk10</trunk-name>
</eth-trunk>
</interface>
</interfaces-state>
</data>
</rpc-reply>
Enabling Port Isolation
This section describes how to enable port isolation using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/ietf-interfaces:interfaces/interface/huawei-traffic:traffic-security/isolate |
Data requirement
Item |
Data |
Description |
---|---|---|
Port isolation status |
true |
Indicates that port isolation is enabled. |
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/4</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<hw-traffic:traffic-security xmlns:hw-traffic="urn:huawei:params:xml:ns:yang:huawei-traffic">
<hw-traffic:isolate>true</hw-traffic:isolate>
</hw-traffic:traffic-security>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response example
Sample of successful response.
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"> <ok/> </rpc-reply>
Sample of failed response.
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Enabling IPSG on Interface
This section describes how to enable IPSG using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/ietf-interfaces:interfaces/interface/huawei-traffic-security:security/binding-config/binding-check-enable |
Data requirement
Item |
Data |
Description |
---|---|---|
IPSG enablement status |
ipv4-check |
Indicates that IPv4 IPSG is enabled on the interface. |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="31" 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>GigabitEthernet1/0/2</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type> <hw-traffic-security:security xmlns:hw-traffic-security="urn:huawei:params:xml:ns:yang:huawei-traffic-security"> <hw-traffic-security:binding-config> <hw-traffic-security:binding-check-enable>ipv4-check</hw-traffic-security:binding-check-enable> </hw-traffic-security:binding-config> </hw-traffic-security:security> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Response example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="31"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="32"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Configuring Interface Speed
This section describes how to configure interface speed using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/ietf-interfaces:interfaces/interface/hw-ethernet:physical-config/speed |
Data requirement
Item |
Data |
Description |
---|---|---|
Port speed |
100Mbps |
Indicates that the interface speed is 100 Mbit/s. |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="15" 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>GigabitEthernet1/0/2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<hw-ethernet:physical-config xmlns:hw-ethernet="urn:huawei:params:xml:ns:yang:huawei-ethernet">
<hw-ethernet:speed>100Mbps</hw-ethernet:speed>
</hw-ethernet:physical-config>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response example
Sample of successful response.
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15"> <ok/> </rpc-reply>
Sample of failed response.
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="16"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Configuring the Duplex Mode
This section describes how to configure the duplex mode using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/ietf-interfaces:interfaces/interface/hw-ethernet:physical-config/duplex |
Data requirement
Item |
Data |
Description |
---|---|---|
Duplex mode |
full |
Indicates that the interface works in full duplex mode. |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="15" 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>GigabitEthernet1/0/2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<hw-ethernet:physical-config xmlns:hw-ethernet="urn:huawei:params:xml:ns:yang:huawei-ethernet">
<hw-ethernet:duplex>full</hw-ethernet:duplex>
</hw-ethernet:physical-config>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
Response example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Querying the Interface Description
This section provides a sample of obtaining the interface description using the get method.
Operation |
XPATH |
---|---|
get |
/ietf-interfaces:interfaces-state/interface/huawei-interfaces:common/description |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>XGigabitEthernet1/0/3</if:name>
<huawei-interfaces:common xmlns:huawei-interfaces="urn:huawei:params:xml:ns:yang:huawei-interfaces">
<huawei-interfaces:description/>
</huawei-interfaces:common>
</if:interface>
</if:interfaces-state>
</filter>
</get>
</rpc>
Response example
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<data>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>XGigabitEthernet1/0/3</name>
<common xmlns="urn:huawei:params:xml:ns:yang:huawei-interfaces">
<description>toN10</description>
</common>
</interface>
</interfaces-state>
</data>
</rpc-reply>
Configuring VCT on an Interface
This section describes how to configure virtual cable test (VCT) on an interface using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-ethernet:virtual-cable-test/input/ifname |
Data requirement
Item |
Data |
Description |
---|---|---|
Interface |
GigabitEthernet1/0/1 |
VCT is configured on the interface. |
Request example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2ac0550f-49dc-11e7-b586-f0bc1781395f">
<hw-ethernet:virtual-cable-test xmlns:hw-ethernet="urn:huawei:params:xml:ns:yang:huawei-ethernet">
<hw-ethernet:ifname>GigabitEthernet1/0/1</hw-ethernet:ifname>
</hw-ethernet:virtual-cable-test>
</rpc>
Response example
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2ac0550f-49dc-11e7-b586-f0bc1781395f"> <result> <virtualcabletest-state-result> <virtualcabletest-pairastatus>normal</virtualcabletest-pairastatus> <virtualcabletest-pairbstatus>normal</virtualcabletest-pairbstatus> <virtualcabletest-paircstatus>normal</virtualcabletest-paircstatus> <virtualcabletest-pairdstatus>normal</virtualcabletest-pairdstatus> <virtualcabletest-pairalength>0</virtualcabletest-pairalength> <virtualcabletest-pairblength>0</virtualcabletest-pairblength> <virtualcabletest-pairclength>0</virtualcabletest-pairclength> <virtualcabletest-pairdlength>0</virtualcabletest-pairdlength> </virtualcabletest-state-result> </result> </rpc-reply>
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="cfc47140-49dc-11e7-8c66-f0bc1781395f"> <rpc-error> <error-message>valid user-defined rpc fail.</error-message> </rpc-error> </rpc-reply>
Reporting a Port Status Change Alarm
This section describes how a device reports an alarm when the port status changes.
Operation |
XPATH |
---|---|
notification |
/huawei-interfaces/interface-status-change |
Alarm example
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2018-03-30T16:34:59Z</eventTime> <interface-status-change xmlns="urn:huawei:params:xml:ns:yang:huawei-interfaces"> <name>Vlanif100</name> <admin-status>down</admin-status> <oper-status>down</oper-status> </interface-status-change> </notification>
- Data Model
- Configuring Basic Attributes of an Interface
- Querying Interface Status Information
- Querying the Bandwidth Usage of an Interface
- Querying the Name of an Eth-Trunk into Which an Interface Is Added
- Enabling Port Isolation
- Enabling IPSG on Interface
- Configuring Interface Speed
- Configuring the Duplex Mode
- Querying the Interface Description
- Configuring VCT on an Interface
- Reporting a Port Status Change Alarm