-
Notifications
You must be signed in to change notification settings - Fork 0
/
switch-config-template.underscore
168 lines (163 loc) · 6.04 KB
/
switch-config-template.underscore
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
config-file-header
<%= hostname %>
v1.1.0.21
CLI v1.0
set system
@
port jumbo-frame
vlan database
vlan 1,10-11,16-24
exit
voice vlan oui-table add 0001e3 Siemens_AG_phone________
voice vlan oui-table add 00036b Cisco_phone_____________
voice vlan oui-table add 00096e Avaya___________________
voice vlan oui-table add 000fe2 H3C_Aolynk______________
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone___________
voice vlan oui-table add 00e075 Polycom/Veritel_phone___
voice vlan oui-table add 00e0bb 3Com_phone______________
hostname <%= hostname %>
//username admin password encrypted 6788996e52ad807ef040c95d3deb23dcc40f8ebc privilege 15
snmp-server server
snmp-server location <%= location %>
snmp-server community <%= snmppassword%> ro view Default
clock timezone " " 0 minutes 0
clock source sntp
sntp unicast client enable
sntp unicast client poll
sntp server ntp.pax.lan poll
ip name-server 10.10.0.1
!
!
interface vlan 1
ip address <%= ip %> 255.255.0.0
no ip address dhcp
!
interface vlan 10
name Internet
!
interface vlan 11
name Servers
!
interface vlan 12
name Servers
!
interface vlan 13
name WiFI
!
interface vlan 14
name BYOCWifi
!
interface vlan 20
name Byoc
!
interface vlan 21
name pcfp
!
interface vlan 22
name VR
!
interface vlan 23
name CFP
!
interface vlan 24
name Royale
!
<%
// Write out each port's configuration
_.range(1,num_access_ports+1).forEach((portnum) => { %>
interface gigabitethernet<%= portnum %>
storm-control broadcast enable
storm-control broadcast level kbps 400000
storm-control include-multicast unknown-unicast
switchport mode access
switchport access vlan <%= access_vlan %>
!
<%
})
var ten_gig_uplinks = num_ten_gig_ports > 0;
var port_channel_link_type = (ten_gig_uplinks ? "ten" : "") + "gigabitethernet"
// Calculate the trunk ports
first_trunk = ten_gig_uplinks ? 1 : num_access_ports + 1;
last_trunk = ten_gig_uplinks ? 2 : num_access_ports+num_trunk_ports;
_.range(first_trunk, last_trunk+1).forEach((portnum) => {
%>
interface <%= port_channel_link_type + portnum %>
channel-group 1 mode auto
!
<% }) %>
interface Port-channel1
switchport trunk allowed vlan add <%= uplink_trunk_vlans.join(",") %>
!
exit
ip default-gateway 10.10.0.1
crypto certificate 1 import
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQD2SfCJtQizfadspIV9xvwhlGk/ybZG9A0ur5vuruL9/zTR4U+V2q+gYs
m2/J3J6U9OkiJW7SF0UpETSkKwM7bUNsa86raMLHwZoa9by+5GCqg6GHlNz4bRYOkhr61n
rEEwjjKu2zIuOmFls79Los4FGHsaF/B8F1uQKCHYEhyQ+QIDAQABAoGAVCwE9ytV4/InzC
uWK9xbwyYzqkdH8ovqDXCa/EHs9h3IcYptZquspkXc5psDWkRQhGvRLKAydMzbJBqXHB0w
eD70he3KJF3XyFkjvFXRB4pTwM3p8FUapkLPM13egOOGirFA5ZmWdcDo2p/2529/R+JCjC
DWCmzOHF6uYiZasLkCQQD9P16nwZf1n4XqX0LXMDD/+Hz4rWC85+KPQe03MTBqzgB9Filr
/b++p6lsqeb/d485mi1CNzRL8m57VUI0bnbzAkEA+Pc1RX5QIZnTdbTAoh0jVgnWNFyB8V
Oef3sEIlSXm1a5wAMAKOmBtw+fa4bIEiafjFREpN8qo7K5hP4idt9rYwJBANKu95ZkjoE/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EAATANBgkqhkiG9w0BAQUFAAOBgQBc3EMZ+u8RRGJ9ih9Yprac
/uPAlPrUFJszLOxwQOr2meeqfHDVOZp167bq0AZzeJ4xD9PnYLvOo4BcPiro/bG1
VqAF8aLF9orJQEMO9obQYfalsjUh1z4mysIt+cX+0w/hOf+7HdCKx18+wbcviXpj
lb4CaBb6adWDMWau0n1dFg==
-----END CERTIFICATE-----
.
crypto certificate 2 import
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC7pd02vMDGv8rLDobdjGRciz4P8F3jcR++5syjng5F2VbLRwfqf9sRyq
2MREUWIHasp5hxaod+uCVnueD+iDUyrCK92mmXFtcj/u0D5J+HZYHys/1wB2g0F1skYI4j
UeRaDqWikjqO5dZvvxmAKNXtbLeppxa5m5JPSt4OhGjpEwIDAQABAoGBAJkTB1BdzgzT7E
SVRyN4IW71D93EwXKGl9UNRia7Cv2j/I+7FBQR1M3Avq5MCuev99+EoHD07C9NXQYutgIt
bubPsCaxSjh2Cha7JDDRmfHv4wg7UuuhIhpqA/LSB8JMMfobIeErrb0fhbvahnINMcPFiF
JPhmugjS2ZXpUA8R9RAkEA3mXj5WgOBnaKxfeY9fLWApWB9lpd84SEPVFDLzATFMojLhQM
epJjY/FN+z6tHYKDn8To6cftD9WVtL0S/zI2VQJBANf/4NYAT42wOgqaIYRPVuyCnXkFyO
GXw3IKlZfKIKdY3+KNGlURtoxeOaOWutrPZpYLIHiKzWS+7UobSE9o+ccCQFRMGKLW2yIW
AqnhHMh04Cugkd9YB26LVziKucWEGmdx6v3HOaeoHyY9y8okyqd51fxUPdiHIFM1KQaV+E
JkvPUCQQC1qdggRCykXxXBuvX7gHr7+bKViZ701R4k+O/ttKsX9DCAKup9p6MflVPm2SuY
Qhzmjr8lgp/SXp3V2PJND14bAkBh6tXPWeXO6FP/xalHdpkDLZQCrYgMsuvR6BUl1DnJfG
rkvVUqVeUX3OO9Ii7egXrIhzE3hm9sl6QjPkwv5JqJ
-----END RSA PRIVATE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