System Configuration

Example for System Configuration Payload

Here, the management interface uses a static IP address, and the WAN interface relies on DHCP. You can assign static IP addresses to both interfaces, but only one interface can use DHCP.

<system>
    <settings>
        <hostname>MyNFVIS123</hostname>
            <mgmt>
                <ip>
                    <address>192.168.1.2</address>
                    <netmask>255.255.255.0</netmask>
                </ip>
            </mgmt>
            <wan>
                <dhcp/>
            </wan>
    </settings>
</system>
Property Type Description Mandatory/Default Value
hostname String Hostname of the system.
The hostname now follows RFC952 rules, allowing only alphabets, numbers, and hyphen. The hostname can begin and end with either an alphabet or a digit. Host software must handle host names of up to 255 characters.
Yes
default-gw String IP address of the default gateway.
Note: The default gateway that is assigned through the DHCP configuration takes precedence over the default gateway for static configuration. Hence, to use the default gateway for static configuration, disable DHCP configuration for the WAN interface. When using the default gateway, the system does not allow DHCP configuration on any interface, including WAN, and MGMT interfaces.
Yes
mgmt ip address String Management IP address.
Note: Configuring an interface with a static IP address automatically disables DHCP on that interface.
Yes
mgmt ip netmask String Netmask for the IP address. Yes
wan dhcp String Set DHCP on the WAN interface.
Note: You can configure DHCP either on the WAN interface or the management interface; you cannot configure DHCP on both the interfaces simultaneously.
No

Example: PUT System Configuration API

curl -v -u admin:password -H "Accept:application/yang-data+xml" \
-H "Content-Type:application/yang-data+xml" -k -X PUT \
https://a.b.c.d/restconf/data/system:system/settings\ 
-d "<settings>
        <hostname>Do3rdENCS75SettingsNoGW</hostname>
        <default-gw>172.19.183.1</default-gw>
        <mgmt>
          <ip>
            <address>172.19.183.75</address>
            <netmask>255.255.255.0</netmask>
          </ip>
            </mgmt>
            <wan>
              <ip>
                <address>4.3.2.5</address>
                <netmask>255.255.0.0</netmask>
              </ip>
        </wan>
    </settings>"

Example: GET System Details API

curl -k -v -u admin:password 'https://a.b.c.d/restconf/data/system:system/settings-native' \
-H 'Accept: application/yang-data+xml'

Response:
<settings-native xmlns="http://www.cisco.com/nfv" xmlns:y="http://tail-f.com/ns/rest"  xmlns:system="http://www.cisco.com/nfv">
  <mgmt>
   <ip-info>
      <interface>MGMT</interface>
      <ipv4_address>192.168.1.2</ipv4_address>
      <netmask>255.255.255.0</netmask>
      <ipv6_address>fe80::2f2:8bff:fec3:4a54</ipv6_address>
      <prefixlen>64</prefixlen>
      <mac_address>00:f2:8b:c3:4a:54</mac_address>
      <mtu>1500</mtu>
      <txqueuelen>1000</txqueuelen>
    </ip-info>
    <stats>
      <rx_packets>12481280</rx_packets>
      <rx_bytes>14392431432</rx_bytes>
      <rx_errors>0</rx_errors>
      <rx_dropped>210</rx_dropped>
      <rx_overruns>0</rx_overruns>
      <rx_frame>0</rx_frame>
      <tx_packets>3080505</tx_packets>
      <tx_bytes>238975886</tx_bytes>
      <tx_errors>0</tx_errors>
      <tx_dropped>0</tx_dropped>
      <tx_overruns>0</tx_overruns>
      <tx_carrier>0</tx_carrier>
      <tx_collisions>0</tx_collisions>
    </stats>
    <dhcp>
      <enabled>false</enabled>
      <offer>false</offer>
      <interface>NA</interface>
      <fixed_address>0.0.0.0</fixed_address>
      <subnet_mask>0.0.0.0</subnet_mask>
      <gateway>0.0.0.0</gateway>
      <lease_time>0</lease_time>
      <message_type>0</message_type>
      <name_servers>NA</name_servers>
      <server_identifier>0.0.0.0</server_identifier>
      <renewal_time>0</renewal_time>
      <rebinding_time>0</rebinding_time>
      <vendor_encapsulated_options>NA</vendor_encapsulated_options>
      <domain_name>NA</domain_name>
      <renew>0001-01-01T00:00:00-00:00</renew>
      <rebind>0001-01-01T00:00:00-00:00</rebind>
      <expire>0001-01-01T00:00:00-00:00</expire>
    </dhcp>
  </mgmt>
  <wan>
    <ip-info>
      <interface>wan-br</interface>
      <ipv4_address>209.165.201.22</ipv4_address>
      <netmask>255.255.255.0</netmask>
      <ipv6_address>fe80::2f2:8bff:fec3:49e0</ipv6_address>
      <prefixlen>64</prefixlen>
      <mac_address>00:f2:8b:c3:49:e0</mac_address>
      <mtu>1500</mtu>
      <txqueuelen>0</txqueuelen>
    </ip-info>
    <stats>
      <rx_packets>2971387</rx_packets>
      <rx_bytes>420208255</rx_bytes>
      <rx_errors>0</rx_errors>
      <rx_dropped>229</rx_dropped>
      <rx_overruns>0</rx_overruns>
      <rx_frame>0</rx_frame>
      <tx_packets>155</tx_packets>
      <tx_bytes>45522</tx_bytes>
      <tx_errors>0</tx_errors>
      <tx_dropped>0</tx_dropped>
      <tx_overruns>0</tx_overruns>
      <tx_carrier>0</tx_carrier>
      <tx_collisions>0</tx_collisions>
    </stats>
    <dhcp>
      <enabled>false</enabled>
      <offer>false</offer>
      <interface>NA</interface>
      <fixed_address>0.0.0.0</fixed_address>
      <subnet_mask>0.0.0.0</subnet_mask>
      <gateway>0.0.0.0</gateway>
      <lease_time>0</lease_time>
      <message_type>0</message_type>
      <name_servers>NA</name_servers>
      <server_identifier>0.0.0.0</server_identifier>
      <renewal_time>0</renewal_time>
      <rebinding_time>0</rebinding_time>
      <vendor_encapsulated_options>NA</vendor_encapsulated_options>
      <domain_name>NA</domain_name>
      <renew>0001-01-01T00:00:00-00:00</renew>
      <rebind>0001-01-01T00:00:00-00:00</rebind>
      <expire>0001-01-01T00:00:00-00:00</expire>
    </dhcp>
  </wan>
  <domain>NA</domain>
  <dns>
    <nameserver1>172.19.183.147</nameserver1>
    <nameserver2>0.0.0.0</nameserver2>
    <nameserver3>0.0.0.0</nameserver3>
  </dns>
 <hostname>Do3rdENCS75SettingsNoGW</hostname>
  <gateway>
    <ipv4_address>209.165.201.1</ipv4_address>
    <interface>MGMT</interface>
  </gateway>
</settings-native>