Linux_ network services _DHCP_ superscope configuration of the second segment, the test is not normally obtains an IP address

Linux_ network services _DHCP_ superscope configuration of the second segment, the test is not normally obtains an IP address

This article only to take notes, self-study notes

Reference video do experiments [DHCP], [superscope configuration], assign an IP address two segments of

 

Server, modify the

/etc/dhcp/dhcpd.conf file

shared-network 0-11 {
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.11;
range 10.0.0.16 10.0.0.16;
}
subnet 10.0.11.0 netmask 255.255.255.0 {
option routers 10.0.11.11;
range 10.0.11.220 10.0.11.230;
}

 Segment 1

10.0.0.0

Distribution range

10.0.0.16-10.0.0.16 # For testing, where a network segment allocated an IP

Segment 2

10.0.11.0

Distribution range

10.0.11.220-10.0.11.230    

 

 Testing of two clients

Setup used, the [] User DHCP opened, and then perform [ifdown eth0; ifup eth0]

 

 

After the client 1, test, obtain IP

10.0.0.16

 

Client 2, after the test, has been unable to obtain an IP address network segment 2

The acquisition is [10.0.0.120]

 

This is clearly not the test results we need, back to the server, view the configuration file] [/etc/dhcp/dhcpd.conf

Discovery, set up the mac address binding IP settings (had never thought of this period, also repeatedly watched the video, and then I think this stuff),

[The main reason is to do the experiment mac address binding IP video inside before, back when doing superscopes experiment, dhcp.conf file is re-cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample file】

我本地测试的时候,没有重新cp,直接使用上一次的配置文件。这里需要将mac地址绑定IP的配置注释(或删除即可)

错误原因:设置了mac绑定IP,正好实验网段2的客户端的mac地址就是这个

 

解决方案:将之前mac地址绑定IP的配置注释,并重启 service dhcpd restart

 

 

 

 客户端2,正确获取到网段2的IP地址

 

Guess you like

Origin www.cnblogs.com/fengxingzhe/p/10994126.html