DNS_PRIMARY, DNS_SECONDARY

 

Description

Get or Set Primary or Secondary DNS (Domain Name Server) IP addresses.

The runtime DNS server settings could be set by several methods. They could be set manually or set by DHCP process. The following rules give how firmware maintains the runtime DNS server settings.

  1. There is no valid setting in DNS_PRIMARY and DNS_SECONDARY
  2. There are valid settings in DNS_PRIMARY or DNS_SECONDARY

If the CHANNEL=n was set with this URL to the multiple channel video encoders, this URL is treated as read command and the router's DNS configurations will be returned.

Input Argument

Unicast IPv4 Addressing (xxx.xxx.xxx.xxx)
Note:
When set 0.0.0.0, the firmware removes the DNS server settings. For example,
The DNS_PRIMARY=0.0.0.0 and DNS_PRIMARY= could remove the primary DNS server setting from firmware
But the return message of them are different.
OK: DNS_PRIMARY='0.0.0.0' is the return message of the first command and DNS_PRIMARY='' is the return message of the second command.
After these two commands, the DNS_PRIMARY configuration in firmware will be DNS_PRIMARY=''.

Attribute

Return of Message

DNS_PRIMARY='168.95.1.1'
DNS_SECONDARY=''

OK: DNS_PRIMARY='168.95.1.1'
OK: DNS_SECONDARY=''
or
ERROR: DNS_PRIMARY='168.95.1.1'
ERROR: DNS_SECONDARY=''

Applicability

Status

Valid

See Also

DNS, WAN_STATUS, V2_WAN_STATUS

Example

http://ip:port/cgi-bin/system?USER=Admin&PWD=123456&DNS_PRIMARY
http://ip:port/cgi-bin/system?USER=Admin&PWD=123456&DNS_SECONDARY
or
http://ip:port/cgi-bin/cmd/system?DNS_PRIMARY
http://ip:port/cgi-bin/cmd/system?DNS_SECONDARY
http://ip:port/cgi-bin/system?USER=Admin&PWD=123456&DNS_PRIMARY='168.95.1.1'
http://ip:port/cgi-bin/system?USER=Admin&PWD=123456&DNS_SECONDARY=''
or
http://ip:port/cgi-bin/cmd/system?DNS_PRIMARY='168.95.1.1'
http://ip:port/cgi-bin/cmd/system?DNS_SECONDARY=''

Back to

HOME, SYSTEM CGI