-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitches_config.json
More file actions
268 lines (254 loc) · 12.2 KB
/
switches_config.json
File metadata and controls
268 lines (254 loc) · 12.2 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
{
"network": {
"interface": "vmbr0",
"network_cidr": "192.168.0.0/18",
"dhcp_start": "192.168.3.1",
"dhcp_end": "192.168.8.254"
},
"switches": [
{ "id": 1, "ip": "192.168.1.1", "model_id": "HUAWEI_VRP" },
{ "id": 2, "ip": "192.168.1.2", "model_id": "HUAWEI_VRP" },
{ "id": 3, "ip": "192.168.1.3", "model_id": "HUAWEI_VRP" },
{ "id": 4, "ip": "192.168.1.4", "model_id": "HUAWEI_VRP" },
{ "id": 5, "ip": "192.168.1.5", "model_id": "HUAWEI_VRP" },
{ "id": 6, "ip": "192.168.1.6", "model_id": "HUAWEI_VRP" },
{ "id": 7, "ip": "192.168.1.7", "model_id": "HUAWEI_VRP" },
{ "id": 8, "ip": "192.168.1.8", "model_id": "HUAWEI_VRP" },
{ "id": 9, "ip": "192.168.0.4", "model_id": "HP_COMWARE5", "snmp": { "enabled": true, "version": "2c", "port": 161 } },
{ "id": 10, "ip": "192.168.0.5", "model_id": "NETGEAR_PROSAFE", "snmp": { "enabled": true, "version": "2c", "port": 161 } },
{ "id": 11, "ip": "192.168.0.6", "model_id": "NETGEAR_PROSAFE", "snmp": { "enabled": true, "version": "2c", "port": 161 } }
],
"models": [
{
"id": "HUAWEI_VRP",
"brand": "Huawei",
"description": "Huawei VRP — S310, S5700, S5720, S6720, S5300, CE series",
"mac_format": "huawei",
"port_keywords": ["GE", "ETH", "XGE"],
"uplink_keywords": ["10GE", "XGE"],
"error_strings": ["Error:", "Unrecognized command", "Wrong parameter"],
"commands": {
"find_mac": "display mac-address {mac}",
"port_config": "display current-configuration interface {port}",
"port_state": "display interface {port} | include current state",
"port_vlan": "display port vlan {port}",
"port_errors": "display interface {port} | include errors",
"arp_lookup": "display arp | include {mac}",
"lldp_neighbors": "display lldp neighbor interface {port} brief",
"poe_status": "display poe power interface {port}",
"version": "display version | include VRP",
"cpu_usage": "display cpu-usage"
}
},
{
"id": "CISCO_IOS",
"brand": "Cisco",
"description": "Cisco IOS / IOS-XE — Catalyst 2960, 3560, 3750, 3850, 9200, 9300, 9500",
"mac_format": "cisco",
"port_keywords": ["Gi", "Fa", "Te", "Twe", "Eth", "Hu"],
"uplink_keywords": ["Te", "Twe", "Hu", "fo"],
"error_strings": ["Invalid input", "Incomplete command", "Ambiguous command"],
"commands": {
"find_mac": "show mac address-table address {mac}",
"port_config": "show running-config interface {port}",
"port_state": "show interfaces {port} | include line protocol",
"port_vlan": "show interfaces {port} switchport | include Access Mode VLAN",
"port_errors": "show interfaces {port} | include input errors",
"arp_lookup": "show ip arp | include {mac}",
"lldp_neighbors": "show lldp neighbors {port} detail",
"poe_status": "show power inline {port}",
"version": "show version | include Cisco IOS",
"cpu_usage": "show processes cpu sorted | head 5"
}
},
{
"id": "CISCO_NXOS",
"brand": "Cisco",
"description": "Cisco NX-OS — Nexus 5000, 7000, 9000 series",
"mac_format": "cisco",
"port_keywords": ["Eth", "eth", "Po"],
"uplink_keywords": ["Po", "Eth1/1", "Eth2/"],
"error_strings": ["Invalid command", "Incomplete command"],
"commands": {
"find_mac": "show mac address-table address {mac}",
"port_config": "show running-config interface {port}",
"port_state": "show interface {port} brief",
"port_vlan": "show interface {port} switchport | include Access Mode VLAN",
"port_errors": "show interface {port} counters errors",
"arp_lookup": "show ip arp | include {mac}",
"lldp_neighbors": "show lldp neighbors interface {port} detail",
"poe_status": "show power inline {port}",
"version": "show version | include NXOS",
"cpu_usage": "show processes cpu sorted | head 5"
}
},
{
"id": "ARUBA_AOS_S",
"brand": "Aruba / HPE",
"description": "Aruba AOS-S / HPE ProCurve — 2530, 2930, 3810, 5400 series",
"mac_format": "colon",
"port_keywords": ["/"],
"uplink_keywords": ["Trk", "lag", "LACP"],
"error_strings": ["Invalid input", "Command not found"],
"commands": {
"find_mac": "show mac-address {mac}",
"port_config": "show running-config interface {port}",
"port_state": "show interfaces {port} | include Status",
"port_vlan": "show vlans ports {port}",
"port_errors": "show interfaces {port} | include errors",
"arp_lookup": "show arp | include {mac}",
"lldp_neighbors": "show lldp info remote-device {port}",
"poe_status": "show power-over-ethernet {port}",
"version": "show system | include Software",
"cpu_usage": "show cpu"
}
},
{
"id": "ARUBA_AOS_CX",
"brand": "Aruba / HPE",
"description": "Aruba AOS-CX — CX 6200, 6300, 6400, 8320, 8400 series",
"mac_format": "colon",
"port_keywords": ["/"],
"uplink_keywords": ["lag", "1/1/1", "1/1/2"],
"error_strings": ["Unknown command", "Invalid"],
"commands": {
"find_mac": "show mac-address-table address {mac}",
"port_config": "show running-config interface {port}",
"port_state": "show interface {port} | include link state",
"port_vlan": "show interface {port}",
"port_errors": "show interface {port} | include errors",
"arp_lookup": "show arp | include {mac}",
"lldp_neighbors": "show lldp neighbor-info {port}",
"poe_status": "show poe interface {port}",
"version": "show version | include AOS-CX",
"cpu_usage": "show system resource-utilization"
}
},
{
"id": "JUNIPER_JUNOS",
"brand": "Juniper",
"description": "Juniper JunOS — EX2300, EX3400, EX4300, EX9200 series",
"mac_format": "colon",
"port_keywords": ["ge-", "xe-", "et-", "fe-"],
"uplink_keywords": ["xe-", "et-"],
"error_strings": ["unknown command", "syntax error"],
"commands": {
"find_mac": "show ethernet-switching table | match {mac}",
"port_config": "show configuration interfaces {port}",
"port_state": "show interfaces {port} brief",
"port_vlan": "show interfaces {port} | match vlan",
"port_errors": "show interfaces {port} statistics | match errors",
"arp_lookup": "show arp | match {mac}",
"lldp_neighbors": "show lldp neighbors interface {port}",
"poe_status": "show poe interface {port}",
"version": "show version | match Junos",
"cpu_usage": "show system processes extensive | head 5"
}
},
{
"id": "MIKROTIK_ROS",
"brand": "MikroTik",
"description": "MikroTik RouterOS — CRS, CSS and CCR series",
"mac_format": "colon",
"port_keywords": ["ether", "sfp", "bridge", "bonding"],
"uplink_keywords": ["sfp", "sfp-plus", "sfp-sfpplus", "bonding"],
"error_strings": ["bad command", "no such item", "syntax error"],
"commands": {
"find_mac": "/interface bridge host print where mac-address={mac}",
"port_config": "/interface print detail where name={port}",
"port_state": "/interface print detail where name={port}",
"port_vlan": "/interface bridge vlan print where bridge=bridge",
"port_errors": "/interface ethernet print stats where name={port}",
"arp_lookup": "/ip arp print where mac-address={mac}",
"lldp_neighbors": "/ip neighbor print where interface={port}",
"poe_status": "/interface ethernet poe print where name={port}",
"version": "/system resource print",
"cpu_usage": "/system resource print"
}
},
{
"id": "DLINK_CLI",
"brand": "D-Link",
"description": "D-Link CLI — DGS-1210, DGS-3000, DXS-3600 enterprise series",
"mac_format": "colon",
"port_keywords": ["1", "2", "3", "4", "5", "6", "7", "8"],
"uplink_keywords": ["25", "26", "27", "28"],
"error_strings": ["Command not found", "Available commands", "Error"],
"commands": {
"find_mac": "show fdb mac_address {mac}",
"port_config": "show config current_config ports {port}",
"port_state": "show ports {port}",
"port_vlan": "show vlan ports {port}",
"port_errors": "show error ports {port}",
"arp_lookup": "show arpentry mac {mac}",
"lldp_neighbors": "show lldp neighbor_info ports {port}",
"poe_status": "show inline_power ports {port}",
"version": "show switch",
"cpu_usage": "show utilization cpu"
}
},
{
"id": "TPLINK_JETSTREAM",
"brand": "TP-Link",
"description": "TP-Link JetStream — T1600G, T2600G, T3700G enterprise series",
"mac_format": "colon",
"port_keywords": ["Gi", "Te", "GigabitEthernet", "TenGigabitEthernet"],
"uplink_keywords": ["Te", "TenGigabitEthernet"],
"error_strings": ["Unrecognized command", "Invalid"],
"commands": {
"find_mac": "show mac-address-table address {mac}",
"port_config": "show interface GigabitEthernet {port}",
"port_state": "show interface GigabitEthernet {port}",
"port_vlan": "show interface GigabitEthernet {port}",
"port_errors": "show interface GigabitEthernet {port}",
"arp_lookup": "show arp | include {mac}",
"lldp_neighbors": "show lldp neighbors-information interface GigabitEthernet {port}",
"poe_status": "show power inline interface GigabitEthernet {port}",
"version": "show version",
"cpu_usage": "show cpu-usage"
}
},
{
"id": "HP_COMWARE5",
"brand": "HP / H3C",
"description": "HP Comware 5 (H3C-based) — V1910, V1905, E4200, A5500 series (JE006A, JE009A, etc.)",
"mac_format": "huawei",
"port_keywords": ["GE", "GigabitEthernet", "Eth"],
"uplink_keywords": ["XGE", "Ten-GigabitEthernet", "Bridge-Aggregation"],
"error_strings": ["Unrecognized command", "Wrong parameter", "Incomplete command"],
"commands": {
"find_mac": "display mac-address {mac}",
"port_config": "display current-configuration interface {port}",
"port_state": "display interface {port} | include current state",
"port_vlan": "display port vlan {port}",
"port_errors": "display interface {port} | include error",
"arp_lookup": "display arp | include {mac}",
"lldp_neighbors": "display lldp neighbor-information interface {port} brief",
"poe_status": "display poe interface {port}",
"version": "display version | include Comware",
"cpu_usage": "display cpu-usage"
}
},
{
"id": "NETGEAR_PROSAFE",
"brand": "NETGEAR",
"description": "NETGEAR ProSAFE Smart/Managed — XS724TM, XS728T, XS748T, M4300, M5300 series",
"mac_format": "colon",
"port_keywords": ["0/", "1/0/", "2/0/", "3/0/"],
"uplink_keywords": ["3/0/", "lag", "po"],
"error_strings": ["Invalid input", "Unknown command", "Ambiguous command"],
"commands": {
"find_mac": "show mac-address-table address {mac}",
"port_config": "show running-config interface {port}",
"port_state": "show interfaces {port} | include Link",
"port_vlan": "show interfaces {port} switchport",
"port_errors": "show interfaces {port} | include error",
"arp_lookup": "show arp | include {mac}",
"lldp_neighbors": "show lldp neighbors {port} detail",
"poe_status": "show power inline {port}",
"version": "show version | include Software",
"cpu_usage": "show process cpu"
}
}
]
}