超级作用域
(2022-05-08 18:13:06)
标签:
教育 |
查看dhcpd的配置文档。
vim
/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample
90 shared-network 224-29
{
91 subnet 10.17.224.0 netmask
255.255.255.0 {
92 option routers
rtr-224.example.org;
93 }
94 subnet 10.0.29.0 netmask
255.255.255.0 {
95 option routers
rtr-29.example.org;
96 }
97 pool {
98 allow members of
"foo";
99 range 10.17.224.10
10.17.224.250;
100 }
101 pool {
102 deny members of
"foo";
103 range 10.0.29.10
10.0.29.230;
104 }
105 }
shared-network
超级作用域的名称{
参数...
标准作用域1{
选项...
参数...
}
标准作用域2{
选项...
参数...
}
...
}
明白了其配置方法后,我们就可以轻松组建超级作用域了。
下面是我配置的一个例子:
vim
/etc/dhcp/dhcpd.conf
1 shared-network mydhcpdomain
{
2 default-lease-time
172800;
3 max-lease-time
259200;
4 option domain-name-servers
114.114.114.114;
5 option domain-name
"dns.ibadboy.net";
6 subnet 192.168.1.0 netmask
255.255.255.0 {
7 range 192.168.1.210
192.168.1.210;
8 option routers
192.168.1.254;
9 }
10 subnet 192.168.2.0 netmask
255.255.255.0 {
11 range 192.168.2.210
192.168.2.210;
12 option routers
192.168.2.254;
13 }
14 subnet 192.168.3.0 netmask
255.255.255.0 {
15 range 192.168.3.210
192.168.3.210;
16 option routers
192.168.3.254;
17 }
18 }
使用三台PC测试,若每台PC都可正常获取IP且获取到的IP的网段都不同,则本实验成功
前一篇:linuxdhcp超级作用域
后一篇:网络操作系统第15次作业

加载中…