Skip to main content

OEM DNS Settings

Table 1. DNS settings properties
FieldTypeRead onlyDescription

DNSStatus

String

False

Indicator of whether DNS is enabled

DNSIndex

String

False

Interface index value for the DNS server IP address

DNSDHCP

String

False

DNS DHCP mode

IPPriority

String

False

IP Priority of DNS server

DomainDHCP

String

False

Domain DHCP mode (0h: static method; 1h: DHCP method)

DomainIndex

String

False

Interface index value for domain selection

DomainPriority

String

False

Domain priority for IPv4 or IPv6

Domainname

String

False

Domain name of DNS server

HostName

String

False

Host name of DNS server

DNSServerIP1

String

False

IP address of DNS server 1

DNSServerIP2

String

False

IP address of DNS server 2

DNSServerIP3

String

False

IP address of DNS server 3

Actions

object

True

Restart DNS: User needs to perform a reset action after changing DNS configuration.

Request

Get DNS Settings

GET https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/NetworkProtocol/Oem/Lenovo/DNS
Content-Type: application/json

Response example

{
"@odata.context": "/redfish/v1/$metadata#ManagerNetworkProtocol.ManagerNetworkProtocol",
"@odata.etag": "\"1583393604\"",
"@odata.id": "/redfish/v1/Managers/Self/NetworkProtocol/Oem/Lenovo/DNS",
"@odata.type": "#ManagerNetworkProtocol.v1_4_1.ManagerNetworkProtocol",
"Actions": {
"#DNS.Reset": {
"ResetType@Redfish.AllowableValues": [
"restart"
],
"target": "/redfish/v1/Managers/Self/NetworkProtocol/Oem/Lenovo/DNS/Actions/DNS.reset"
}
},
"DNSDHCP": "DHCP",
"DNSIndex": "Eth1",
"DNSStatus": "enable",
"DomainDHCP": "DHCP",
"DomainIndex": "Eth1",
"DomainPriority": "IPv4",
"HostName": "TSM3CE1A1C7E7DA",
"IPPriority": "IPv4",
"Id": "DNS",
"Name": "Network Protocol DNS"

Request

Change DNS Settings

After completing all the DNS patch action as following, it has to post the DNS.reset to restart the DNS service.

PATCH https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/NetworkProtocol/Oem/Lenovo/DNS
Content-Type: application/json

Request body

DNS properties should be patched individually. See the following example patch body:

DNS status:
{
"DNSStatus" : "disable"
}
DNS hostname:
{
"DNSHostname":"AMI202923333328"
}
DNS setting:
- DHCP mode
{
"DNSDHCP" :"DHCP",
"DNSIndex" :"eth1",
"IPPriority" :"ipv4"
}
- Static mode
{
"DNSDHCP":"static",
"DNSIndex":"none",
"IPPriority":"none"
}
DNS Domain name setting
-DHCP mode
{
"DomainDHCP":"DHCP",
"DomainIndex":"eth1",
"DomainPriority":"ipv4"
}
-Static mode
{
"DomainDHCP":"static",
"DomainName":"USI.com.tw"
}
DNS server ip
{
"DNSServerIP1": "10.2.0.12",
"DNSServerIP2":"10.2.0.11",
"DNSServerIP3":"10.2.0.20"
}

Request

Reset DNS

POST https://{{ip}}/redfish/v1/Managers/Self/NetworkProtocol/Oem/Lenovo/DNS/Actions/DNS.reset
Content-Type: application/json

Request body

{
"ResetType":"restart"
}

Response

The response content is 200 with no body.

Note
After the DNS reset request is executed successfully, the DNS service will restart, and the network service will also restart, so the network will be unavailable for a short time (about 30 seconds).