1 Star 0 Fork 4.9K

bill / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dns.md 4.06 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

dns

Command Function

This command is used to query and set the IP address of a DNS server on a board.

Syntax

dns <1-2> <IP>

dns -a

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

<1-2>

Indicates the DNS server to set the IP address.

1 or 2

<IP>

Indicates the IP address of the server.

N/A

-a

Displays the current settings.

N/A

Usage

None

Example

Example:

  1. Check the current DNS settings.
  2. Set the IP address of the second DNS server.
  3. Verify the setting.

Output

  1. Checking the current DNS settings:

    OHOS # dns -a
    dns1: 192.168.1.10
    dns2: 0.0.0.0
  2. Setting the IP address of the second DNS server:

    OHOS # dns 2 192.168.1.2
  3. Verifying the setting:

    OHOS # dns -a
    dns1: 192.168.1.10
    dns2: 192.168.1.2
1
https://gitee.com/ximeibaba/docs.git
git@gitee.com:ximeibaba/docs.git
ximeibaba
docs
docs
master

搜索帮助