lost and found ( for me ? )

unbound : change configuration on the fly with unbound-control

unbound 1.4.5

unbound-control set_option で on the fly でコンフィグの変更ができるみたい。
ただし、すべてのオプションを on the fly で変更できるわけではない。
どれが可能 or not は書いてないなー。

set_option opt: val
             Set the option to the given value without a reload.   The  cache
             is  therefore  not  flushed.  The option must end with a ':' and
             whitespace must be between the option and the value.  Some  val-
             ues  may  not have an effect if set this way, the new values are
             not written to the config file, not all options are supported.

      get_option opt
             Get the value of the option.  Give the  option  name  without  a
             trailing  ':'.  The value is printed.  If the value is "", noth-
             ing is printed and the connection closes.  On error 'error  ...'
             is  printed  (it  gives  a syntax error on unknown option).  For
             some options a list of values, one on  each  line,  is  printed.
             Not all options are supported.

root@hat1:~# unbound-control get_option do-tcp

root@hat1:~# unbound-control set_option do-tcp: yes

root@hat1:~# unbound-control get_option do-tcp

root@hat1:~# unbound-control get_option msg-cache-size

root@hat1:~# unbound-control set_option msg-cache-size: 200m

root@hat1:~# unbound-control get_option msg-cache-size

root@hat1:~# unbound-control lookup www.google.co.jp
The following name servers are used for lookup of www.google.co.jp.
;rrset 86233 4 0 2 0
google.co.jp. 86233 IN NS ns2.google.com.
google.co.jp. 86233 IN NS ns4.google.com.
google.co.jp. 86233 IN NS ns3.google.com.
google.co.jp. 86233 IN NS ns1.google.com.
;rrset 84681 1 0 8 0
ns1.google.com. 343881 IN A
;rrset 84681 1 0 8 0
ns3.google.com. 343881 IN A
;rrset 84681 1 0 8 0
ns4.google.com. 343881 IN A
;rrset 84681 1 0 8 0
ns2.google.com. 343881 IN A
Delegation with 4 names, of which 4 can be examined to query further addresses.
It provides 4 IP addresses.    rtt 260 msec, 0 lost. EDNS 0 probed.    rtt 261 msec, 0 lost. EDNS 0 probed.    rtt 189 msec, 0 lost. EDNS 0 probed.    rtt 206 msec, 0 lost. EDNS 0 probed.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.