source: trunk/reverse-patterns.html

Last change on this file was 742, checked in by Kris Deugau, 8 years ago

/trunk

Fix bizarre glitch in reverse-patterns.html change in r741, possibly
due to accidentally applying the patch several times instead of
removing/applying to confirm it was as intended.

File size: 6.3 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5 <title>Reverse DNS Template Reference</title>
6 <!-- General stylesheet for most content, all browsers -->
7 <link rel="stylesheet" type="text/css" href="templates/dns.css" />
8 <!-- Custom local stylesheet, if desired -->
9 <link rel="stylesheet" type="text/css" href="local.css" />
10 </head>
11 <body>
12 <div id="main">
13 <h2>Reverse DNS Template Reference</h2>
14<!-- rdns pattern table -->
15 <table class="container" cellpadding="2" cellspacing="2" style="max-width:850px;">
16 <tbody>
17 <tr class="tableheader">
18 <td colspan="3">Whole-IP patterns</td>
19 </tr>
20 <tr class="tableheader">
21 <td></td>
22 <td>Substitution pattern</td>
23 <td>Example expansion using 192.168.23.45</td>
24 </tr>
25 <tr class="row0">
26 <td>Dashed IP</td>
27 <td>%i</td>
28 <td>192-168-23-45</td>
29 </tr>
30 <tr class="row1">
31 <td>Reverse dashed IP</td>
32 <td>%r</td>
33 <td>45-23-168-192</td>
34 </tr>
35 <tr class="row0">
36 <td>Hex-coded IP</td>
37 <td>%h</td>
38 <td>c0a8172d</td>
39 </tr>
40 <tr class="row1">
41 <td>Decimal IP</td>
42 <td>%d</td>
43 <td>323241453</td>
44 </tr>
45 <tr class="row0">
46 <td colspan="3">
47 %i and %r also allow explicitly defining the separator; eg %.i or %_r. Dot/period (.), dash (-),
48 and underscore (_) are the only characters supported since DNS names may not contain most
49 other non-alphanumerics.
50 </td>
51 </tr>
52 <tr class="row0">
53 <td colspan="3">
54 %blank% may be used to specifically prevent template expansion on a segment of a block if
55 desired; eg, if 192.168.23.0/24 has "unused-%i.example.com" set, adding an A+PTR template
56 for 192.168.23.48/30 of "%blank%" will leave 192.168.23.48 through .51 without PTR records
57 unless specific entries exist for those IPs.
58 </td>
59 </tr>
60 <tr class="tableheader">
61 <td colspan="3">Per-octet patterns (1, 2, 3, or 4 specify
62 the octet; d, h or 0 specify decimal, hexidecimal, or
63 0-padded decimal)</td>
64 </tr>
65 <tr class="row0">
66 <td>First octet, decimal</td>
67 <td>%1d</td>
68 <td>192</td>
69 </tr>
70 <tr class="row1">
71 <td>Third octet, 0-padded</td>
72 <td>%30</td>
73 <td>023</td>
74 </tr>
75 <tr class="row0">
76 <td>Fourth octet, hexidecimal</td>
77 <td>%4h</td>
78 <td>2d</td>
79 </tr>
80 <tr class="row1">
81 <td>All octets, different expansions</td>
82 <td>%1h-%2d-%30-%4h</td>
83 <td>c0-168-023-2d</td>
84 </tr>
85
86 <tr><td colspan="3">&nbsp;</td></tr>
87
88 <tr class="tableheader">
89 <td colspan="3">Extensions</td>
90 </tr>
91 <tr class="tableheader">
92 <td></td>
93 <td>Substitution pattern</td>
94 <td>Example expansion using 192.168.23.40/29</td>
95 </tr>
96 <tr class="row0">
97 <td>Network/<br />gateway/<br />broadcast</td>
98 <td>%ngb%</td>
99 <td>
100 customer-%i%ngb%.example.com<br />
101 192.168.23.40 -> customer-net.example.com<br />
102 192.168.23.41 -> customer-gw.example.com<br />
103 192.168.23.42 -> customer-192-168-23-42.example.com<br />
104 192.168.23.43 -> customer-192-168-23-43.example.com<br />
105 192.168.23.44 -> customer-192-168-23-44.example.com<br />
106 192.168.23.45 -> customer-192-168-23-45.example.com<br />
107 192.168.23.46 -> customer-192-168-23-46.example.com<br />
108 192.168.23.47 -> customer-bcast.example.com
109 </td>
110 </tr>
111 <tr class="row1">
112 <td colspan="3">
113 Any IP pattern component is blanked on the network, gateway, and broadcast IPs when this is
114 used.<br />
115 Each of n, g, or b can be prefixed with a dash, eg %-ng-b% or %n-g-b%, which will
116 blank that entire entry instead of substituting <tt>net</tt>, <tt>gw</tt>, or <tt>bcast</tt>.
117 </td>
118 </tr>
119 <tr class="row0">
120 <td>n'th usable IP</td>
121 <td>%c</td>
122 <td>
123 customer-%3d-%c.example.com<br />
124 192.168.23.40 -> customer-23.example.com<br />
125 192.168.23.41 -> customer-23.example.com<br />
126 192.168.23.42 -> customer-23-1.example.com<br />
127 192.168.23.43 -> customer-23-2.example.com<br />
128 192.168.23.44 -> customer-23-3.example.com<br />
129 192.168.23.45 -> customer-23-4.example.com<br />
130 192.168.23.46 -> customer-23-5.example.com<br />
131 192.168.23.47 -> customer-23.example.com
132 </td>
133 </tr>
134 <tr class="row1">
135 <td colspan="3">
136 c can be prefixed with a dash (%-c), which starts the numbering from the conventional gateway IP
137 instead. (.41 above would be 1, .42 2, etc, finishing with 6 at .46).
138 </td>
139 </tr>
140 <tr class="row0">
141 <td>n'th natural IP</td>
142 <td>%x</td>
143 <td>
144 customer-23-%x.example.com<br />
145 192.168.23.40 -> customer-23-1.example.com<br />
146 192.168.23.41 -> customer-23-2.example.com<br />
147 192.168.23.42 -> customer-23-3.example.com<br />
148 192.168.23.43 -> customer-23-4.example.com<br />
149 192.168.23.44 -> customer-23-5.example.com<br />
150 192.168.23.45 -> customer-23-6.example.com<br />
151 192.168.23.46 -> customer-23-7.example.com<br />
152 192.168.23.47 -> customer-23-8.example.com
153 </td>
154 </tr>
155 </tbody>
156 </table>
157<!-- done rdns pattern table -->
158
159 </div>
160 </body>
161</html>
Note: See TracBrowser for help on using the repository browser.