Mist Switch & Port Operations
Inspect switch ports, compare configs, map stacks to connected APs, find port speeds, profiles, PoE usage, and DNS settings across Mist-managed switches.
Workflow
Step 0 — Resolve org_id and sites
get_mist_self → org_id.
- If user names a site, resolve it by name:
search_mist_data(scope='org', search_type='sites', org_id=..., filters={name:'<site_name>'}) → site_id. Only fetch the full site list (get_mist_config(resource_type='sites', scope='org', org_id=..., limit=200)) when you need a complete site map (e.g., org-wide queries).
- If a specific switch is named, resolve it:
find_mist_entity(org_id=..., query='<switch_name>', entity_types=['device']).
Step 1 — Route by question type
| User intent |
Go to |
| Switchport config comparison (working vs non-working AP) |
Step 2 |
| Switch stacks with connected APs |
Step 3 |
| Active / inactive ports at a site |
Step 4 |
| Ports at 100Mb / APs at 100Mbps |
Step 5 |
| PoE power draw |
Step 5b |
| Switch overrides |
Step 6 |
| DNS servers on switches |
Step 7 |
| MAC auth enabled ports |
Step 8 |
| Port profiles at a site |
Step 9 |
| Devices connected to a specific switch |
Step 10 |
Step 2 — Switchport config comparison
Goal: compare the port config for the ports where a working AP and a non-working AP are connected.
- Resolve both APs by name/MAC:
find_mist_entity(org_id=..., query='<ap_name>').
- Find which switch ports they connect to:
get_mist_stats(stats_type='site_ports', site_id=..., limit=100). Paginate. Look for ports where neighbor_system_name matches the AP hostname.
- Note the switch MAC (
mac field) and port_id for each AP.
- Get the switch device config:
get_mist_config(resource_type='devices', scope='site', site_id=..., resource_id='<switch_device_id>').
- Compare the
port_config entries for the two port_ids. Highlight any differences (VLAN, PoE, profile, speed settings).
Step 3 — Switch stacks with connected APs
- Get port stats:
get_mist_stats(stats_type='site_ports', site_id=..., limit=100). Paginate fully.
- Detect virtual chassis: ports with
vcp- prefix (e.g., vcp-0/1/3, vcp-1/1/3) are virtual chassis inter-member links. Multiple vcp- ports sharing the same mac = a stack. The FPC number in ge-X/0/Y identifies the stack member.
- Filter user-facing ports only (exclude internal ports — see Port field reference below).
- Identify AP connections: ports where
neighbor_system_name is set and matches AP hostnames. Cross-reference with get_mist_stats(stats_type='site_devices', site_id=...) to classify neighbors as APs.
- Present: stack name | member switches (by FPC number) | connected APs (with port, speed, PoE status) | disconnected APs (with last_seen from device stats).
Step 4 — Active / inactive ports
- Get port stats:
get_mist_stats(stats_type='site_ports', site_id=..., limit=100). Paginate fully.
- For a specific switch, filter by
mac (switch MAC). For all switches at site, include all.
- Filter out internal ports (see Port field reference below).
- Active ports:
up=true (link up). Inactive: up=false.
- The
active field indicates recent traffic — up=true but active=false means link is up but no traffic.
- Present: switch name | port_id | up | active | speed | duplex | neighbor | poe_on | power_draw.
Step 5 — Ports at 100Mb / APs at 100Mbps
- Get port stats. If no site specified, use org-level:
get_mist_stats(stats_type='org_ports', org_id=..., limit=100). For a specific site: get_mist_stats(stats_type='site_ports', site_id=..., limit=100). Paginate fully.
- Filter where
speed=100 and up=true. Exclude internal ports.
- Build AP hostname list:
get_mist_stats(stats_type='org_devices', org_id=..., filters={type:'ap'}). Collect all AP hostnames.
- Cross-reference each port's
neighbor_system_name against the AP hostname list. Mark as "AP" if matched, "other" otherwise.
- Present: switch | port_id | speed | neighbor device | type (AP/other).
Step 5b — PoE power draw
- Get port stats (site or org level). Paginate fully.
- Filter ports where
poe_on=true. These ports have a power_draw field (in watts).
- Summarize: total PoE draw per switch, per-port breakdown.
- Present: switch | port_id | neighbor | speed | power_draw (W).
Step 6 — Switch overrides
Overrides are device-level configurations that differ from the assigned template/profile.
- Get switch configs:
get_mist_config(resource_type='devices', scope='site', site_id=...). Filter type='switch'.
- For each switch, look for fields that override the template:
port_config, ip_config, dns_servers, additional_config_cmds, networks, port_mirroring, ntp_servers, mist_nac, etc.
- Any non-empty field on the device config that would normally come from the device profile is an override.
- Present: switch name | overridden fields | values.
Step 7 — DNS servers on switches
- Get all switch configs:
get_mist_config(resource_type='devices', scope='site', site_id=...) or org-wide.
- Extract
dns_servers field from each switch config. Also check ip_config.dns and oob_ip_config.dns.
- Group switches by DNS server set.
- Present: DNS servers | switches using them.
Step 8 — MAC auth enabled ports
- Get switch configs at site:
get_mist_config(resource_type='devices', scope='site', site_id=...).
- For each switch, inspect
port_config. Look for ports where port_auth.type is "dot1x" or "mac_auth", or port_auth.enable_mac_auth is true.
- Present: switch | port_id | auth type | profile/usage.
Step 9 — Port profiles at site
- Get switch configs at site. Inspect
port_config for each switch.
- Each port entry has a
usage field (e.g., "ap", "default", "uplink", custom names).
- Also check
get_mist_config(resource_type='deviceprofiles', scope='org', org_id=...) for org-level port profile definitions.
- Present: profile name/usage | port count | description/settings.
Step 10 — Devices connected to a switch
- Resolve the switch:
find_mist_entity(org_id=..., query='<switch_name>').
- Get its port stats:
get_mist_stats(stats_type='site_ports', site_id=..., filters={mac:'<switch_mac>'}, limit=100). Paginate.
- Filter out internal ports. Extract
neighbor_system_name and neighbor_port_desc from each port.
- Cross-reference with device inventory to classify neighbors (AP, switch, gateway, unknown).
- Present: port_id | neighbor name | neighbor type | speed | poe_on | power_draw | rx_bps/tx_bps.
Port field reference
Fields returned by site_ports / org_ports stats:
| Field |
Description |
mac |
Switch MAC address |
port_id |
Port name (e.g., ge-0/0/1, mge-0/0/0, xe-0/2/0) |
up |
Link state: true = up, false = down |
active |
Recent traffic detected (up + no traffic = active=false) |
speed |
Link speed in Mbps: 100, 1000, 2500, 5000, 10000 |
full_duplex |
true/false |
poe_on |
PoE enabled on this port |
power_draw |
PoE power draw in watts (only present when poe_on=true) |
neighbor_system_name |
LLDP neighbor hostname (only present if LLDP neighbor detected) |
neighbor_port_desc |
LLDP neighbor port description |
rx_bps / tx_bps |
Current throughput in bits per second |
rx_bytes / tx_bytes |
Total bytes transferred |
Port type prefixes:
| Prefix |
Meaning |
ge- |
Gigabit Ethernet (1G copper) |
mge- |
Multi-Gig Ethernet (2.5G/5G/10G copper) |
xe- |
10 Gigabit Ethernet (SFP+) |
et- |
25G/40G/100G Ethernet |
vcp- |
Virtual Chassis Port (inter-member link) |
Internal ports to exclude from user-facing queries: bme0, cbp0, irb, jsrv, pip0, vme, me0, inband-management. These are system/management interfaces — filter them out unless specifically asked.
Pagination
Port stats can be large (646+ ports in an org). Always paginate has_more → next_cursor.
Output
Use canvas for port grid visualizations or stack topology diagrams when data is substantial. Markdown tables for focused queries.
Error handling
| Situation |
Action |
| Switch not found |
Try search_mist_data(search_type='devices', filters={hostname:'...'}) |
| No port stats |
Switch may be disconnected — check device status first |
| Port has no neighbor info |
LLDP not enabled or no device connected on that port |
| Virtual chassis not detected |
Look for vcp- ports in port stats (definitive signal) |
Source: tmunzer-AIDE/mist-skills — distributed by TomeVault.
1---2name: tmunzer-aide-mist-skills-mist-switch-port3description: Mist Switch & Port Operations4---56# Mist Switch & Port Operations78Inspect switch ports, compare configs, map stacks to connected APs, find port speeds, profiles, PoE usage, and DNS settings across Mist-managed switches.910## Workflow1112### Step 0 — Resolve org_id and sites13141. `get_mist_self` → `org_id`.152. If user names a site, resolve it by name: `search_mist_data(scope='org', search_type='sites', org_id=..., filters={name:'<site_name>'})` → `site_id`. Only fetch the full site list (`get_mist_config(resource_type='sites', scope='org', org_id=..., limit=200)`) when you need a complete site map (e.g., org-wide queries).163. If a specific switch is named, resolve it: `find_mist_entity(org_id=..., query='<switch_name>', entity_types=['device'])`.1718### Step 1 — Route by question type1920| User intent | Go to |21|---|---|22| Switchport config comparison (working vs non-working AP) | Step 2 |23| Switch stacks with connected APs | Step 3 |24| Active / inactive ports at a site | Step 4 |25| Ports at 100Mb / APs at 100Mbps | Step 5 |26| PoE power draw | Step 5b |27| Switch overrides | Step 6 |28| DNS servers on switches | Step 7 |29| MAC auth enabled ports | Step 8 |30| Port profiles at a site | Step 9 |31| Devices connected to a specific switch | Step 10 |3233### Step 2 — Switchport config comparison3435Goal: compare the port config for the ports where a working AP and a non-working AP are connected.36371. Resolve both APs by name/MAC: `find_mist_entity(org_id=..., query='<ap_name>')`.382. Find which switch ports they connect to: `get_mist_stats(stats_type='site_ports', site_id=..., limit=100)`. Paginate. Look for ports where `neighbor_system_name` matches the AP hostname.393. Note the switch MAC (`mac` field) and `port_id` for each AP.404. Get the switch device config: `get_mist_config(resource_type='devices', scope='site', site_id=..., resource_id='<switch_device_id>')`.415. Compare the `port_config` entries for the two port_ids. Highlight any differences (VLAN, PoE, profile, speed settings).4243### Step 3 — Switch stacks with connected APs44451. Get port stats: `get_mist_stats(stats_type='site_ports', site_id=..., limit=100)`. Paginate fully.462. **Detect virtual chassis**: ports with `vcp-` prefix (e.g., `vcp-0/1/3`, `vcp-1/1/3`) are virtual chassis inter-member links. Multiple `vcp-` ports sharing the same `mac` = a stack. The FPC number in `ge-X/0/Y` identifies the stack member.473. Filter user-facing ports only (exclude internal ports — see Port field reference below).484. Identify AP connections: ports where `neighbor_system_name` is set and matches AP hostnames. Cross-reference with `get_mist_stats(stats_type='site_devices', site_id=...)` to classify neighbors as APs.495. Present: stack name | member switches (by FPC number) | connected APs (with port, speed, PoE status) | disconnected APs (with last_seen from device stats).5051### Step 4 — Active / inactive ports52531. Get port stats: `get_mist_stats(stats_type='site_ports', site_id=..., limit=100)`. Paginate fully.542. For a specific switch, filter by `mac` (switch MAC). For all switches at site, include all.553. Filter out internal ports (see Port field reference below).564. **Active ports:** `up=true` (link up). **Inactive:** `up=false`.575. The `active` field indicates recent traffic — `up=true` but `active=false` means link is up but no traffic.586. Present: switch name | port_id | up | active | speed | duplex | neighbor | poe_on | power_draw.5960### Step 5 — Ports at 100Mb / APs at 100Mbps61621. Get port stats. If no site specified, use org-level: `get_mist_stats(stats_type='org_ports', org_id=..., limit=100)`. For a specific site: `get_mist_stats(stats_type='site_ports', site_id=..., limit=100)`. Paginate fully.632. Filter where `speed=100` and `up=true`. Exclude internal ports.643. Build AP hostname list: `get_mist_stats(stats_type='org_devices', org_id=..., filters={type:'ap'})`. Collect all AP hostnames.654. Cross-reference each port's `neighbor_system_name` against the AP hostname list. Mark as "AP" if matched, "other" otherwise.665. Present: switch | port_id | speed | neighbor device | type (AP/other).6768### Step 5b — PoE power draw69701. Get port stats (site or org level). Paginate fully.712. Filter ports where `poe_on=true`. These ports have a `power_draw` field (in watts).723. Summarize: total PoE draw per switch, per-port breakdown.734. Present: switch | port_id | neighbor | speed | power_draw (W).7475### Step 6 — Switch overrides7677Overrides are device-level configurations that differ from the assigned template/profile.78791. Get switch configs: `get_mist_config(resource_type='devices', scope='site', site_id=...)`. Filter `type='switch'`.802. For each switch, look for fields that override the template: `port_config`, `ip_config`, `dns_servers`, `additional_config_cmds`, `networks`, `port_mirroring`, `ntp_servers`, `mist_nac`, etc.813. Any non-empty field on the device config that would normally come from the device profile is an override.824. Present: switch name | overridden fields | values.8384### Step 7 — DNS servers on switches85861. Get all switch configs: `get_mist_config(resource_type='devices', scope='site', site_id=...)` or org-wide.872. Extract `dns_servers` field from each switch config. Also check `ip_config.dns` and `oob_ip_config.dns`.883. Group switches by DNS server set.894. Present: DNS servers | switches using them.9091### Step 8 — MAC auth enabled ports92931. Get switch configs at site: `get_mist_config(resource_type='devices', scope='site', site_id=...)`.942. For each switch, inspect `port_config`. Look for ports where `port_auth.type` is `"dot1x"` or `"mac_auth"`, or `port_auth.enable_mac_auth` is true.953. Present: switch | port_id | auth type | profile/usage.9697### Step 9 — Port profiles at site98991. Get switch configs at site. Inspect `port_config` for each switch.1002. Each port entry has a `usage` field (e.g., "ap", "default", "uplink", custom names).1013. Also check `get_mist_config(resource_type='deviceprofiles', scope='org', org_id=...)` for org-level port profile definitions.1024. Present: profile name/usage | port count | description/settings.103104### Step 10 — Devices connected to a switch1051061. Resolve the switch: `find_mist_entity(org_id=..., query='<switch_name>')`.1072. Get its port stats: `get_mist_stats(stats_type='site_ports', site_id=..., filters={mac:'<switch_mac>'}, limit=100)`. Paginate.1083. Filter out internal ports. Extract `neighbor_system_name` and `neighbor_port_desc` from each port.1094. Cross-reference with device inventory to classify neighbors (AP, switch, gateway, unknown).1105. Present: port_id | neighbor name | neighbor type | speed | poe_on | power_draw | rx_bps/tx_bps.111112## Port field reference113114Fields returned by `site_ports` / `org_ports` stats:115116| Field | Description |117|---|---|118| `mac` | Switch MAC address |119| `port_id` | Port name (e.g., `ge-0/0/1`, `mge-0/0/0`, `xe-0/2/0`) |120| `up` | Link state: true = up, false = down |121| `active` | Recent traffic detected (up + no traffic = `active=false`) |122| `speed` | Link speed in Mbps: 100, 1000, 2500, 5000, 10000 |123| `full_duplex` | true/false |124| `poe_on` | PoE enabled on this port |125| `power_draw` | PoE power draw in watts (only present when `poe_on=true`) |126| `neighbor_system_name` | LLDP neighbor hostname (only present if LLDP neighbor detected) |127| `neighbor_port_desc` | LLDP neighbor port description |128| `rx_bps` / `tx_bps` | Current throughput in bits per second |129| `rx_bytes` / `tx_bytes` | Total bytes transferred |130131**Port type prefixes:**132133| Prefix | Meaning |134|---|---|135| `ge-` | Gigabit Ethernet (1G copper) |136| `mge-` | Multi-Gig Ethernet (2.5G/5G/10G copper) |137| `xe-` | 10 Gigabit Ethernet (SFP+) |138| `et-` | 25G/40G/100G Ethernet |139| `vcp-` | Virtual Chassis Port (inter-member link) |140141**Internal ports to exclude from user-facing queries:** `bme0`, `cbp0`, `irb`, `jsrv`, `pip0`, `vme`, `me0`, `inband-management`. These are system/management interfaces — filter them out unless specifically asked.142143## Pagination144145Port stats can be large (646+ ports in an org). Always paginate `has_more` → `next_cursor`.146147## Output148149Use canvas for port grid visualizations or stack topology diagrams when data is substantial. Markdown tables for focused queries.150151## Error handling152153| Situation | Action |154|---|---|155| Switch not found | Try `search_mist_data(search_type='devices', filters={hostname:'...'})` |156| No port stats | Switch may be disconnected — check device status first |157| Port has no neighbor info | LLDP not enabled or no device connected on that port |158| Virtual chassis not detected | Look for `vcp-` ports in port stats (definitive signal) |159160---161> Source: [tmunzer-AIDE/mist-skills](https://github.com/tmunzer-AIDE/mist-skills) — distributed by [TomeVault](https://tomevault.io).162<!-- tomevault:4.0:skill_md:2026-06-16 -->