DNS na SPGrid

Primeiramente mudamos o /etc/resolv.conf

domain grid
nameserver 143.107.128.16
nameserver 143.107.128.17
nameserver 127.0.0.1
nameserver  200.204.0.10
nameserver 200.204.0.138

para colocar a spgrid como uma servidora de nomes

search     grid   localhost
nameserver 192.168.1.150
nameserver 143.107.128.17
nameserver 143.107.128.16
nameserver  200.204.0.10
nameserver 200.204.0.138
Mudamos agora o /etc/named.conf, incluindo a nossa zona no final
zone "grid" IN{
        type master;
        file "grid.hosts";
};

zone "1.168.192.in-addr.arpa" IN{
        notify yes;
        type master;
        file "grid.rev";
};

vamos usar um arquivo pré-existente para servir de modelo para o arquivo de parâm etros de nossa zona e poder edita-lo
[root@spgrid named]# cd /var/named
[root@spgrid named]# cp named.local grid.hosts
editando o grid.hosts para deixa-lo desta forma:
$TTL    86400
@       IN      SOA     spg00.grid. root.spg00.grid.  (
                                      1 ; Serial
                                      8H      ; Refresh
                                      2H      ; Retry
                                      1W    ; Expire
                                      1D )    ; Minimum
              IN      NS      spg00.grid.

ns       IN      A     192.168.1.150
agora vamos criar neste mesmo diretório o grid.rev
$TTL    86400
@       IN      SOA     spg00.grid. root.spg00.grid.  (
                                      1 ; Serial
                                      8H      ; Refresh
                                      2H      ; Retry
                                      1W    ; Expire
                                      1D )    ; Minimum
              IN      NS      grid.

1       IN      A     spg00.grid.
criar agora o /etc/hosts.conf
#/etc/hosts.conf
order hosts,bind
multi on
e agora iniciar o serviço
[root@spgrid named]# service named start
Starting named:                                            [  OK  ]
[root@spgrid named]# ntsysv
e selecione o serviço
[x] named
(com o tab). Dê Ok e assim o serviço estará na inicialização do sistema.

Testando

Pegue um node que não esteja ocupado e edite o /etc/resolv.conf:

* Tire qualquer nameserver

[root@node12:root]# ping  gdrb08.cern.ch
ping: unknown host gdrb08.cern.ch
  • Colocando só a spgrid
[root@node12:root]# vim /etc/resolv.conf
[root@node12:root]# ping  gdrb08.cern.ch
PING gdrb08.cern.ch (137.138.154.172) 56(84) bytes of data.
64 bytes from gdrb08.cern.ch (137.138.154.172): icmp_seq=0 ttl=47 time=262 ms
  • Volte na spgrid e pare o named
[root@spgrid named]# service named stop
Stopping named:                                            [  OK  ]
na máquina
[root@node12:root]# ping  gdrb08.cern.ch
ping: unknown host gdrb08.cern.ch
  • Restart novamente na spgrid. Será qu conseguimos o DNS reverso?
[root@spgrid named]# service named start
Starting named:                                            [  OK  ]
[root@node12:root]# host 137.138.154.172
172.154.138.137.in-addr.arpa domain name pointer gdrb08.cern.ch.

Atualizando os nos

O script abaixo atualizou os n'os de 01 at'e 18

#!/bin/bash
for ((i=1; i<19; i++))
 do
ssh  192.168.1.$i "mv /etc/resolv.conf /etc/resolv.conf.old"
ssh   192.168.1.$i "echo domain grid| cat >>/etc/resolv.conf; echo nameserver 192.168.1.150| cat >>/etc/resolv.conf; e
cho nameserver 143.107.128.17| cat >>/etc/resolv.conf; echo nameserver 200.136.80.4| cat >>/etc/resolv.conf"
done
Topic revision: r2 - 2006-10-31 - MarcoAndreFerreiraDias
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort