1 Star 0 Fork 4.9K

Lin_bruin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dhclient.md 6.80 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

dhclient

命令功能

设置和查看dhclient的参数。

命令格式

dhclient <netif name>

dhclient -x <netif name>

dhclient -gb <netif name>

dhclient -sv <vendor>

dhclient -gv

dhclient -gd <index>

dhclient -sd <dns_ip>

参数说明

表 1 参数说明

参数

参数说明

取值范围

<netif name>

启动对应网卡的dhcp请求。

网卡名字,eth0。

-x <netif name>

关闭对应网卡的dhcp功能。

网卡名字,eth0。

-gb <netif name>

查看对应网卡的dhcp请求是否完成。

网卡名字,eth0。

-sv <vendor>

设置dhcp请求的厂商信息。

厂商信息,长度是32个字符。

-gv

查看dhcp请求的厂商信息。

N/A

-gd <index>

获取第index个dns server的信息。

index,0或者1。

-sd <dns_ip>

设置主dns server的ip。

dns的ip地址。

使用指南

dhclient eth0

dhclient -x eth0

dhclient -gb eth0

dhclient -sv MFSI

dhclient -gv

dhclient -gd 0

dhclient -sd 8.8.8.8

使用实例

输出说明

表 2 输出说明

输出

说明

dhclient: set vendor info [MFSI] success

设置厂商信息MFSI信息成功。

dns[0]: 192.168.1.100

dns server ip地址为192.168.1.100。

1
https://gitee.com/dreaminghell/docs.git
git@gitee.com:dreaminghell/docs.git
dreaminghell
docs
docs
master

搜索帮助