Example for saving the configuration, Network requirements, Configuration procedure – H3C Technologies H3C S6300 Series Switches User Manual

Page 256: Verifying the configuration

Advertising
background image

243

Configurations that already exist in the current configuration are replaced by those loaded from the

configuration file.

# Copy the following text to the client to load a configuration file for the device:

<?xml version="1.0" encoding="UTF-8"?>

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<load>

<file>Specify the configuration file name</file>

</load>

</rpc>

The name of the specified configuration file must start with the storage media name and end with the
extension .cfg. The total length of the save path and file name must be no more than 191 characters.
After receiving the load request, the device returns a response in the following format if the load
operation is successful:

<?xml version="1.0" encoding="UTF-8"?>

<rpc-reply message-id="101"

xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<ok/>

</rpc-reply>

Example for saving the configuration

Network requirements

Save the current configuration to the configuration file my_config.cfg.

Configuration procedure

# Enter XML view.

<Sysname> xml

# Exchange capabilities.

<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<capabilities>

<capability>

urn:ietf:params:netconf:base:1.0

</capability>

</capabilities>

</hello>

# Save the configuration of the device to the configuration file my_config.cfg.

<?xml version="1.0" encoding="UTF-8"?>

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<save>

<file>my_config.cfg</file>

</save>

</rpc>

Verifying the configuration

If the client receives the following response, the save operation is successful:

<?xml version="1.0" encoding="UTF-8"?>

Advertising