AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[dhcpd](server)

Martin Hope
deaugur
Asked: 2021-03-02 16:39:30 +0800 CST

dhcpd.leases 中的“host”条目和“lease”条目有什么区别?

  • 0

在托管文件dhcpd.leases中,我们的生命周期管理应用程序host h1.example.com { ... }在从应用程序构建虚拟机时添加了一个条目。但是,已迁移到应用程序并需要续租的已构建机器具有条目lease X.X.X.X { ... client-hostname "h2"; }(注意:条目中缺少域lease)。

我正在谈论的一个更清晰的例子:

host h1.example.com {
  dynamic;
  hardware ethernet 00:11:22:AA:BB:CC;
  fixed-address 192.168.1.10;
        supersede server.filename = "pxelinux.0";
        supersede server.next-server = AA:BB:CC:DD;
        supersede host-name = "h1.example.com";
}

lease 192.168.2.20 {
  starts 4 2021/01/01 00:00:00;
  ends 6 2021/04/01 00:00:00;
  cltt 4 2021/02/25 00:00:00;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:11:22:AA:BB:DD;
  client-hostname "h2"; 
}

有关其他信息:我们的生命周期管理应用程序还管理 DNS。我们注意到dhcpd.lease主机的 in 条目具有与其 DNS 记录不匹配h2的条目和 IP。当主机请求新 IP 时,lease该条目会自动填充。lease租约续订时似乎没有host创建记录,并且仅在生命周期管理应用程序构建新主机时出现。

host {...}这两个条目和dhcpd.leases之间有什么区别,lease {...}它们会影响哪些其他功能?

dhcp dhcpd
  • 1 个回答
  • 88 Views
Martin Hope
Sean McVeigh
Asked: 2016-08-15 12:12:02 +0800 CST

CentOS 7 DHCP 服务器无法启动(不会在指定端口上启用)

  • 2

我有一台带有无线和有线网络端口的 Cent0S 7 miniPC。无线端口 (wlp3s0) 作为 DHCP 客户端连接,地址为 192.168.10.X,并具有 DNS 解析。

我正在尝试将有线端口(enp2s0)设置为具有 192.168.100.X 寻址的私有子网的 DHCP 服务器。miniPC 将连接到网络交换机,该交换机将连接其他客户端设备进行测试。

我按照从 RedHat 到 T 恤的指示。

我/etc/systemd/system/dhcpd.service的如下:

[Unit]
Description=DHCPv4 Server Daemon
Documentation=man:dhcpd(8) man:dhcpd.conf(5)
Wants=network-online.target
After=network-online.target
After=time-sync.target

[Service]
Type=notify
ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid enp2s0

[Install]
WantedBy=multi-user.target

我/etc/dhcp/dhcpd.conf的如下:

default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.100.0 netmask 255.255.255.0 {
    option routers                  192.168.100.1;
    option subnet-mask              255.255.255.0;
    option broadcast-address        192.168.100.255;
    range 192.168.100.10 192.168.100.100;
}

当我去配置和启动服务时:

sudo systemctl --system daemon-reload
sudo systemctl restart dhcpd.service

我得到这个/var/log/messages:

localhost systemd: Starting DHCPv4 Server Daemon...
localhost dhcpd: Internet Systems Consortium DHCP Server 4.2.5
localhost dhcpd: Copyright 2004-2013 Internet Systems Consortium.
localhost dhcpd: All rights reserved.
localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
localhost dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
localhost dhcpd: Wrote 0 leases to leases file.
localhost dhcpd: 
localhost dhcpd: No subnet declaration for enp2s0 (no IPv4 addresses).
localhost dhcpd: ** Ignoring requests on enp2s0.  If this is not what
localhost dhcpd:   you want, please write a subnet declaration
localhost dhcpd:   in your dhcpd.conf file for the network segment
localhost dhcpd:   to which interface enp2s0 is attached. **
localhost dhcpd: 
localhost dhcpd: 
localhost dhcpd: Not configured to listen on any interfaces!
localhost dhcpd: 
localhost dhcpd: This version of ISC DHCP is based on the release available
localhost dhcpd: on ftp.isc.org.  Features have been added and other changes
localhost dhcpd: have been made to the base software release in order to make
localhost dhcpd: it work better with this distribution.
localhost dhcpd: 
localhost dhcpd: Please report for this software via the CentOS Bugs Database:
localhost dhcpd:    http://bugs.centos.org/
localhost dhcpd: 
localhost dhcpd: exiting.
localhost systemd: dhcpd.service: main process exited, code=exited, status=1/FAILURE
localhost systemd: Failed to start DHCPv4 Server Daemon.
localhost systemd: Unit dhcpd.service entered failed state.
localhost systemd: dhcpd.service failed.

知道这里出了什么问题吗?

谢谢。

dhcp centos7 dhcpd
  • 2 个回答
  • 39030 Views
Martin Hope
bourneN5years
Asked: 2016-04-28 15:25:45 +0800 CST

如何清除 OSX Server 中的 DHCP GUI?大楼里的幽灵客户

  • 1

我有几台客户端机器出现在网络中(不仅在 Server.app 中,而且在各种日志中),它们有我不认识的“计算机名称”(Apple 中的 Bonjour 名称),但可能是旧的客户或更可能是活跃客户的旧名称。我还无法将 MAC 地址与日志中的较新计算机名称或主机名等进行匹配,而且我没有太多历史数据可以使用,例如网络上以前已确认的客户端。

更奇怪的是,相同的客户端出现在一些 Cisco 交换机的日志中,并且并不总是在建筑物的同一楼层,这很奇怪,因为制造商查找的 MAC 可能是 iMac。我相当一致地看到其中的 2-4 个,在一个我们有大约 100 台类似 iMac 的网络中,这些 iMac 都将以类似的方式进行成像,但没有这些缓存数据,或者其他任何东西。

它通过关闭 dhcp(在这种情况下通过使用 Server.app 中的 GUI)暂时清除 dhcp 列表中的名称,然后删除或编辑/var/db/dhcpd_leases,然后重新打开服务,但几分钟后它们再次出现。我怎样才能删除它们?...或者我应该有其他网络和/或安全问题?

任何关于如何在命令行上在 Darwin/OSX 中管理 DHCP 的更通用的提示也会有所帮助。Server.app 中的整个 DHCP 设置对我来说似乎有问题/滞后。

这个问题是关于在 10.10 和 10.11 上运行客户端的 OSX Server 5.0 而非 OSX 10.11 的服务器。

mac-osx-server mac-osx dhcp dhcpd
  • 1 个回答
  • 1890 Views
Martin Hope
halt
Asked: 2014-08-30 12:38:07 +0800 CST

ISC dhcpd 动态引导文件名。这可能吗?

  • 2

实际上,我想根据客户端 MAC 动态分配引导文件名。

我试过这个配置:

option bootfile-name concat( binary-to-ascii(16, 8, "", substring (hardware, 1, 6)), ".cfg");

但这是错误的配置(因为 dhcp 服务器根本没有启动)。如果不是 concat(...) 我只输入真实的文件名(例如“000102030405.cfg”),一切都很好。但这不是我需要的。有没有办法动态设置引导文件名?

dhcpd
  • 2 个回答
  • 2349 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve