-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
391 lines (347 loc) · 17 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<!DOCTYPE html><html><head><meta charset="utf-8"><style>/* Fonts */
@font-face{
font-family: octicons-anchor;
src: url(data:x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1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fnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');
}
/* Body */
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body{
color:#4d4d4c;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
font-size:12px;
line-height:1.5em;
background:#fefefe;
width: 45em;
margin: 10px auto;
padding: 30px;
border: 1px solid #ddd;
outline: 1300px solid #f8f8f8;
}
/* Links */
a{ color: #06d; text-decoration:none; }
a:hover{ color: #06e; text-decoration: underline; }
a:active{ color:#faa700; }
a:focus{ outline: thin dotted; }
a:hover, a:active{ outline: 0; }
::-moz-selection { background:rgba(255,255,0,0.3); color:#000 }
::selection { background:rgba(255,255,0,0.3); color:#000 }
a::-moz-selection { background:rgba(255,255,0,0.3); color:#0645ad }
a::selection { background:rgba(255,255,0,0.3); color:#0645ad }
/* Header Anchor Links*/
a.headeranchor-link {
color:#111;
border: 0;
margin-left: -20px;
padding-right: 6px;
cursor: pointer;
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 0;
}
span.headeranchor {
font: normal normal 16px octicons-anchor;
line-height: 1;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
a.headeranchor-link:hover { text-decoration: none;}
a.headeranchor-link:visited { color:#4d4d4c; }
a.headeranchor-link:active { color:#4d4d4c; }
a.headeranchor-link:hover span.headeranchor:before { content: '\f05c'; }
h1:hover a span.headeranchor:before { content: '\f05c'; }
h2:hover a span.headeranchor:before { content: '\f05c'; }
h3:hover a span.headeranchor:before { content: '\f05c'; }
h4:hover a span.headeranchor:before { content: '\f05c'; }
h5:hover a span.headeranchor:before { content: '\f05c'; }
h6:hover a span.headeranchor:before { content: '\f05c'; }
abbr { cursor: pointer; }
/* Paragraphs */
p { margin:1em 0; }
/* Images */
img {
max-width:100%;
border: 0;
-ms-interpolation-mode: bicubic;
vertical-align: middle;
}
/* Headers */
h1,h2,h3,h4,h5,h6 {
font-weight:normal;
color:#111;
line-height: 1.7;
position: relative;
}
h4,h5,h6{ font-weight: bold; }
h1 { font-size:2.5em; border-bottom: 1px solid #ddd;}
h2 { font-size:2em; border-bottom:1px solid #eee; padding-bottom: 5px; }
h3 { font-size:1.5em; }
h4 { font-size:1.2em; }
h5 { font-size:1em; }
h6 { font-size:0.9em; }
/* Block Quotes */
blockquote {
color:#666666;
margin:0;
padding-left: 3em;
border-left: 0.5em #EEE solid;
}
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
/* Raw Blocks */
span.backtick {
border:1px solid #EAEAEA;
border-radius:3px;
background:#F8F8F8;
padding:0 3px 0 3px;
}
pre, code, kbd, samp {
color: #000;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 0.88em;
background-color: #F8F8F8;
border: 1px solid #CCC;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
padding: 10px;
}
code { padding: 0 3px 0 3px; }
pre code { border: 0; padding: 0; }
/* Admonition */
div.admonition {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 0.88em;
padding: 0.5em 1em 0.5em 1em;
margin: 10px auto;
}
div.admonition p {
padding: 0;
margin: 0.5em 0 0.5em 0;
}
p.admonition-title {
font-weight: bold;
}
div.admonition.attention {
color: #4F8A10;
background-color: #DFF2BF;
border: 1px solid #4F8A10;
}
div.admonition.caution {
color: #9F6000;
background-color: #FEEFB3;
border: 1px solid #9F6000;
}
div.admonition.hint {
color: #00529B;
background-color: #BDE5F8;
border: 1px solid #00529B;
}
div.admonition.danger {
color: #D8000C;
background-color: #FFBABA;
border: 1px solid #D8000C;
}
div.admonition.note {
color: #888888;
background-color: #F8F8F8;
border: 1px solid #888888;
}
/* Inlines */
b, strong { font-weight: bold; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
dfn { font-style: italic; }
/* Lists */
ul, ol { padding-left: 30px; }
li p:last-child { margin:0 }
li.task-list-item { list-style-type: none; }
li.task-list-item input { float:left; margin-left: -20px; margin-top: 6px; }
dt { font-weight: bold; font-style: italic;}
dd { margin: 0 0 0 2em; }
/* Tables */
table { border-collapse: collapse; border: 1px solid #ddd; background-color: #fefefe; }
table tr:nth-child(2n) { background-color: #f8f8f8; }
td, th { border: 1px solid #ddd; padding: 6px 13px; }
/* Codehilite Tables */
table.codehilitetable { border: 0; border-spacing: 0; width: 100%; }
td.linenos, td.code, table.codehilitetable td { border: 0; padding: 0; }
table.codehilitetable td:not(.linenos) div.linenodiv { padding: 0 !important; }
td.code { width: 100%; }
table.codehilitetable td.linenos div pre, td div.linenodiv pre {
border: 0;
border-top: 1px solid #CCC;
border-left: 1px solid #CCC;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-border-top-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-bottomleft: 3px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
table.codehilitetable td.code div pre {
border: 0;
border-top: 1px solid #CCC;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-topright: 3px;
-moz-border-radius-bottomright: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* Media */
@media only screen and (min-width: 480px) {
body{ font-size:14px; }
}
@media only screen and (min-width: 768px) {
body{ font-size:16px; }
}
@media print {
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
body{ font-size:12pt; max-width:100%; outline:none; border: 0;}
a, a:visited { text-decoration: underline; }
a.headeranchor-link { display: none; }
hr { height: 1px; border:0; border-bottom:1px solid black; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}
</style><title>README</title></head><body><h1 id="stpslax"><a name="user-content-stpslax" href="#stpslax" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>stp.slax</h1>
<h4 id="description"><a name="user-content-description" href="#description" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Description:</h4>
<p>This is a Juniper SLAX op script to provide a quick STP topology breakdown.</p>
<p>This script will combine and shorten the output of the <code>show spanning-tree bridge</code>, <br />
<code>show spanning-tree interface</code>, and <code>show spanning-tree mstp configuration</code> <br />
commands into one easy to read format. You can determine <br />
if the local switch is root, what the root priority and root MAC address are, why the local <br />
switch is not root, and what interface is the root port if it isn’t root. If in a VSTP <br />
or MSTP scenario, it will also print associated VLANs for each MSTI. For MSTP configurations, it will<br />
also output the Configuration Name, Revision Level, and Configuration Digest. </p>
<p>For detailed information for storing and enabling an op script on your Junos device, please visit <a href="http://www.juniper.net/techpubs/en_US/junos13.2/topics/task/configuration/junos-script-automation-script-storing-enabling.html">this page</a></p>
<p><a href="http://www.juniper.net/techpubs/en_US/junos14.1/topics/concept/junos-script-automation-slax-overview.html">General SLAX Overview</a><br />
<a href="http://www.juniper.net/techpubs/en_US/junos13.2/information-products/pathway-pages/config-guide-automation/configuration-and-operations-automation.html#overview">Junos Automation Documentation</a> </p>
<h4 id="examples"><a name="user-content-examples" href="#examples" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Examples:</h4>
<p><strong>RSTP Example:</strong> </p>
<pre><code>> op stp
-------------------------------------------------------------
Region Rt Priority Root MAC Root? Why Not?
RSTP 8192 40:b4:f0:6a:dc:01 No Your priority: 32768
Root port: ge-0/0/47.0
</code></pre>
<p><strong>MSTP Example</strong> </p>
<pre><code>> op stp
-------------------------------------------------------------
Region Rt Priority Root MAC Root? Why Not?
CIST 8192 00:19:e2:51:83:c1 No Your priority: 32768
Root port: ge-0/0/12.0
VLANS: 0-264, 267-269, 271-1300, 1303-1330, 1333-4094
-------------------------------------------------------------
Configuration Name Revision Level Configuration Digest
Test-MSTP 1 0x2adca6e344946ceedde262329c949bb0
-------------------------------------------------------------
Region Rt Priority Root MAC Root? Why Not?
MSTI 1 32769 00:19:e2:51:85:c1 No Root has lower MAC.
VLANS: 1301-1302 Root port: ge-0/0/12.0
-------------------------------------------------------------
Region Rt Priority Root MAC Root? Why Not?
MSTI 2 32770 3c:8a:b0:9b:fc:81 Yes N/A
No active interfaces on any VLANs in this MSTI.
VLANS: 1331-1332
-------------------------------------------------------------
Region Rt Priority Root MAC Root? Why Not?
MSTI 3 32771 00:19:e2:51:85:c1 No Root has lower MAC.
VLANS: 265-266, 270 Root port: ge-0/0/12.0
</code></pre>
<p><strong>VSTP Example</strong> </p>
<pre><code>> op stp
VSTP Instances:
VSTP VLAN Rt Priority Root MAC Root? Why Not?
Vlan 10 32778 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 11 32779 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 12 32780 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 13 32781 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 1301 34069 00:19:e2:51:85:c1 No Root has lower MAC.
Root port: ge-0/0/12.0
Vlan 1331 34099 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 14 32782 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 15 32783 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 16 32784 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 17 32785 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 18 32786 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 21 32789 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 23 32791 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 24 32792 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 258 33026 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 265 33033 00:19:e2:51:85:c1 No Root has lower MAC.
Root port: ge-0/0/12.0
Vlan 400 33168 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 500 33268 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 620 33388 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 621 33389 3c:8a:b0:9b:fc:81 Yes N/A
Vlan 666 33434 3c:8a:b0:9b:fc:81 Yes N/A
</code></pre>
<h4 id="version-history"><a name="user-content-version-history" href="#version-history" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Version History:</h4>
<ul>
<li>v1.0<ul>
<li>Inital Release</li>
</ul>
</li>
<li>v1.1<ul>
<li>Modified template rootport-vlans to not display the ‘VLANS’ line when RSTP is running, since it should be obvious that all vlans are encompassed by RSTP. </li>
<li>Also changed how ouput is handled to remove output-line template, which made code more readable.</li>
</ul>
</li>
<li>v1.2<ul>
<li>Changed invoking of the commands to be one open connection to the RE, to improve callback time. </li>
<li>Also made some changes to comments. </li>
</ul>
</li>
<li>v1.3 <ul>
<li>Added blank lines between MSTI regions for readability. </li>
<li>Modified the output of the VLAN list. If it is greater than 35 characters, <br />
it shows up one line below, so that the Root Port information doesn’t get shifted right.</li>
<li>Added output for the MSTP Configuration Name, Revision Level, and Configuration Digest. </li>
<li>Fixed the logic for MSTP instances. There was an error so that the first MSTI was being used as the results for all MSTI instances. </li>
<li>Updated the Readme with instructions on using the SLAX script. </li>
<li>Modified output to be shown to the user as it is generated, rather than all at once upon script completion.<br />
This should create quicker results for large numbers of MSTIs, so the user knows that the script is actively working.</li>
</ul>
</li>
<li>v1.3.1<ul>
<li>Rootport-vlans template will now let the user know if there are no interfaces active in a given MSTI. </li>
<li>Rootport-vlans template will also now output the VLAN info for MSTIs where no VLANS in the MSTI have active interfaces. </li>
<li>VLAN info will now also be omitted when the protocol is STP, was previously only omitting for RSTP. </li>
<li>VSTP logic fix, had the same problem as MSTP in v1.3</li>
<li>Made the VLAN list output easier to read by injecting a space after each comma. </li>
<li>Updated example output inside the script, and within the Readme file. </li>
</ul>
</li>
</ul></body></html>