RES: 'nsupdate' to delete non-existent hostname

Paula Saito Telloli Martins pmartins at bmf.com.br
Wed Jul 27 12:07:21 UTC 2005


 
Yes ! And in this case you can use:
#nsupdate 
>yxrrset host1.mydomain.com 
>update delete host1.mydomain.com 

It means that only if there is a host named host1, the system will delete
it. 
(You can use YXRRSET that means "if it exists" or NXRRSET tha means "if it
doesn´t exist").

You can also use the command "nsupdate -d" instead of only "nsupdate". It
will show you the statistics and actions that were taken by the system at
the moment you tried to add or delete a host.


Paula.


-----Mensagem original-----
De: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] Em nome de
Kevin Darcy
Enviada em: quarta-feira, 27 de julho de 2005 02:45
Para: bind-users at isc.org
Assunto: Re: 'nsupdate' to delete non-existent hostname

Yes, it's normal behavior. Deleting something that does not exist is not, in
and of itself, considered a fault or error. Oftentimes a Dynamic Update
client doesn't care whether the name/RRset/record existed
*before* the Dynamic Update, only that it no longer exists *after* the
Dynamic Update.

If you really *must* detect that the name, RRset or a specific record exists
just prior to the deletion attempt, then set the appropriate prereq in the
update and you'll get an NXDOMAIN or an NXRRSET response code if the name or
RRset previously existed. See RFC 2136 and/or the nsupdate man page for more
details.

                                                                         
                                                                        
                                    - Kevin

Roman Mashak wrote:

>Hello,
>
>I ran into problem with using 'nsupdate'. Suppose I want to delete 
>host.mydomain.com and the record
>
>host  IN  A 192.168.1.1
>
>do exist in my zone file.
>
>Then I run:
>#nsupdate
>  
>
>>update delete host.mydomain.com
>>;
>>    
>>
>
>everything is fine, record is deleted from zone.
>
>But, if I do the same action regarding host1.mydomain.com (and this 
>name is not regostered in zone file), 'nsupdate' doesn't return any 
>fault or appropriate exit code.
>
>Is it normal behavior? I checked it with BIND8 and BIND9.
>
>--=20
>Roman
>
>
>
>
>
>  
>





More information about the bind-users mailing list