【Linux】一步一步学Linux——dhclient命令(156)
生活随笔
收集整理的這篇文章主要介紹了
【Linux】一步一步学Linux——dhclient命令(156)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
00. 目錄
文章目錄
- 00. 目錄
- 01. 命令概述
- 02. 命令格式
- 03. 常用選項
- 04. 參考示例
- 05. 附錄
01. 命令概述
dhclient命令使用動態主機配置協議動態的配置網絡接口的網絡參數,也支持BOOTP協議。
02. 命令格式
dhclient [參數] [網絡接口]03. 常用選項
-4 : 使用DHCPv4 -6 : 使用DHCPv6 -p 指定dhcp客戶端監聽的端口號(默認端口號86) -d 總是以前臺方式運行程序 -q 安靜模式,不打印任何錯誤的提示信息 -r 釋放ip地址 -n 不配置任何接口 -x 停止正在運行的DHCP客戶端,而不釋放當前租約,殺死現有的dhclient -s 在獲取ip地址之前指定DHCP服務器 -w 即使沒有找到廣播接口,也繼續運行04. 參考示例
4.1 動態獲取IP
[root@localhost ~]# dhclient4.2 釋放IP
[root@localhost ~]# dhclient -r4.3 動態獲取IP,并且顯示過程
[root@localhost ~]# dhclient -v ens33 dhclient(71545) is already running - exiting. This version of ISC DHCP is based on the release available on ftp.isc.org. Features have been added and other changes have been made to the base software release in order to make it work better with this distribution.Please report for this software via the CentOS Bugs Database:http://bugs.centos.org/exiting. [root@localhost ~]#4.4 釋放IP,顯示過程
[root@localhost ~]# dhclient -r -v ens33 Internet Systems Consortium DHCP Client 4.2.5 Copyright 2004-2013 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/Listening on LPF/ens33/00:50:56:26:d8:88 Sending on LPF/ens33/00:50:56:26:d8:88 Sending on Socket/fallback DHCPRELEASE on ens33 to 192.168.12.2 port 67 (xid=0x254c08e2)4.5 從指定的服務器獲取ip地址
[root@localhost ~]# dhclient -s 192.168.12.24.6 停止運行dhclient
[root@localhost ~]# dhclient -x05. 附錄
參考:【Linux】一步一步學Linux系列教程匯總
總結
以上是生活随笔為你收集整理的【Linux】一步一步学Linux——dhclient命令(156)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux】一步一步学Linux——e
- 下一篇: 【Linux】一步一步学Linux——i