---
title: System‑Config
slug: enterprise-v6p1/systemconfig
createdAt: 2025-12-18T08:45:10.386Z
---

# <font color="#1d50a2">AsterNOS-System-Config</font>

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

## <font color="#1d50a2">Create DNS Server</font>

Request example to create DNS server via **edit-config**.

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

Response example

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

## <font color="#1d50a2">Modify Hostname</font>

:::hint{type="warning"}
**NOTE:**
Valid hostname requirements:

- Only letters (a–z, A–Z), digits (0–9), and hyphens (-) are allowed.
- Special characters like underscores (\_), dots (.), spaces, or symbols are not allowed.
- The hostname must start and end with a letter or a digit.
- It cannot begin or end with a hyphen.
- The total length must be between 1 and 63 characters.
:::

Request example to modify hostname via **edit-config**.

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

Response example

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

## <font color="#1d50a2">Modify System Clock</font>

:::hint{type="warning"}
**NOTE:**
Here we can mpdify the system datetime and timezone.
The datetime format is: YYYY-MM-DDThh\:mm\:ss±hh\:mm.
And we can obtain the supported timezones via rpc **show-supported-timezones**.

However, we recommend using NTP to synchronize the time whenever possible.
:::

Request example to modify hostname via **edit-config**.

```xml
<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

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

## <font color="#1d50a2">Modify SSH Max Session Number</font>

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

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

Response example

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

## <font color="#1d50a2">Modify Telnet Max Session Number</font>

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

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

Response example

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

## <font color="#1d50a2">Delete DNS server</font>

Request example to delete DNS server via **edit-config**.

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

Response example

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

## <font color="#1d50a2">Get DNS Servers</font>

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

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

Response example

```xml
<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>
```

## <font color="#1d50a2">Get System Configurations</font>

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

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

Response example

```xml
<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>
```

## <font color="#1d50a2">Show License Status</font>

Request example to retrieve license status via rpc **show-license**

```xml
<show-license/>
```

Response example

```xml
<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>
```

## <font color="#1d50a2">Update License</font>

:::hint{type="warning"}
**NOTE:**
To update the license, you need to place the license file in the /etc/sonic/lic/ directory beforehand.
:::

Request example to update license via rpc **update-license**

```xml
<update-license/>
```

Response example

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

## <font color="#1d50a2">Get supported timezones</font>

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

```xml
<show-supported-timezones/>
```

Response example

```xml
<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>
```

