Dumping running config/named.conf

2009-03-04 Thread Todd Snyder
Good morning,

We utilize a number of include files as part of our named.conf.  I am
looking to see if there is a clever way to dump the entire named.conf
(or, even better, the entire RUNNING named.conf), which includes all the
include files.

I say running config, because sometimes you do an rndc reconfig and it
rejects some lines, but loads the ones that work.  I'd like to be able
to dump the running config (like sh run).

Cheers,

Todd.

-
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Dumping running config/named.conf

2009-03-04 Thread Mark Andrews

bin/tests/cfg_test --named /etc/named.conf

In message 1d8c9a4471119a40bd574f9d8d464ae304bd3...@xch60ykf.rim.net, Todd S
nyder writes:
 Good morning,
 
 We utilize a number of include files as part of our named.conf.  I am
 looking to see if there is a clever way to dump the entire named.conf
 (or, even better, the entire RUNNING named.conf), which includes all the
 include files.
 
 I say running config, because sometimes you do an rndc reconfig and it
 rejects some lines, but loads the ones that work.  I'd like to be able
 to dump the running config (like sh run).
 
 Cheers,
 
 Todd.
 
 -
 This transmission (including any attachments) may contain confidential inform
 ation, privileged material (including material protected by the solicitor-cli
 ent or other applicable privileges), or constitute non-public information. An
 y use of this information by anyone other than the intended recipient is proh
 ibited. If you have received this transmission in error, please immediately r
 eply to the sender and delete this information from your system. Use, dissemi
 nation, distribution, or reproduction of this transmission by unintended reci
 pients is not authorized and may be unlawful.
 ___
 bind-users mailing list
 bind-users@lists.isc.org
 https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: mark_andr...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


$generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Takahiro Masuda
Hi I was trying to get the $generate directive to work like so 

11 IN PTR 14.cool.com.



30 IN PTR 33.cool.com.

$GENERATE 11-30  ${3,0,d} PTR $.COOL.COM.


I've read the manual here 
http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#id2566761---

Syntax: $GENERATE range lhs [ttl] [class] type rhs [ comment ]

