Management Section
DHCP and DNS on the same server
Login Address:ssh root/192.168.20.210 password:jyd315.com
DHCP Master profile:/etc/dhcp/dhcpd.conf (where to define network segments and IP address ranges)
DNS Master profile:/var/named/chroot/etc/named.conf (defines the service listener port and address)
4. View IP address assignment for each network segment: cat/var/lib/dhcpd/dhcpd.leases
Installation and configuration section
System Environment CentOS6.5
Yum–y Install DHCP bindbind-chroot bind-utils (installing DHCP and DNS services [Bindbind-chroot Bind-utils] )
DHCP Service Configuration
edit The vim/etc/dhcp/dhcpd.conf master configuration file
# DHCP Server Configuration file.
# See/usr/share/doc/dhcp*/dhcpd.conf.sample
# See ' Mans 5 dhcpd.conf '
* The above is the default profile content
#ddns-update-style None; no, but it must be written .
Log-facility Local7; # Log record location (vim/etc/rsyslog.conf last add local4.*/var/log/dhcp.log)
Default-lease-time 86400; # Default IP Lease Duration
Max-lease-time 86400; # Maximum IP Lease Duration
Option Domain-name "jyd.com"; # owning domain suffix
Option Domain-name-servers 192.168.20.210,219.141.140.10,218.30.26.70; # Point to the intranet DNS cache service and the public primary domain name server, the primary name server address can write multiple
* the following are network segments and IP address range definition format and content
Subnet 192.168.20.0 netmask 255.255.255.0 {
# this IP The address range is empty, which means that only this segment is present without the configured address
}
Subnet 192.168.3.0 netmask 255.255.255.0 {
Range 192.168.3.50192.168.3.150; # Define IP address assignment range
Option routers192.168.3.1;# defines the default gateway for this segment
}
* which network segments are required to be added down in the format above
DNS Cache Service Configuration
edit The vim/var/named/chroot/etc/named.conf master configuration file
Options {
listen-on Port . }; # Change the default value in the expansion number to any; , notice the semicolon
Forwarders { 219.141.140.10;218.30.26.70; }; # point to the public primary domain server address, You can write multiple
allow-query { any ; }; # Change the default value in the expansion number to any; , notice the semicolon
recursion Yes; slow down the recursive parsing data to the server,Yes to cache,no for no cache
};
Include "/etc/named.rfc1912.zones";
Include "/etc/named.root.key";
* The above is a list of areas that need to be modified
5. three layer core switch configuration (key--- all network first to interoperability )
follow the command below to enter each VLAN for the same operation
Example:
cisco3750x-24 (config) #interface VLAN 11
Cisco3750x-24 (config-if) #ip helper-address 192.168.20.210 <- Here is the server address that points to DHCP
Cisco3750x-24 (config-if) #no IP helper-address 192.168.20.50<- This command removes the address of the server to which the original DHCP is pointing, and if this is the initial configuration, you can ignore this article
View each the address letter of the DHCP server to which the VLAN is pointing (yellow section below)
Cisco3750x-24#showrunning-config
...
Interface Vlan11
IP address 192.168.11.1 255.255.255.0
IP helper-address 192.168.20.210
...
Zhang Guangjun
Date: 2016-12-19 19:01
This article is from the "Linux in Practice" blog, so be sure to keep this source http://zhangguangjun.blog.51cto.com/4629376/1884849
Deploy cross-network segment DHCP and DNS services for the entire network