RAC-DNS-and-DHCP-Server-setup
RAC-DNS-and-DHCP-Server-setup
Dependencies Resolved
===================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================
Installing:
dhcp x86_64 12:4.1.1-53.P1.0.1.el6_9.1 public_ol6_latest 823 k
Updating for dependencies:
dhclient x86_64 12:4.1.1-53.P1.0.1.el6_9.1 public_ol6_latest 321 k
dhcp-common x86_64 12:4.1.1-53.P1.0.1.el6_9.1 public_ol6_latest 144 k
Transaction Summary
===================================================================================================================================
Install 1 Package(s)
Upgrade 2 Package(s)
Dependency Updated:
dhclient.x86_64 12:4.1.1-53.P1.0.1.el6_9.1 dhcp-common.x86_64 12:4.1.1-53.P1.0.1.el6_9.1
Complete!
[root@dns01 ~]#
Edit /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
range 192.168.56.2 192.168.56.254; # Range of IP addresses that can be issued to DHCP client
default-lease-time 21600; # Amount of time in seconds that a client may keep the IP address
max-lease-time 43200;
}
Dependencies Resolved
===================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================
Installing:
bind x86_64 32:9.8.2-0.62.rc1.el6_9.4 public_ol6_latest 4.0 M
Updating:
bind-libs x86_64 32:9.8.2-0.62.rc1.el6_9.4 public_ol6_latest 891 k
bind-utils x86_64 32:9.8.2-0.62.rc1.el6_9.4 public_ol6_latest 188 k
Transaction Summary
===================================================================================================================================
Install 1 Package(s)
Upgrade 2 Package(s)
Installed:
bind.x86_64 32:9.8.2-0.62.rc1.el6_9.4
Updated:
bind-libs.x86_64 32:9.8.2-0.62.rc1.el6_9.4 bind-utils.x86_64 32:9.8.2-0.62.rc1.el6_9.4
Complete!
[root@dns ~]#
options {
};
zone "localdomain." IN {
type master;
notify no;
file "localdomain.db";
};
zone "." in {
type hint;
file "/dev/null";
};
Edit zone files
[root@dns01 ~]# cd /var/named
$TTL 1H
@ IN SOA dns01 root.localdomain. (
2018060701 ; serial (todays date + todays serial #)
3H ; refresh 3 hours
1H ; retry 1 hour
1W ; expire 1 week
1D ) ; minimum 24 hour
;
NS dns01.localdomain.
100 PTR rac01.localdomain.
101 PTR rac02.localdomain.
102 PTR dns01.localdomain.
150 PTR rac-gns.localdomain. ; reverse mapping for GNS
# Generated by NetworkManager
search localdomain rac.localdomain
nameserver 192.168.56.102
Check DNS
[root@dns01 named]# dig rac-gns.localdomain
;; QUESTION SECTION:
;rac-gns.localdomain. IN A
;; ANSWER SECTION:
rac-gns.localdomain. 3600 IN A 192.168.56.150
;; AUTHORITY SECTION:
localdomain. 3600 IN NS dns01.localdomain.
;; ADDITIONAL SECTION:
dns.localdomain. 3600 IN A 192.168.56.102
Name: dns01.localdomain
Address: 192.168.56.102
Name: rac-gns.localdomain
Address: 192.168.56.150
Disable Firewall
[root@dns named]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]