linux虚拟机dhcp启动失败,Linux 的dhcp启动异常之No subnet declaration for eth1 (192.168.48.134)...

最近折腾Centos自动化安装,需要的dhcp服务,使用yum -y install dhcp安装dhcp、dhcp-common的rpm包,启动dhcp时异常报错,

由于dhcp是及服务,关于dhcp启动失败可以查看操作系统日志/var/log/messages,使用service dhcpd start时报错如下:

[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

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 eth1 (192.168.48.134).

May 13 20:30:45 localhost dhcpd: ** Ignoring requests on eth1.  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 eth1 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:

May 13 20:30:45 localhost dhcpd:

May 13 20:30:45 localhost dhcpd: exiting.

针对dhcp启动No subnet declaration for eth的报错,需要排查确认信息:

1、dhcp报错提示的ethn网卡与dhcp配置文件在同一网段确定subnet为192.168.48.0

[root@myserver tftpboot]# cat /etc/dhcpd.conf

ddns-update-style none; #设置DHCP服务器模式

ignore client-updates; #禁止客户端更新

subnet 192.168.48.0 netmask 255.255.255.0 { #设置网段

option routers 192.168.48.254; #设置网关

range  192.168.48.160 192.168.48.200; #设置dhcp服务器IP地址租用的范围

default-lease-time 604800; #默认租约时间

max-lease-time 605800; #最大租约时间

next-server 192.168.48.134; #tftp服务器地址

filename "pxelinux.0"; #tftp服务器根目录下面的文件名

}

[root@myserver tftpboot]#

2、使用vmware虚拟机时,需要注意dhcp配置的subnet在eth0网卡Ip所在网段,并且eth0不能是hostonly,可以是桥接模式或NAT模式,

同时需要在linux主机内ping通vmware自己的网卡Ip地址。

然后,启动dhcp不使用service dhcpd start而使用dhcpd -cf /etc/dhcpd.conf eth1在dhcp启动的时候指定dhcp监听的网卡,

dhcp启动就能正常启动了。

[root@myserver tftpboot]# dhcpd -cf /etc/dhcpd.conf eth1

Internet Systems Consortium DHCP Server 4.1.1-P1

Copyright 2004-2010 Internet Systems Consortium.

All rights reserved.

For info, please visit

he config file

Wrote 2 leases to leases file.

Listening on LPF/eth1/00:0c:29:89:78:3d/192.168.48.0/24

Sending on   LPF/eth1/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:

exiting.

[root@myserver tftpboot]# service dhcpd status

dhcpd (pid  2501) is running...

[root@myserver tftpboot]#

如果需要开机自动启动dhcp,这时再使用命令chkconfig dhcp on,可以将dhcpd -cf /etc/dhcpd.conf eth1添加到/etc/rc.local

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/411898.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Developer Express .Net 2005 V7.2.1 crack

Developer Express .Net 2005 V7.2.1破解及下载 http://www.sofitcn.net/ 破解需要注册后才能下载。不要广泛外传! 转载于:https://www.cnblogs.com/ainima/archive/2007/07/14/6331513.html

[vue] 使用vue渲染大量数据时应该怎么优化?说下你的思路!

[vue] 使用vue渲染大量数据时应该怎么优化?说下你的思路! 1.如果需要响应式,考虑使用虚表(只渲染要显示的数据); 2.如果不考虑响应式,变量在beforeCreated或created中声明(Object.f…

linux u盘 uid pid,linux下的pid文件的作用

在Linux系统的目录/var/run下面一般我们都会看到很多的*.pid文件。而且往往新安装的程序在运行后也会在/var/run目录下面产生自己的pid文件。那么这些pid文件有什么作用呢?它的内容又是什么呢?(1) pid文件的内容:pid文件为文本文件&#xff0…

学习进度第4周

时间30小时代码量2000行左右博客园2知识点 知识点&#xff1a;从最基本的jsp连接数据库学习。 List<类名> listnew ArrayList<>()&#xff1a;这就像是一个容器。能把数据储存在 list里。 ResultSet rs&#xff1a;创建rs结果集可以用来接受储存数据。 rs…

昨夜的雨图片

昨天趟着淹没到屁股的雨水回家的&#xff0c;今天才知道&#xff0c;这是一场非常可怕的暴雨.本来就吓的够戗,现在直接两腿发软&#xff0c;几欲要哭了。想想真是后怕. 朋友说&#xff0c;你可真大胆,那么大雨你也敢趟.其实不是胆大,而是我走着走着水没的越来越往上了.幸亏个子…

[vue] 你有使用过JSX吗?说说你对JSX的理解

[vue] 你有使用过JSX吗&#xff1f;说说你对JSX的理解 jsx不是一门新的语言&#xff0c;是一种新的语法糖。让我们在js中可以编写像html一样的代码。 允许XML语法直接加入到JavaScript代码中&#xff0c;让你能够高效的通过代码而不是模板来定义界面个人简介 我是歌谣&#x…

linux qtopia-2.2.0编译,qtopia-2.2.0在linux上的安装(基于mini2440)

环境&#xff1a;fedora9、ubuntu10.04x86-qtopia、arm-qtopiagcc-4.3.x、g-4.3.xarm-linux-4.3.2一、x86-qtopia的安装x86-qtopia的安装不管在哪一版本中的linux中&#xff0c;必须采用gcc-4.3.x、g-4.3.x的编译器(或以下&#xff0c;没测试过)&#xff0c;编译过程才不会莫名…

微信支付开发流程

记录下微信JSAPI支付的流程 1、判断是微信浏览器则直接请求微信授权的链接&#xff0c;需要传递给微信重定向回的页面&#xff0c;及订单id // 微信浏览器直接调用 if (this.isWeixin) {let redirectUri http://192.168.1.6/weChatwindow.location.href https://open.weixin.…

vb对数据库操作用存储过程

存储过程如下create proc sp_recordset bbb int as select * from aaa where bbb bbbvb代码如下&#xff1a; Dim cmd As ADODB.Command Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim ADOPrm Set ADOPrm New ADODB.Parameter Set rs New AD…

[vue] `<template></template>`有什么用?

[vue] <template></template>有什么用&#xff1f; 包裹嵌套其它元素&#xff0c;使元素具有区域性&#xff0c;自身具有三个特点&#xff1a; *隐藏性&#xff1a;不会显示在页面中 *任意性&#xff1a;可以写在页面的任意地方 *无效性&#xff1a; 没有一个根元…

linux域文件夹权限设置密码,如何配置Linux 文件权限(经典详细版本: rwxst)

在Linux中&#xff0c;Linux文件权限一共分为三种。本文将向读者展示如何正确配置Linux文件权限。三种特殊权限简介SUID当一个设置了SUID 位的可执行文件被执行时&#xff0c;该文件将以所有者的身份运行&#xff0c;也就是说无论谁来执行这个文件&#xff0c;他都有文件所有者…

ASP如何限定中英文混合的文字输出字数?

1<%2字符串截取函数&#xff0c;用于信息标题 3strWord需要截取的字符串 4intByteLength显示的字节长度&#xff0c;1个汉字两个字节 5intPadDotAmount背截取后尾部补充点的个数 6字符串截取函数&#xff0c;用于信息标题 7Function FixString()Function FixString(ByVal st…

【译】索引进阶(十一):SQL SERVER中的索引碎片【上篇】

原文链接&#xff1a;传送门。 第十章节我们分析了索引的内部结构。有了这些关于索引结构的知识&#xff0c;我们便可以分析索引碎片了&#xff1a;其产生的原因&#xff0c;如何防止&#xff0c;以及何时可以不去关注它们。 一些背景知识 / 复习 以下知识对于理解索引碎片来说…

linux备份mysql部分表数据,linux mysql 数据按表名称备份

1、按表名称备份#!/bin/bash#user#数据库用户dbuser"root"#数据库密码dbpassword"chenyong"#时间date$(date %Y%m%d)#数据库名称dbnamesungrowv3#备份数据保存的路劲url/home/test/sql/#指定数据库的所以表tables$(mysql -u$dbuser -p$dbpassword -ss -e &…

Maverick.Net介绍 (来自http://www.cnblogs.com/RicCC/archive/2006/09/17/506890.html)

Maverick.Net介绍 Maverick.Net是Java社区开源MVC Web框架Maverick的.Net版本&#xff0c;相关资料可以查看项目主页。不管Maverick.Net的是非好坏&#xff0c;了解一下它的思想还是不错的。下面的内容是对Maverick.Net整体做一个简单的介绍&#xff0c;以求能够从全局的角度了…

惊了!最通俗易懂的Djongo入门竟然在这里!

Django简介python下有多款不同的web框架&#xff0c;Django是最有代表行的一种。许多成功的网站和app都基于djanfo。django是一个开源的web应用框架&#xff0c;由python写成。django采用了MVC的软件设计模式&#xff0c;即模型M,视图V和控制器C。Django特点强大的数据库功能&a…

linux z是什么文件夹,Linux znew初学者命令实例教程

原标题&#xff1a;Linux znew初学者命令实例教程您是否知道Linux提供了一种将.Z文件重新压缩为.gz文件的方法&#xff1f; 是的&#xff0c;znew命令可以让你这样做。 在本教程中&#xff0c;我们将使用一些易于理解的示例讨论此命令行实用程序的基础知识。 但在我们这样做之前…