全国直销电话:4006-854-568
IT-technology
以人为本,众志成城,以“用户至上”.“服务上乘”为原则,
追求产品和服务高质量,努力实现与客户之间真诚有效的沟通,
不断地圆梦、奔跑与腾飞。
新闻动态   NEWS
​Centos7.8部署DHCP及地址保留、超级作用域-北京赛维博信科技发展有限公司
来源: | 作者:svbx001 | 发布时间: 2022-04-15 | 3361 次浏览 | 分享到:

,进行覆盖。

[root@dhcp-server dhcp]# cp -a /usr/share/doc/dhcp*/dhcpd.conf.example /etc/dhcp/dhcpd.confcp:是否覆盖"/etc/dhcp/dhcpd.conf"?y[root@dhcp-server dhcp]#
4.查看example的配置信息
  1. [root@dhcp-server dhcp]# cat dhcpd.conf

  2. # dhcpd.conf

  3. #

  4. # Sample configuration file for ISC dhcpd

  5. #


  6. # option definitions common to all supported networks...

  7. option domain-name "example.org";

  8. option domain-name-servers ns1.example.org, ns2.example.org;


  9. default-lease-time 600;

  10. max-lease-time 7200;


  11. # Use this to enble / disable dynamic dns updates globally.

  12. #ddns-update-style none;


  13. # If this DHCP server is the official DHCP server for the local

  14. # network, the authoritative directive should be uncommented.

  15. #authoritative;


  16. # Use this to send dhcp log messages to a different log file (you also

  17. # have to hack syslog.conf to complete the redirection).

  18. log-facility local7;


  19. # No service will be given on this subnet, but declaring it helps the

  20. # DHCP server to understand the network topology.


  21. subnet 10.152.187.0 netmask 255.255.255.0{

  22. }


  23. # This is a very basic subnet declaration.


  24. subnet 10.254.239.0 netmask 255.255.255.224{

  25.  range 10.254.239.1010.254.239.20;

  26.  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;

  27. }


  28. # This declaration allows BOOTP clients to get dynamic addresses,

  29. # which we don't really recommend.


  30. subnet 10.254.239.32 netmask 255.255.255.224{

  31.  range dynamic-bootp 10.254.239.4010.254.239.60;

  32.  option broadcast-address 10.254.239.31;

  33.  option routers rtr-239-32-1.example.org;

  34. }


  35. # A slightly different configuration for an internal subnet.

  36. subnet 10.5.5.0 netmask 255.255.255.224{

  37.  range 10.5.5.2610.5.5.30;

  38.  option domain-name-servers ns1.internal.example.org;

  39.  option domain-name "internal.example.org";

  40.  option routers 10.5.5.1;

  41.  option broadcast-address 10.5.5.31;

  42. default-lease-time 600;

  43.  max-lease-time 7200;

  44. }


  45. # Hosts which require special configuration options can be listed in

  46. # host statements.   If no address is specified, the address will be

  47. # allocated dynamically (if possible), but the host-specific information

  48. # will still come from the host declaration.


  49. host passacaglia {

  50.  hardware ethernet 0:0:c0:5d:bd:95;

  51.  filename "vmunix.passacaglia";

  52.  server-name "toccata.fugue.com";

  53. }


  54. # Fixed IP addresses can also be specified for hosts.   These addresses

  55. # should not also be listed as being available for dynamic assignment.

  56. # Hosts for which fixed IP addresses have been specified can boot using

  57. # BOOTP or DHCP.   Hosts for which no fixed address is specified can only

  58. # be booted with DHCP, unless there is an address range on the subnet

  59. # to which a BOOTP client is connected which has the dynamic-bootp flag

  60. # set.

  61. host fantasia {

  62.  hardware ethernet 08:00:07:26:c0:a5;

  63. fixed-address fantasia.fugue.com;

  64. }


  65. # You can declare a class of clients and then do address allocation

  66. # based on that.   The example below shows a case where all clients

  67. # in a certain class get addresses on the 10.17.224/24 subnet, and all

  68. # other clients get addresses on the 10.0.29/24 subnet.


  69. class"foo"{

  70.  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";

  71. }


  72. shared-network 224-29{

  73.  subnet 10.17.224.0 netmask 255.255.255.0{

  74.    option routers rtr-224.example.org;

  75. }

  76.  subnet 10.0.29.0 netmask 255.255.255.0{

  77.    option routers rtr-29.example.org;

  78. }

  79.  pool {

  80.    allow members of "foo";

  81.    range 10.17.224.1010.17.224.250;

  82. }

  83.  pool {

  84.    deny members of "foo";

  85.    range 10.0.29.1010.0.29.230;

  86. }

  87. }

  88. [root@dhcp-server dhcp]#

 

服务热线

1391-024-6332