lhs describes the owner name of the resource records to be created. Any single 
$ symbols within the lhs side are replaced by the iterator value. To get a $ in 
the output you need to escape the $ using a backslash \, e.g. \$. The $ may 
optionally be followed by modifiers which change the offset from the iterator, 
field width and base. Modifiers are introduced by a { immediately following the 
$ as ${offset[,width[,base]]}. e.g. ${-20,3,d} which subtracts 20 from the 
current value, prints the result as a decimal in a zero padded field of with 3. 
Available output forms are decimal (d), octal (o) and hexadecimal (x or X for 
uppercase). The default modifier is ${0,0,d}. If the lhs is not absolute, the 
current $ORIGIN is appended to the name.

For compatibility with earlier versions $$ is still recognized a indicating a 
literal $ in the output.

---

The tricky part is ${3,0,d} waas not working. I bumped into a site that stated 
$GENERATE range rhs type lhs

I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this worked.

Hopefully this will help somebody.

Anybody here have the ability to update the manual?


 
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Jeremy C. Reed
On Wed, 4 Mar 2009, Takahiro Masuda wrote:

The tricky part is ${3,0,d} waas not working. I bumped into a site
 that stated $GENERATE range rhs type lhs

That is wrong.

 I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this
 worked.


 Anybody here have the ability to update the manual?

Yes.

But it appears your second try is correct.

I can improve the documentation to make sure that it explains the two 
abbreviations:

lhs is left hand side (the label).

rhs is the right hand side (the RDATA).

Will that work for you?
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Mark Andrews

In message 1e4079388e04544fa3ffa6a900d6fb65015d7...@exchange.vplsnet.net, Ta
kahiro Masuda writes:
 Hi I was trying to get the $generate directive to work like so=20
 
 11 IN PTR 14.cool.com.
 
 
 
 30 IN PTR 33.cool.com.
 
 $GENERATE 11-30  ${3,0,d} PTR $.COOL.COM.

Which doesn't match what you wanted to do.
 
 I've read the manual here =
 http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#id2566761---
 
 Syntax: $GENERATE range lhs [ttl] [class] type rhs [ comment ]
 
 lhs describes the owner name of the resource records to be created. Any =
 single $ symbols within the lhs side are replaced by the iterator value. =
 To get a $ in the output you need to escape the $ using a backslash \, =
 e.g. \$. The $ may optionally be followed by modifiers which change the =
 offset from the iterator, field width and base. Modifiers are introduced =
 by a { immediately following the $ as ${offset[,width[,base]]}. e.g. =
 ${-20,3,d} which subtracts 20 from the current value, prints the result =
 as a decimal in a zero padded field of with 3. Available output forms =
 are decimal (d), octal (o) and hexadecimal (x or X for uppercase). The =
 default modifier is ${0,0,d}. If the lhs is not absolute, the current =
 $ORIGIN is appended to the name.
 
 For compatibility with earlier versions $$ is still recognized a =
 indicating a literal $ in the output.
 
 ---
 
 The tricky part is ${3,0,d} waas not working. I bumped into a site that =
 stated $GENERATE range rhs type lhs
 
 I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this worked.
 
 Hopefully this will help somebody.
 
 Anybody here have the ability to update the manual?

${3,0,d} works on both the left hand side and the right hand side.
The same code is called to process both the lhs and the rhs.

Mark
 
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: mark_andr...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Kevin Darcy

Jeremy,
I don't think the definitions of rhs and lhs are at issue. What 
apparently led the original poster to the wrong solution initially was 
the verbiage in the manual stating Any single *$* symbols within the 
*lhs* side are replaced by the iterator value, which implies that $ 
replacement _only_ occurs within the LHS. As Mark confirmed, $ can 
also occur in the RHS, and in fact that's what was required for the 
correct solution.


Personally, I wouldn't remove within the LHS from the verbiage 
completely, otherwise someone will undoubtedly complain about not being 
able to perform a $ replacement in the class, type or TTL fields 
(users being users :-)


But, maybe it could be amended to within the LHS or RHS...

- Kevin


Jeremy C. Reed wrote:

On Wed, 4 Mar 2009, Takahiro Masuda wrote:

  

The tricky part is ${3,0,d} waas not working. I bumped into a site
that stated $GENERATE range rhs type lhs



That is wrong.

  

I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this
worked.




  

Anybody here have the ability to update the manual?



Yes.

But it appears your second try is correct.

I can improve the documentation to make sure that it explains the two 
abbreviations:


lhs is left hand side (the label).

rhs is the right hand side (the RDATA).

Will that work for you?
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


  


___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Mark Andrews

In message 49af42f8.9070...@chrysler.com, Kevin Darcy writes:
 Jeremy,
 I don't think the definitions of rhs and lhs are at issue. What 
 apparently led the original poster to the wrong solution initially was 
 the verbiage in the manual stating Any single *$* symbols within the 
 *lhs* side are replaced by the iterator value, which implies that $ 
 replacement _only_ occurs within the LHS. As Mark confirmed, $ can 
 also occur in the RHS, and in fact that's what was required for the 
 correct solution.
 
 Personally, I wouldn't remove within the LHS from the verbiage 
 completely, otherwise someone will undoubtedly complain about not being 
 able to perform a $ replacement in the class, type or TTL fields 
 (users being users :-)
 
 But, maybe it could be amended to within the LHS or RHS...

The quoted text was taken from a table describing all the
elements of a $GENERATE.  I don't see how anyone reading
the table could say that $ only is valid on the left hand
side especially when there are examples above the table
showing it on both sides.

Mark

range
This can be one of two forms: start-stop or start-stop/step.
If the first form is used, then step is set to 1. All of
start, stop and step must be positive.
lhs
This describes the owner name of the resource records to be
created.  Any single $ (dollar sign) symbols within the lhs
side are replaced by the iterator value. To get a $ in the
output, you need to escape the $ using a backslash \, e.g.
\$. The $ may optionally be followed by modifiers which
change the offset from the iterator, field width and base.
Modifiers are introduced by a { (left brace) immediately
following the $ as ${offset[,width[,base]]}. For example,
${-20,3,d} subtracts 20 from the current value, prints the
result as a decimal in a zeropadded field of width 3.
Available output forms are decimal (d), octal (o) and
hexadecimal (x or X for uppercase). The default modifier
is ${0,0,d}. If the lhs is not absolute, the current $ORIGIN
is appended to the name.  For compatibility with earlier
versions, $$ is still recognized as indicating a literal $
in the output.
ttl
Specifies the time-to-live of the generated records. If not
specified this will be inherited using the normal ttl
inheritance rules.  class and ttl can be entered in either
order.
class
Specifies the class of the generated records. This must
match the zone class if it is specified.  class and ttl can
be entered in either order.
type
At present the only supported types are PTR, CNAME, DNAME,
A,  and NS.
rhs
rhs is a domain name. It is processed similarly to lhs.

 
 Jeremy C. Reed wrote:
  On Wed, 4 Mar 2009, Takahiro Masuda wrote:
 

  The tricky part is ${3,0,d} waas not working. I bumped into a site
  that stated $GENERATE range rhs type lhs
  
 
  That is wrong.
 

  I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this
  worked.
  
 
 

  Anybody here have the ability to update the manual?
  
 
  Yes.
 
  But it appears your second try is correct.
 
  I can improve the documentation to make sure that it explains the two 
  abbreviations:
 
  lhs is left hand side (the label).
 
  rhs is the right hand side (the RDATA).
 
  Will that work for you?
  ___
  bind-users mailing list
  bind-users@lists.isc.org
  https://lists.isc.org/mailman/listinfo/bind-users
 
 

 
 ___
 bind-users mailing list
 bind-users@lists.isc.org
 https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: mark_andr...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Kevin Darcy

Mark Andrews wrote:

In message 49af42f8.9070...@chrysler.com, Kevin Darcy writes:
  

Jeremy,
I don't think the definitions of rhs and lhs are at issue. What 
apparently led the original poster to the wrong solution initially was 
the verbiage in the manual stating Any single *$* symbols within the 
*lhs* side are replaced by the iterator value, which implies that $ 
replacement _only_ occurs within the LHS. As Mark confirmed, $ can 
also occur in the RHS, and in fact that's what was required for the 
correct solution.


Personally, I wouldn't remove within the LHS from the verbiage 
completely, otherwise someone will undoubtedly complain about not being 
able to perform a $ replacement in the class, type or TTL fields 
(users being users :-)


But, maybe it could be amended to within the LHS or RHS...



The quoted text was taken from a table describing all the
elements of a $GENERATE.  I don't see how anyone reading
the table could say that $ only is valid on the left hand
side especially when there are examples above the table
showing it on both sides.

Mark

range
This can be one of two forms: start-stop or start-stop/step.
If the first form is used, then step is set to 1. All of
start, stop and step must be positive.
lhs
This describes the owner name of the resource records to be
created.  Any single $ (dollar sign) symbols within the lhs
side are replaced by the iterator value. To get a $ in the
output, you need to escape the $ using a backslash \, e.g.
\$. The $ may optionally be followed by modifiers which
change the offset from the iterator, field width and base.
Modifiers are introduced by a { (left brace) immediately
following the $ as ${offset[,width[,base]]}. For example,
${-20,3,d} subtracts 20 from the current value, prints the
result as a decimal in a zeropadded field of width 3.
Available output forms are decimal (d), octal (o) and
hexadecimal (x or X for uppercase). The default modifier
is ${0,0,d}. If the lhs is not absolute, the current $ORIGIN
is appended to the name.  For compatibility with earlier
versions, $$ is still recognized as indicating a literal $
in the output.
ttl
Specifies the time-to-live of the generated records. If not
specified this will be inherited using the normal ttl
inheritance rules.  class and ttl can be entered in either
order.
class
Specifies the class of the generated records. This must
match the zone class if it is specified.  class and ttl can
be entered in either order.
type
At present the only supported types are PTR, CNAME, DNAME,
A,  and NS.
rhs
rhs is a domain name. It is processed similarly to lhs.

 
  

Jeremy C. Reed wrote:


On Wed, 4 Mar 2009, Takahiro Masuda wrote:

  
  

The tricky part is ${3,0,d} waas not working. I bumped into a site
that stated $GENERATE range rhs type lhs



That is wrong.

  
  

I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this
worked.


  
  

Anybody here have the ability to update the manual?



Yes.

But it appears your second try is correct.

I can improve the documentation to make sure that it explains the two 
abbreviations:


lhs is left hand side (the label).

rhs is the right hand side (the RDATA).

Will that work for you?
  
You're right, I wasn't looking at the documentation in full context, 
only the text that the original poster showed.


Seems pretty clear to me, the example even shows $ replacements on the 
right-hand side.


Perhaps the original poster will clarify what they think needs changing 
in the documentation.


Or, perhaps, were they trying to navigate the .html file without using a 
browser, e.g. in a text editor? That can give a pretty distorted view, 
but it's hardly ISC's fault if people do that...



  - Kevin


___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


RE: $generate lhs problem. Manual needs to be updated.

2009-03-04 Thread Takahiro Masuda
Yes I guess I didn't understand it totally because in the example syntax is 
shown as lhs defined at the beginning
 $GENERATE range lhs [ttl] [class] type rhs [ comment ]
and when you read the explanation for lhs it shows the example ${-20,3,d}.
So I thought that ${-20,3,d} should be defined on the left side.  The example 
only shows one part. I think it'll be helpful if you add the whole line in the 
example so users can see where to place it in the syntax
$GENERATE 1-127 $ CNAME ${3,0,d}.0
taka



From: bind-users-boun...@lists.isc.org on behalf of Kevin Darcy
Sent: Wed 3/4/2009 8:20 PM
To: bind-users@lists.isc.org
Subject: Re: $generate lhs problem. Manual needs to be updated.



Mark Andrews wrote:
 In message 49af42f8.9070...@chrysler.com, Kevin Darcy writes:
  
 Jeremy,
 I don't think the definitions of rhs and lhs are at issue. What
 apparently led the original poster to the wrong solution initially was
 the verbiage in the manual stating Any single *$* symbols within the
 *lhs* side are replaced by the iterator value, which implies that $
 replacement _only_ occurs within the LHS. As Mark confirmed, $ can
 also occur in the RHS, and in fact that's what was required for the
 correct solution.

 Personally, I wouldn't remove within the LHS from the verbiage
 completely, otherwise someone will undoubtedly complain about not being
 able to perform a $ replacement in the class, type or TTL fields
 (users being users :-)

 But, maybe it could be amended to within the LHS or RHS...


   The quoted text was taken from a table describing all the
   elements of a $GENERATE.  I don't see how anyone reading
   the table could say that $ only is valid on the left hand
   side especially when there are examples above the table
   showing it on both sides.

   Mark

 range
   This can be one of two forms: start-stop or start-stop/step.
   If the first form is used, then step is set to 1. All of
   start, stop and step must be positive.
 lhs
   This describes the owner name of the resource records to be
   created.  Any single $ (dollar sign) symbols within the lhs
   side are replaced by the iterator value. To get a $ in the
   output, you need to escape the $ using a backslash \, e.g.
   \$. The $ may optionally be followed by modifiers which
   change the offset from the iterator, field width and base.
   Modifiers are introduced by a { (left brace) immediately
   following the $ as ${offset[,width[,base]]}. For example,
   ${-20,3,d} subtracts 20 from the current value, prints the
   result as a decimal in a zeropadded field of width 3.
   Available output forms are decimal (d), octal (o) and
   hexadecimal (x or X for uppercase). The default modifier
   is ${0,0,d}. If the lhs is not absolute, the current $ORIGIN
   is appended to the name.  For compatibility with earlier
   versions, $$ is still recognized as indicating a literal $
   in the output.
 ttl
   Specifies the time-to-live of the generated records. If not
   specified this will be inherited using the normal ttl
   inheritance rules.  class and ttl can be entered in either
   order.
 class
   Specifies the class of the generated records. This must
   match the zone class if it is specified.  class and ttl can
   be entered in either order.
 type
   At present the only supported types are PTR, CNAME, DNAME,
   A,  and NS.
 rhs
   rhs is a domain name. It is processed similarly to lhs.

 
  
 Jeremy C. Reed wrote:

 On Wed, 4 Mar 2009, Takahiro Masuda wrote:

  
  
 The tricky part is ${3,0,d} waas not working. I bumped into a site
 that stated $GENERATE range rhs type lhs


 That is wrong.

  
  
 I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this
 worked.


  
  
 Anybody here have the ability to update the manual?


 Yes.

 But it appears your second try is correct.

 I can improve the documentation to make sure that it explains the two
 abbreviations:

 lhs is left hand side (the label).

 rhs is the right hand side (the RDATA).

 Will that work for you?
  
You're right, I wasn't looking at the documentation in full context,
only the text that the original poster showed.

Seems pretty clear to me, the example even shows $ replacements on the
right-hand side.

Perhaps the original poster will clarify what they think needs changing
in the documentation.

Or, perhaps, were they trying to navigate the .html file without using a
browser, e.g. in a text editor? That can give a pretty distorted view,
but it's hardly ISC's fault if people do that...


   - Kevin

___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users