1 Star 1 Fork 5K

王栓 / docs

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

dhclient

Command Function

This command is used to set and view dhclient parameters.

Syntax

dhclient <netif name>

dhclient -x <netif name>

dhclient -gb <netif name>

dhclient -sv <vendor>

dhclient -gv

dhclient -gd <index>

dhclient -sd <dns_ip>

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

<netif name>

Starts the DHCP request of the network interface card (NIC).

NIC name, eth0

-x <netif name>

Disables the DHCP function for the NIC.

NIC name, eth0

-gb <netif name>

Checks whether the DHCP request of the NIC is complete.

NIC name, eth0

-sv <vendor>

Sets the vendor information of a DHCP request.

Vendor information (The value is a string of 32 characters.)

-gv

Displays the vendor information in a DHCP request.

N/A

-gd <index>

Obtains information about the DNS server at the specified index.

Index, 0 or 1

-sd <dns_ip>

Indicates the IP address of the active DNS server.

IP address of the DNS server

Usage

dhclient eth0

dhclient -x eth0

dhclient -gb eth0

dhclient -sv MFSI

dhclient -gv

dhclient -gd 0

dhclient -sd 8.8.8.8

Example

Output

Table 2 Output description

Parameter

Description

dhclient: set vendor info [MFSI] success

Indicates that the MFSI information is successfully set.

dns[0]: 192.168.1.100

Indicates that the IP address of the DNS server is 192.168.1.100.

1
https://gitee.com/wang-shuan/docs.git
git@gitee.com:wang-shuan/docs.git
wang-shuan
docs
docs
master

搜索帮助