CLI operation example
Configuration requirements
Send the display vlan command to the device.
Configuration procedure
# Enter XML view.
<Sysname> xml
# Notify the device of the NETCONF capabilities supported on the client.
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability> urn:ietf:params:netconf:base:1.0 </capability> </capabilities> </hello>
# Copy the following text to the client to execute the display vlan command:
<?xml version="1.0" encoding="UTF-8"?> <rpc message-id="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <CLI> <Execution> display vlan </Execution> </CLI> </rpc>
Verifying the configuration
If the client receives the following text, the operation is successful:
<?xml version="1.0" encoding="UTF-8"?> <rpc-reply message-id="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <CLI> <Execution><![CDATA[ <Sysname>display vlan Total VLANs: 1 The VLANs include: 1(default) ]]> </Execution> </CLI> </rpc-reply>