-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcisco.json
More file actions
1551 lines (1536 loc) · 66.3 KB
/
Copy pathcisco.json
File metadata and controls
1551 lines (1536 loc) · 66.3 KB
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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
// Publisher: Aaron Carroll
// File: cisco.json
// Description: Cisco configuration snippets. A suggestive tool to aid in rapid configuration.
//
// NOTE ABOUT FILE:
// -----------------------------------------------------------------------------------------------------------------------------------
// - Begin all "prefix" variables with the character "c" to ensure all snippet options appear when searching.
// The prefix is utilized to add snippets to your configurations.
// Example:
// "Cisco Initial Configuration": {
// "prefix": "cInitial", // Prefix specified here should begin with the letter "c"
// "scope": "cisco",
// "body": [
// "hostname",
// "...
// ]
// }
//
// - Organize snippets into the following categories:
// - Initial Configurations
// - Layer 2 Configurations
// - Layer 3 Configurations
// - Protocol Configurations
//
// Define each snippet with a name, prefix, body, and description.
// The prefix activates the snippet, and the body expands and inserts it.
// Use $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with identical IDs are linked.
// Example:
// "Print to console": {
// "prefix": "log",
// "scope": "javascript",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
//
// If you wish to leave verbose comments explaining commands to refresh your memory make two objects one with no notes and the other with notes with the prefix ending int "_info"
// Example:
// NO NOTES:
// "VLAN Creation": {
// "prefix": "vlan",
// "scope": "cisco",
// "body": [
// "vlan ",
// "name <NAME>"
// ],
// "description": "Cisco vlan creation"
// },
//
// NOTES:
// "VLAN Creation with info": {
// "prefix": "vlan_info", // Prefix has "_info" appended to it because info was included
// "scope": "cisco",
// "body": [
// "! Choose a VLAN ID from 1-4094. Ensure this number does not conflict with an existing VLAN ID",
// "vlan ",
// "! Common practice is to name the vlan based on the department of the business and data it will be used for. EX: AccountData. Or for the specific Segmentation item. EX: PLC_352",
// "name <NAME>"
// ],
// "description": "Cisco vlan creation"
// },
//
// Initial Configurations
// -----------------------
// This section is dedicated to Cisco Initial Configurations. Include any pertinent notes to assist in the configuration process.
"Cisco Initial Configuration": {
"prefix": "cInit",
"scope": "cisco",
"body": [
"enable",
"configure terminal",
"login block-for 20 attempts 3 within 30",
"ip name-server <DNS server IP address>",
"no ip domain-lookup",
"ip domain-name <YOUR DOMAIN NAME>",
"ntp server <DOMAIN NAME or IP>, <OPTIONAL DOMAIN NAME or IP>",
"hostname <DEVICE NAME>",
"enable secret level <Add privilege level> <ENABLE PASSWORD>",
"username <DEVICE USERNAME> algorithm-type sha256 secret <USERNAME PASSWORD>",
"line con 0",
" logging synchronous",
" login local",
"line vty 0 15",
" transport input ssh",
" transport output ssh",
" logging synchronous",
" login local"
],
"description": "Cisco Initial Configuration"
},
"Cisco Initial Configuration L2 Switch": {
"prefix": "cInitL2",
"scope": "cisco",
"body": [
"enable",
"configure terminal",
"login block-for 20 attempts 3 within 30",
"ip name-server <DNS server IP address>",
"no ip domain-lookup",
"ntp server <DOMAIN NAME or IP>, <OPTIONAL DOMAIN NAME or IP>",
"hostname <DEVICE NAME>",
"ip default-gateway <GATEWAY IP (MGMT)>",
"enable secret level <Add privilege level> <ENABLE PASSWORD>",
"username <DEVICE USERNAME> algorithm-type sha256 secret <USERNAME PASSWORD>",
"line con 0",
" logging synchronous",
" login local",
"line vty 0 15",
" transport input ssh",
" transport output ssh",
" logging synchronous",
" login local"
],
"description": "Cisco Initial Configuration"
},
"Cisco Initial Configuration L3 Switch": {
"prefix": "cInitL3",
"scope": "cisco",
"body": [
"enable",
"configure terminal",
"login block-for 20 attempts 3 within 30",
"ip name-server <DNS server IP address>",
"no ip domain-lookup",
"ntp server <DOMAIN NAME or IP>, <OPTIONAL DOMAIN NAME or IP>",
"hostname <DEVICE NAME>",
"ip routing",
"! ip route 0.0.0.0 0.0.0.0 <NEXT HOP IP>",
"enable secret level <Add privilege level> <ENABLE PASSWORD>",
"username <DEVICE USERNAME> algorithm-type sha256 secret <USERNAME PASSWORD>",
"line con 0",
" logging synchronous",
" login local",
"line vty 0 15",
" transport input ssh",
" transport output ssh",
" logging synchronous",
" login local"
],
"description": "Cisco Initial Configuration"
},
"Banner motd": {
"prefix": "cbannerMotd",
"scope": "cisco",
"body": [
"banner motd #WARNING: AUTHORIZED ACCESS ONLY",
"You are accessing a private computer system. This system, including all related equipment, networks, and",
"network devices (specifically including Internet access), is provided only for authorized use.",
"Unauthorized use may subject you to criminal prosecution. Evidence of unauthorized use collected during",
"monitoring may be used for administrative, criminal, or other adverse action. Use of this system constitutes",
"consent to monitoring for these purposes.",
"By continuing to use this system, you acknowledge that you understand and agree to these terms.#"
],
"description": "Used to add a warning to users accessing machine"
},
"Banner Login": {
"prefix": "cbannerLogin",
"scope": "cisco",
"body": [
"banner Login #",
"<--Write Descriptive information between the hashes EX:",
"Building: 02",
"Closet: MDF01",
"Rack: 05",
"Unit: 30",
"--> #"
],
"description": "Adds information regarding device"
},
"VLAN Creation": {
"prefix": "vlan",
"scope": "cisco",
"body": [
"vlan ",
"name <NAME>"
],
"description": "Cisco vlan creation"
},
"Host names": {
"prefix": "cHost",
"scope": "cisco",
"body": [
"ip host <NAME FOR HOST, EX: rtrCA01> <HOST_IP_ADDRESS>"
],
"description": "local machine DNS adds host name to IP address"
},
"Cisco Initial Configuration with info": {
"prefix": "cInit_info",
"scope": "cisco",
"body": [
"! Initial configuration for Cisco devices",
"! Type \"?PasswordEncryption\" to learn more about different encryption levels",
"",
"enable",
"configure terminal",
"",
"! Configure login blocking to prevent brute force attacks",
"login block-for 20 attempts 3 within 30",
"",
"! Set DNS server IP address",
"ip name-server <DNS server IP address>",
"",
"! Disable IP domain lookup to prevent local DNS queries",
"no ip domain-lookup",
"",
"! Configure NTP server for time synchronization",
"ntp server <DOMAIN NAME or IP>, <OPTIONAL DOMAIN NAME or IP>",
"",
"! Layer 2 switch gateway (UN-COMMENT BELOW)",
"! ip default-gateway <GATEWAY IP (MGMT)>",
"",
"! Layer 3 switch route (UN-COMMENT BELOW)",
"! ip routing",
"! ip route 0.0.0.0 0.0.0.0 <NEXT HOP IP>",
"",
"! Set device hostname",
"hostname <DEVICE NAME>",
"",
"! Configure enable secret with privilege level",
"enable secret level <Add privilege level> <ENABLE PASSWORD>",
"",
"! Create a username with SHA-256 encryption",
"username <DEVICE USERNAME> algorithm-type sha256 secret <USERNAME PASSWORD>",
"",
"! Configure console line",
"line con 0",
" logging synchronous",
" login local",
"",
"! Configure VTY lines 0 to 15 for SSH",
"line vty 0 15",
" transport input ssh",
" transport output ssh",
" logging synchronous",
" login local"
],
"description": "Cisco Initial Configuration"
},
// you can add more Intial configurtions above here
// This is a template for the PROTOCOL, L3, L2, and INITIAL sections. Do not remove. Copy and paste if you wish to use.
" ": {
"prefix": "c",
"scope": "cisco",
"body": [
" ",
" ",
" ",
" ",
" ",
" "
],
"description": " "
},
// Layer 2 configurations
// -----------------------
// This section is for cisco Layer 2 configurations. Feel free to add notes that are helpful to know when adding configurations
//
"Layer 2 SVI creation": {
"prefix": "cL2Svi",
"scope": "cisco",
"body": [
"interface vlan <VLAN_ID>",
" description MGMT",
" ip address <L2 SVI MGMT IP> <SUBNET MASK>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 2"
},
"Layer 2 Trunk Switchport creation": {
"prefix": "cL2TrunkSwitchport",
"scope": "cisco",
"body": [
"interface <portX/X/X>",
" description <toSomeLocation>",
" switchport trunk encapsulation dot1q <INTERFACE IP> <INTERFACE SUBNET MASK>",
" switchport mode trunk",
" switchport trunk allowed vlan <PRUNED VLAN IDs>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Trunk Switchport creation"
},
"Layer 2 Access Switchport creation": {
"prefix": "cL2AccessSwitchport",
"scope": "cisco",
"body": [
"interface <portX/X/X>",
" description <toSomeLocation>",
" switchport host",
" switchport access vlan <VLAN_ID>",
" spanning-tree bpduguard enable",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Access Switchport creation"
},
"Layer 2 Access Switchport creation with Port Security": {
"prefix": "cL2AccessSwitchportPortSecurity",
"scope": "cisco",
"body": [
"interface <portX/X/X>",
" description <toSomeLocation>",
" switchport host",
" switchport access vlan <VLAN_ID>",
" switchport port-security",
" switchport port-security maximum 2",
" switchport port-security violation restrict",
" spanning-tree bpduguard enable",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Access Switchport creation with Port Security"
},
"Layer 2 Access Switchport with Voice VLAN and security": {
"prefix": "cL2AccessSwitchportSecurityVoiceVLAN",
"scope": "cisco",
"body": [
"interface <portX/X/X>",
" description <toSomeLocation>",
" switchport host",
" switchport access vlan <Data_VLAN_ID>",
" switchport voice vlan <Voice_VLAN_ID>",
" switchport port-security",
" switchport port-security maximum 2",
" switchport port-security violation restrict",
" spanning-tree bpduguard enable",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Access Switchport creation with Voice VLAN and security"
},
"Layer 2 Access Switchport with Voice VLAN": {
"prefix": "cL2AccessSwitchportVoiceVLAN",
"scope": "cisco",
"body": [
"interface <portX/X/X>",
" description <toSomeLocation>",
" switchport host",
" switchport access vlan <Data_VLAN_ID>",
" switchport voice vlan <Voice_VLAN_ID>",
" spanning-tree bpduguard enable",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Access Switchport creation with Voice VLAN"
},
"Layer 2 Port-Channel creation": {
"prefix": "cl2Portchannel",
"scope": "cisco",
"body": [
"interface port-channel<PORT CHANNEL NUMBER>",
" description <toSOME_LOCATION-PortChannel>",
" switchport trunk encapsulation dot1q",
" switchport mode trunk",
" switchport trunk allowed vlan <XX,YY,ZZ>",
" vpc <XX> (DELETE IF NOT USED",
" shutdown",
" no shutdown",
"exit",
"interface range <portX/X-X>",
" description to<Some location>-PortChannel",
" switchport trunk encapsulation dot1q",
" switchport mode trunk",
" switchport trunk allowed vlan <XX,YY,ZZ>",
" channel-group <PORT CHANNEL NUMBER> mode active",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 2 Port-Channel creation"
},
"Initial lldp and example": {
"prefix": "cLLDP",
"scope": "cisco",
"body": [
"lldp run",
"interface ethernet X/Z",
" no lldp transmit",
" no lldp receive"
],
"description": "Initial lldp and example"
},
"Layer 2 SVI creation with info": {
"prefix": "cL2Svi",
"scope": "cisco",
"body": [
"interface vlan <VLAN_ID>",
" description MGMT",
" ip address <L2 SVI MGMT IP> <SUBNET MASK>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 2"
},
// you can add more Layer 2 configurations above here
// This is a template for the PROTOCOL, L3, L2, and INITIAL sections. Do not remove. Copy and paste if you wish to use.
" ": {
"prefix": "c",
"scope": "cisco",
"body": [
" ",
" ",
" ",
" ",
" ",
" "
],
"description": " "
},
// Layer 3 configurations
// ----------------------
// This section is for cisco Layer 3 configurations. Feel free to add notes that are helpful to know when adding configurations
//
"Layer 3 HSRP SVI (gateways) creation with info": {
"prefix": "cL3Svi_info",
"scope": "cisco",
"body": [
"! FOR HSRP",
"! -------------------------------------",
"! SET: Preempt if ACTIVE switch only.",
"! SET: priority, Higher == More prefered",
"! DEFAULT GATEWAY VLAN_ID is a good convention for ID number.",
"",
"vlan <DEFAULT GATEWAY VLAN_ID>",
"name <DEFAULT GATEWAY NAME>",
"",
"interface vlan <DEFAULT GATEWAY VLAN_ID>",
" description <CAMPUS DATA | CAMPUS VOICE | NMS | FINANCE>",
" ip address <DEFAULT GATEWAY IP> <DEFAULT GATEWAY SUBNET MASK>",
" ip helper-address <DHCP POOL IP ADDRESS>",
" standby <DEFAULT GATEWAY VLAN_ID> ip <VIP>",
" standby <DEFAULT GATEWAY VLAN_ID> priority <110>",
" standby <DEFAULT GATEWAY VLAN_ID> timers <Seconds for next Hello> <Hold time before switching to backup>",
" !standby <DEFAULT GATEWAY VLAN_ID> preempt",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 3"
},
"Layer 3 HSRP SVI (gateways) creation": {
"prefix": "cL3Svi",
"scope": "cisco",
"body": [
"vlan <DEFAULT GATEWAY VLAN_ID>",
"name <DEFAULT GATEWAY NAME>",
"interface vlan <DEFAULT GATEWAY VLAN_ID>",
" description <CAMPUS DATA | CAMPUS VOICE | NMS | FINANCE>",
" ip address <DEFAULT GATEWAY IP> <DEFAULT GATEWAY SUBNET MASK>",
" ip helper-address <DHCP POOL IP ADDRESS>",
" standby <DEFAULT GATEWAY VLAN_ID> ip <VIP>",
" standby <DEFAULT GATEWAY VLAN_ID> priority <110>",
" standby <DEFAULT GATEWAY VLAN_ID> timers <Seconds for next Hello> <Hold time before switching to backup>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 3"
},
"Layer 3 VRRP SVI creation with info": {
"prefix": "cL3SviVRRP_info",
"scope": "cisco",
"body": [
"! FOR VRRP",
"! -------------------------------------",
"! SET: priority, Higher == More preferred",
"! DEFAULT GATEWAY VLAN_ID is a good convention for VRRP_GROUP_NUMBER number. Its limited to 255 on VRRP.",
"",
"vlan <DEFAULT GATEWAY VLAN_ID>",
"name <DEFAULT GATEWAY NAME>",
"",
"interface Vlan<DEFAULT GATEWAY VLAN_ID>",
" description <CAMPUS DATA | CAMPUS VOICE | NMS | FINANCE>",
" ip address <DEFAULT GATEWAY IP> <DEFAULT GATEWAY SUBNET MASK>",
" ip helper-address <DHCP POOL IP ADDRESS>",
" vrrp <VRRP_GROUP_NUMBER> ip <VIP>",
" vrrp <VRRP_GROUP_NUMBER> priority 110",
" vrrp <VRRP_GROUP_NUMBER> timers advertise <ADVERTISE_INTERVAL>",
" vrrp <VRRP_GROUP_NUMBER> preempt",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 3"
},
"Layer 3 VRRP SVI creation": {
"prefix": "cL3SviVRRP",
"scope": "cisco",
"body": [
"vlan <DEFAULT GATEWAY VLAN_ID>",
"name <DEFAULT GATEWAY NAME>",
"interface Vlan<DEFAULT GATEWAY VLAN_ID>",
" description <CAMPUS DATA | CAMPUS VOICE | NMS | FINANCE>",
" ip address <DEFAULT GATEWAY IP> <DEFAULT GATEWAY SUBNET MASK>",
" ip helper-address <DHCP POOL IP ADDRESS>",
" vrrp <VRRP_GROUP_NUMBER> ip <VIP>",
" vrrp <VRRP_GROUP_NUMBER> priority 110",
" vrrp <VRRP_GROUP_NUMBER> timers advertise <ADVERTISE_INTERVAL>",
" vrrp <VRRP_GROUP_NUMBER> preempt",
" shutdown",
" no shutdown",
"exit"
],
"description": "Cisco SVI syntax for Layer 3"
},
"Layer 3 interface creation": {
"prefix": "cl3Interface",
"scope": "cisco",
"body": [
"interface <port X/X/X>",
" description <toSomeLocation>",
" ip address <L3 INTERFACE IP> <L3 INTERFACE SUBNET MASK>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 3 interface creation"
},
"Layer 3 Serial Interface creation": {
"prefix": "cl3SerialInterface",
"scope": "cisco",
"body": [
"interface serial<SERIAL_PORT>",
" description <toSomeLocation>",
" ip address <L3_INTERFACE_IP> <L3_INTERFACE_SUBNET_MASK>",
" clock rate <CLOCK_RATE>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 3 serial interface creation"
},
"Layer 3 GigabitEthernet interface creation": {
"prefix": "cl3GigaInterface",
"scope": "cisco",
"body": [
"interface GigabitEthernet<X/X/X>",
" description <toSomeLocation>",
" ip address <L3 INTERFACE IP> <L3 INTERFACE SUBNET MASK>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 3 GigabitEthernet interface creation"
},
"Layer 3 fastEthernet interface creation": {
"prefix": "cl3FastInterface",
"scope": "cisco",
"body": [
"interface FastEthernet<X/X/X>",
" description <toSomeLocation>",
" ip address <L3 INTERFACE IP> <L3 INTERFACE SUBNET MASK>",
" shutdown",
" no shutdown",
"exit"
],
"description": "Layer 3 GigabitEthernet interface creation"
},
"Layer 3 Port-Channel creation": {
"prefix": "cl3Portchannel",
"scope": "cisco",
"body": [
"interface port-channel<PORT CHANNEL NUMBER>",
" description to <Some location>-PortChannel",
" no switchport",
" ip address <L3 INTERFACE IP> <L3 INTERFACE SUBNET>",
" shutdown",
" no shutdown",
"exit",
"",
"interface range <portX/X-X>",
" description toPaNGFWSeaIceHQ01-PortChannel",
" no switchport",
" no ip address",
" channel-group <PORT CHANNEL NUMBER> mode active",
" shutdown",
" no shutdown",
"exit",
],
"description": "Layer 3 Port-Channel creation"
},
// you can add more Layer 3 configurations above here
// This is a template for the PROTOCOL, L3, L2, and INITIAL sections. Do not remove. Copy and paste if you wish to use.
" ": {
"prefix": "c",
"scope": "cisco",
"body": [
" ",
" ",
" ",
" ",
" ",
" "
],
"description": " "
},
// Protocol configurations
// -----------------------
// This section is for cisco protocols. Feel free to add notes that are helpful to know when adding configurations
"AAA Configuration with info": {
"prefix": "cAAAConfig_info",
"scope": "cisco",
"body": [
"! Configure AAA (Authentication, Authorization, and Accounting)",
"! Enable new-model for AAA configurations",
"aaa new-model",
"",
"! Configure session ID handling and device sensors",
"aaa session-id common",
"device-sensor accounting",
"device-sensor notify all-changes"
],
"description": "General AAA Configuration"
},
"AAA Configuration": {
"prefix": "cAAAConfig",
"scope": "cisco",
"body": [
"aaa new-model",
"aaa session-id common",
"device-sensor accounting",
"device-sensor notify all-changes"
],
"description": "General AAA Configuration"
},
"RADIUS Configuration with info": {
"prefix": "cRadiusConfig_info",
"scope": "cisco",
"body": [
"! Configure AAA group for RADIUS server",
"aaa group server radius MY_RADIUS_GROUP",
" server name MY_RADIUS_SERVER",
"",
"! Configure authentication methods for RADIUS",
"aaa authentication dot1x default group MY_RADIUS_GROUP",
"",
"! Configure authorization methods for RADIUS",
"aaa authorization network default group MY_RADIUS_GROUP",
"aaa authorization auth-proxy default group MY_RADIUS_GROUP",
"",
"! Configure accounting for RADIUS",
"aaa accounting update periodic 15",
"aaa accounting auth-proxy default start-stop group MY_RADIUS_GROUP",
"aaa accounting dot1x default start-stop group MY_RADIUS_GROUP",
"",
"! Configure dynamic authorization server for RADIUS",
"aaa server radius dynamic-author",
" client <SERVER IP ADDRESS> server-key RADIUSSecretKey",
"",
"! Configure RADIUS server attributes",
"radius-server vsa send accounting",
"radius-server vsa send authentication",
"radius-server attribute 1 format ietf upper-case",
"radius-server attribute 4 include-in-access-req",
"radius-server attribute 5 include-in-access-req",
"radius-server attribute 6 on-for-login-auth",
"radius-server attribute 6 support-multiple",
"radius-server attribute 7 include-in-access-req",
"radius-server attribute 8 include-in-access-req",
"radius-server attribute 11 include-in-access-req",
"radius-server attribute 12 include-in-access-req",
"radius-server attribute 24 include-in-access-req",
"radius-server attribute 25 access-request include",
"radius-server attribute 26 include-in-access-req",
"radius-server attribute 31 mac format ietf upper-case",
"radius-server attribute 31 send nas-port-detail",
"radius-server attribute 32 include-in-access-req",
"radius-server attribute 44 include-in-access-req",
"radius-server attribute 61 include-in-access-req",
"radius-server attribute 62 include-in-access-req",
"radius-server attribute 64 include-in-access-req",
"radius-server attribute 65 include-in-access-req",
"radius-server attribute 66 include-in-access-req",
"radius-server attribute 81 include-in-access-req",
"radius-server attribute 82 include-in-access-req",
"",
"! Define RADIUS server",
"radius-server host <SERVER IP ADDRESS> auth-port 1812 acct-port 1813 key RADIUSSecretKey",
"radius-server key RADIUSSecretKey"
],
"description": "RADIUS Configuration"
},
"RADIUS Configuration": {
"prefix": "cRadiusConfig",
"scope": "cisco",
"body": [
"aaa group server radius MY_RADIUS_GROUP",
" server name MY_RADIUS_SERVER",
"aaa authentication dot1x default group MY_RADIUS_GROUP",
"aaa authorization network default group MY_RADIUS_GROUP",
"aaa authorization auth-proxy default group MY_RADIUS_GROUP",
"aaa accounting update periodic 15",
"aaa accounting auth-proxy default start-stop group MY_RADIUS_GROUP",
"aaa accounting dot1x default start-stop group MY_RADIUS_GROUP",
"aaa server radius dynamic-author",
" client <SERVER IP ADDRESS> server-key RADIUSSecretKey",
"radius-server vsa send accounting",
"radius-server vsa send authentication",
"radius-server attribute 1 format ietf upper-case",
"radius-server attribute 4 include-in-access-req",
"radius-server attribute 5 include-in-access-req",
"radius-server attribute 6 on-for-login-auth",
"radius-server attribute 6 support-multiple",
"radius-server attribute 7 include-in-access-req",
"radius-server attribute 8 include-in-access-req",
"radius-server attribute 11 include-in-access-req",
"radius-server attribute 12 include-in-access-req",
"radius-server attribute 24 include-in-access-req",
"radius-server attribute 25 access-request include",
"radius-server attribute 26 include-in-access-req",
"radius-server attribute 31 mac format ietf upper-case",
"radius-server attribute 31 send nas-port-detail",
"radius-server attribute 32 include-in-access-req",
"radius-server attribute 44 include-in-access-req",
"radius-server attribute 61 include-in-access-req",
"radius-server attribute 62 include-in-access-req",
"radius-server attribute 64 include-in-access-req",
"radius-server attribute 65 include-in-access-req",
"radius-server attribute 66 include-in-access-req",
"radius-server attribute 81 include-in-access-req",
"radius-server attribute 82 include-in-access-req",
"radius-server host <SERVER IP ADDRESS> auth-port 1812 acct-port 1813 key RADIUSSecretKey",
"radius-server key RADIUSSecretKey"
],
"description": "RADIUS Configuration"
},
"TACACS+ Configuration with info": {
"prefix": "cTacacsConfig_info",
"scope": "cisco",
"body": [
"! Configure AAA (Authentication, Authorization, and Accounting)",
"aaa new-model",
"",
"! Configure AAA group for TACACS+ server",
"aaa group server tacacs+ MY_TACACS_GROUP",
" server name MY_TACACS_SERVER",
"",
"! Configure authentication methods for TACACS+",
"aaa authentication login LOGIN_USING_TACACS group MY_TACACS_GROUP",
"aaa authentication enable default group MY_TACACS_GROUP",
"",
"! Configure authorization methods for TACACS+",
"aaa authorization exec default group MY_TACACS_GROUP",
"aaa authorization commands 15 default group MY_TACACS_GROUP",
"",
"! Configure TACACS+ server",
"tacacs server MY_TACACS_SERVER",
" address ipv4 <IP ADDRESS>",
" key <TACACS KEY>",
"",
"! Configure VTY lines to use TACACS+ for authentication",
"line vty 0 15",
" login authentication LOGIN_USING_TACACS",
" privilege level 1"
],
"description": "TACACS+ Configuration"
},
"TACACS+ Configuration": {
"prefix": "cTacacsConfig",
"scope": "cisco",
"body": [
"aaa new-model",
"aaa group server tacacs+ MY_TACACS_GROUP",
" server name MY_TACACS_SERVER",
"aaa authentication login LOGIN_USING_TACACS group MY_TACACS_GROUP",
"aaa authentication enable default group MY_TACACS_GROUP",
"aaa authorization exec default group MY_TACACS_GROUP",
"aaa authorization commands 15 default group MY_TACACS_GROUP",
"tacacs server MY_TACACS_SERVER",
" address ipv4 <IP ADDRESS>",
" key <TACACS KEY>",
"line vty 0 15",
" login authentication LOGIN_USING_TACACS",
" privilege level 1"
],
"description": "TACACS+ Configuration"
},
"Configure SNMP with info": {
"prefix": "cpSNMP_info",
"scope": "cisco",
"body": [
"! Run ?snmp command for more information about configuring SNMP",
"",
"! Configure SNMP community string with read-only access and access control",
"snmp-server community <COMMUNITY-STRING> RO <ACCESS-LIST-NUMBER>",
"",
"! Configure SNMP trap source interface",
"snmp-server trap-source <SOURCE-INTERFACE>",
"",
"! Configure SNMP informs source interface",
"snmp-server source-interface informs <INFORMS-INTERFACE>",
"",
"! Enable SNMP traps for link state changes",
"snmp-server enable traps snmp linkdown linkup",
"",
"! Enable SNMP traps for MAC notification changes",
"snmp-server enable traps mac-notification change move threshold",
"",
"! Configure SNMP host for receiving traps",
"snmp-server host <HOST-IP-ADDRESS> version 2c <COMMUNITY-STRING> [mac-notification]",
"",
"! Define access control list (ACL) for SNMP",
"access-list <ACCESS-LIST-NUMBER> permit <ALLOWED-SOURCE-IP>",
"access-list <ACCESS-LIST-NUMBER> deny any",
"",
"! Apply ACL to SNMP community string",
"snmp-server community <COMMUNITY-STRING> use-acl <ACCESS-LIST-NUMBER>",
"",
"! Enable SNMP on the device",
"snmp-server enable"
],
"description": "Configure SNMP settings in Cisco devices"
},
"Configure SNMP": {
"prefix": "cpSNMP",
"scope": "cisco",
"body": [
"snmp-server community <COMMUNITY-STRING> RO <ACCESS-LIST-NUMBER>",
"snmp-server trap-source <SOURCE-INTERFACE>",
"snmp-server source-interface informs <INFORMS-INTERFACE>",
"snmp-server enable traps snmp linkdown linkup",
"snmp-server enable traps mac-notification change move threshold",
"snmp-server host <HOST-IP-ADDRESS> version 2c <COMMUNITY-STRING> [mac-notification]",
"access-list <ACCESS-LIST-NUMBER> permit <ALLOWED-SOURCE-IP>",
"access-list <ACCESS-LIST-NUMBER> deny any",
"snmp-server community <COMMUNITY-STRING> use-acl <ACCESS-LIST-NUMBER>",
"snmp-server enable"
],
"description": "Configure SNMP settings in Cisco devices"
},
"IP SLA icmp-echo configurations with info": {
"prefix": "cpIpSlaIcmpEcho_info",
"scope": "cisco",
"body": [
"! icmp-echo for SLA",
"! \"track\" tracking number and \"ip sla\" numbers are arbitrary",
"ip sla <ip sla ID#>",
" icmp-echo <ip address to ping> source-ip <IP>",
" frequency <# in Seconds (10 is normal)>",
"exit",
"",
"! start service",
"ip sla schedule <ip sla ID#> life forever start-time now",
"",
"! Creating a tracking object of Track ID#",
"track <Track ID#> ip sla <ip sla ID#> reachability",
"",
"!Attaches \"track object\" to route which tells the router to only use this route if the tracking object is up",
"ip route <IP> <SUBNET> <NEXT HOP> track <Track ID#>",
],
"description": "IP SLA icmp-echo configurations"
},
"IP SLA icmp-echo configurations": {
"prefix": "cpIpSlaIcmpEcho",
"scope": "cisco",
"body": [
"ip sla <ip sla ID#>",
" icmp-echo <ip address to ping> source-ip <IP>",
" frequency <# in Seconds (10 is normal)>",
"exit",
"ip sla schedule <ip sla ID#> life forever start-time now",
"track <Track ID#> ip sla <ip sla ID#> reachability",
"ip route <IP> <SUBNET> <NEXT HOP> track <Track ID#>",
],
"description": "IP SLA icmp-echo configurations"
},
"Rapid Per VLAN Spanning Tree + with info": {
"prefix": "cpRpvst+_info",
"scope": "cisco",
"body": [
"spanning-tree mode rapid-pvst",
" ",
"! vlan syntax: Lower Priority number is the prefered route.",
"! Default to Lowest MAC address for Root Bridge",
"! Good convention = Lower priority for all odds on CORE 1 and all evens on CORE 2",
"vlan <VLAN ID>",
"name <CampusData>",
"spanning-tree vlan <VLAN ID, VLAN ID2, VLAN ID3, ...> priority 0",
],
"description": "Rapid Per VLAN Spanning Tree + creation"
},
"Rapid Per VLAN Spanning Tree +": {
"prefix": "cpRpvst+",
"scope": "cisco",
"body": [
"spanning-tree mode rapid-pvst",
"vlan <VLAN ID>",
"name <CampusData>",
"spanning-tree vlan <VLAN ID, VLAN ID2, VLAN ID3, ...> priority 0",
],
"description": "Rapid Per VLAN Spanning Tree + creation"
},
"HSRP standby commands": {
"prefix": "cpStandby",
"scope": "cisco",
"body": [
"standby <DEFAULT GATEWAY VLAN_ID> ip <VIP>",
"standby <DEFAULT GATEWAY VLAN_ID> priority 110",
"standby <DEFAULT GATEWAY VLAN_ID> timers <Seconds for next Hello> <Hold time before switching to backup>",
"!standby <DEFAULT GATEWAY VLAN_ID> preempt"
],
"description": "HSRP standby commands"
},
"VRRP commands": {
"prefix": "cpVrrp",
"scope": "cisco",
"body": [
"vrrp <GROUP_NUMBER> ip <VIP>",
"vrrp <GROUP_NUMBER> priority 110",
"vrrp <GROUP_NUMBER> timers advertise <ADVERTISE_INTERVAL>",
"!vrrp <GROUP_NUMBER> preempt"
],
"description": "VRRP commands"
},
"OSPF Area Configuration": {
"prefix": "cpOspf",
"scope": "cisco",
"body": [
"! Delete the options you dont need.",
"router ospf <PROCESS ID>",
" router-id <IP>",
" redistribute connected subnets",
" redistribute static subnets route-map STATIC-ROUTES",
" redistribute static subnets",
" redistribute <PROTOCOL> metric <METRIC>",
" !default-information originate",
" log-adjacency-changes",
" network <IP> <WILD CARD MASK> area 0",
" network <IP> <WILD CARD MASK> area 1",
" area <AREA ID> authentication message-digest",
" !passive-interface <GigabitEthernet0/1>",
" !passive-interface default",
" !no passive-interface <VLAN INTERFACE>",
" !no passive-interface <PORT CHANNEL INTERFACE>",
" !no passive-interface <INTERFACE>",
"exit",
],
"description": "OSPF Area level Configuration"
},
"OSPF Interface Configuration": {
"prefix": "cpOspfInterface",
"scope": "cisco",
"body": [
"! Illustrates some options for the interface configuration",
"interface <INTERFACE>",
" ip ospf <PROCESS_ID> area <AREA>",
" ip ospf priority <PRIORITY>",
" ip ospf cost <COST>",
" ip ospf hello-interval <HELLO_INTERVAL>",
" ip ospf dead-interval <DEAD_INTERVAL>",
" ip ospf retransmit-interval <RETRANSMIT_INTERVAL>",
" ip ospf network <NETWORK_TYPE>",
" ip ospf authentication message-digest",
" ip ospf message-digest-key <KEY_ID> md5 <SECRET>",
"interface <INTERFACE>",
" ip ospf <PROCESS_ID> area <AREA>",
" ip ospf priority <PRIORITY>",
" ip ospf cost <COST>",
" ip ospf hello-interval <HELLO_INTERVAL>",
" ip ospf dead-interval <DEAD_INTERVAL>",
" ip ospf retransmit-interval <RETRANSMIT_INTERVAL>",
" ip ospf network <NETWORK_TYPE>",
" ip ospf authentication null",
"exit",
],
"description": "OSPF Interface Configuration, showing what can be done at the interface"
},
"EIGRP Configuration": {
"prefix": "cpEigrp",
"scope": "cisco",
"body": [
"router eigrp <AS_NUMBER>",
" eigrp router-id <ROUTER_ID>",
" network <NETWORK> <WILDCARD_MASK>",
" passive-interface default",
" no passive-interface <INTERFACE>",