
Linux网络服务之DHCP
Linux网络服务之DHCP
一、DHCP的基本概念、工作原理
1.DHCP的IP分配机制
1)自动分配:DHCP分配一个永久的IP给主机
2)动态分配:把一个IP地址在有限的期限内分给主机,当时间过半的时候续约
3)手工分配:由管理员分配固定的IP地址给主机
2.DHCP的工作原理
1)DHCP Client发现阶段
即DHCP客户端寻找DHCP服务端的过程,对应于客户端发送DHCP Discovery,因为DHCP Server对应于DHCP客户端是未知的,所以DHCP 客户端发出的DHCP Discovery报文是广播包,源地址为0.0.0.0目的地址为255.255.255.255。网络上的所有支持TCP/IP的主机都会收到该DHCP Discovery报文,但是只有DHCP Server会响应该报文。
2)DHCP Server 提供阶段
DHCP Server提供阶段,即为DHCP Server响应DHCP Discovery所发的DHCP Offer阶段,即DHCP服务器提供IP地址的阶段。在网络中接收到DHCP discover发现信息的DHCP服务器都会做出响应,它从尚未出租的IP地址中挑选一个分配给DHCP客户机,向DHCP客户机发送一个包含出租的IP地址和其他设置的DHCP offer提供信息
3) DHCP Client 确认阶段
即DHCP客户机选择某台DHCP服务器提供的IP地址的阶段。如果有多台DHCP服务器向DHCP客户机发来的DHCPoffer提供信息,则DHCP客户机只接受第一个收到的DHCPoffer提供信息,然后它就以广播方式回答一个DHCPrequest请求信息,该信息中包含向它所选定的DHCP服务器请求IP地址的内容。之所以要以广播方式回答,是为了通知所有的DHCP服务器,他将选择某台DHCP服务器所提供的IP地址
4) DHCP Server确认阶段
即DHCP服务器确认所提供的IP地址的阶段。当DHCP服务器收到DHCP客户机回答的DHCP request请求信息之后,它便向DHCP客户机发送一个包含它所提供的IP地址和其他设置的DHCP ack确认信息,告诉DHCP客户机可以使用它所提供的IP地址。然后DHCP客户机便将其TCP/IP协议与网卡绑定,另外,除DHCP客户机选中的服务器外,其他的DHCP服务器都将收回曾提供的IP地址
3.DHCP租约
50%
75%
87.5%
4.DHCP保报文格式
字段名 | 长度(字节) | 描述 |
---|---|---|
Op | 1 | 消息类型(请求/回复) |
Htype | 1 | 硬件类型 |
Hlen | 1 | 硬件地址长度 |
Hops | 1 | 转发次数 |
Xid | 4 | 交易 ID |
Secs | 2 | 秒数(从 DHCP 协议开始到现在的时间) |
Flags | 2 | 标志 |
Ciaddr | 4 | 客户端 IP 地址 |
Yiaddr | 4 | 分配给客户端的 IP 地址 |
Siaddr | 4 | DHCP 服务器的 IP 地址 |
Giaddr | 4 | DHCP 中继代理的 IP 地址 |
Chaddr | 16 | 客户端 MAC 地址 |
Sname | 64 | DHCP 服务器名称 |
File | 128 | 引导文件名 |
Options | 可变 | 选项(包括客户端和服务器使用的 DHCP 选项和其他参数) |
二、配置DHCP服务器
安装及配置文件
安装:yum -y install dhcp
<p>查看配置文件:rpm -ql dhcp</p>
<p>/etc/dhcp/dhcpd.conf ##配置文件
/usr/sbin/dhcrelay ##中继服务
/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example ##模板文件
/var/lib/dhcpd/dhcpd.leases ## 租约文件
DHCP的配置文件解析
2.1 DHCP默认的配置文件
# dhcpd.conf</p>
<h1></h1><h1 id="Sample configuration file for ISC dhcpd">Sample configuration file for ISC dhcpd</h1><h1></h1>
<p></p>
<h1 id="option definitions common to all supported networks...">option definitions common to all supported networks...</h1>
<p>option domain-name "example.org"; #域名
option domain-name-servers ns1.example.org, ns2.example.org; #域名服务器
default-lease-time 600; #默认的租约时间
max-lease-time 7200; #最大租约时间
</p>
<h1 id="Use this to enble / disable dynamic dns updates globally.">Use this to enble / disable dynamic dns updates globally.</h1>
<p>#ddns-update-style none;
</p>
<h1 id="If this DHCP server is the official DHCP server for the local">If this DHCP server is the official DHCP server for the local</h1><h1 id="network, the authoritative directive should be uncommented.">network, the authoritative directive should be uncommented.</h1>
<p>#authoritative; #如果是权威DHCP,建议打开
</p>
<h1 id="Use this to send dhcp log messages to a different log file (you also">Use this to send dhcp log messages to a different log file (you also</h1><h1 id="have to hack syslog.conf to complete the redirection).">have to hack syslog.conf to complete the redirection).</h1>
<p>log-facility local7; #日志级别
</p>
<h1 id="No service will be given on this subnet, but declaring it helps the">No service will be given on this subnet, but declaring it helps the</h1><h1 id="DHCP server to understand the network topology.">DHCP server to understand the network topology.</h1>
<p>
#作用域配置
subnet 10.152.187.0 netmask 255.255.255.0 {
}
</p>
<h1 id="This is a very basic subnet declaration.">This is a very basic subnet declaration.</h1>
<p>#作用域配置
subnet 10.254.239.0 netmask 255.255.255.224 {
range 10.254.239.10 10.254.239.20;
option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
}</p>
<h1 id="This declaration allows BOOTP clients to get dynamic addresses,">This declaration allows BOOTP clients to get dynamic addresses,</h1><h1 id="which we don't really recommend.">which we don't really recommend.</h1>
<p>#作用域配置
subnet 10.254.239.32 netmask 255.255.255.224 {
range dynamic-bootp 10.254.239.40 10.254.239.60;
option broadcast-address 10.254.239.31;
option routers rtr-239-32-1.example.org;
}
</p>
<h1 id="A slightly different configuration for an internal subnet.">A slightly different configuration for an internal subnet.</h1>
<p>#作用域配置
subnet 10.5.5.0 netmask 255.255.255.224 {
range 10.5.5.26 10.5.5.30;
option domain-name-servers ns1.internal.example.org;
option domain-name "internal.example.org";
option routers 10.5.5.1;
option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
}
</p>
<h1 id="Hosts which require special configuration options can be listed in">Hosts which require special configuration options can be listed in</h1><h1 id="host statements. If no address is specified, the address will be">host statements. If no address is specified, the address will be</h1><h1 id="allocated dynamically (if possible), but the host-specific information">allocated dynamically (if possible), but the host-specific information</h1><h1 id="will still come from the host declaration.">will still come from the host declaration.</h1>
<p>
host passacaglia {
hardware ethernet 0:0:c0:5d:bd:95;
filename "vmunix.passacaglia";
server-name "toccata.fugue.com";
}</p>
<h1 id="Fixed IP addresses can also be specified for hosts. These addresses">Fixed IP addresses can also be specified for hosts. These addresses</h1><h1 id="should not also be listed as being available for dynamic assignment.">should not also be listed as being available for dynamic assignment.</h1><h1 id="Hosts for which fixed IP addresses have been specified can boot using">Hosts for which fixed IP addresses have been specified can boot using</h1><h1 id="BOOTP or DHCP. Hosts for which no fixed address is specified can only">BOOTP or DHCP. Hosts for which no fixed address is specified can only</h1><h1 id="be booted with DHCP, unless there is an address range on the subnet">be booted with DHCP, unless there is an address range on the subnet</h1><h1 id="to which a BOOTP client is connected which has the dynamic-bootp flag">to which a BOOTP client is connected which has the dynamic-bootp flag</h1><h1 id="set.">set.</h1>
<p>host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
</p>
<h1 id="You can declare a class of clients and then do address allocation">You can declare a class of clients and then do address allocation</h1><h1 id="based on that. The example below shows a case where all clients">based on that. The example below shows a case where all clients</h1><h1 id="in a certain class get addresses on the 10.17.224/24 subnet, and all">in a certain class get addresses on the 10.17.224/24 subnet, and all</h1><h1 id="other clients get addresses on the 10.0.29/24 subnet.">other clients get addresses on the 10.0.29/24 subnet.</h1>
<p>
class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}
shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
}
subnet 10.0.29.0 netmask 255.255.255.0 {
option routers rtr-29.example.org;
}
pool {
allow members of "foo";
range 10.17.224.10 10.17.224.250;
}
pool {
deny members of "foo";
range 10.0.29.10 10.0.29.230;
}
}
说明:
dhcp范本配置文件内容包含了部分参数、声明以及选项的用法,其中注释部分可以放在任何位置,并以“#”号开头,当一行内容结束时,以“;”号结束,大括号所在行除外,可以看出整个配置文件分成全局和局部两个部分。但是并不容易看出哪些属于参数,哪些属于声明和选项。
2.2 DHCP全局配置
# option definitions common to all supported networks...
option domain-name "example.org"; #为客户端指定所属的域名
option domain-name-servers ns1.example.org, ns2.example.org; #为客户端指定DNS服务器地址
default-lease-time 600; #定义最小租约期限,以秒为单位的租约时间
max-lease-time 7200; #定义最大租约时间,以秒为单位的租约时间,当客户端超过租约时间,却尚未更新IP 时,最长可以使用该IP 的时间;
比如,机器在开机获得IP地址后,然后关机了。这时,当时间过了default-lease-time 600秒后,没有机器向DHCP续约,DHCP会保留7200秒,保留此IP地址不用于分配给其它机器。 当超过7200秒后,将不再保留此IP地址给此机器。
log-facility local7; #定义日志类型为 local7
2.3 DHCP局部配置
subnet:声明一般用来指定IP 作用域、定义为客户端分配的IP 地址池等等
# A slightly different configuration for an internal subnet.
subnet 10.5.5.0 netmask 255.255.255.224 { #指定IP分配范围与子网掩码
range 10.5.5.26 10.5.5.30; #指定分配地址池
option domain-name-servers ns1.internal.example.org; #为客户端指定DNS服务器地址
option domain-name "internal.example.org"; #DNS名称(有就填域名,没有可默认)
option routers 10.5.5.1; #指定默认网关
option broadcast-address 10.5.5.31; #指定默认广播地址
default-lease-time 600; #定义最小租约期限,以秒为单位的租约时间
max-lease-time 7200; #定义最大租约时间,以秒为单位的租约时间,当客户端超过租约时间,却尚未更新IP 时,最长可以使用该IP 的时间;
}
注意:如果全局配置和局部配置冲突,以局部配置为准
host fantasia { ##配置保留地址
hardware ethernet 08:00:07:26:c0:a5; ##配置保留IP地址的MAC
fixed-address fantasia.fugue.com; #配置IP地址
}
例如:
host fantasia {
hardware ethernet 08:00:07:26:c0:a5; ##配置保留IP地址的MAC
fixed-address 192.168.1.100; #配置IP地址
}
2.4 再次启动
启动之前要定义一个和当前DHCP服务器在同一个网络端的子网段,否则无法启动。
subnet 192.168.1.0 netmask 255.255.255.0 { #定义一个本网段的作用域,注意地址范围必须是和DHCP当前IP地址在同一个范围
range 192.168.1.200 192.168.1.230;
}
[root@localhost dhcp]# systemctl start dhcpd #启动没有问题。
[root@localhost dhcp]# systemctl status dhcpd #查看DHCP状态。
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: active (running) since 一 2023-04-24 09:11:01 CST; 9s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Main PID: 54141 (dhcpd)
Status: "Dispatching packets..."
Tasks: 1
CGroup: /system.slice/dhcpd.service
└─54141 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: All rights reserved.
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: For info, please visit https://www.isc.org/software/dhcp/
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Wrote 0 class decls to leases file.
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Wrote 0 deleted host decls to leases file.
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Wrote 0 new dynamic host decls to leases file.
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Wrote 0 leases to leases file.
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Listening on LPF/ens33/00:0c:29:7a:14:f2/192.168.1.0/24
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Sending on LPF/ens33/00:0c:29:7a:14:f2/192.168.1.0/24
4月 24 09:11:01 localhost.localdomain dhcpd[54141]: Sending on Socket/fallback/
2.5 查看DHCP服务的端口
[root@localhost dhcp]# netstat -antup |grep dhcp
udp 0 0 0.0.0.0:67 0.0.0.0:* 54141/dhcpd
注意:DHCP客户端使用的端口68,服务端使用端口67
2.6定义保留IP
/etc/dhcp/dhcpd.conf</p>
<p>host fantasia {
hardware ethernet 08:00:07:26:c0:a5; # 客户端MAC地址
fixed-address fantasia.fugue.com; # 需要保留的IP
}
三、DHCP中继
3.1 DHCP中继工作过程
(1)DHCP客户端广播dhcp discover包
(2)DHCP中继代理将dhcp discover包以单播发送到DHCP服务器
(3)DHCP服务器以单播发送DHCP offer包给DHCP中继代理
(4)DHCP中继代理广播dhcp offer包
(5)DHCP客户端广播dhcp request包
(6)DHCP中继代理以单播转发dhcp request包给DHCP服务器
(7)DHCP服务器以单播发送dhcp ack包给DHCP中继代理
(8)DHCP中继代理广播dhcp ack包。
3.2 部署DHCP中继
IP地址规划
服务器类型 | IP地址 | 网络 |
---|---|---|
DHCP服务器 | 192.168.1.100 | vmnet4 |
DHCP中继 | 192.168.1.110 | vmnet4 |
192.168.2.110 | vmnet10 | |
客户端 | 未知 | vmnet10 |
配置dhcp服务
[root@dhcp-server ~]# yum -y install dhcp
[root@dhcp-server/etc/sysconfig/network-scripts]$ cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="static"
NAME="eth1"
DEVICE="eth1"
ONBOOT="yes"
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.110
DNS1=8.8.8.8
DNS2=114.114.114.114
[root@dhcp-server/etc/dhcp]$ cat dhcpd.conf</p>
<h1 id="dhcpd.conf">dhcpd.conf</h1>
<p>option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.210;
option subnet-mask 255.255.255.0;
option routers 192.168.1.110;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.200 192.168.2.210;
option subnet-mask 255.255.255.0;
option routers 192.168.2.110;
}
[root@dhcp-server/etc/dhcp]$ systemctl start dhcpd
配置DHCP中继服务器
# 添加两块网卡,VMnet4,VMnet10
[root@dhcp/etc/sysconfig/network-scripts]# cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="static"
NAME="eth1"
DEVICE="eth1"
ONBOOT="yes"
IPADDR=192.168.1.110
NETMASK=255.255.255.0
[root@dhcp/etc/sysconfig/network-scripts]# cat ifcfg-eth2
TYPE="Ethernet"
BOOTPROTO="static"
NAME="eth2"
DEVICE="eth2"
ONBOOT="yes"
IPADDR=192.168.2.110
NETMASK=255.255.255.0
[root@dhcp ~]# yum -y install dhcp
</p>
<h1 id="开启路由转发功能">开启路由转发功能</h1>
<p>[root@dhcp ~]# echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf</p>
<h1 id="使配置生效">使配置生效</h1>
<p>[root@dhcp ~]# sysctl -p
</p>
<h1 id="开启dhcp中继服务">开启dhcp中继服务</h1>
<p>[root@dhcp~]# dhcrelay 192.168.1.100
客户端测试
[root@client~]$ dhclient -d # dhcp分配过程
</p>
<h1 id="可以获取到 192.168.2.0 网段地址,说明可以进行正常通信。</code></pre><h4 style="" id="heading-23"><strong>遇到的问题</strong></h4><pre><code># 因为 eth0 网卡写了网关">可以获取到 192.168.2.0 网段地址,说明可以进行正常通信。
遇到的问题
# 因为 eth0 网卡写了网关</h1>
<p>[root@dhcp-server/etc/sysconfig/network-scripts]$ cat ifcfg-eth0 | grep GATEWAY
GATEWAY=10.0.0.1</p>
<h1 id="所以就导致了,客户端去获取IP的时候,默认获取到了,10.0.0.0网段的IP,导致 ping 不通的情况,这个时候我们去检查路由信息。">所以就导致了,客户端去获取IP的时候,默认获取到了,10.0.0.0网段的IP,导致 ping 不通的情况,这个时候我们去检查路由信息。</h1>
<p>
[root@dhcp-server/etc/sysconfig/network-scripts]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 192.168.1.110 0.0.0.0 UG 101 0 0 eth1
10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 101 0 0 eth1</p>
<h1 id="这里我们看到了这个信息">这里我们看到了这个信息</h1>
<p>0.0.0.0 10.0.0.1 0.0.0.0 UG 100 0 0 eth0</p>
<h1 id="导致默认走向了这条路由,我们把他删掉">导致默认走向了这条路由,我们把他删掉</h1>
<p>[root@dhcp-server ~]$ route del -net 0.0.0.0
</p>
<h1 id="然后就可以ping 通了">然后就可以ping 通了</h1>
<p>[root@dhcp-server/etc/sysconfig/network-scripts]$ ping 192.168.2.110
PING 192.168.2.110 (192.168.2.110) 56(84) bytes of data.
64 bytes from 192.168.2.110: icmp_seq=1 ttl=64 time=0.647 ms
64 bytes from 192.168.2.110: icmp_seq=2 ttl=64 time=0.699 ms
64 bytes from 192.168.2.110: icmp_seq=3 ttl=64 time=1.71 ms
四、超级作用域
应用场景
1)、更换IP地址更多的网段来容纳更多的IP
2)、在原有的基础上增加新的IP地址</p>
<p>DHCP可以为单个局域网内的客户端分配多个不同作用域的IP地址
部署超级作用域
架构图
4.1 IP地址规划
服务器类型 | IP地址 | 网络环境 |
---|---|---|
DHCP服务器 | 192.168.1.100 | vmnet4 |
192.168.2.100 | vmnet4 | |
客户端 | 未知 | vmnet4 |
4.2配置作用域
DHCP服务器网卡配置
[root@dhcp/etc/sysconfig/network-scripts]$ cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="static"
NAME="eth1"
DEVICE="eth1"
ONBOOT="yes"
IPADDR=192.168.1.100
NETMASK=255.255.255.0
[root@dhcp/etc/sysconfig/network-scripts]$ cat ifcfg-eth2
TYPE="Ethernet"
BOOTPROTO="static"
NAME="eth2"
DEVICE="eth2"
ONBOOT="yes"
IPADDR=192.168.2.100
NETMASK=255.255.255.0
配置DHCP的作用域
# 在文件结尾添加,1-2只是代表了一个名称,可以随意写
option routers 代表的是网关</p>
<p>[root@dhcp~]$ cat /etc/dhcp/dhcpd.conf
shared-network 1-2 {
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.100;
range 192.168.1.200 192.168.1.200;
}</p>
<pre><code> subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.100;
range 192.168.2.200 192.168.2.210;
}
}
开启路由转发
# 编辑<code>/etc/sysctl.conf
这个文件,在最后加入net.ipv4.ip_forward=1 #1代表开启,0代表关闭
[root@dhcp~]$ echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
[root@dhcp~]$ sysctl -p # 使配置生效
两台客户端测试
# Client 1
[root@client01/etc/sysconfig/network-scripts]$ cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="dhcp"
NAME="eth1"
DEVICE="eth1"
ONBOOT="yes"</p>
<p>[root@client01/etc/sysconfig/network-scripts]$ ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::20c:29ff:fea5:2a29 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:a5:2a:29 txqueuelen 1000 (Ethernet)
RX packets 11 bytes 1508 (1.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 123 bytes 20694 (20.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p>
<h1 id="Client 2">Client 2</h1>
<p>[root@client02/etc/sysconfig/network-scripts]$ cat ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="dhcp"
NAME="eth1"
DEVICE="eth1"
ONBOOT="yes"</p>
<p>[root@client02/etc/sysconfig/network-scripts]$ ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.200 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fe77:203 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:77:02:03 txqueuelen 1000 (Ethernet)
RX packets 12 bytes 1286 (1.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 59 bytes 4986 (4.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
五、DHCP服务器管理工具
5.1 常见的DHCP服务器管理工具
Windows Server DHCP管理工具:适用于Microsoft Windows操作系统的DHCP服务器管理工具。它提供了一个图形用户界面,可用于管理DHCP服务器,包括分配IP地址、管理范围和保留地址等。
ISC DHCP:一种流行的开源DHCP服务器,可在多个操作系统上运行。它提供了一个命令行界面,可以使用配置文件进行配置和管理。
Cisco Prime Network Registrar:一种商业DHCP服务器管理工具,可用于管理大型网络环境中的DHCP服务器。它提供了一个Web界面,可用于管理DHCP服务器、IP地址和其他网络参数。
Infoblox DHCP:一种商业DHCP服务器管理工具,可用于管理大型网络环境中的DHCP服务器。它提供了一个Web界面,可用于管理DHCP服务器、IP地址和其他网络参数。
Webmin:Webmin 是一个通用的系统管理工具,支持许多 UNIX/Linux 平台,并具有强大的网络配置和管理功能。Webmin 包括一个 DHCP Server 模块,可以使用它来管理 DHCP 服务器,包括添加、编辑和删除 DHCP 租约、范围和选项等。
DHCP Explorer:DHCP Explorer 是一款免费的 Windows 应用程序,它可以帮助你快速找到网络上所有的 DHCP 服务器和相关信息,如服务器 IP 地址、范围、租约信息等。DHCP Explorer 还支持通过 SNMP 访问和管理 DHCP 服务器。
GestióIP:GestióIP 是一款开源的 IP 管理和 DHCP 管理工具,可以帮助网络管理员轻松管理 IP 地址、子网和 DHCP 服务器等网络资源。GestióIP 提供一个直观的 Web 界面,可以快速设置和管理 DHCP 服务器,包括 DHCP 范围、租约、选项等。
2 实战:安装DHCP服务器管理软件
# 下载
wget https://sourceforge.net/projects/webadmin/files/webmin/1.979/webmin-1.979.tar.gz</p>
<h1 id="解压">解压</h1>
<p>tar -zxvf webmin-1.979.tar.gz</p>
<h1 id="安装">安装</h1>
<p>./setup.sh</p>
<h1 id="访问">访问</h1>
<p>http://IP:10000
- 感谢你赐予我前进的力量