Configure IPv6 DNS server on centos 7

Source: Internet
Author: User
Take my machine as an example. If the network card is eth3, select 2000: FFFF for the IPv6 address.

[[Email protected] ~] # Uname-R
2.6.32-431. el6.x86 _ 64

[[Email protected] ~] # Ifconfig eth3
Eth3 ????? Link encap: Ethernet? Hwaddr 00: 1b: 21: 21: Cf: dd?
????????????? Inet6 ADDR: 2000: FFFF/64 scope: Global
? ?? ???????? Inet6 ADDR: 2000: 21B: 21ff: fe21: cfdd/64 scope: Global
??? ? ?? ???? Inet6 ADDR: fe80: 21B: 21ff: fe21: cfdd/64 scope: Link
??????? ? ? ? Up broadcast running Multicast? MTU: 1500? Metric: 1
? ?? ???????? RX packets: 100318 errors: 0 dropped: 0 overruns: 0 frame: 0
??? ? ?? ???? TX packets: 150174 errors: 0 dropped: 0 overruns: 0 carrier: 0
??????? ? ? ? Collisions: 0 FIG: 1000
? ?? ???????? RX Bytes: 19520814 (18.6 MIB )? TX Bytes: 101293129 (96.6 MIB)
??? ? ?? ???? Interrupt: 19 memory: f7da0000-f7dc0000

  1. Modify ifcfg-eth3

??? # Vim/etc/sysconfig/network-scripts/ifcfg-eth3

???? Add dns1 = 2000: FFFF

  1. Modify/etc/hosts

??? # Vim/etc/hosts

??? Add 2000: FFFF ??? Lenovo-m8400-01.example.com ?? Lenovo-m8400-01

  1. Modify/etc/sysconfig/Network

??? Modify hostname = lenovo-m8400-01.example.com

  1. Modify/etc/resolv. conf

??? Search example.com
??? Nameserver 2000: FFFF

  1. Restart NETWORK SERVICE

???? # Service network restart

  1. Install bind packages

??? # Yum install bind *

  1. Modify/etc/named. conf

???? Options {

? ? ?? ? Listen-on port 53 {127.0.0.1 ;};?????????? ---> // Listen-on port 53 {127.0.0.1 ;};

? ? ? ?? Listen-on-v6 port 53 {: 1 ;};???? ? ? ? ? ? ? ---> Listen-on-v6 port 53 {2000: FFFF ;};

???????? Allow-query ???? {Localhost ;};??????????????? ---> Allow-query ???? {Any ;};

???????? ...

???? };

  1. Modify/etc/named. rfc1912.zones

??? 1) Change

??? Zone "localhost. localdomain" in {
?? ?? ? Type master;
???? ?? File "named. localhost ";
??????? Allow-update {none ;};
??? };

? ? Is

? ? Zone "example.com" in {
?? ? ??? Type master;
??? ? ?? File "forward. Zone ";
???? ? ? Allow-update {none ;};
?? };

?? 2) Change

??? Zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" in {
?? ?? ?? Type master;
?? ? ? ? File "named. loopback ";
?? ?? ?? Allow-update {none ;};
? ? };
??? Is
??? Zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.ip6.arpa" in {
?????? ? Type master;
???????? File "reverse. Zone ";
???????? Allow-update {none ;};
?? };

  1. Edit forward. Zone and reverse. Zone

??? # Cd/var/named

??? # Cp named. localhost forward. Zone

??? # Cp named. loopback reverse. Zone

??? Forward. Zone

??????? $ TTL 1d
? ? ??? @ In SOA example.com. root.example.com .(
??????????????????????????????????????? 0 ?????? ; Serial
??????????????????????????????????????? 1D ????? ; Refresh
??????????????????????????????????????? 1 H ????? ; Retry
??????????????????????????????????????? 1 W ????? ; Expire
??????????????????????????????????????? 3 h )??? ; Minimum
?? ? ?? ? In NS ?? Lenovo-m8400-01.example.com.
????????? Lenovo-m8400-01 in AAAA 2000: FFFF

??? Reverse. Zone

??? $ TTL 1d
??? @ In SOA example.com. root.example.com .(
??????????????????????????????????????? 0 ?????? ; Serial
??????????????????????????????????????? 1D ????? ; Refresh
??????????????????????????????????????? 1 H ????? ; Retry
??????????????????????????????????????? 1 W ????? ; Expire
??????????????????????????????????????? 3 h )??? ; Minimum
???? ? ? ? ? In NS ?? Lenovo-m8400-01.example.com.
???? F. F ??? In PTR? Lenovo-m8400-01.example.com.

???? # Chgrp named forward. Zone

???? # Chgrp named reverse. Zone

???? # Service named start

  1. Verify Configuration

???? [[Email protected] named] # Dig lenovo-m8400-01.example.com AAAA

???? ; <> Dig 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <> lenovo-m8400-01.example.com AAAA
??? ; Global Options: + cmd
??? ; Got answer:
??? ;-> Header <-opcode: Query, status: noerror, ID: 17812
??? ; Flags: qr aa rd ra; query: 1, answer: 1, authority: 1, Additional: 0

??? ; Question Section:
??? ; Lenovo-m8400-01.example.com. In AAAA

??? ; Answer section:
??? Lenovo-m8400-01.example.com. 86400 in AAAA 2000: FFFF

??? ; Authority section:
??? Example.com. 86400 in ?? ? NS ?? ? Lenovo-m8400-01.example.com.

??? ; Query time: 0 msec
??? ; Server: 2000: FFFF #53 (2000: FFFF)
??? ; When: Tue Oct 13 17:01:31 2015
??? ; MSG size? Rcvd: 101

??? [[Email protected] named] # Dig-x 2000: FFFF

??? ; <> Dig 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <>-x 2000: FFFF
??? ; Global Options: + cmd
??? ; Got answer:
??? ;-> Header <-opcode: Query, status: noerror, ID: 1608
??? ; Flags: qr aa rd ra; query: 1, answer: 1, authority: 1, Additional: 1

??? ; Question Section:
??? ; F. f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.ip6. ARPA. In PTR

??? ; Answer section:
??? F. f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.ip6. ARPA. 86400 ?? ? In PTR lenovo-m8400-01.example.com.

??? ; Authority section:
??? 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.ip6.arpa. 86400 ?? ? In NS lenovo-m8400-01.example.com.

??? ; Additional section:
??? Lenovo-m8400-01.example.com. 86400 in AAAA 2000: FFFF

??? ; Query time: 0 msec
??? ; Server: 2000: FFFF #53 (2000: FFFF)
??? ; When: Tue Oct 13 17:32:49 2015
??? ; MSG size? Rcvd: 187

Configure IPv6 DNS server on centos 7

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.