DHCP reserved addresses and superscopes centos7

A reserved address the concept please Baidu
brief overview superscopes features: multiple network segments to distribute ip address.
Two reserved addresses (specified to the client IP)
  1. commented further scope (range block with all statements), leaving only a configured scope (Scope single configuration https: //blog.csdn. NET / kingoflongevity / Article This article was / the Details / 103 960 108)
  2. know you want to keep ip address mac address of the client is available arp -acommand to view your MAC address
  3. prepare a client;
  4. modify the configuration file as follows:

Here Insert Picture Description
  hardware fill in your corresponding ip want to assign to the corresponding client or the server's MAC address;
  Fixed-address is filled ip address it; (good English actually see Notes will know)
  want to keep more than one address, re-copy the entire block statement a;
  5. restart the dhcpd service, start the client to see whether the reservation was successful; (encountered not restart service Verify that the document grammatically dhcpd -t -cf dhcpd.conf文件的绝对路径step by step to exclude the problem).
Three .DHCP Super Scope
  1. Prepare two client.
  2. You can use the above dhcp
  establish a virtual network adapter 3.

第一步:进入 /etc/sysconfig/network-scripts/ 目录下 复制一份网卡配置文件
第二步:修改网卡device信息 和 name信息 与你的`配置文件名`一样(我的为ifcfg-ens33:DHCP)IP设置为你需要的ip(需要把ip设置为另一个网段)
第三步:用 systemctl restart netwok重启 | ifup ens33:DHCP 开启我们的网卡

  My ip address as follows:
Here Insert Picture Description
  4. Turn routing forwarding in the kernel

永久开启,(写入内核)
在 vim /etc/sysctl.conf 下加入此行 
net.ipv4.ip_forward = 1
sysctl -p      # 加载一下,使之生效

  5 modify the configuration file dhcpd.conf
  find
Here Insert Picture Description
  delete pool or comment it;
modify part as follows:
Here Insert Picture Description
  Shard-Network: where can you address any pool label;
  the Range: address allocation (because we need to test IP allocation, so the best the range of IP address pool of a segment is set to a, for example: 192.168.1.2 192.168.1.3);
  Option Routers: gateway;
Finally statement checks the configuration file

dhcpd -t -cf /etc/dhcp/dhcpd.conf

The following figure after you can restart the service: the
Here Insert Picture Description
  final turn distributed client, two clients get different IP network segment, the successful implementation of multi-segment distribution ip (ip not enough to solve the situation)
  end of the experiment
  tips: encountered a restart service has always been the case, please carefully check the error, it may be just the wrong address range, or just a simple label does not comply with the syntax error and the like.
            
                Bao Jianfeng from tempered

                Plum blossom from the bitter cold

Released seven original articles · won praise 2 · Views 297

Guess you like

Origin blog.csdn.net/kingoflongevity/article/details/104028378