-
Notifications
You must be signed in to change notification settings - Fork 1
/
boss.j2c
576 lines (565 loc) · 39.8 KB
/
boss.j2c
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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
package Decoder;
my $Version = "0.02";
__END__
# BOSS json to config (j2x) decoder
# Ensure that c2j encoder used was of same major version to ensure operating on same data schema
################################################################################
# SYNTAX #
################################################################################
# Special directives:
# DEVICE_PORT_RANGE = x # 0 = do not generate ranges; 1 = compact ranges (Baystack like : 1/1-24); 2 = VOSS ranges (less compact 1/1-1/24)
# SLOT_PORT_SEPARATOR = "<char>" # Set the character to separate slot/port; if not set will assume "/"; for EXOS nees to be set to ":"
#
# This file will need editing based on what config you want to generate from the json/yaml data.
#
# Provide the config lines for the features/functionalities you want to generate config for.
# These config lines are in the target system CLI syntax, but yank back to the encoded data structure to fetch arguments and iterations.
# These arguments are embedded as $variables, using a hash/array syntax to exactly point to the data in the encoded structure.
# The encoded data structure is either the json or yaml output produced by the 'extract' encoder.
# All of the following are valid variables pointing to values inside the data structure:
#
# $system{name}
# $vlan{x}
# $vlan{x}{name}
# $dns{server}[x]
# $ip{route}[x]{next-hop}
# $x # 1-based array index of any of above variables containing [x]
#
# Where 'x' is placed inside curlies, {x}, the commands will be repeated as many times as there are instances of data for x as hash key.
# Where 'x' is placed inside squares, [x], the commands will be repeated as many times as there are instances of data for x as array index.
#
# Note that a variable like $item{x}, where '{x}' is at the end of the variable, will result in keys of x being used. Which is the most intuitive
# if we expect the values to be lower level hashes. For example $vlan{x} will be the vlan-id key and all the data for each vlan will be placed in
# lower level hash keys like $vlan{x}{name}, etc..
# If however the hash is flat, and the desired values are in the same hash, we can access those using $item{x:v}.
#
#
# Example1:
# vlan create $vlan{x} [name $vlan{x}{name}] type port-mstprstp $vlan{x}{instance}
#
# If we have this data in the encoded structure:
# "vlan" : {
# "1" : {
# "ports" : "1/1-8"
# },
# "2" : {
# "instance" : 0,
# "name" : "Grt-2",
# "ports" : "1/9",
# "pvid" : "1/9",
# "type" : "port",
# "voice-vlan" : false
# },
# "5" : {
# "instance" : 0,
# "type" : "port",
# "voice-vlan" : true
# }
# }
#
# Then the example1 line will produce this config output:
# vlan create 2 name GRT-2 type port-mstprstp 0
# vlan create 5 type port-mstprstp 0
#
# If the $variable includes an "x" index, then that index is allowed to iterate across all relevant values in the data structure.
# Each command line can include optional sections. In the example above [name $vlan{x}{name}] is an optional section and is only
# included in the output if there is a value for that variable in the data structure for the x iteration.
# Whereas if there is no value for a $variable which is not part of an optional section, then the whole line is omitted; for example
# we got no vlan creation command line for vlan 1, as there was no value for $vlan{x}{instance} with x = 1
#
#
# Example2:
# vlan create $vlan{x} [name $vlan{x}{name}] type port-mstprstp 0 &IF: $vlan{x} > 1
#
# In this case we might not care about mapping ERS STP instances over to the VOSS config, so we hard code the instance to 0.
# But now we don't want to generate a config with a vlan 1 creation command. So we can apply constraints to commands to add to our
# generated config file by appnding &IF: <condition-to-eval>.
# The <condition-to-eval> is evaluated and only if the result is true then the line is added to the produced config.
#
#
# Example3:
# i-sid $vlan{x}{isid} elan
# c-vid $vlan{x} ports $vlan{x}{ports}
# exit
#
# Indentation can be used to make inner context lines, dependant on the outer context.
# If we have this data in the encoded structure:
# "vlan" : {
# "1" : {
# "ports" : "1/1-8"
# },
# "2" : {
# "instance" : 0,
# "name" : "Grt-2",
# "ports" : "1/9",
# "pvid" : "1/9",
# "type" : "port",
# "voice-vlan" : false
# },
# "210" : {
# "i-sid" : 2800210,
# "instance" : 0,
# "name" : "Green-210",
# "ports" : "1/10-11",
# "pvid" : "1/10-11",
# "type" : "port",
# },
# "211" : {
# "i-sid" : 2800211
# },
# }
#
# Then the example3 line will produce this config output:
# i-sid 2800210 elan
# c-vid 210 ports 1/10-11
# exit
# i-sid 2800211 elan
# exit
#
# Note that for the 2nd line (c-vid ...) does not appear for vlans 1 & 2, as these have no i-sid and hence did not create the 1st line either.
# Also note not for vlan 211 as there are no ports.
#
#
# Example4:
# radius server host $radius{server}{ip} [acct-enable &IF: $radius{server}{accounting}] [timeout $radius{server}{timeout}]
#
# Here the optional acct-enable parameter is included based on the &IF: evaluation of $radius{server}{accounting}
#
# With this data:
# "radius" : {
# "server" : {
# "accounting" : true,
# "ip" : "10.8.255.17",
# "timeout" : 4
# }
#
# Produces this line:
# radius server host 10.8.255.17 acct-enable timeout 4
#
#
# Example5:
# vlan ports $port{x} tagging $port{x}{tagging} [filter-untagged-frame $port{x}{filter-untagged-frame}%:enable,disable]
#
# Appending '%:<value1>,<value2>' to a vaiable will result in value1 being replaced if the variable is true and value2 otherwise
#
#
################################################################################
# DEFINITIONS #
################################################################################
DEVICE_PORT_RANGE = 1
enable
configure terminal
! *** AAA ***
password security &IF: $password{security}{enable}
password aging-time $password{security}{aging-time}
password password-history $password{security}{history}
password complexity lower-case $password{security}{lower-case}
password complexity numeric $password{security}{numeric}
password complexity special $password{security}{special}
password complexity upper-case $password{security}{upper-case}
password min-length $password{security}{min-length}
password notifications $password{security}{notifications}
! *** CORE (Phase 1) ***
no autosave enable &IF: !$system{autosave}
no autotopology &IF: !$sonmp{enable}
sntp server primary address $sntp{server}[0] # edited
sntp server secondary address $sntp{server}[1] # edited
sntp enable &IF: $sntp{enable}
sntp sync-interval $sntp{sync-interval}
ntp server $ntp{server}{x} enable &IF: $ntp{server}{x}{enable}
ntp &IF: $ntp{enable}
telnet-access inactive-timeout $cli{inactive-timeout}
terminal width $terminal{width}
terminal length $terminal{length}
cli password serial $cli{password}{serial}
cli password telnet $cli{password}{telnet}
tftp-server $tftp{server}
! *** RADIUS ***
no radius-server password fallback &IF: !$radius{password-fallback}
no radius use-management-ip &IF: !$radius{use-management-ip}
radius server host $radius{server}{x} [<scd:secondary>] [acct-enable &IF: $radius{server}{x}{accounting}] [timeout $radius{server}{x}{timeout}]
#radius server host timeout <tm> # edited
#radius server host used-by eapol timeout <tm> # edited
#radius server host used-by non-eapol timeout <tm> # edited
radius accounting interim-updates enable &IF: $radius{interim-updates}
radius reachability mode $radius{reachability}{mode} [username $radius{reachability}{username}] [password $radius{reachability}{password}]
radius reachability timeout $radius{reachability}{timeout}
! *** RADIUS Dynamic Server ***
radius dynamic-server replay-protection &IF: $radius{dynamic-server}{replay-protection}
radius dynamic-server client $radius{dynamic-server}{client}{x} [port $radius{dynamic-server}{client}{x}{port}]
radius dynamic-server client $radius{dynamic-server}{client}{x} [process-reauthentication-requests &IF: $radius{dynamic-server}{client}{x}{reauthentication}] [process-disconnect-requests &IF: $radius{dynamic-server}{client}{x}{disconnect}] [process-change-of-auth-requests &IF: $radius{dynamic-server}{client}{x}{coa}]
! *** TACACS+ ***
! *** SNMP ***
snmp-server enable &IF: $snmp{enable}
snmp-server contact $system{contact}
snmp-server name $system{name}
snmp-server location $system{location}
snmp-server view $snmp{view}{x} $snmp{view}{x}
snmp-server user $snmp{user}{x} $snmp{user}{x}{auth} [$snmp{user}{x}{priv}] [read-view $snmp{user}{x}{read-view}] [write-view $snmp{user}{x}{write-view}] [notify-view $snmp{user}{x}{notify-view}]
snmp-server notify-filter $snmp{notify-filter}[x]{profile} $snmp{notify-filter}[x]{oid}
snmp-server notification-control $snmp{notification-control}{x} &IF: $snmp{notification-control}{x}{enable} && !$snmp{notification-control}{x}{ports} # edited
snmp-server notification-control $snmp{notification-control}{x} $snmp{notification-control}{x}{ports} &IF: $snmp{notification-control}{x}{enable} && $snmp{notification-control}{x}{ports} # edited
no snmp-server notification-control $snmp{notification-control}{x} &IF: !$snmp{notification-control}{x}{enable} && !$snmp{notification-control}{x}{ports} # edited
no snmp-server notification-control $snmp{notification-control}{x} $snmp{notification-control}{x}{ports} &IF: !$snmp{notification-control}{x}{enable} && $snmp{notification-control}{x}{ports} # edited
! *** IP ***
ip default-gateway $mgmt{vlan}{default-gateway}
ip address switch $mgmt{vlan}{ip}
ip address stack $mgmt{vlan}{ip}
ip address unit <unit> <ip>
ip netmask $mgmt{vlan}{mask}
ip address source $mgmt{vlan}{source}
ip domain-name $dns{domain-name}
ip name-server $dns{server}[x]
ip mgmt netmask $mgmt{oob}{mask}
ip mgmt address switch $mgmt{vlan}{ip}
ip mgmt address stack $mgmt{vlan}{ip}
! *** IP Manager ***
telnet-access disable &IF: !$telnet{enable}
ipmgr source-ip $access-control{src-ip}{x} $access-control{src-ip}{x}{address} mask $access-control{src-ip}{x}{mask}
ipmgr source-ip $access-control{src-ipv6}{x} $access-control{src-ipv6}{x}{address}
! *** ASSET ID ***
! *** IPFIX ***
! *** System Logging ***
logging remote address $syslog{1}{server} # edited
logging remote secondary-address $syslog{2}{server} # edited
logging remote enable &IF: $syslog{enable}
logging remote facility $syslog{1}{facility}
logging remote level $syslog{1}{level}
! *** STACK ***
stack forced-mode &IF: $stack{forced-mode}
no stack reboot-on-failure &IF: !$stack{reboot-on-failure}
! *** Custom Banner ***
banner disabled &IF: !$system{banner}{enable}
banner $x $system{banner}{custom}[x]
! *** Certificates Settings ***
! --- Certificate Subject ---
certificate subject common-name $certificate{subject}{common-name}
certificate subject country $certificate{subject}{country}
certificate subject e-mail $certificate{subject}{e-mail}
certificate subject include-ip-address $certificate{subject}{include-ip-address}
certificate subject locality $certificate{subject}{locality}
certificate subject organization $certificate{subject}{organization}
certificate subject province $certificate{subject}{province}
certificate subject unit $certificate{subject}{unit}
! --- Certificate Authority ---
certificate ca $certificate{ca}{x}
certificate ca $certificate{ca}{x} common-name $certificate{ca}{x}{common-name}
certificate ca $certificate{ca}{x} key-name $certificate{ca}{x}{key-name}
certificate ca $certificate{ca}{x} ca-url $certificate{ca}{x}{ca-url}
certificate ca $certificate{ca}{x} use-for $certificate{ca}{x}{use-for}
! --- Certificate Key ---
! --- Certificates in CA ---
! --- Certificates in TrustStore ---
! *** SSH ***
ssh rekey-interval $ssh{rekey-interval}
ssh &IF: $ssh{enable}
! *** SSL ***
ssl &IF: $web{ssl}
no https-only &IF: $web{http}
! *** SSHC ***
sshc authentication $ssh{client}{auth}
sshc rsa-key $ssh{client}{rsa-key}
sftp-server $ssh{sftp-server}
! *** MSTP (Phase 1) ***
spanning-tree mode mst &IF: $spanning-tree{mode}
spanning-tree mstp region region-name $spanning-tree{mstp}{region}{name}
! *** LACP (Phase 1) ***
interface Ethernet ALL
lacp mode port $port{x} off &IF: !$port{x}{lacp}{enable}
exit
! *** VLAN ***
vlan configcontrol $system{vlan}{configcontrol}
vlan create $vlan{x} type $vlan{x}{type} [$vlan{x}{instance}] [$vlan{x}{instance}] [voice-vlan &IF: $vlan{x}{voice-vlan}]
vlan name $vlan{x} $vlan{x}{name}
vlan ports $port{x} [priority $port{x}{qos}] [name $port{x}{name}]
vlan ports $port{x} tagging $port{x}{tagging} [filter-untagged-frame $port{x}{filter-untagged-frame}%:enable,disable] [filter-unregistered-frames $port{x}{filter-unregistered-frames}%:enable,disable]
vlan members $vlan{x} none &IF: !$vlan{x}{ports-all}
vlan members $vlan{x} $vlan{x}{ports-all}
vlan ports $vlan{x}{pvid} pvid $vlan{x}
no auto-pvid &IF: !$system{vlan}{auto-pvid}
! *** 802.1ab ***
interface Ethernet ALL
lldp tx-tlv port $port{x} dot3 mac-phy-config-status &IF: $port{x}{lldp}{tx-tlv}{dot3}{mac-phy-config-status}
no lldp tx-tlv port $port{x} dot3 mdi-power-support &IF: !$port{x}{lldp}{tx-tlv}{dot3}{mdi-power-support}
no lldp tx-tlv port $port{x} med extendedPSE &IF: !$port{x}{lldp}{tx-tlv}{med}{extendedPSE}
no lldp tx-tlv port $port{x} local-mgmt-addr &IF: !$port{x}{lldp}{tx-tlv}{local-mgmt-addr}
exit
! *** 802.1ab vendor-specific TLVs config ***
lldp vendor-specific call-server <n> $lldp{vendor-specific}[x]
lldp vendor-specific file-server <n> $lldp{file-server}[x]
interface Ethernet ALL
no lldp tx-tlv port $port{x} vendor-specific poe-conservation &IF: !$port{x}{lldp}{tx-tlv}{vendor-specific}{poe-conservation}
no lldp tx-tlv port $port{x} vendor-specific call-server &IF: !$port{x}{lldp}{tx-tlv}{vendor-specific}{call-server}
no lldp tx-tlv port $port{x} vendor-specific file-server &IF: !$port{x}{lldp}{tx-tlv}{vendor-specific}{file-server}
no lldp tx-tlv port $port{x} vendor-specific dot1q-framing &IF: !$port{x}{lldp}{tx-tlv}{vendor-specific}{dot1q-framing}
exit
! *** 802.1AB MED Voice Network Policies ***
interface Ethernet ALL
lldp med-network-policies [port $port{x}] voice dscp $port{x}{lldp}{med}{voice}{dscp} priority $port{x}{lldp}{med}{voice}{priority} tagging $port{x}{lldp}{med}{voice}{tagging} vlan-id $port{x}{lldp}{med}{voice}{vlan}
no lldp med-network-policies port <ports> voice
exit
! *** QOS ***
qos if-group name $qos{if-group}{x} class $qos{if-group}{x}
qos l2-element $qos{l2-element}{x} name $qos{l2-element}{x}{name}
qos classifier $qos{classifier}{x} set-id $qos{classifier}{x}{set-id} name $qos{classifier}{x}{name} element-type $qos{classifier}{x}{element-type} element-id $qos{classifier}{x}{element-id}
qos if-assign port $port{x} name $port{x}{qos}{if-group}
qos agent queue-set $qos{queue-set}
qos agent ubp high-security-local &IF: $qos{ubp}{high-security-local}
qos queue-set-assignment queue-set $qos{queue-set}{x} 1p $qos{queue-set}{x}{1p} queue $qos{queue-set}{x}{queue}
qos ubp classifier name $qos{ubp}{x} [addr-type $qos{ubp}{x}{classifier}{addr-type}] [ds-field $qos{ubp}{x}{classifier}{ds-field}] [ethertype $qos{ubp}{x}{classifier}{ethertype}] drop-action $qos{ubp}{x}{classifier}{drop}%:enable,disable [block <blk>] [eval-order $qos{ubp}{x}{classifier}{eval-order}]
qos ubp set name $qos{ubp}{x} set-priority $qos{ubp}{x}{set}{priority} track-statistics $qos{ubp}{x}{set}{statistics}
qos traffic-profile classifier name $qos{traffic-profile}{x} [addr-type $qos{traffic-profile}{x}{classifier}{addr-type}] [src-ip $qos{traffic-profile}{x}{classifier}{src-ip}] [dst-ip $qos{traffic-profile}{x}{classifier}{dst-ip}] [ds-field $qos{traffic-profile}{x}{classifier}{ds-field}] [ethertype $qos{traffic-profile}{x}{classifier}{ethertype}] [drop-action $qos{traffic-profile}{x}{classifier}{drop}%:enable,disable] [update-dscp $qos{traffic-profile}{x}{classifier}{update-dscp}] [block <blk>] [eval-order $qos{traffic-profile}{x}{classifier}{eval-order}] [update-dscp-out-action $qos{traffic-profile}{x}{classifier}{update-dscp-out-action}]
qos traffic-profile set port <ports> name $qos{traffic-profile}{x} [meter-mode $qos{traffic-profile}{x}{set}{policer}{meter-mode}] [committed-rate $qos{traffic-profile}{x}{set}{policer}{committed-rate}] [committed-burst-size $qos{traffic-profile}{x}{set}{policer}{burst-size}] [drop-out-action $qos{traffic-profile}{x}{set}{drop}%:enable,disable] track-statistics $qos{traffic-profile}{x}{set}{statistics}
! *** RMON ***
! *** SPBM (Phase 1) ***
spbm &IF: $isis{spbm}{enable}
router isis
spbm $isis{spbm}{instance}
spbm <id> b-vid $isis{spbm}{bvids} primary $isis{spbm}{primary-bvid}
spbm <id> nick-name $isis{spbm}{nick-name}
spbm <id> ip enable &IF: $isis{spbm}{ip}
manual-area $isis{area}
interface Ethernet <!ports>
isis
isis spbm $port{x}{isis}{spbm}{instance}
isis spbm <id> l1-metric $port{x}{isis}{spbm}{metric}
isis enable &IF: $port{x}{isis}{enable}
exit
router isis
system-id $isis{system-id}
sys-name $isis{system-name}
exit
! *** EAP Guest VLAN ***
interface Ethernet ALL
eapol guest-vlan port $port{x} enable &IF: $port{x}{eapol}{guest-vlan}
exit
! *** EAP ***
eapol multihost allow-non-eap-enable &IF: $eapol{multihost}{neap}
eapol multihost radius-non-eap-enable &IF: $eapol{multihost}{neap-radius}
eapol multihost use-radius-assigned-vlan &IF: $eapol{multihost}{radius-assigned-vlan}
eapol multihost non-eap-use-radius-assigned-vlan &IF: $eapol{multihost}{neap-radius-assigned-vlan}
eapol multihost eap-packet-mode $eapol{multihost}{eap-packet-mode}
eapol multihost multivlan enable &IF: $eapol{multihost}{multivlan}
eapol multihost auto-non-eap-mhsa-enable &IF: $eapol{multihost}{neap-mhsa}
eapol multihost non-eap-reauthentication-enable &IF: $eapol{multihost}{neap-reauth}
interface Ethernet ALL
eapol multihost port $port{x} [enable &IF: $port{x}{eapol}{multihost}{enable}] [eap-mac-max $port{x}{eapol}{multihost}{eap}{mac-max}] [non-eap-mac-max $port{x}{eapol}{multihost}{neap}{mac-max}] [allow-non-eap-enable &IF: $port{x}{eapol}{multihost}{neap}{local}] [radius-non-eap-enable &IF: $port{x}{eapol}{multihost}{neap}{radius}] [auto-non-eap-mhsa-enable &IF: $port{x}{eapol}{multihost}{neap}{auto-mhsa}] [use-radius-assigned-vlan &IF: $port{x}{eapol}{multihost}{eap}{radius-assigned-vlan}] [non-eap-use-radius-assigned-vlan &IF: $port{x}{eapol}{multihost}{neap}{radius-assigned-vlan}] [eap-packet-mode $port{x}{eapol}{multihost}{eap}{packet-mode}] [mac-max $port{x}{eapol}{multihost}{mac-max}] [mhsa-no-limit &IF: $port{x}{eapol}{multihost}{mhsa}{no-limit}] &IF: $port{x}{eapol} #edited
eapol multihost port $port{x} [non-eap-phone-enable &IF: $port{x}{eapol}{multihost}{neap-phone}] [eap-packet-mode $port{x}{eapol}{multihost}{packet-mode}] &IF: $port{x}{eapol} # edited
no eapol multihost port $port{x} non-eap-use-radius-assigned-vlan &IF: !$port{x}{eapol}{multihost}{neap-radius-assigned-vlan}
eapol port $port{x} [status $port{x}{eapol}{enable}%:auto,authorized] [re-authentication $port{x}{eapol}{reauth}%:enable,disable] [re-authentication-period $port{x}{eapol}{reauth-period}] [quiet-interval $port{x}{eapol}{quiet-interval}]
eapol port $port{x} radius-dynamic-server enable &IF: $port{x}{eapol}{radius-dynamic-server}
exit
eapol allow-port-mirroring &IF: $eapol{mirroring}
eapol user-based-policies enable &IF: $eapol{ubp}{enable}
eapol user-based-policies filter-on-mac enable &IF: $eapol{ubp}{filter-on-mac}
eapol multihost non-eap-user-based-policies enable &IF: $eapol{ubp}{neap}
eapol multihost non-eap-user-based-policies filter-on-mac enable &IF: $eapol{ubp}{filter-on-mac}
no eapol multihost non-eap-pwd-fmt $eapol{multihost}{neap-password-format}{x} &IF: !$eapol{multihost}{neap-password-format}{x}
eapol multihost non-eap-pwd-fmt $eapol{multihost}{neap-password-format}{x} &IF: $eapol{multihost}{neap-password-format}{x}
! *** EAP Fail Open VLAN ***
eapol multihost fail-open-vlan vid $eapol{multihost}{fail-open-vlan}{vlan}
eapol multihost fail-open-vlan enable &IF: $eapol{multihost}{fail-open-vlan}{enable}
eapol multihost fail-open-vlan continuity-mode enable &IF: $eapol{multihost}{fail-open-vlan}{continuity-mode}
interface Ethernet ALL
eapol multihost fail-open-vlan port $port{x} [enable &IF: $port{x}{eapol}{multihost}{fail-open-vlan}{enable}] vid $port{x}{eapol}{multihost}{fail-open-vlan}{vid-mode}
eapol multihost fail-open-vlan port $port{x} [enable &IF: $port{x}{eapol}{multihost}{fail-open-vlan}{enable}] vid $port{x}{eapol}{multihost}{fail-open-vlan}{vlan}
exit
! *** EAP Voip VLAN ***
eapol enable &IF: $eapol{enable}
! *** Interface ***
interface Ethernet ALL
shutdown port $port{x} &IF: $port{x}{shutdown}
speed port $port{x} $port{x}{speed}
speed port $port{x} auto &IF: $port{x}{auto-negotiation}
duplex port $port{x} $port{x}{duplex}
duplex port $port{x} auto &IF: $port{x}{auto-negotiation}
snmp trap link-status port $port{x} disable &IF: !$port{x}{snmp}{link-trap}
flowcontrol port $port{x} disable &IF: !$port{x}{flow-control}
name port $port{x} $port{x}{name}
exit
! *** Rate-Limit ***
rate-limit port $port{x} broadcast $port{x}{rate-limit}{broadcast}
rate-limit port $port{x} multicast $port{x}{rate-limit}{multicast}
! *** MLT (Phase 1) ***
mlt $mlt{x} name $mlt{x}{name} [$mlt{x}{enable}] member $mlt{x}{member}
mlt $mlt{x} loadbalance $mlt{x}{loadbalance}
mlt $mlt{x} bpdu single-port &IF: $mlt{x}{spanning-tree}{bpdu-single-port}
! *** MAC-Based Security ***
interface Ethernet ALL
mac-security port $port{x} enable &IF: $port{x}{mac-security}{enable}
mac-security auto-learning port $port{x} enable &IF: $port{x}{mac-security}{auto-learning}
exit
mac-security intrusion-detect enable intrusion-timer $mac-security{intrusion-timer} &IF: $mac-security{intrusion-detect}
mac-security filtering enable &IF: $mac-security{filtering}
! *** LACP (Phase 2) ***
interface Ethernet ALL
lacp key port $port{x} $port{x}{lacp}{key}
lacp mode port $port{x} $port{x}{lacp}{passive}%:passive,active
lacp timeout-time port $port{x} $port{x}{lacp}{timeout-time}
lacp aggregation port $port{x} enable &IF: $port{x}{lacp}{aggregation}
exit
! *** ADAC ***
interface Ethernet ALL
adac port $port{x} enable &IF: $port{x}{adac}
exit
adac voice-vlan $adac{voice-vlan}
adac uplink-port $adac{uplink-port}
adac op-mode $adac{op-mode}
adac enable &IF: $adac{enable}
! *** MSTP (Phase 2) ***
spanning-tree mstp remove-vlan $spanning-tree{mstp}{remove-vlans}[x]
interface Ethernet ALL
spanning-tree mstp port <ports> learning <learning:enable,disable>
spanning-tree mstp port <ports> edge-port <edge:true,false>
spanning-tree bpdu-filtering port $port{x} $port{x}{bpdu-guard}%:enable,disable
exit
! *** Port Mirroring ***
! *** VLAN Phase 2***
vlan mgmt $mgmt{vlan}{vlan-id} &IF: $mgmt{vlan}{vlan-id} != 1
! *** MLT (Phase 2) ***
mlt spanning-tree $mlt{x} learning $mlt{x}{spanning-tree}{learning}%:enable,disable
! *** PoE ***
! *** RTC ***
clock source $system{clock}{source}
clock summer-time recurring $system{clock}{summer-time}{start}{week-number} $system{clock}{summer-time}{start}{week-day} $system{clock}{summer-time}{start}{month} $system{clock}{summer-time}{start}{time} $system{clock}{summer-time}{end}{week-number} $system{clock}{summer-time}{end}{week-day} $system{clock}{summer-time}{end}{month} $system{clock}{summer-time}{end}{time} $system{clock}{summer-time}{minutes}
clock time-zone $system{clock}{time-zone}
! *** Extreme Networks Energy Saver ***
! *** AUR ***
! *** AAUR ***
! *** L3 ***
interface vlan $vlan{x} &IF: $vlan{x} != $mgmt{vlan}{vlan-id} # edited
ip address $vlan{x}{ip} $vlan{x}{mask} # edited
exit
interface loopback $ip{circuitless}{x} # edited
ip address $ip{circuitless}{x}{ip} $ip{circuitless}{x}{mask} # edited
exit
! --- ECMP ---
ip route $ip{route}[x]{route} $ip{route}[x]{mask} $ip{route}[x]{next-hop} $ip{route}[x]{weight}
ip routing &IF: $ip{routing}
! *** Brouter Port ***
! *** CORE (Phase 2) ***
no mac-address-table learning $port{x} &IF: $port{x}{no-mac-learning}
! *** IPV6 ***
ipv6 enable &IF: $ipv6{enable}
! *** MLD ***
! *** FHS ***
! --- FHS Global settings ---
! --- IPV6 access list settings ---
! --- IPv6 mac access list settings ---
! --- IPV6 dhcp guard settings ---
! --- IPV6 RA Guard settings ---
! --- IPV6 Policy Port Map settings ---
! --- IPV6 FHS ND SBT Table settings ---
! --- IPV6 Source Guard Interface settings ---
! *** RIPNG ***
! *** VRRPV3 ***
! *** IPsec ***
! *** IKE ***
! *** VLACP ***
vlacp enable &IF: $vlacp{enable}
vlacp macaddress $vlacp{macaddress}
interface Ethernet ALL
vlacp port $port{x} timeout $port{x}{vlacp}{timeout}
vlacp port $port{x} timeout-scale $port{x}{vlacp}{timeout-scale}
vlacp port $port{x} enable &IF: $port{x}{vlacp}{enable}
exit
! *** DHCP Relay ***
ip dhcp-relay &IF: $dhcp-relay{enable}
no ip dhcp-relay &IF: !$dhcp-relay{enable}
ip dhcp-relay fwd-path $ip{interface}{x} $ip{interface}{x}{dhcp-relay}{server}
ip dhcp-relay fwd-path $ip{interface}{x} $ip{interface}{x}{dhcp-relay}{server} mode $ip{interface}{x}{dhcp-relay}{mode}
interface vlan $vlan{x} # edited
ip dhcp-relay mode dhcp &IF: $vlan{x}{dhcp-relay}{enable} # edited
exit
! *** L3 Source Interface ***
! *** L3 Protocols ***
! --- IP Directed Broadcast ---
! --- Proxy ARP ---
! --- UDP Broadcast Forwarding ---
! --- VRRP ---
! --- Route Policies ---
! --- OSPF ---
router ospf
router-id $ospf{router-id}
default-cost ethernet $ospf{default-cost}{ethernet}
default-cost fast-ethernet $ospf{default-cost}{fast-ethernet}
default-cost gig-ethernet $ospf{default-cost}{gig-ethernet}
exit
! --- RIP ---
! *** SPBM (Phase 2) ***
router isis
ip-source-address $isis{ip-source-address}
exit
router isis enable &IF: $isis{enable}
! *** IP Forwarding Next-Hop ***
! *** DHCP SNOOPING ***
ip dhcp-snooping &IF: $dhcp-snooping{enable}
ip dhcp-snooping vlan $vlan{x} &IF: $vlan{x}{dhcp-snooping}
interface Ethernet ALL
ip dhcp-snooping port $port{x} $port{x}{dhcp-snooping}
exit
! *** ARP INSPECTION ***
! *** IP SOURCE GUARD ***
! *** IGMP ***
interface vlan $vlan{x} # edited
ip igmp &IF: $vlan{x}{igmp}{enable} # edited
ip igmp snooping &IF: $vlan{x}{igmp}{snooping} # edited
exit
! *** MVR ***
! *** STACK MONITOR ***
stack-monitor enable &IF: $stack{stack-monitor}{enable}
stack-monitor stack-size $stack{stack-monitor}{stack-size}
! *** SLPP ***
! *** SLPP-guard ***
interface Ethernet ALL
slpp-guard port $port{x} [enable &IF: $port{x}{slpp-guard}{enable}] [timeout $port{x}{slpp-guard}{timeout}] &IF: $port{x}{slpp-guard} # edited
exit
! *** PIM ***
! *** CFM ***
cfm spbm mepid $cfm{spbm}{mepid}
cfm spbm enable &IF: $cfm{spbm}{enable}
! *** SLAMON ***
application
slamon oper-mode enable &IF: $slamon{enable}
slamon cli enable &IF: $slamon{cli}
slamon server-bypass enable &IF: $slamon{server-bypass}
exit
! *** STORM CONTROL ***
! *** LINK STATE TRACKING ***
! *** SFLOW ***
sflow enable &IF: $sflow{enable}
sflow collector $sflow{collector}{x} address $sflow{collector}{x}{ip} [owner $sflow{collector}{x}{owner}]
interface Ethernet ALL
sflow port $port{x} sampling-rate ingress $port{x}{sflow}{sampling-rate}{ingress}
sflow port $port{x} sampling-rate egress $port{x}{sflow}{sampling-rate}{egress}
sflow port $port{x} counter-interval $port{x}{sflow}{counter-interval}
sflow port $port{x} collector $port{x}{sflow}{collector}
exit
! *** Application Telemetry ***
app-telemetry collector address $app-telemetry{collector}
app-telemetry enable ports $app-telemetry{ports}
! *** Fabric Attach ***
fa zero-touch disable-mgmt-vlan-distribution &IF: !$fabric-attach{forward-mgmt-vlan}
fa extended-logging &IF: $fabric-attach{extended-logging}
fa port-enable $port{x} &IF: $port{x}{fabric-attach}{enable}
no fa port-enable $port{x} &IF: !$port{x}{fabric-attach}{enable}
fa zero-touch-option auto-port-mode-fa-client client-type $fabric-attach{zero-touch-option}{auto-neap-mode}{client-type}[x] &IF: $fabric-attach{zero-touch-option}{auto-neap-mode}{enable}
fa zero-touch-option auto-pvid-mode-fa-client client-type $fabric-attach{zero-touch-option}{auto-pvid-mode}{client-type}[x] &IF: $fabric-attach{zero-touch-option}{auto-pvid-mode}{enable}
fa zero-touch-option auto-mgmt-vlan-fa-client client-type $fabric-attach{zero-touch-option}{auto-mgmt-vlan}{client-type}[x] &IF: $fabric-attach{zero-touch-option}{auto-mgmt-vlan}{enable}
fa zero-touch-option auto-trusted-mode-fa-client client-type $fabric-attach{zero-touch-option}{auto-trusted-mode}{client-type}[x] &IF: $fabric-attach{zero-touch-option}{auto-trusted-mode}{enable}
fa zero-touch-option auto-client-attach client-type $fabric-attach{zero-touch-option}{auto-client-attach}{client-type}[x] &IF: $fabric-attach{zero-touch-option}{auto-client-attach}{enable}
fa zero-touch-client standard $fabric-attach{zero-touch-client}{x} vlan $fabric-attach{zero-touch-client}{x}{vlan} i-sid $fabric-attach{zero-touch-client}{x}{i-sid}
fa message-authentication $port{x} key-mode $port{x}{fabric-attach}{message-authentication}{key-mode}
no fa message-authentication $port{x} &IF: !$port{x}{fabric-attach}{message-authentication}{enable}
fa timeout $fabric-attach{timeout}
i-sid $vlan{x}{i-sid} vlan $vlan{x}
! *** MACsec ***
macsec connectivity-association $macsec{connectivity-association}{x} connectivity-association-key $macsec{connectivity-association}{x}{key}
interface Ethernet $port{x} # edited
macsec connectivity-association $port{x}{macsec}{connectivity-association} # edited
macsec encryption enable &IF: $port{x}{macsec}{encryption} # edited
macsec enable &IF: $port{x}{macsec}{enable} # edited
exit
! *** ZTP+ ***
no auto-provision enable &IF: !$ztp{enable}
end