欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Linux的dhcp啟動(dòng)異常怎么辦-創(chuàng)新互聯(lián)

這篇文章主要介紹“Linux的dhcp啟動(dòng)異常怎么辦”,在日常操作中,相信很多人在Linux的dhcp啟動(dòng)異常怎么辦問題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”Linux的dhcp啟動(dòng)異常怎么辦”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!

成都創(chuàng)新互聯(lián)公司主營(yíng)玄武網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,成都App定制開發(fā),玄武h5小程序制作搭建,玄武網(wǎng)站營(yíng)銷推廣歡迎玄武等地區(qū)企業(yè)咨詢

    最近折騰Centos自動(dòng)化安裝,需要Linux的dhcp服務(wù),使用yum -y install dhcp安裝dhcp、dhcp-common的rpm包,啟動(dòng)dhcp時(shí)異常報(bào)錯(cuò),

由于dhcp是操作系統(tǒng)及服務(wù),關(guān)于dhcp啟動(dòng)失敗可以查看操作系統(tǒng)日志/var/log/messages,使用service dhcpd start時(shí)報(bào)錯(cuò)如下:

[root@localhost log]# tail -f messages

May 13 20:30:45 localhost dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
May 13 20:30:45 localhost dhcpd: Copyright 2004-2010 Internet Systems Consortium.
May 13 20:30:45 localhost dhcpd: All rights reserved.
May 13 20:30:45 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
May 13 20:30:45 localhost dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
May 13 20:30:45 localhost dhcpd: Wrote 0 leases to leases file.
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: No subnet declaration for eth2 (192.168.48.134).
May 13 20:30:45 localhost dhcpd: ** Ignoring requests on eth2.  If this is not what
May 13 20:30:45 localhost dhcpd:    you want, please write a subnet declaration
May 13 20:30:45 localhost dhcpd:    in your dhcpd.conf file for the network segment
May 13 20:30:45 localhost dhcpd:    to which interface eth2 is attached. **
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: Not configured to listen on any interfaces!
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: This version of ISC DHCP is based on the release available
May 13 20:30:45 localhost dhcpd: on ftp.isc.org.  Features have been added and other changes
May 13 20:30:45 localhost dhcpd: have been made to the base software release in order to make
May 13 20:30:45 localhost dhcpd: it work better with this distribution.
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: Please report for this software via the CentOS Bugs Database:
May 13 20:30:45 localhost dhcpd:     http://bugs.centos.org/
May 13 20:30:45 localhost dhcpd: 
May 13 20:30:45 localhost dhcpd: exiting.

    針對(duì)dhcp啟動(dòng)No subnet declaration for eth的報(bào)錯(cuò),需要排查確認(rèn)信息:

1、dhcp報(bào)錯(cuò)提示的ethn網(wǎng)卡與dhcp配置文件在同一網(wǎng)段確定subnet為192.168.48.0

[root@myserver tftpboot]# cat /etc/dhcpd.conf
ddns-update-style none; #設(shè)置DHCP服務(wù)器模式
ignore client-updates; #禁止客戶端更新
subnet 192.168.48.0 netmask 255.255.255.0 { #設(shè)置網(wǎng)段
  option routers 192.168.48.254; #設(shè)置網(wǎng)關(guān)
  range  192.168.48.160 192.168.48.200; #設(shè)置dhcp服務(wù)器IP地址租用的范圍
  default-lease-time 604800; #默認(rèn)租約時(shí)間
  max-lease-time 605800; #大租約時(shí)間
  next-server 192.168.48.134; #tftp服務(wù)器地址
  filename "pxelinux.0"; #tftp服務(wù)器根目錄下面的文件名
}
[root@myserver tftpboot]# 

2、使用vmware虛擬機(jī)時(shí),需要注意dhcp配置的subnet在eth0網(wǎng)卡Ip所在網(wǎng)段,并且eth0不能是hostonly,可以是橋接模式或NAT模式,

同時(shí)需要在linux主機(jī)內(nèi)ping通vmware自己的網(wǎng)卡Ip地址。

    然后,啟動(dòng)dhcp不使用service dhcpd start而使用dhcpd -cf /etc/dhcpd.conf eth2在dhcp啟動(dòng)的時(shí)候指定dhcp監(jiān)聽的網(wǎng)卡,

dhcp啟動(dòng)就能正常啟動(dòng)了。

[root@myserver tftpboot]# dhcpd -cf /etc/dhcpd.conf eth2
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
he config file
Wrote 2 leases to leases file.
Listening on LPF/eth2/00:0c:29:89:78:3d/192.168.48.0/24
Sending on   LPF/eth2/00:0c:29:89:78:3d/192.168.48.0/24
Sending on   Socket/fallback/fallback-net
[root@myserver tftpboot]# There's already a DHCP server running.
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@myserver tftpboot]# service dhcpd status
dhcpd (pid  2501) is running...
[root@myserver tftpboot]#

    如果需要開機(jī)自動(dòng)啟動(dòng)dhcp,這時(shí)再使用命令chkconfig dhcp on,可以將dhcpd -cf /etc/dhcpd.conf eth2添加到/etc/rc.local

到此,關(guān)于“Linux的dhcp啟動(dòng)異常怎么辦”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!

當(dāng)前題目:Linux的dhcp啟動(dòng)異常怎么辦-創(chuàng)新互聯(lián)
當(dāng)前鏈接:http://chinadenli.net/article0/cdoeoo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司商城網(wǎng)站網(wǎng)站改版虛擬主機(jī)網(wǎng)站內(nèi)鏈移動(dòng)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化