DHCP server configuration

  

DHCP installation 11: First install dhcp-3.0.5-18.el5 package 2: After installation and then through rpm -qc dhcp view his configurable document 3: find /etc/dhcpd. Conf this document and edit 4: edit vim /etc/dhcpd.conf with vim editor and see that this text is empty, but you can see a comment (# see /usr/share/doc/dhcp*/Dhcpd.conf.sample ) Probably means: reference /usr/share/doc/dhcp*/dhcpd.conf.sample5: refer to the /usr/share/doc/dhcp*/dhcpd.conf.sample file in the previous step, in vim Execute in etc/dhcpd.conf: r /usr/share/doc/dhcp*/dhcpd.conf.sample Read the contents of this document 6: Modify the current /etc/dhcpd.conf file 1 # 2 # DHCP Server Configuration File. 3 # see /usr/share/doc/dhcp*/dhcpd.conf.sample 4 # 5 ddns-update-style interim; 6 ignore client-updates; 7 option domain-name-servers 222.88.88.88,222.85.85.85 ; (Super-scoped DNS server) 8 subnet 192.168. 60.0 netmask 255.255.255.0 { (a common scope network segment, subnet mask) 9 10 # --- default gateway 11 option routers 192.168.60.254; (gateway) 12 option subnet-mask 255.255.255.0; (subnet Mask) 13 14 option nis-domain "domain.org"; 15 option domain-name "test"; (name of the scope) 16 filename "pxelinux.0"; 17 option time-offset -18000; # Eastern Standard Time 18 # option ntp-servers 192.168.1.1; 19 # option netbios-name-servers 192.168.1.1; 20 # --- Selects point-to-point node (default is hybrid). Don't change this unless 21 # -- you understand Netbios very well 22 # option netbios- Node-type 2; 23 24 range dynamic-bootp 192.168.60.1 192.168.60.10; 25 default-lease-time 21600; 26 max-lease-time 43200; 27 28 # we want the nameserver to appear at a fixed address 29 #host AAA{ 30 # next-server marvin.redhat.com; 31 # hardware ethernet 00:0C:29:68:2F:9D; 32 # fixed-address 192.168.60.2; 33 #}


34 } 35 Subnet 192.168.70.0 netmask 255.255.255.0 { 36 37 # --- default gateway 38 option routers 192.168.70.254; 39 option subnet-mask 255.255.255.0; 40 41 option nis-domain "domain.org"; 42 option domain- Name "test1"; 43 filename "pxelinux.0"; 44 option time-offset -18000; # Eastern Standard Time 45 # Option ntp-servers 192.168.1.1; 46 # option netbios-name-servers 192.168.1.1; 47 # --- Selects point-to-point node (default is hybrid). Don't change this unless 48 # -- you understand Netbios very well 49 # option netbios-node-type 2; 50 51 range dynamic-bootp 192.168.70.1 192.168.70.10; 52 default-lease-time 21600; 53 max-lease-time 43200; 54 55 # we want the nameserver to Appear at a fixed address 56 # host AAA{ 57 # next-server marvin.redhat.com; 58 # hardware ethernet 00:0C:29:68:2F:9D; 59 # fixed-address 192.168.60.2; 60 # } 61 } 62 subnet 192.168.10.0 netmask 255.255.255.0 { (62-63 This is an empty scope, mainly to match the host's IP address) 63 } where # indicates the comment part This is the dhcp configuration on my machine, which needs to be done Partially modified, I made two scopes here, one is 192.168.60.0, and the other On the 192.168.70.0 network segment, you can also make them a superscope. However, you need to add a command to add a line after the 7th line, shared-network AAA (the name of the super scope) { & rdquo;, then the last line Write another line “}”, finally wq save and exit. Author “Footer's Notes”



Copyright © Windows knowledge All Rights Reserved