[ root @ Slave / ] # /sbin/ifconfig eth0:0 172.28.1.1 netmask 255.255.240.0
[ root @ Slave / ] # /sbin/ifconfig eth0:1 172.28.1.2 netmask 255.255.240.0
[ root @ Slave / ] # /sbin/ifconfig eth0:2 172.28.1.3 netmask 255.255.240.0
[ root @ Slave / ] # /sbin/ifconfig eth0:3 172.28.1.4 netmask 255.255.240.0
[ root @ Slave / ] # cp /var/named/named.rfc1912.zones /var/named/named.rfc1912.zones.bk
[ root @ Slave / ] # mkdir /var/named/slaves/{local, cmcc,cucc,ctcc,cecc,others}
[ root @ Slave / ] # chown -R named.named /var/named/slaves/{local, cmcc,cucc,ctcc,cecc,others}
[ root @ Slave named ] # cat /usr/local/named/etc/named.conf
options {
listen - on port fifty-three { any ; } ;
directory "/var/named" ;
dump - file "/var/named/data/cache_dump.db" ;
statistics - file "/var/named/data/named_stats.txt" ;
memstatistics - file "/var/named/data/named_mem_stats.txt" ;
allow - query { any ; } ;
recursion yes ;
bindkeys - file "/usr/local/named/etc/bind.key" ;
} ;
logging {
channel default_debug {
file "data/named.run" ;
severity dynamic ;
} ;
channel gsquery {
file "data/query.log" versions three size 20m ;
severity info ;
print - time yes ;
print - category yes ;
print - severity yes ;
} ;
category queries { gsquery ; } ;
} ;
key "rndc-key" {
algorithm hmac - md5 ;
secret "IZMC23sEaNM1nkSQ+1qQxA==" ;
} ;
controls {
inet 127.0.0.1 port nine hundred and fifty-three
allow { 127.0.0.1 ; } keys { "rndc-key" ; } ;
} ;
include "/var/named/named.rfc1912.zones" ;
[ root @ Slave named ] # cat /var/named/named.rfc1912.zones
view "LOCAL" {
match - clients { 172.28.1.1 ; LOCAL ; } ; #LOCAL
transfer - source 172.28.1.1 ;
allow - notify { 172.28.1.1 ; } ;
recursion yes ;
zone "." IN {
type hint ;
file "named.root" ;
} ;
zone "t4x.org" IN {
type slave ;
file "slaves/local/local.t4x.org.zone" ;
masters { 1.1.1.19 ; } ;
} ;
} ;
view "CTCC" {
match - clients { 172.28.1.2 ; CTCC ; } ;
transfer - source 172.28.1.2 ;
allow - notify { 172.28.1.2 ; } ;
recursion yes ;
zone "." IN {
type hint ;
file "named.root" ;
} ;
zone "t4x.org" IN {
type slave ;
file "slaves/ctcc/ctcc.t4x.org.zone" ;
masters { 1.1.1.19 ; } ;
} ;
} ;
view "CUCC" {
match - clients { 172.28.1.3 ; CUCC ; } ;
transfer - source 172.28.1.3 ;
allow - notify { 172.28.1.3 ; } ;
recursion yes ;
zone "." IN {
type hint ;
file "named.root" ;
} ;
zone "t4x.org" IN {
type slave ;
file "slaves/cucc/cucc.t4x.org.zone" ;
masters { 1.1.1.19 ; } ;
} ;
} ;
view "CMCC" {
match - clients { 172.28.1.4 ; CMCC ; } ;
transfer - source 172.28.1.4 ;
allow - notify { 172.28.1.4 ; } ;
recursion yes ;
zone "." IN {
type hint ;
file "named.root" ;
} ;
zone "t4x.org" IN {
type slave ;
file "slaves/cmcc/cmcc.t4x.org.zone" ;
masters { 1.1.1.19 ; } ;
} ;
} ;
view "OTHERS" {
match - clients { 172.28.1.5 ; OTHERS ; } ;
transfer - source 172.28.1.5 ;
allow - notify { 172.28.1.5 ; } ;
recursion yes ;
zone "." IN {
type hint ;
file "named.root" ;
} ;
zone "t4x.org" IN {
type slave ;
file "slaves/others/others.t4x.org.zone" ;
masters { 1.1.1.19 ; } ;
} ;
} ;
include "ctcc.cfg" ;
include "cucc.cfg" ;
include "cmcc.cfg" ;
include "local.cfg" ;
include "others.cfg" ;
[ root @ Slave named ] # /usr/local/named/sbin/named-compilezone -f raw -F text -o /tmp/t4x.org.txt t4x.org /var/named/slaves/local/local.t4x.org.zone
zone t4x . org / IN : loaded serial two billion fifteen million fifty thousand one hundred and one
dump zone to / tmp / t4x . org . txt . . . done
OK
[ root @ Slave named ] # cat /tmp/t4x.org.txt
t4x . org . sixty IN SOA ns1 . t4x . org . admin . t4x . org . two billion fifteen million fifty thousand one hundred and one one hundred and twenty six hundred six hundred and four thousand and eight hundred ten thousand and eight hundred
t4x . org . sixty IN NS ns1 . t4x . org .
t4x . org . sixty IN NS ns2 . t4x . org .
t4x . org . sixty IN A 1.1.1.19
ns1 . t4x . org . sixty IN A 1.1.1.19
ns2 . t4x . org . sixty IN A 172.28.1.1
note . t4x . org . sixty IN A 101.1.1.1