Skip to content
Ask AI

System‑Config

This chapter provides examples on how to use Netconf to manage System configurations on AsterNOS devices.

Request example to create DNS server via edit-config.

<config>
<top>
<system-config>
<dns-resolver>
<server operation="create">
<address>1.1.1.1</address>
</server>
</dns-resolver>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to modify hostname via edit-config.

<config>
<top>
<system-config operation="merge">
<hostname>test-netconf</hostname>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to modify hostname via edit-config.

<config>
<top>
<system-config>
<clock operation="merge">
<datetime>2025-02-12T02:26:01Z</datetime>
<timezone>Asia/Shanghai</timezone>
</clock>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to modify SSH max session number via edit-config.

<config>
<top>
<system-config operation="merge">
<ssh-max-session>20</ssh-max-session>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to modify Telnet max session number via edit-config.

<config>
<top>
<system-config operation="merge">
<telnet-max-session>20</telnet-max-session>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to delete DNS server via edit-config.

<config>
<top>
<system-config>
<dns-resolver>
<server operation="delete">
<address>1.1.1.1</address>
</server>
</dns-resolver>
</system-config>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4f3ee6c9-9bae-427a-93c8-d151b6f2f190">
<ok/>
</rpc-reply>

Request example to retrieve DNS servers via get-config with subtree filter.

<filter type="subtree">
<top>
<system-config>
<dns-resolver>
<server/>
</dns-resolver>
</system-config>
</top>
</filter>

Response example

<data>
<top>
<system-config xmlns="http://asterfusion.com/ns/yang/asternos-system-config">
<dns-resolver>
<server>
<address>2.2.2.2</address>
</server>
<server>
<address>1.1.1.1</address>
</server>
</dns-resolver>
</system-config>
</top>
</data>

Request example to retrieve system configurations via get-config with subtree filter.

<filter type="subtree">
<top>
<system-config/>
</top>
</filter>

Response example

<data>
<top>
<system-config xmlns="http://asterfusion.com/ns/yang/asternos-system-config">
<hostname>test-netconf</hostname>
<ssh-max-session>20</ssh-max-session>
<telnet-max-session>20</telnet-max-session>
<dns-resolver>
<server>
<address>1.1.1.1</address>
</server>
</dns-resolver>
<clock>
<timezone>Asia/Shanghai</timezone>
</clock>
</system-config>
</top>
</data>

Request example to retrieve license status via rpc show-license

<show-license/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:05b3dfdd-15c1-44e8-8777-bddcde13a3ed">
<data xmlns="http://asterfusion.com/ns/yang/asternos-system-config">
License Name : all-19710101-license
MD5 : fab126157378dd632cc607d0c00488cd
Valid : True
Build Time : 1971-01-01 00:07:24
Valid To : 2026-07-19 17:39:08
Feature Status
---------------------------------------
IGMP TRUE
TUNNEL TRUE
ROUTER_PROTOCOL TRUE
CLI TRUE
</data>
</rpc-reply>

Request example to update license via rpc update-license

<update-license/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:90228ddf-2cbc-4d64-895b-cc135051e210">
<ok/>
</rpc-reply>

Request example to get supported timezone via rpc show-supported-timezones

<show-supported-timezones/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dd07584a-43f9-4036-8488-653dc46d48f2">
<data>Africa/Abidjan</data>
<data>Africa/Accra</data>
<!-- The time zones in the middle have been omitted -->
<data>WET</data>
<data>Zulu</data>
</rpc-reply>